-
Notifications
You must be signed in to change notification settings - Fork 0
Reset Custom Post Types
hofmannsven edited this page Nov 7, 2014
·
2 revisions
With v1.1.2 of the Mark Posts Plugin we've implemented the filter mark_posts_excluded_post_types
to exclude or include (custom) post types within the mark posts settings.
To use the markers within the media library (for attachments) one can reset the excluded post types by adding the following filter to the functions.php
:
add_filter( 'mark_posts_excluded_post_types', 'reset_custom_marker_post_types' );
function reset_custom_marker_post_types() {
return array( 'revision', 'nav_menu_item' );
}
The filter above will enable Attachments within the settings:
It's also possible to completely prevent usage for any other post type e.g. Posts:
add_filter( 'mark_posts_excluded_post_types', 'reset_custom_marker_post_types' );
function reset_custom_marker_post_types() {
return array( 'post', 'attachment', 'revision', 'nav_menu_item' );
}
Note: The usage of markers in combintion with revision
or nav_menu_item
is not yet supported.
Mark-Posts Plugin: https://wordpress.org/plugins/mark-posts/