Is it possible to change an existing post status from ‘pending’ to ‘publish’ via email?

Step 1 – Register a Custom Query Var By adding a custom query var, you make WP aware of it so it can be used in requests. function wpse_add_query_vars( $vars ) { $vars[] = ‘wpse_set_to_publish’; return $vars; } add_filter( ‘query_vars’, ‘wpse_add_query_vars’ ); Step 2 – Sniff The Request Now we hook into parse_request to look … Read more

Sending emptys emails every day, How stop it?

Do a quick check to make sure one of the required $_POST payment variables is present and not empty. So at the top of your file if(!empty($_POST[‘paymentinfovariable’])) { // put all your current code here // that way POST info is only processed, and email is only sent, // if your required variable has been … Read more

Mechanism to send to users of secured WordPress install new notifications by SMS or email?

I’d say there’s three specific requirements here; Allow users to choose notification times, timezone aware Hook into transition_post_status to listen up for new posts, and then take action Find a decent SMS API For 1), hook into show_user_profile to output your time picker field(s), and personal_options_update to save them. You could detect the user’s timezone … Read more

Send email only upon draft

$post_id is an integer (just the post id) and not a post object (the whole post with id,status,title …) so globalize the $post object and check the status from there eg: function er_send_email_on_post_draft_save( $post_id ) { global $post; //verify post is not a revision if ( $post->post_status == ‘draft’ ) { $post_title = get_the_title( $post_id … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)