Submit
Path:
~
/
home
/
getwphos
/
www
/
shellfish
/
wp-content
/
plugins
/
wordpress-seo
/
src
/
integrations
/
admin
/
File Content:
fix-news-dependencies-integration.php
<?php namespace Yoast\WP\SEO\Integrations\Admin; use WP_Screen; use WPSEO_Admin_Asset_Manager; use Yoast\WP\SEO\Conditionals\Admin_Conditional; use Yoast\WP\SEO\Conditionals\News_Conditional; use Yoast\WP\SEO\Integrations\Integration_Interface; /** * Fix_News_Dependencies_Integration class. */ class Fix_News_Dependencies_Integration implements Integration_Interface { /** * Returns the conditionals based in which this loadable should be active. * * In this case: when on an admin page. * * @return array The conditionals. */ public static function get_conditionals() { return [ Admin_Conditional::class, News_Conditional::class ]; } /** * Registers an action to disable script concatenation. * * @return void */ public function register_hooks() { global $pagenow; // Load the editor script when on an edit post or new post page. $is_post_edit_page = $pagenow === 'post.php' || $pagenow === 'post-new.php'; if ( $is_post_edit_page ) { \add_action( 'admin_enqueue_scripts', [ $this, 'add_news_script_dependency' ], 11 ); } } /** * Fixes the news script dependency. * * @return void */ public function add_news_script_dependency() { $scripts = \wp_scripts(); if ( ! isset( $scripts->registered['wpseo-news-editor'] ) ) { return; } $is_block_editor = WP_Screen::get()->is_block_editor(); $post_edit_handle = 'post-edit'; if ( ! $is_block_editor ) { $post_edit_handle = 'post-edit-classic'; } $scripts->registered['wpseo-news-editor']->deps[] = WPSEO_Admin_Asset_Manager::PREFIX . $post_edit_handle; } }
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
addon-installation
---
0755
activation-cleanup-integration.php
1898 bytes
0644
admin-columns-cache-integration.php
7778 bytes
0644
background-indexing-integration.php
11012 bytes
0644
check-required-version.php
4980 bytes
0644
crawl-settings-integration.php
11152 bytes
0644
cron-integration.php
1005 bytes
0644
deactivated-premium-integration.php
4313 bytes
0644
first-time-configuration-integration.php
15628 bytes
0644
first-time-configuration-notice-integration.php
5114 bytes
0644
fix-news-dependencies-integration.php
1589 bytes
0644
health-check-integration.php
2750 bytes
0644
helpscout-beacon.php
13077 bytes
0644
import-integration.php
8838 bytes
0644
indexables-exclude-taxonomy-integration.php
1419 bytes
0644
indexing-notification-integration.php
7112 bytes
0644
indexing-tool-integration.php
7460 bytes
0644
installation-success-integration.php
4152 bytes
0644
integrations-page.php
7994 bytes
0644
link-count-columns-integration.php
7819 bytes
0644
menu-badge-integration.php
916 bytes
0644
migration-error-integration.php
1379 bytes
0644
old-configuration-integration.php
1685 bytes
0644
redirect-integration.php
1763 bytes
0644
redirects-page-integration.php
1456 bytes
0644
unsupported-php-version-notice.php
4951 bytes
0644
workouts-integration.php
11314 bytes
0644
N4ST4R_ID | Naxtarrr