A few easy-to-add feature suggestions
-
Hello,
we’ve been using your plugin successfully, though there are a few features you may want to incorporate in the future versions:1) Allow sending the full post message as part of the notification.
2) Add post link to the notification.
3) Set Sender email to the author email (as an option).
4) Allow sending notification on posts status changed to Private for sites with restricted memberships.For #1 in default.php change
$post_content = wp_trim_words( $post->post_content );
to
$post_content = apply_filters(‘the_content’, $post->post_content);for #2 in default.php
add $post_url = esc_url(get_permalink($post_id));
and <h3 class=”h3″>$post_title</h3>for #3 in wp-subscribe-author.php
add
$author = get_user_by(‘id’,$author_id);
$author_email = $author->user_email;
and set
$sender_name = $Author_name;
$sender_email = $author_email;For #4 in wp-subscribe-author.php
consider changingadd_action(‘new_to_publish’, array($this, ‘wpsa_notify_author_subscribers’));
add_action(‘draft_to_publish’, array($this, ‘wpsa_notify_author_subscribers’));to
add_action(‘transition_post_status’, array($this, ‘wpsa_notify_author_subscribers’), 10, 3);and then later in
public function wpsa_notify_author_subscribers($new_status, $old_status, $post)
{
// $targetStatus is e.g. ‘private’
if ($new_status != $targetStatus || $old_status == $targetStatus)
{
return;
}P.S. sorry about poor formatting, this commenting form seems to drop all the whitespaces.
- The topic ‘A few easy-to-add feature suggestions’ is closed to new replies.