Skip to content

[Resolved] Force Filtered Post Types & Filtered Taxonomies

Home Forums Developer Support Force Filtered Post Types & Filtered Taxonomies

This topic contains 5 replies, has 2 voices, and was last updated by 1 year, 8 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #22305 Reply

    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

    #22308 Reply

    [ login required ]

    #22320 Reply

    [ login required ]

    #22323 Reply

    [ login required ]

    #22329 Reply

    [ login required ]

    #22338 Reply

    [ login required ]

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

Registered members have full access to Pro support forums here.

Feel free to log in or purchase a support key.