Skip to content

Instantly share code, notes, and snippets.

@sftsk
Created April 21, 2016 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sftsk/1c461d6c85f994a4fa795600809a3664 to your computer and use it in GitHub Desktop.
Save sftsk/1c461d6c85f994a4fa795600809a3664 to your computer and use it in GitHub Desktop.
JS Scriplet that creates a list of the active plugins of a WordPress installation. Useful when needed for a site documentation or similar
// v0.1
// @saftsaak
// got tt the plugins page, open the developer tools on your browser, paste this, hit enter and then copy-paste the output from the console log
var pList = "";
jQuery('#the-list tr.active:not(.plugin-update-tr)').each(function () {
var $this = jQuery(this);
var pTitle = jQuery('.plugin-title strong', $this).text();
var pVersion = jQuery('.plugin-version-author-uri', $this).text();
var pDesc = jQuery('.plugin-description', $this).text();
pList += pTitle + ' – ' + pVersion + "\n";
pList += pDesc + "\n\n";
});
console.log(pList);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment