PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 6.3.0
Defender Security – Malware Scanner, Login Security & Firewall v6.3.0
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
← All changes | src/functions.php +0 -35 6.2.0 → 6.3.0 View file →
@@ -691,43 +691,8 @@
691 691
692 692 return false !== strpos( $request_uri, $rest_prefix );
693 693 }
694 694
695 -/**
696 - * Handle deprecated functions by logging or triggering actions.
697 - * This function is a wrapper for WordPress's _deprecated_function() function.
698 - * It is used to handle deprecated functions by either logging a deprecation
699 - * message or triggering an action. It checks if the current request is an AJAX
700 - * request or a REST API request and acts accordingly.
701 - *
702 - * @param string $function_name The function that was called.
703 - * @param string $version The version number that deprecated the function.
704 - * @param string $replacement (Optional) The function that should be used instead.
705 - *
706 - * @return void
707 - * @since 4.2.0
708 - */
709 -function defender_deprecated_function( string $function_name, string $version, string $replacement = '' ): void {
710 - /**
711 - * Filters whether to trigger an error for deprecated functions.
712 - *
713 - * @param bool $trigger Whether to trigger the error for deprecated functions. Default false.
714 - *
715 - * @since 4.2.1
716 - */
717 - if ( WP_DEBUG && apply_filters( 'defender_deprecated_function_trigger_error', false ) ) {
718 - if ( wp_doing_ajax() || defender_is_rest_api_request() ) {
719 - do_action( 'deprecated_function_run', $function_name, $replacement, $version );
720 -
721 - $log_string = "Function {$function_name} is deprecated since version {$version}!";
722 - $log_string .= '' !== $replacement ? " Use {$replacement} instead." : '';
723 - wp_die( esc_html( $log_string ) );
724 - } else {
725 - _deprecated_function( esc_html( $function_name ), esc_html( $version ), esc_html( $replacement ) );
726 - }
727 - }
728 -}
729 -
730 695 if ( ! function_exists( 'defender_get_data_from_request' ) ) {
731 696 /**
732 697 * Retrieves the value of a specific server data key after sanitizing it.
733 698 *