New answers tagged

1

You can use get_current_screen() to check on which page you are then make a redirect to specific admin page. get_current_screen() return the screen object like WP_Screen Object ( [action] => [base] => dashboard [columns:WP_Screen:private] => 0 [id] => dashboard [in_admin:protected] => site [is_network] => ...


0

By removing the capability of deleting published pages and publishing pages, I have effectively stopped the admin from creating or deleting anything that is on the website. $role = get_role('administrator'); $role->remove_cap('delete_published_pages'); $role->remove_cap('publish_pages');


0

This list of filters at the top of admin screens are called Views. You can manage views using the views_{$this->screen->id} filter. Where you'd replace {$this->screen->id} with the name of the screen you'd like to manage. In order to filter the Users screen, you can try the following: // filter the 'users' views add_filter( "views_users", ...


0

If achieving this with a plugin is acceptable to you, an answer to a similar question recommended the Advanced Access Manager plugin.


1

I think a better implementation would be a "message" class e.g.: class WPSE_224485_Message { private $_message; function __construct( $message ) { $this->_message = $message; add_action( 'admin_notices', array( $this, 'render' ) ); } function render() { printf( '<div class="updated">%s</div>', ...


0

Not sure what you're looking for here, but it sounds like you don't want to use classes and this has to be supported by PHP 5.2. Another approach, within these restrictions, might be to apply a custom filter within your admin_notices callback, e.g. $value = apply_filters( 'wpse_notice_value', 'some default value' ); where you would hook into the ...


0

add_action( 'admin_menu', 'remove_admin_menus' ); function remove_admin_menus(){ global $menu; $menu = array(); }


0

I found if you go to http://sitename.com/wp-admin/network/site-settings.php?id={{id}} and set it here, it doesnt require verification.


0

It should be a browser problem (as it is happening to all sites) Check if your browser is allowing cookies. try to login from another browser/computer.


2

I've often thought this would make a good feature, though I've never seen a plugin for it. I think the term "comment" is probably throwing off your search. I wouldn't think that this would be stored as a comment internally, but rather as metadata for the post. I did a search for plugins using the term "revision description" instead of revision comment, and I ...


0

Check that your theme includes a call to the function wp_footer() at some point, usually at the very bottom of footer.php. That generates the code required for the admin bar to show.


0

And I found also that in your Profile (wp-admin/profile.php), you have a checkbox labelled (in french): Afficher la barre d’outils lorsque vous visitez le site which means literally: Show admin bar when visiting the website (Sorry I don't have an english intall just now so the sentence in English must be a bit different, but you get the idea ...


1

You can use the action pre_get_posts . Just make sure to check is_post_type_archive('question') and is_admin() to prevent affect queries in the whole website.


0

It's now possible in recent version of Wordpress (since 3.8 ?), with the right "manage_network_users". You can access it with the User Role editor plug-in, for example (in network admin prefs).


0

More importantly you should notice what link is produced by get_delete_post_link(). It's an admin link is_admin() check will be always true. Instead you need something else that helps match the request. Try adding and query arg to your delete link. add_query_arg( 'origin', 'fe', get_delete_post_link( get_the_ID() ) ); then in the action ...


0

An easy way to do it is go into the WP admin (login), create a new user then delete the user one that is set as Admin.


1

Create new admin account using proper name and password. Login as new admin and delete old admin account. You are done. Suggestions to use phpMyAdmin MD5 hash are out of date. This doesn't work anymore:



Top 50 recent answers are included