grep for PHP functions, while excluding class methods and pasted-in javascript

I’m grep’ping through WP core, attempting to write a grep statement that will find all PHP functions, while excluding any class methods or Javascript functions.

This is what I have now:

Read More

grep -r --include=*.php 'function [A-Za-z_]+(.+)' .

This is returning both polluted functions from class methods and JS functions.

Related posts

Leave a Reply

1 comment