There sure are a lot of them.
Month: September 2013
Tribe Events filters & actions
So I’m just starting to outline a developers’ tutorial on the filters & action hooks in Modern Tribe’s fantastic The Events Calendar plugin for WordPress, and I thought, Hmmm, I wonder how many filters and hooks there are in the code. So, being a nerd, I ran the following commands1 on my little Ubuntu machine:
% wget http://downloads.wordpress.org/plugin/the-events-calendar.3.0.3.zip
% unzip the-events-calendar.3.0.3.zip
% cd the-events-calendar
% find . -type f -exec grep apply_filters {} \; > filter-count.txt
% find . -type f -exec grep do_action {} \; >> filter-count.txt
% vi filter-count.txt
:%s/.*apply_filters( '\([^']*\).*/\1/g
:%s/.*do_action( '\([^']*\).*/\1/g
:v/tribe_/d
:wq
% sort -u filter-count.txt > unique-filters.txt
% wc -l unique-filters.txt
And what do you, a number popped out. According to my (very) rough guesstimation, there are 371 unique filters & hooks2 in The Events Calendar. Seems I have my work cut out for me.