I wanted to know if the (auto_update_plugin) and the (auto_update_theme) filters work when put in theme's functions.php file instead of config.php file in WordPress core.
2 Answers
The filter works when placed in active theme's functions.php file. Just tested that, and the result was positive.
In general they should. All of config load, plugins load, and theme load happens during load process and before init
hook, which is considered a point after which load is done and functionality starts.
Unless you are dealing with early load-related events, typically plugin is perfectly appropriate place.
PS not sure what you mean by config.php
, hooks don't even work as early as wp-config.php
yet.
config.php
is this? You shouldn't be modifying WP Core