$previous_value, 'EventType' => $event_type, ) ); } // if ( $frequency !== $previous_frequency ) { // Alert_Manager::trigger_event( // 10902, // array( // 'PreviousValue' => $previous_value, // 'EventType' => $event_type, // ) // ); // } if ( $robots_txt !== $previous_robots_txt ) { Alert_Manager::trigger_event( 10903, array( 'PreviousValue' => $previous_robots_txt, 'EventType' => $robots_txt, ) ); } } /** * Fires on the timely termly_site_scan option add. * * @param mixed $option - Option name. * @param mixed $new_value - New value of the option. * * @return void * * @since 5.4.0 */ public static function site_scan_add( $option, $new_value ) { if ( \is_array( $new_value ) ) { if ( isset( $new_value['enabled'] ) ) { $event_type = Settings_Helper::string_to_bool( $new_value['enabled'] ) ? 'enabled' : 'disabled'; } else { $event_type = 'disabled'; } if ( isset( $new_value['frequency'] ) ) { $frequency = $new_value['frequency']; } else { $frequency = 'trimonthly'; } if ( isset( $new_value['robots_txt'] ) ) { $robots_txt = Settings_Helper::string_to_bool( $new_value['robots_txt'] ) ? 'enabled' : 'disabled'; } else { $robots_txt = 'disabled'; } } else { $event_type = 'disabled'; $frequency = 'trimonthly'; $robots_txt = 'disabled'; } Alert_Manager::trigger_event( 10902, array( 'PreviousValue' => 'disabled', 'EventType' => $event_type, ) ); // if ( $frequency !== $previous_frequency ) { // Alert_Manager::trigger_event( // 10902, // array( // 'PreviousValue' => $previous_value, // 'EventType' => $event_type, // ) // ); // } Alert_Manager::trigger_event( 10903, array( 'PreviousValue' => 'disabled', 'EventType' => $robots_txt, ) ); } /** * Fires on the timely termly_site_scan option update. * * @param mixed $old_value - Old value of the option. * @param mixed $new_value - New value of the option. * * @return void * * @since 5.4.0 */ public static function banner_settings( $old_value, $new_value ) { $old_value = Settings_Helper::string_to_bool( $old_value ) ? 'enabled' : 'disabled'; $new_value = Settings_Helper::string_to_bool( $new_value ) ? 'enabled' : 'disabled'; if ( $old_value !== $new_value ) { Alert_Manager::trigger_event( 10904, array( 'PreviousValue' => $old_value, 'EventType' => $new_value, ) ); } } /** * Fires on the timely termly_site_scan option add. * * @param mixed $option - Option name. * @param mixed $new_value - New value of the option. * * @return void * * @since 5.4.0 */ public static function banner_settings_add( $option, $new_value ) { $new_value = Settings_Helper::string_to_bool( $new_value ) ? 'enabled' : 'disabled'; Alert_Manager::trigger_event( 10904, array( 'PreviousValue' => 'disabled', 'EventType' => $new_value, ) ); } /** * Fires on the timely termly_site_scan option update. * * @param mixed $old_value - Old value of the option. * @param mixed $new_value - New value of the option. * * @return void * * @since 5.4.0 */ public static function auto_blocker( $old_value, $new_value ) { $old_value = Settings_Helper::string_to_bool( $old_value ) ? 'enabled' : 'disabled'; $new_value = Settings_Helper::string_to_bool( $new_value ) ? 'enabled' : 'disabled'; if ( $old_value !== $new_value ) { Alert_Manager::trigger_event( 10905, array( 'PreviousValue' => $old_value, 'EventType' => $new_value, ) ); } } /** * Fires on the timely termly_site_scan option add. * * @param mixed $option - Option name. * @param mixed $new_value - New value of the option. * * @return void * * @since 5.4.0 */ public static function auto_blocker_add( $option, $new_value ) { $new_value = Settings_Helper::string_to_bool( $new_value ) ? 'enabled' : 'disabled'; Alert_Manager::trigger_event( 10905, array( 'PreviousValue' => 'disabled', 'EventType' => $new_value, ) ); } /** * Fires on the timely termly_site_scan option update. * * @param mixed $old_value - Old value of the option. * @param mixed $new_value - New value of the option. * * @return void * * @since 5.4.0 */ public static function udpated_api( $old_value, $new_value ) { if ( $old_value !== $new_value ) { Alert_Manager::trigger_event( 10911, array( 'PreviousValue' => $old_value, 'NewValue' => $new_value, ) ); } } /** * Fires on the timely termly_site_scan option add. * * @param mixed $option - Option name. * @param mixed $new_value - New value of the option. * * @return void * * @since 5.4.0 */ public static function added_api( $option, $new_value ) { Alert_Manager::trigger_event( 10911, array() ); } } }