Customize display of Plugins used on your site

AndrewSW.com has a WordPress plugin that provides some template functions for you to display a list of your WordPress plugins used on your site. Incase if, the andrewsw.com link is not working, you can save the under given code as pluginusedplugin.php Note:1. The owner and copyrights are of AndrewSW.com only. 2. Always try parent site first, for […]
AndrewSW.com has a WordPress plugin that provides some template functions for you to display a list of your WordPress plugins used on your site.

Incase if, the andrewsw.com link is not working, you can save the under given code as pluginusedplugin.php

Note:1. The owner and copyrights are of AndrewSW.com only. 2. Always try parent site first, for downloading.


<?php /* plugin name: plugins used plugin version: 0.1.10 plugin uri: http://www.andrewsw.com/pages/pluginsusedplugin description: this plugin will give you a function to display what plugins you are using. thanks to s&ouml;ren weber ( http://soeren-weber.net ) for submitting a fix for a display problem ( http://soeren-weber.net/post/2005/07/10/35/ ). author: andrew chen author uri: http://www.andrewsw.com */global $mypluginfiles; $activepluginsresult ="" get_settings('active_plugins'); if (is_array($activepluginsresult)) { $pup_plugin_files ="" $activepluginsresult; } else { $pup_plugin_files ="" explode("\n",$activepluginsresult); }; $mypluginfiles ="" array_values($pup_plugin_files); if (is_array($mypluginfiles[0])) { // new style - used the keys, not the values $mypluginfiles ="" array_keys($pup_plugin_files); }; sort($mypluginfiles); // alphabetize by filename. better way? $mypluginfiles="array_unique($myPluginFiles);"function displaypluginsastable($tableid="none", $showdescription="1") { global $mypluginfiles; $style ="" ''; if ($tableid ="=" "none") { $tablestr ="" ' width="100%" cellpadding="3" cellspacing="3" '; } else { $tablestr ="" ' id="'.$tableId.'" '; }; ?> <table <?php print $tablestr; ?> > <tr> <th><?php _e('plugin'); ?></th> <th><?php _e('version'); ?></th> <th><?php _e('author'); ?></th> <?php if ($showdescription ="=" "1") { ?> <th><?php _e('description'); ?></th> <?php }; ?> </tr> <?php $style ="" ''; foreach($mypluginfiles as $plugin_file) { if (trim($plugin_file) ="=" "") continue; if (!file_exists(ABSPATH . '/wp-content/plugins/' . $plugin_file)) continue; if (!is_readable(ABSPATH . '/wp-content/plugins/' . $plugin_file)) continue; $plugin_data ="" implode('', file(ABSPATH . '/wp-content/plugins/' . $plugin_file)); preg_match("|Plugin Name:(.*)|i", $plugin_data, $plugin_name); if ('' ="=" $plugin_name[1]) continue; preg_match("|Plugin URI:(.*)|i", $plugin_data, $plugin_uri); preg_match("|Description:(.*)|i", $plugin_data, $description); preg_match("|Author:(.*)|i", $plugin_data, $author_name); preg_match("|Author URI:(.*)|i", $plugin_data, $author_uri); if ( preg_match("|Version:(.*)|i", $plugin_data, $version) ) $version ="" $version[1]; else $version ="'';"$description ="" wptexturize($description[1]);if ('' ="=" $plugin_uri) { $plugin ="" $plugin_name[1]; } else { $plugin ="" __("<a href='".trim($plugin_uri[1])."' title='Visit plugin homepage'>{$plugin_name[1]}</a>"); }if ('' == $author_uri) { $author = $author_name[1]; } else { $author = __("<a href='".trim($author_uri[1])."' title='Visit author homepage'>{$author_name[1]}</a>"); }$style = ('class="alternate"' == $style) ? '' : 'class="alternate"';echo " <tr $style> <td>$plugin <!--\n"; print "Plugin Name: ".$plugin_name[1]."\n"; print "Plugin URI: ".$plugin_uri[1]."\n"; print "Author: ".$author_name[1]."\n"; print "Description: ".htmlspecialchars($description)."\n"; print "Author URI: ".$author_uri[1]."\n"; print "Version: ".$version."\n"; echo "--> </td> <td>$version</td> <td>$author</td> "; if($showDescription) { echo " <td>$description</td> "; }; echo " </tr> "; }; ?></table><?php}; // end of that functionfunction displaypluginsaslist() { global $mypluginfiles; ?> <ul> <?php $style ="" ''; foreach($mypluginfiles as $plugin_file) { if (trim($plugin_file) ="=" "") continue; if (!file_exists(ABSPATH . '/wp-content/plugins/' . $plugin_file)) continue; if (!is_readable(ABSPATH . '/wp-content/plugins/' . $plugin_file)) continue; $plugin_data ="" implode('', file(ABSPATH . '/wp-content/plugins/' . $plugin_file)); preg_match("|Plugin Name:(.*)|i", $plugin_data, $plugin_name); if ('' ="=" $plugin_name[1]) continue; preg_match("|Plugin URI:(.*)|i", $plugin_data, $plugin_uri);if ('' ="=" $plugin_uri) { $plugin ="" $plugin_name[1]; } else { $plugin ="" __("<a href='".trim($plugin_uri[1])."' title='Visit plugin homepage'>{$plugin_name[1]}</a>"); };echo " <li> $plugin </li>"; }; ?></ul><?php}; // end of that function?>