PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 28.5
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v28.5
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
← All changes | admin/class-admin-asset-dev-server-location.php +2 -12 18.428.5 View file →
@@ -14,9 +14,9 @@
14 14 * Holds the dev server's default URL.
15 15 *
16 16 * @var string
17 17 */
18 - const DEFAULT_URL = 'http://localhost:8080';
18 + public const DEFAULT_URL = 'http://localhost:8080';
19 19
20 20 /**
21 21 * Holds the url where the server is located.
22 22 *
@@ -29,11 +29,9 @@
29 29 *
30 30 * @param string|null $url Where the dev server is located.
31 31 */
32 32 public function __construct( $url = null ) {
33 - if ( $url === null ) {
34 - $url = self::DEFAULT_URL;
35 - }
33 + $url ??= self::DEFAULT_URL;
36 34
37 35 $this->url = $url;
38 36 }
39 37
@@ -46,16 +44,8 @@
46 44 * @return string The URL of the asset.
47 45 */
48 46 public function get_url( WPSEO_Admin_Asset $asset, $type ) {
49 47 if ( $type === WPSEO_Admin_Asset::TYPE_CSS ) {
50 - return $this->get_default_url( $asset, $type );
51 - }
52 -
53 - $asset_manager = new WPSEO_Admin_Asset_Manager();
54 - $flat_version = $asset_manager->flatten_version( WPSEO_VERSION );
55 - $version_less_source = str_replace( '-' . $flat_version, '', $asset->get_src() );
56 -
57 - if ( strpos( $version_less_source, 'select2' ) !== false ) {
58 48 return $this->get_default_url( $asset, $type );
59 49 }
60 50
61 51 $path = sprintf( 'js/dist/%s%s.js', $asset->get_src(), $asset->get_suffix() );