• Resolved daymobrew

    (@daymobrew)


    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_option was used you could get rid of the monitor_option_accesses() function and just use add_option_usage() (with a small adjustment in function parameters). It might make the recording of option usage faster as you would no longer be calling str_starts_with() twice or preg_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.