How to change a user’s password programatically
wp_set_password( $password, $user_id ); See reference for details.
wp_set_password( $password, $user_id ); See reference for details.
When you visit a frontend page, WordPress will query the database and if your page does not exist in the database, that query is not needed and is just a waste of resources. Luckily, WordPress offers a way to handle frontend requests in a custom way. That is done thanks to the ‘do_parse_request’ filter. Returning … Read more
To disable user email notification, add this in a plugin or theme: add_filter( ‘send_password_change_email’, ‘__return_false’ ); FYI wp_password_change_notification() controls admin email notification when a user changes their password
Please mail [email protected] and ask them to remove your plugin. Provide all infos and explain that you won’t start to develop the plugin so the name should no longer be blocked. I would use the same email as while registering the plugin (maybe even replying to it) and I think they will remove it after … Read more
Diff the post content, title and author As had to do something related some month ago, here’s the easiest and most future proof way (that I could fine) to check if there’s a change made to the content or title or if the author changed: // Update Title ” !== wp_text_diff( $el[‘post_title’], $GLOBALS[‘post’]->post_title ) AND … Read more
I’d suggest either a plug-in or a drop-in section of code in your client’s functions.php file. The advantage of a drop-in is that you can add it once and never have to worry about activating or managing the system once it’s up-and-running. Here’s a quick explanation of how to add the Google tracking code to … Read more
Most of the following can be found in the Codex: apply_filters The callback functions attached to filter hook $tag are invoked by calling this function. This function can be used to create a new filter hook by simply calling this function with the name of the new hook specified using the $tag parameter. $value = … Read more
@Tal Gailili: Absolutely, WordPress would be a great platform for a CrunchBase clone! Use Custom Post Type and Custom Taxonomies What you want to look at are Custom Post Types and Custom Taxonomies [see this answer I gave on a very similar subject]. Example Code for your Company’s Post Type and Taxonomies With WordPress 3.0 … Read more
Intermediate image generation is extremely rigid. image_resize() keeps it close to code and completely lacks hooks. Pretty much only option for this is to hook into wp_generate_attachment_metadata and overwrite WP-generated image with your own (which will need bit of a image_resize() fork). I need this for work so I might be able to share some … Read more
Yes, it is possible to create a plugin that extends another plugin. Here are a few ideas on how you might go about it: A plugin can set up its own action and filter hooks (using the do_action and apply_filter functions) just like the WordPress core does. If the plugin you are targeting does this, … Read more