Problems with removing admin bar
There is already an per-user-option to disable the admin-bar in the latest WordPress versions. It can be found in the user profile settings: …/wp-admin/profile.php (click on your name after logging in)
There is already an per-user-option to disable the admin-bar in the latest WordPress versions. It can be found in the user profile settings: …/wp-admin/profile.php (click on your name after logging in)
This is just a first idea: Check if it is the AJAX request. if ( defined( ‘DOING_AJAX’ ) && DOING_AJAX ) return $slug; or: if ( isset( $_POST[‘action’] ) && ‘sample-permalink’ === $_POST[‘action’] ) return $slug; depending on the level of detail you need. If you put this in the beginning of the function (maybe … Read more
Take a look into /wp-admin/custom-header.php. You may extend the class Custom_Image_Header and adjust it to your needs.
it can be done easily without any codes or plugin just go to pages dashboard, click Quick Edit” which url you want to change. Now add underscore. Update and done
(I know this is a late answer, so this user has probably moved on; but I’m answering this in the hopes that if a future user ends up here seeking a similar solution, that the following will help them find it.) The problem that Postman is telling you about is that the function wp_mail() has … Read more
To prevent the comment deletion hook into before_delete_post, and filter the query for associated comments so the deletion routine cannot find and delete those. PHP 5.3 required: add_action( ‘before_delete_post’, function( $post_id ) { add_filter( ‘query’, function( $query ) use ( $post_id ) { $find = ‘WHERE comment_parent=”; FALSE !== strpos( $query, $find . $post_id ) … Read more
There is no security risk in a pluggable function: If someone installs a plugin that lowers the security it is his/her own fault. On the other hand, you can override the functions to make nonces more unique or to change their format. In a custom function wp_verify_nonce() you could use an optional third parameter or … Read more
Note: This is the merged version between my and @toscho answers. Explanation (by @toscho) Use add_meta_boxes_page as action hook. You can find the hook in wp-admin/edit-form-advanced.php and it displays as: do_action(‘add_meta_boxes_’ . $post_type, $post); Solution(s) Try the following action, which is inside register_post_type() as well. function wpse59607_remove_meta_box( $callback ) { remove_meta_box( ‘id-of-meta-box’ , ‘page’ , … Read more
Unfortunately, the plugin author did not leave room for a filter. But I did request one for you here. I suggested changing: /* Add option page */ function cd_setting_page(){ add_options_page( ‘Commenter data Settings’, ‘Commenter data Settings’, ‘administrator’, ‘commenterdata-settings’, array( $this, ‘cd_renderer’ )); } to /* Add option page */ function cd_setting_page(){ $cap = apply_filters( ‘commenter_data_settings_page_capability_filter’, … Read more
If you take a look at template-tags.php file, then you’ll see something like that: if ( ! function_exists( ‘twentyseventeen_posted_on’ ) ) : /** * Prints HTML with meta information for the current post-date/time and author. */ function twentyseventeen_posted_on() { // Get the author name; wrap it in a link. $byline = sprintf( /* translators: %s: … Read more