Skip to content

Instantly share code, notes, and snippets.

@DArcMattr
Last active September 14, 2019 18:24
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DArcMattr/279f73d787d0115cdd4b3e0e0c528c94 to your computer and use it in GitHub Desktop.
Save DArcMattr/279f73d787d0115cdd4b3e0e0c528c94 to your computer and use it in GitHub Desktop.
Universal Ctags configuration for WordPress action & filter hooks. Adapted from work done by @dsawardekar
--regex-PHP=/^do_action(_deprecated|_ref_array)?\s*\(\s*['"]([a-z_]+)['"]\s*.*$/4c710n_\1/A,action/
--regex-PHP=/^add_action\s*\(\s*['"]([a-z_]+)['"]\s*.*$/4l1573n3r_\1/L,alistener/
--regex-PHP=/^apply_filters(_deprecated|_ref_array)?\s*\(\s*['"]([a-z_]+)['"]\s*.*$/ph1l73r_\1/R,filter/
--regex-PHP=/^add_filter\s*\(\s*['"]([a-z_]+)['"]\s*.*$/phl1573n3r_\1/E,flistener/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment