Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

What I would like to do is mimic how Wordpress shows an administrator how many new updates there are for installed plugins (a tiny number displayed next to a link). The main difference is that I want to serve this info to a logged-in user on the front end (since they last visited):

  • new messages they've received (Buddypress)
  • new forum posts (Buddypress)
  • new posts for "favorited" categories

Not sure where to find the code that provides plugin update notices but that would be a start...

share|improve this question
    
The code in question is in wp-admin/menu.php but I don't think it's gonna help you anyhow as checking for available plugin updates is something different then checking for a new content since user's last visit. –  Michal Mau Jan 23 '11 at 21:24

2 Answers 2

As far as display goes, the admin code does this in several ways.

  1. Via the 'message' class for stuff that shows once at the top of the content area.
  2. On the left nav menu, either on the Plugins tab or up where it says Dashboard.
  3. And in the list of themes (or plugins).

Items 2 and 3 get their information via a handshake with the api.wordpress.org server.

Item 1's code can (mostly) be found in wp-admin/users.php. I would go into more detail, but my wife just told me to 'Get the hell off the computer because we're going to the beach.' Bye!

share|improve this answer
    
We pushed this task back to next week but I will check this out. Thanks! –  Adam Jan 26 '11 at 1:44

Surely the thing to do would be to provide some kind of buddy press feed per user for each of those types of info and then just use the rss feed code to display the items on the wp blog? Assuming that somehow you know who belongs to which.

That would make more sense than trying to mess with plugin update codes

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.