Redirect after post deleted
Maybe you use the hook deleted_post and create a rewrite. The hook runs just after a post or page is deleted. Action function arguments is post- or page-ID.
Maybe you use the hook deleted_post and create a rewrite. The hook runs just after a post or page is deleted. Action function arguments is post- or page-ID.
You’re adding a filter to get_search_query, and within that function calling get_search_query, which runs your filter, which calls get_search_query, which runs your filter, which calls get_search_query, which runs your filter… do you see the problem here? The search query is passed to the filter as an argument, so you don’t need to fetch it- function … Read more
I got it to working finally .. The code is: add_action( ‘wp_enqueue_scripts’, ‘pretty_photo_styles’, 100 ); function pretty_photo_styles() { if ( ! is_single() ) { wp_dequeue_script( ‘pretty_photo’ ); wp_dequeue_style( ‘pretty_photo’ ); } } Please someone correct it if I missed anything! I tried it and it worked for me.
The antispambot() method is still very reliable and robust from my experience, I have not had many problems using it but something else to look at depending on how far you are willing to go in securing your email address is to look into probably one of the easiest and most effective methods but also … Read more
This is a required field (http://codex.wordpress.org/Function_Reference/wp_create_user) and I think that more than one function in the core of WordPress relies on that. So I would not recommend to code around it or alter any other WP core files as the next update could render all these changes back to the default values.
In short: WordPress uses the term count in various places. There’s even another count that it’s in the options table. So as long as you are talking about the core behavior, then the recommendation is: Never ever touch the WordPress cores term counting mechanism! It’s hard enough to bring it to work in some cases … Read more
After asking around and looking for alternatives, I came up with a working solution that works in the web frontend and in the Android/iOS XML-RPC based apps. This is the filter. add_filter(‘wp_insert_post_data’, array($this, ‘save_content2’), 9, 2); I am pretty sure it is called before the content_save_pre filter. It allows direct access to the post fields … Read more
I think you’re looking for the retrieve_password_title filter. For example: add_filter( ‘retrieve_password_title’, function( $title ) { $title = __( ‘WPSE Custom Password Reset’ ); return $title; } );
I am not sure why you want to do this, but you can accomplish it with preg_replace(). Try adding this to your theme’s functions.php: add_filter( ‘admin_post_thumbnail_html’, ‘remove_featured_image_link’ ); function remove_featured_image_link($content) { $content_edit = preg_replace(‘/<a .*?class=”(.*?thickbox.*?)”>(.*?)<\/a>/’,'<div>$2</div>’,$content); return $content_edit; }
Note: The reason this doesn’t work for the OP is the use of woocommerce, otherwise, so in regards of core WordPress functionality, this should be working as described. Update: I assumed it is about emails on registration. Good thing you specified your needs. WordPress tries – several checks are performed – to add the new … Read more