Curious – why is ‘all’ filter used instead of ‘pre_option’
-
I started to write a small plugin similar to this when I found it mentioned somewhere (and it’s a million times better than mine would have been).
I am curious why the ‘
all‘ filter is used to find the options requested instead of the more focused ‘pre_option‘ filter.If
pre_optionwas used you could get rid of themonitor_option_accesses()function and just useadd_option_usage()(with a small adjustment in function parameters). It might make the recording of option usage faster as you would no longer be callingstr_starts_with()twice orpreg_replace().
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.