Tag Info

Hot answers tagged

2

Go to your domain and type /wp-admin and log on with your username and password. http//www.yourdomain.com/wp-admin Then go to appearance, themes and then activate your theme. If it's not already installed you can either drag your theme to the wp-content/themes folder or install it from within the themes area.


1

I would agree that current_user_can('Administrator') should return true for the user. However, current_user_can is primarily intended to check for capabilities, which is generally a more robust check to be making. I'd suggest something like this (untested): if ( current_user_can( 'activate_plugins' ) && ! current_user_can( 'update_core' ) ) { //... ...


1

If you dont want 'TopLevel' menu to represent a custom page you can use: add_menu_page( 'TopLevel', 'TopLevel', 'MENU_CAP_LVL', 'MENU_SLUG', 'MENU_CB' ); add_submenu_page( 'MENU_SLUG', 'SubMenu', 'SubMenu', 'MENU_CAP_LVL', 'SUB_MENU_SLUG', 'SUB_MENU_CB' ); add_submenu_page( 'MENU_SLUG', 'SubMenu-A', 'SubMenu-A', 'MENU_CAP_LVL', 'SUB_MENU_A_SLUG', ...


1

I got it to work as follows -- in mu-plugins directory, my superAdmin.php script looks like this: <?php function check_for_superAdmin($user_login, $user) { $current_user = get_userdatabylogin($user_login); if ( is_super_admin( $current_user->ID ) ) { // do these things } else { // do other things } } add_action( 'wp_login', ...


1

It's easier then you thought! Just add this code to the functions.php file in your theme. function prefix_set_default_editor() { return 'text'; } add_filter( 'wp_default_editor', 'prefix_set_default_editor' );



Only top voted, non community-wiki answers of a minimum length are eligible