WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#11703 closed enhancement (fixed)

Allow for register_post_type() to enable/disable revisioning of new post_Types

Reported by: dd32 Owned by: dd32
Priority: normal Milestone: 3.0
Component: Revisions Version: 3.0
Severity: normal Keywords: has-patch
Cc: mikeschinkel@…

Description

At present, Only pages and posts are allowed to be revisioned, It'd be good to leverage the revisioning system for custom post types.

I personally think that it should be disabled by default for post types, and enabled specifically.

I'll submit a patch to this effect at some point.

Attachments (3)

11703.diff (1.4 KB) - added by dd32 3 years ago.
11703.2.diff (9.1 KB) - added by dd32 3 years ago.
11703.3.diff (9.2 KB) - added by dd32 3 years ago.

Download all attachments as: .zip

Change History (8)

dd323 years ago

comment:1 dd323 years ago

  • Keywords has-patch added; needs-patch removed

attachment 11703.diff added

  • Only changes the backend, Doesnt touch the front end implications.
  • Need to verify if any front end functionalities need to be modified to allow it
    • Pretty sure that the meta boxes will need updating once the Post Type UI goes in

comment:2 dd323 years ago

  • Keywords needs-patch added; has-patch removed
  • Owner set to dd32
  • Status changed from new to assigned

This depends on the talk for Post_type_supports() chat over in #9674 as well.

Patch is now stale, Will update it when the above is sorted out..

comment:3 mikeschinkel3 years ago

  • Cc mikeschinkel@… added

dd323 years ago

dd323 years ago

comment:4 dd323 years ago

  • Keywords has-patch added; needs-patch removed

attachment 11703.3.diff added

Implements revisions for all post types that specifically support 'revisions'

Implements passing an array (or string) 'supports' in the args of register_post_type to allow for register-time registering of what features the post type supports.

Could do with a singular/plural form of the post type..

Leaving here for review by anyone who's interested.

comment:5 dd323 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [12751]) Introduce Revisioning for custom Post Types, Introduce 'supports' argument to register_post_type() to wrap add_post_type_support(), Whitespace additions to create_initial_post_types(). See #9674. Fixes #11703

Note: See TracTickets for help on using tickets.