Skip to content

Instantly share code, notes, and snippets.

@pwillis-els
Created January 13, 2021 01:48
Show Gist options
  • Save pwillis-els/4102060d9dd40d41f17f277e3514a205 to your computer and use it in GitHub Desktop.
Save pwillis-els/4102060d9dd40d41f17f277e3514a205 to your computer and use it in GitHub Desktop.
Get locally installed Wordpress plugin versions
#!/bin/sh
# This will display the wordpress plugin name and version, based on some standard formatting
# in a .php file in each plugin. If the plugin author didn't use this convention, this probably
# won't work... but it works for me.
grep -e "^[ *]*Version:" wp-content/plugins/*/*.php | sed -e 's/wp-content\/plugins\/\(.\+\)\/.*\.php:[ *]*Version:[[:space:]]*\(.*\)$/\1:\2/g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment