How to get the URL of a valid page in notifications
-
Hello, I liked the plugin.
How can I get a link to an entry in the notifications where the comment is left?And also get a link to a new post?
Now in the code in notifications comes a link to the main site
/** * New Comment Action * * @since 1.4.0 * * @param $comment_ID */ public function telefication_action_wp_insert_comment( $comment_ID ) { $comment_text = get_comment_text( $comment_ID ); //notification body $message = get_bloginfo( 'name' ) . ":\n\n"; $message .= __( 'New Comment: ', 'telefication' ) . "\n-----\n\n"; $message .= $comment_text . "\n\n"; <strong>$message .= site_url();</strong> $telefication_service = new Telefication_Service( $this->options ); if ( $telefication_service->create_url( $message ) ) { $telefication_service->send_notification(); } }
How can I receive notifications via a link to the main page of a site?
$message .= site_url();but on the page where the comment was written?
How to replace site_url();
Thank you
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to get the URL of a valid page in notifications’ is closed to new replies.