Merged in feature/from-pantheon (pull request #16)

code from pantheon

* code from pantheon
This commit is contained in:
Tony Volpe
2024-01-10 17:03:02 +00:00
parent 054b4fffc9
commit 4eb982d7a8
16492 changed files with 3475854 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
<?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;