*/ protected function styles_to_be_registered() { $flat_version = $this->flatten_version( WPSEO_VERSION ); return [ [ 'name' => 'admin-css', 'src' => 'yst_plugin_tools-' . $flat_version, 'deps' => [ self::PREFIX . 'toggle-switch' ], ], [ 'name' => 'toggle-switch', 'src' => 'toggle-switch-' . $flat_version, ], [ 'name' => 'dismissible', 'src' => 'wpseo-dismissible-' . $flat_version, ], [ 'name' => 'notifications', 'src' => 'notifications-' . $flat_version, ], [ 'name' => 'alert', 'src' => 'alerts-' . $flat_version, ], [ 'name' => 'badge', 'src' => 'badge-' . $flat_version, ], [ 'name' => 'edit-page', 'src' => 'edit-page-' . $flat_version, ], [ 'name' => 'featured-image', 'src' => 'featured-image-' . $flat_version, ], [ 'name' => 'metabox-css', 'src' => 'metabox-' . $flat_version, 'deps' => [ self::PREFIX . 'select2', self::PREFIX . 'admin-css', 'wp-components', ], ], [ 'name' => 'wp-dashboard', 'src' => 'dashboard-' . $flat_version, ], [ 'name' => 'scoring', 'src' => 'yst_seo_score-' . $flat_version, ], [ 'name' => 'adminbar', 'src' => 'adminbar-' . $flat_version, 'deps' => [ 'admin-bar', ], ], [ 'name' => 'primary-category', 'src' => 'metabox-primary-category-' . $flat_version, ], [ 'name' => 'select2', 'src' => 'select2/select2', 'suffix' => '.min', 'version' => '4.0.1', 'rtl' => false, ], [ 'name' => 'admin-global', 'src' => 'admin-global-' . $flat_version, ], [ 'name' => 'yoast-components', 'src' => 'yoast-components-' . $flat_version, ], [ 'name' => 'extensions', 'src' => 'yoast-extensions-' . $flat_version, ], [ 'name' => 'filter-explanation', 'src' => 'filter-explanation-' . $flat_version, ], [ 'name' => 'search-appearance', 'src' => 'search-appearance-' . $flat_version, 'deps' => [ self::PREFIX . 'monorepo', ], ], [ 'name' => 'monorepo', 'src' => 'monorepo-' . $flat_version, ], [ 'name' => 'structured-data-blocks', 'src' => 'structured-data-blocks-' . $flat_version, 'deps' => [ 'wp-edit-blocks' ], ], [ 'name' => 'schema-blocks', 'src' => 'schema-blocks-' . $flat_version, ], [ 'name' => 'elementor', 'src' => 'elementor-' . $flat_version, ], ]; } /** * Determines the URL of the asset. * * @param WPSEO_Admin_Asset $asset The asset to determine the URL for. * @param string $type The type of asset. Usually JS or CSS. * * @return string The URL of the asset. */ protected function get_url( WPSEO_Admin_Asset $asset, $type ) { $scheme = wp_parse_url( $asset->get_src(), PHP_URL_SCHEME ); if ( in_array( $scheme, [ 'http', 'https' ], true ) ) { return $asset->get_src(); } return $this->asset_location->get_url( $asset, $type ); } }