Changeset 55620
- Timestamp:
- 04/04/2023 02:54:31 PM (22 months ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/default-filters.php
r55200 r55620 329 329 add_action( 'wp_head', 'feed_links_extra', 3 ); 330 330 add_action( 'wp_head', 'rsd_link' ); 331 add_action( 'wp_head', 'wlwmanifest_link' );332 331 add_action( 'wp_head', 'locale_stylesheet' ); 333 332 add_action( 'publish_future_post', 'check_and_publish_future_post', 10, 1 ); -
trunk/src/wp-includes/deprecated.php
r55436 r55620 4628 4628 ); 4629 4629 } 4630 4631 /** 4632 * Displays the link to the Windows Live Writer manifest file. 4633 * 4634 * @link https://msdn.microsoft.com/en-us/library/bb463265.aspx 4635 * @since 2.3.1 4636 * @deprecated 6.3.0 WLW manifest is no longer in use and no longer included in core, 4637 * so the output from this function is removed. 4638 */ 4639 function wlwmanifest_link() { 4640 _deprecated_function( __FUNCTION__, '6.3.0' ); 4641 } -
trunk/src/wp-includes/general-template.php
r55526 r55620 3374 3374 3375 3375 /** 3376 * Displays the link to the Windows Live Writer manifest file.3377 *3378 * @link https://msdn.microsoft.com/en-us/library/bb463265.aspx3379 * @since 2.3.13380 */3381 function wlwmanifest_link() {3382 printf(3383 '<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="%s" />' . "\n",3384 includes_url( 'wlwmanifest.xml' )3385 );3386 }3387 3388 /**3389 3376 * Displays a referrer `strict-origin-when-cross-origin` meta tag. 3390 3377 * -
trunk/src/wp-includes/https-detection.php
r53878 r55620 209 209 } 210 210 211 // 2. Check if HTML includes the site's Windows Live Writer manifest link. 212 if ( has_action( 'wp_head', 'wlwmanifest_link' ) ) { 213 // Try both HTTPS and HTTP since the URL depends on context. 214 $pattern = preg_replace( '#^https?:(?=//)#', '', includes_url( 'wlwmanifest.xml' ) ); // See wlwmanifest_link(). 215 return false !== strpos( $html, $pattern ); 216 } 217 218 // 3. Check if HTML includes the site's REST API link. 211 // 2. Check if HTML includes the site's REST API link. 219 212 if ( has_action( 'wp_head', 'rest_output_link_wp_head' ) ) { 220 213 // Try both HTTPS and HTTP since the URL depends on context. -
trunk/tests/phpunit/tests/https-detection.php
r55029 r55620 200 200 * @ticket 47577 201 201 */ 202 public function test_wp_is_local_html_output_via_wlwmanifest_link() {203 remove_action( 'wp_head', 'rsd_link' );204 205 // HTML includes WLW manifest link.206 $head_tag = get_echo( 'wlwmanifest_link' );207 $html = $this->get_sample_html_string( $head_tag );208 $this->assertTrue( wp_is_local_html_output( $html ) );209 210 // HTML includes modified WLW manifest link but same URL.211 $head_tag = str_replace( ' />', '>', get_echo( 'wlwmanifest_link' ) );212 $html = $this->get_sample_html_string( $head_tag );213 $this->assertTrue( wp_is_local_html_output( $html ) );214 215 // HTML includes WLW manifest link with alternative URL scheme.216 $head_tag = get_echo( 'wlwmanifest_link' );217 $head_tag = false !== strpos( $head_tag, 'https://' ) ? str_replace( 'https://', 'http://', $head_tag ) : str_replace( 'http://', 'https://', $head_tag );218 $html = $this->get_sample_html_string( $head_tag );219 $this->assertTrue( wp_is_local_html_output( $html ) );220 221 // HTML does not include WLW manifest link.222 $html = $this->get_sample_html_string();223 $this->assertFalse( wp_is_local_html_output( $html ) );224 }225 226 /**227 * @ticket 47577228 */229 202 public function test_wp_is_local_html_output_via_rest_link() { 230 203 remove_action( 'wp_head', 'rsd_link' ); 231 remove_action( 'wp_head', 'wlwmanifest_link' );232 204 233 205 // HTML includes REST API link. … … 257 229 public function test_wp_is_local_html_output_cannot_determine() { 258 230 remove_action( 'wp_head', 'rsd_link' ); 259 remove_action( 'wp_head', 'wlwmanifest_link' );260 231 remove_action( 'wp_head', 'rest_output_link_wp_head' ); 261 232
Note: See TracChangeset
for help on using the changeset viewer.