How to disable 3.3 Tooltips?

You could also remove the pointer script and style from their respective arrays just after they have been registered using this method. // Remove javascript add_action( ‘wp_default_scripts’ , ‘remove_pointer_script’ ); function remove_pointer_script( $wp_scripts ) { $wp_scripts->remove(‘wp-pointer’); } // Remove stylesheet add_action( ‘wp_default_styles’ , ‘remove_pointer_style’ ); function remove_pointer_style( $wp_styles ) { $wp_styles->remove(‘wp-pointer’); } The remove method … Read more

Prevent from deleting any user role but subscriber

If you mean the delete button on the user list at /wp-admin/users.php, then that button is created by the WP_Users_List_Table class around (currently) line 256. If you look a little further down– a few lines– you will see a filter called user_row_actions. You can use that to hide the ‘delete’ link. add_filter( ‘user_row_actions’, function($actions, $user_object) … Read more

Add button in TinyMCE editor to insert text

Add this to your plugin file or in functions.php file in the theme directory add_action( ‘admin_enqueue_scripts’, ‘wpse_141344_admin_enqueue_scripts’ ); add_action( ‘admin_head’, ‘wpse_141344_add_mce_button’ ); function wpse_141344_admin_enqueue_scripts() { wp_enqueue_script( ‘wpse_141344-tinymce-scipt’, ‘url/to/your/custom-tinymce.js’ ); } function wpse_141344_add_mce_button() { if ( ! current_user_can( ‘edit_posts’ ) && ! current_user_can( ‘edit_pages’ ) ) { return; } add_filter( ‘mce_external_plugins’, ‘wpse_141344_add_tinymce_plugin’ ); add_filter( ‘mce_buttons’, ‘wpse_141344_register_mce_button’ … Read more

How can I make my Admin Icon SVG color correctly? [closed]

From Codex: $icon_url […] * Pass a base64-encoded SVG using a data URI, which will be colored to match the color scheme. This should begin with ‘data:image/svg+xml;base64,’. WordPress will change color of your SVG if you use SVG content instead of the file URL. (JS code responsible for changing the color is in svg-painter.js file.) … Read more

Hide a page in the admin end without a plugin?

you can use parse_query filter hook to exclude your pages using post__not_in attribute add_filter( ‘parse_query’, ‘exclude_pages_from_admin’ ); function exclude_pages_from_admin($query) { global $pagenow,$post_type; if (is_admin() && $pagenow==’edit.php’ && $post_type ==’page’) { $query->query_vars[‘post__not_in’] = array(’21’,’22’,’23’); } } this will exclude pages with the ids of 21,22,23 and to make sure this pages will not be included on … Read more