We are trying to force the Filtered Post Types & Filtered Taxonomies throughout all sites in our network.
Here are the check boxes we need checked:
Filtered Post Types Modify permissions for these Post Types:
☑ Dashboard Notes
☑ Events
☑ Media
☑ Pages
☑ Posts
Shortcodes
Slides
Filtered Taxonomies Modify permissions for these Taxonomies:
☑ Categories
☑ Event Categories
☑ Event Locations
Format
☑ Media Categories
☑ Tags
We are trying this code below but getting an error = Warning: Illegal string offset ‘page’ in /var/www/html/wp-content/themes/cms3/functions.php on line 109 Warning: Illegal string offset ‘post’ in /var/www/html/wp-content/themes/cms3/functions.php on line 110 Warning: Illegal string offset ‘attachment’ in /var/www/html/wp-content/themes/cms3/functions.php on line 111 Warning: Illegal string offset ‘event’ in /var/www/html/wp-content/themes/cms3/functions.php on line 119
// Press Permit: Force options and block/disregard manual settings
function my_pp_options( $options ) {
// Default Filtered Post Types checkboxes
$options[“pp_enabled_post_types”][“page”] = true; // NOT WORKING
$options[“pp_enabled_post_types”][“post”] = true; // NOT WORKING
$options[“pp_enabled_post_types”][“attachment”] = true; // NOT WORKING
// Default Filtered Taxonomies checkboxes
$options[“pp_enabled_taxonomies”][“category”] = true;
$options[“pp_enabled_taxonomies”][“post_tag”] = true;
// Events Maker Plugin
if (is_plugin_active( ‘events-maker/events-maker.php’ ) ) {
// Filtered Post Types checkboxes
$options[“pp_enabled_post_types”][“event”] = true; // NOT WORKING
// Filtered Taxonomies checkboxes
$options[“pp_enabled_taxonomies”][“event-category”] = true;
$options[“pp_enabled_taxonomies”][“event-location”] = true;
}
// Enhanced Media Library
if (is_plugin_active( ‘enhanced-media-library/enhanced-media-library.php’ ) ) {
// Filtered Taxonomies checkboxes
$options[“pp_enabled_taxonomies”][“media_category”] = true;
}
return $options;
}
add_filter( ‘pp_hide_options’, ‘my_pp_options’, 99 );
add_filter( ‘pp_options’, ‘my_pp_options’, 99 );
Is this a bug or are we doing something wrong?
Thanks
David