Changes between Initial Version and Version 1 of Ticket #12955, comment 76
- Timestamp:
- 05/02/2018 08:06:20 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #12955, comment 76
initial v1 12 12 That said, the more I think about it the more I think this concern primarily applies to built-in post types and not to custom post types that are implemented for a specific plugin or specific site. Those we should be able to extend without too much concern. 13 13 14 So consider the following proposal: We added a private "lock" array to WP_Post that defaults to all the built-in post types and a method that allows checking it a post type is locked. If a post type is not locked the mthe `get_post` filter would not reset to clean `WP_Post` but if it is locked it would trigger an error.14 So consider the following proposal: We added a private "lock" array to WP_Post that defaults to all the built-in post types and a method that allows checking it a post type is locked. If a post type is not locked then the `get_post` filter would not reset to clean `WP_Post` but if it is locked it would trigger an error. 15 15 16 16 Then we could also add a method that allows adding post types to the lock array so that plugins like WooCommerce could lock their post types when loading too.