Official Comments 1.1 ===================== ================================================================================ How It Works: ================================================================================ If you are logged into your WordPress admin panel, and you make a comment, the plugin will see that you are an official WP user of your blog and mark the comment with your WP User ID. Also, comments by WP users will be automatically approved and not moderated. When the page is rendered, that User ID is called up by the plugin functions, which you can use to change text, change CSS class, add images, whatever your imagination desires. ================================================================================ Where to get the latest version? ================================================================================ Documentation and news updates are at: Latest stable versions will always be available at: Unstable development versions are available over SVN: ================================================================================ Installation ================================================================================ Save the source code to a file (I suggest official-comments.php), and upload to your wp-content/plugins directory. Log-in to your WP admin panel, go to the Plugins tab and activate the Official Comments plugin. ================================================================================ Implementation Examples ================================================================================ * SIMPLE EXAMPLE Demo: Simply add this somewhere within the Comments loop in wp-comments.php and/or wp-comments-popup.php: ** PHP *********************************************************************** ****************************************************************************** * INTERMEDIATE EXAMPLE Demo: Use CSS to change the look of official comments! ** PHP ***********************************************************************
  • ****************************************************************************** ** CSS *********************************************************************** .commentOfficialUser { border: 1px solid black; background-color: #999999 } ****************************************************************************** * AWESOME EXAMPLE Demo: Why not display a user-specific image next to your comment? Combined with the intermediate example, you're sure to impress :) ** PHP *********************************************************************** "; } ?> ****************************************************************************** ================================================================================ Public Functions ================================================================================ * is_wpuser_comment() * comment_user_id() (alias) Use in: Main comment loop in wp-comments.php and wp-comments-popup.php Returns: WordPress UserID for current comment or 0 if not by WP user. * comment_wpusername() Use in: Main comment loop in wp-comments.php and wp-comments-popup.php Returns: Login Name for WP User of current comment or false if not WP user. ================================================================================ Known Issues ================================================================================ * It only works with official comments made after the point of installation, as WordPress doesn’t automatically add the WP user ids to the comments field it already has. ================================================================================ Bugs and Suggestions ================================================================================ For Support for using this plugin, ry the WordPress Support Forums: Any bugs or suggestions, (NO SUPPORT QUESTIONS!) please email me: ================================================================================ Version History ================================================================================ 1.1 * comment_wpusername() now returns false when comment not by a wp user * cleaned up code, minor improvements * Now hosted on wp-plugins.org! SVN repository at: 1.0 * Initial Release