Last active
May 22, 2017 08:41
-
-
Save adrianvalenz/69e85e340eb8204ef84c67f86572f6a2 to your computer and use it in GitHub Desktop.
place this after initial php open tag to update the site's url
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 characters
update_option( 'siteurl', 'http://example.com' ); | |
update_option( 'home', 'http://example.com' ); | |
// Allow editors to see Appearance menu | |
$role_object = get_role( 'editor' ); | |
$role_object->add_cap( 'edit_theme_options' ); | |
function hide_menu() { | |
// Hide theme selection page | |
remove_submenu_page( 'themes.php', 'themes.php' ); | |
// Hide widgets page | |
remove_submenu_page( 'themes.php', 'widgets.php' ); | |
// Hide customize page | |
global $submenu; | |
unset($submenu['themes.php'][6]); | |
} | |
add_action('admin_head', 'hide_menu'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment