Does the ‘init’ hook works for all sites in multisite?
Question
Im trying to trigger a configuration everytime I create a new subsite on multisite environment, like so:
add_action('init', 'mgh_set_events_option', 99);
function mgh_set_events_option(){
$mgh_is_set_options = get_option('mgh_is_set_options');
if(!$mgh_is_set_options){
print_r('setting options');
update_option( 'mgh_is_set_options', true );
}
}
The problem is that the ‘init’ action does not trigger in some sites from our multisite instance. There is any principle of why this happens?
0
3 weeks
2023-01-19T11:22:10-05:00
2023-01-19T11:22:10-05:00 0 Answers
0 views
0
Leave an answer