Skip to content

Instantly share code, notes, and snippets.

@danburzo danburzo/index.js
Created Feb 25, 2017

What would you like to do?
Find the WordPress themes & plugins used by a page
function _match(str, regex) {
var matches = [];
str.replace(regex, function() {
return matches;
function _unique(item, idx, arr) {
return arr.indexOf(item) === idx;
function find_themes(str) {
return _match(str, /wp\-content\/themes\/([^\/]+)/g)
.map(function(item) {
return item[1];
function find_plugins(str) {
return _match(str, /wp\-content\/plugins\/([^\/]+)/g).map(function(item) {
return item[1];
function inspect_wp() {
var html = document.documentElement.innerHTML;'Found themes:');
console.table(find_themes(html));'Found plugins:');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.