Files
medicalalert-web-reloaded/wp/wp-content/plugins/imagify/inc/3rd-party/yoast-seo.php
Tony Volpe 4eb982d7a8 Merged in feature/from-pantheon (pull request #16)
code from pantheon

* code from pantheon
2024-01-10 17:03:02 +00:00

25 lines
635 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
if ( defined( 'WPSEO_VERSION' ) && is_admin() && ! wp_doing_ajax() ) :
add_action( 'wp_print_scripts', '_imagify_dequeue_yoastseo_script' );
/**
* Remove Yoast SEO bugged script.
*
* @since 1.4.1
*/
function _imagify_dequeue_yoastseo_script() {
if ( ! function_exists( 'get_current_screen' ) ) {
return;
}
$current_screen = get_current_screen();
if ( isset( $current_screen ) && 'post' === $current_screen->base && 'attachment' === $current_screen->post_type ) {
wp_dequeue_script( 'yoast-seo' );
wp_deregister_script( 'yoast-seo' );
}
}
endif;