Is there a way to get the site_url in HTML code?
Is there a way to get the site_url in HTML code?
Is there a way to get the site_url in HTML code?
Can you check the argument passed $post_id and see if it is returning the post id else define post globally along with $wpdb like global $wpdb, $post and use $post->ID instead of $post_id.
Instead of rely on global $post, you should use the post object passed to function via the posts status transition: add_action(‘pending_to_future’, ‘scheduledNotification’); add_action(‘approved_to_future’, ‘scheduledNotification’); function scheduledNotification( $post ) { $author = get_userdata($post->post_author); // the rest of your function here }
You need to include the wordpress config file: require $_SERVER[‘DOCUMENT_ROOT’].’/wp-config.php’; OR use a page template if your form handler is in your theme. Take a look at using page template’s in wordpress: http://codex.wordpress.org/Page_Templates
I do not see the $comment_ID variable having any value in your code. So try by changing the following code wp_notify_postauthor($comment_ID, $comment->comment_type); to wp_notify_postauthor($comment->comment_ID, $comment->comment_type); You can also remove $comment->comment_type as per codex
$ticket is a WP_Post object. It should have all of the information you need. Just add that information to the $message string to create whatever content you want. Bare-bones example: $message=”You are viewing “.$ticket->post_title; $message .= ‘Post Content: ‘.$ticket->post_content; $message .= ‘View it: ‘ . get_permalink( $ticket->ID ) . “\nEdit it: ” . get_edit_post_link( $ticket->ID … Read more
Custom WP deactivate an email activation link sent to user’s email.
My Email Newsletter plugin will not configure when I try to import the widget
Don’t do this if you have too many registered users on the site. Below is the edited portion from your code. } elseif( ! $gone && ( $is_stats || $is_cm ) ) { // we are in 3 days frame and trying to access to stats => redirect to post // Start the code to … Read more
As far as i know there is no hook or filter to provide a custom User name for default registration process, however if you really want to modify it, you can alter the $_POST data. here is the sample code: add_action(‘wp_loaded’, ‘wpse_138736_filter_username’); function wpse_138736_filter_username(){ //your code to extract username from email $_POST[‘user_login’] = ‘test’; } … Read more