Created
December 21, 2016 16:13
-
-
Save d4mation/f72bde54d532960d35045ac22c06e90d to your computer and use it in GitHub Desktop.
Revisions
-
d4mation revised this gist
Dec 21, 2016 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ */ add_action( 'customize_register', 'add_site_identity_for_non_admins' ); function add_site_identity_for_non_admins( $wp_customize ) { $wp_customize->get_setting( 'blogname' )->capability = 'edit_theme_options'; $wp_customize->get_setting( 'blogdescription' )->capability = 'edit_theme_options'; $wp_customize->get_setting( 'site_icon' )->capability = 'edit_theme_options'; } -
d4mation created this gist
Dec 21, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ <?php /** * Allows certain Customizer Settings to not require `manage_options` * Since no one wants to give Clients Admin Access if they don't have to. * * You will need to grant them `edit_theme_options` for this example, which will also give them access to the Customizer */ add_action( 'customize_register', 'add_site_identity_for_non_admins' ); function add_site_identity_for_non_admins( $wp_customize ) { $wp_customize->get_setting( 'blogname' )->capability = 'edit_theme_options'; $wp_customize->get_setting( 'blogdescription' )->capability = 'edit_theme_options'; $wp_customize->get_setting( 'site_icon' )->capability = 'edit_theme_options'; }