-
Notifications
You must be signed in to change notification settings - Fork 2
Custom Marker Limits
Sven edited this page Jun 20, 2020
·
4 revisions
As of version 1.0.4 of the Mark Posts Plugin we've implemented the filter mark_posts_marker_limit
to allow custom marker limits.
Restricted markers will only be available to users with at least the defined capability.
Note: Markers with no custom limit are available to all users!
The filter takes an array with the name of your marker and the depending user capability:
'marker name' => 'user capability',
You can add the filter to your themes functions.php
like this:
add_filter( 'mark_posts_marker_limit', 'set_custom_marker_limit' );
function set_custom_marker_limit() {
$marker_limit = [
// 'marker name' => 'user capability',
'Final' => 'activate_plugins',
'Review' => 'edit_posts'
];
return $marker_limit;
}
In detail information about user roles and capabilities can be found at the Capability vs. Role Table
Mark-Posts Plugin: https://wordpress.org/plugins/mark-posts/