Which action is triggered when a theme was modified?

Anytime changes are saved in the Customizer, there is a customize_save_after hook. For theme updates, you can use the upgrader_process_complete hook – you pass it various arguments including ‘type’ => ‘theme’. I don’t think there are any WordPress-specific hooks for when files of a child theme are modified. This typically happens via FTP, rather than … Read more

How to disable reCaptcha v3 except on Contact Form 7 pages?

I’d put the dequeue statements inside the ‘if’, replacing the $loadscripts line. No need to set the flag and then check the flag to dequeue. That might simplify the code for further debugging. Edited: suggested code corrections: function contactform_dequeue_scripts() { if (is_singular()) { $post = get_post(); if (has_shortcode($post->post_content, ‘contact-form-7’)) { wp_dequeue_script(‘contact-form-7’); wp_dequeue_script(‘google-recaptcha’); wp_dequeue_style(‘contact-form-7’); } } … Read more

Plugin settings not saving

the problem is you keep resting the values here: $options = array( ‘cemb_seminar_seminars_college’ => ‘0’, ‘cemb_seminar_showcases_college’ => ‘0’, ‘cemb_seminar_writers_college’ > ‘0’, ‘cemb_seminar_aet_college’ => ‘0’, ‘cemb_seminar_mbu_college’ => ‘0’, ‘cemb_seminar_eis_college’ => ‘0’, ‘cemb_seminar_sng_college’ => ‘0’, ); update_option( ‘cemb_seminar_options’, $options ); change it to $options = get_option(‘cemb_seminar_options’); if ($options === false){ $options = array( ‘cemb_seminar_seminars_college’ => ‘0’, ‘cemb_seminar_showcases_college’ … Read more