Skip to content
Public Ticket #15890

AMP

Conversation thread

PenciDesign replied

Staff Reply

Hi,

Have you used the latest version of the Yoast SEO plugin? Because as I can see there is an issue with Yoast SEO.

Best Regards,

PenciDesign

maticholobar replied

Customer Reply

image

maticholobar started the conversation

Conversation Start

Hi,

it looks like AMP is calling a deprecated function (see image).

/**
 * Mark a function as deprecated and inform when it has been used.
 *
 * There is a {@see 'hook deprecated_function_run'} that will be called that can be used
 * to get the backtrace up to what file and function called the deprecated
 * function.
 *
 * The current behavior is to trigger a user error if `WP_DEBUG` is true.
 *
 * This function is to be used in every function that is deprecated.
 *
 * @since 2.5.0
 * @since 5.4.0 This function is no longer marked as "private".
 * @since 5.4.0 The error type is now classified as E_USER_DEPRECATED (used to default to E_USER_NOTICE).
 *
 * @param string $function    The function that was called.
 * @param string $version     The version of WordPress that deprecated the function.
 * @param string $replacement Optional. The function that should have been called. Default empty.
 */
function _deprecated_function( $function, $version, $replacement = '' ) {

/**
* Fires when a deprecated function is called.
*
* @since 2.5.0
*
* @param string $function    The function that was called.
* @param string $replacement The function that should have been called.
* @param string $version     The version of WordPress that deprecated the function.
*/
do_action( 'deprecated_function_run', $function, $replacement, $version );

/**
* Filters whether to trigger an error for deprecated functions.
*
* @since 2.5.0
*
* @param bool $trigger Whether to trigger the error for deprecated functions. Default true.
*/
if ( WP_DEBUG && apply_filters( 'deprecated_function_trigger_error', true ) ) {
if ( function_exists( '__' ) ) {
if ( $replacement ) {
trigger_error(
sprintf(
/* translators: 1: PHP function name, 2: Version number, 3: Alternative function name. */
__( '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ),
$function,
$version,
$replacement
),
E_USER_DEPRECATED
);
} else {
trigger_error(
sprintf(
/* translators: 1: PHP function name, 2: Version number. */
__( '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.' ),
$function,
$version
),
E_USER_DEPRECATED
);
}
} else {
if ( $replacement ) {
trigger_error(
sprintf(
'%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.',
$function,
$version,
$replacement
),
E_USER_DEPRECATED
);
} else {
trigger_error(
sprintf(
'%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.',
$function,
$version
),
E_USER_DEPRECATED
);
}
}
}
}

Want to join this conversation or access attachments? Sign in first.