Changeset 1031150
- Timestamp:
- 11/23/2014 01:18:37 PM (11 years ago)
- Location:
- new-post-notification
- Files:
-
- 7 added
- 2 edited
-
tags/1.0.9 (added)
-
tags/1.0.9/languages (added)
-
tags/1.0.9/languages/npn_plugin-de_DE.mo (added)
-
tags/1.0.9/languages/npn_plugin-de_DE.po (added)
-
tags/1.0.9/languages/npn_plugin-ja.po (added)
-
tags/1.0.9/npn_plugin.php (added)
-
tags/1.0.9/readme.txt (added)
-
trunk/npn_plugin.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
new-post-notification/trunk/npn_plugin.php
r911892 r1031150 4 4 * Plugin URI: http://kilozwo.de/wordpress-new-post-notification-plugin 5 5 * 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. 86 * Version: 1.0.9 7 7 * Author: Jan Eichhorn 8 8 * Author URI: http://kilozwo.de … … 15 15 // Do something when a post gets published // 16 16 add_filter ( 'publish_post', 'npn_notify' ); 17 18 // Use HTML-Mails19 add_filter('wp_mail_content_type',create_function('', 'return "text/html"; '));20 17 21 18 function npn_notify($post_ID) { … … 35 32 // get allowed groups to access post // 36 33 $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"; ')); 37 37 38 38 // Go through the users and check the access // … … 59 59 60 60 // 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 } 62 66 } 67 68 // Use default plain 69 add_filter('wp_mail_content_type',create_function('', 'return "text/plain"; ')); 70 63 71 update_post_meta($post_ID, 'npn_notified', '1', true); 64 72 return $post_ID; -
new-post-notification/trunk/readme.txt
r911892 r1031150 4 4 Tags: Posts, Subscription, Notification, Email, User-Access-Manager, UAM 5 5 Requires at least: 3.0.1 6 Tested up to: 3.97 Stable tag: 1.0. 86 Tested up to: 4.0.1 7 Stable tag: 1.0.9 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 30 30 31 31 == Changelog == 32 33 = 1.0.9 = 34 * Fixed bug causing malfunction of reset-password-link. Many thanks to valcorin. 32 35 33 36 = 1.0.8 =
Note: See TracChangeset
for help on using the changeset viewer.