Notify Authors WordPress plugin for WordPress 2.0
June 9th, 2006
This was a plugin Adam Howell showed me, it’s useful for group blogs. However, it only worked with WordPress 1.5. Tonight at work I hacked the PHP and got it working on WordPress 2.0.3, you can see the new code here, or below:
function notify_users($post_ID) {
global $wpdb;
$users = $wpdb->get_results( "SELECT ID FROM $wpdb->users, $wpdb->usermeta WHERE $wpdb->usermeta.user_id = $wpdb->users.ID AND $wpdb->usermeta.meta_key = 'wpredesign_user_level' AND $wpdb->usermeta.meta_value = 10" );
$post = $wpdb->get_row( "SELECT post_author, post_title FROM $wpdb->posts WHERE ID = " . $post_ID );
$authordata = get_usermeta( $post->post_author, 'nickname' );
$blogname = get_settings( "blogname" );
$subject = "[Redesign Blog] New or updated content by " . $authordata;
$text = $authordata . " has posted new content or updated content on the website.";
$text = $text . "\n\nNew or updated article: " . $post->post_title;
$text = $text . "\n\nRead it here: " . get_permalink( $post_ID );
foreach ($users as $user) {
$user_data = get_userdata( $user->ID );
mail( $user_data->user_email,
$subject,
$text,
"From: " . $blogname . " <" . get_settings( "admin_email" ) . ">" );
}
}
Popularity: 100%
More from Joe, Write!
- I like the Mendoza Line, they just kinda broke up, and these are my favorite song titles of theirs
- New Favorite Site: WheresGeorge.com
- A list of ideas for other lists:
- Pre-DNC, Day 2: Cookies
- Taking care of @ColoradoTweets
Joe, Write! Recommends
Related Posts:

5 comments on “Notify Authors WordPress plugin for WordPress 2.0”
01
Where’d your zombie revive board go? I’m stuck outside the Pagram Library and am very dead.
02
i wish i understood this stuff. i imagine it’s useful, unlike this bond angle shit i don’t understand.
03
Who’s Bond? What’s his angle?
04
Frowning but not angry. There’s only a certain amount plastic shit I can take, seriously.
Hey man I’m glad you’re
“out there.
thanks for directing me towards Adam’s Jillion site also.
party,
05
Hello!
I installed Wordpress on my server, and set up a site. It’s a relly nice piece of software. However, I am missing a piece of functionality, and
couldn’t find a suitable answer for it. Mayou you know a plugin I could use?I need to automatically inserts ads in my posts.And not AdSense ads, but rather HTML snippets defined by me (affiliate links, etc). Let’s say I would insert a tag in my post:
– ad here –
and the plugin would automatically replace it with some HTML code, when the post is displayed on my site.I really don’t need any fancy configuration options etc, just the basic replace functionality.
Do you know a plugin that can handle this?
Leave a Reply