Plugin Directory

Changeset 1031150


Ignore:
Timestamp:
11/23/2014 01:18:37 PM (11 years ago)
Author:
kilozwo
Message:

published version 1.0.9 error in broken password reset link fixed.

Location:
new-post-notification
Files:
7 added
2 edited

Legend:

Unmodified
Added
Removed
  • new-post-notification/trunk/npn_plugin.php

    r911892 r1031150  
    44 * Plugin URI:  http://kilozwo.de/wordpress-new-post-notification-plugin
    55 * Description: Simply notifies users if a new post has been published. This is an addon for User-Access-Manager. Users will only be notified if they have access. Your subscribers can also decide which posts they would like to be noticed on.
    6  * Version:     1.0.8
     6 * Version:     1.0.9
    77 * Author:      Jan Eichhorn
    88 * Author URI:  http://kilozwo.de
     
    1515// Do something when a post gets published //
    1616add_filter ( 'publish_post', 'npn_notify' );
    17 
    18 // Use HTML-Mails
    19 add_filter('wp_mail_content_type',create_function('', 'return "text/html"; '));
    2017
    2118function npn_notify($post_ID) {
     
    3532    // get allowed groups to access post //
    3633    $allowed_groups = npn_get_allowed_groups($post_ID);
     34
     35    // Use HTML-Mails
     36    add_filter('wp_mail_content_type',create_function('', 'return "text/html"; '));
    3737
    3838    // Go through the users and check the access //
     
    5959
    6060      // send Mail if User activated Notification and there was no notification before.
    61       if ($access==true AND $cat_chosen==true AND get_the_author_meta( 'npn_mailnotify', $user->ID )=='1' AND get_post_meta( $post_ID, 'npn_notified', true) != '1') wp_mail( $user->data->user_email, '['.get_option('blogname').'] '.__('New Post','npn_plugin').': '.$postobject->post_title, npn_generate_mail_content($postobject,$postcontent,$postthumb,$user->ID));
     61      if ($access==true AND $cat_chosen==true AND get_the_author_meta( 'npn_mailnotify', $user->ID )=='1'
     62      AND get_post_meta( $post_ID, 'npn_notified', true) != '1') {
     63        wp_mail( $user->data->user_email, '['.get_option('blogname').'] '.__('New Post','npn_plugin').': '
     64        .$postobject->post_title, npn_generate_mail_content($postobject,$postcontent,$postthumb,$user->ID)); 
     65      }
    6266     }
     67     
     68     // Use default plain
     69     add_filter('wp_mail_content_type',create_function('', 'return "text/plain"; '));
     70     
    6371    update_post_meta($post_ID, 'npn_notified', '1', true);
    6472    return $post_ID;
  • new-post-notification/trunk/readme.txt

    r911892 r1031150  
    44Tags: Posts, Subscription, Notification, Email, User-Access-Manager, UAM
    55Requires at least: 3.0.1
    6 Tested up to: 3.9
    7 Stable tag: 1.0.8
     6Tested up to: 4.0.1
     7Stable tag: 1.0.9
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3030
    3131== Changelog ==
     32
     33= 1.0.9 =
     34* Fixed bug causing malfunction of reset-password-link. Many thanks to valcorin.
    3235
    3336= 1.0.8 =
Note: See TracChangeset for help on using the changeset viewer.