Opened 3 years ago

Last modified 11 months ago

#14077 new enhancement

Add support for removal of multiple features from a post type in remove_post_type_support

Reported by: Utkarsh Owned by:
Priority: normal Milestone: Future Release
Component: Post Types Version: 3.0
Severity: minor Keywords: has-patch
Cc: admin@…

Description

From this thread

add_post_type_support allows an array to be passed as the 2nd parameter, but remove_post_type_support doesn't.

The patch attached adds the functionality.

Attachments (4)

14077.diff (971 bytes) - added by Utkarsh 3 years ago.
14077_2.diff (975 bytes) - added by edwardw 20 months ago.
Update of Utkarsh's previous patch
14077.3.diff (1.0 KB) - added by jeremyfelt 11 months ago.
Refreshed patch
14077.4.diff (2.3 KB) - added by SergeyBiryukov 11 months ago.
Brings similar formatting cleanup to add_post_type_support() for consistency

Download all attachments as: .zip

Change History (11)

Utkarsh3 years ago

  • Cc admin@… added
  • Keywords needs-testing added; needs removed
  • Milestone changed from Unassigned to 3.1
  • Keywords needs-refresh added; needs-testing removed
  • Milestone changed from Awaiting Triage to Future Release

Patch doesn't adhere to coding standards. Needs whitespace, also, the cast should probably be within the foreach directly.

Update of Utkarsh's previous patch

  • Keywords has-patch dev-feedback added; needs-refresh removed

Updated Utkarsh's previous patch to current SVN and formatted.

  • Component changed from General to Post Types
  • Keywords dev-feedback removed
  • Type changed from defect (bug) to enhancement

Closed #21224 as duplicate. Would be nice to get some traction on this in 3.5.

Refreshed patch

Refreshed previous patch with additional code formatting in 14077.3.diff.

Tested remove_post_type_support() with both a single string and an array of features and works.

Brings similar formatting cleanup to add_post_type_support() for consistency

Note: See TracTickets for help on using tickets.