public
Created

Output a list of every extension hook for a given ExpressionEngine installation

  • Download Gist
Find EE Extension Hooks
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# Description:
# A couple of useful bash one-liners for finding all of the extension hooks in
# a given ExpressionEngine installation. Here's what it does:
#
# 1. Finds all of the native hooks, and any third-party hooks;
# 2. Sorts them alphabetically;
# 3. Outputs them to STDOUT or a file of your choosing.
#
# Usage:
# CD to the `/system/expressionengine/` directory of your site, and run
# one of the following commands.
 
# Option A: Output to STDOUT.
grep -ERho "$this\->(?:EE\->)?extensions\->(?:universal_)?call\('([a-z_]+)" ./ | awk '{split($0, arr, "("); print substr(arr[2], 2);}' | sort
 
# Option B: Output to a file.
grep -ERho "$this\->(?:EE\->)?extensions\->(?:universal_)?call\('([a-z_]+)" ./ | awk '{split($0, arr, "("); print substr(arr[2], 2);}' | sort -o /path/to/your/file.txt

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.