Normally, you can add code snippets for your custom functions into
functions.php which is placed in your theme or child
theme folder. But in case you select “mu-plugins” (ip-geo-block-mu.php)
as “Validation timing” in “Validation rule settings”
section, your code for this plugin in
functions.php would be failed to work
as you expected.
This restriction is originated from the excution order described
in Action Reference where you can find
hook is triggered far before
after_setup_theme which is the timing of your
functions.php to be parsed.
Then what’t the solution?
If there is a special file named
drop-in.php in your Geolocation API folder which might be one the of following locations:
You can find a sample for
/wp-content/plugins/ip-geo-block/drop-in-sample.php. So you can copy it into
your Geolocation API folder and rename it as
Note that even in case of multisite,
drop-in.php is the only one file for
all sites and will be called on each site. So if you want each site to behave
differently, you should add some code like follows:
functions.phpdoesn't need to be put together into
drop-in.phpbut functions related to only this plugin such as Filter hooks for this plugin.