• Resolved y2kand13

    (@y2kand13)


    The following code added to function file is the stated way to provide access to the customizer for users with “edit_posts” capabilities.

    ********************************

    function allow_users_who_can_edit_posts_to_customize( $caps, $cap, $user_id ) {
        $required_cap = 'edit_posts';
        if ( 'customize' === $cap && user_can( $user_id, $required_cap ) ) {
            $caps = array( $required_cap );
        }
        return $caps;
    }
    add_filter( 'map_meta_cap', 'allow_users_who_can_edit_posts_to_customize', 10, 3 );

    ********************************

    The Probblem; Outside of the admin, eligible users are shown the customizer link in the toolbar, but when they click the link they get “Cheating,’uh” accusation rather than the customizer.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Allow Non-administrators to Access the Customizer (Not Working)’ is closed to new replies.