Changeset 9461 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions.php
- Timestamp:
- 02/04/2020 12:16:34 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions.php
r9253 r9461 355 355 } 356 356 add_action( 'login_purge_pending_registrations', 'wporg_login_purge_pending_registrations' ); 357 358 /** 359 * Add a canonical tag to the login screens. 360 */ 361 function wporg_login_canonical_link() { 362 $canonical = false; 363 364 // If the regular expression for this route is not matching, it's the canonical. 365 if ( false === stripos( WP_WPOrg_SSO::$matched_route_regex, '(' ) ) { 366 $canonical = site_url( WP_WPOrg_SSO::$matched_route_regex ); 367 } 368 369 if ( $canonical ) { 370 printf( '<link rel="canonical" href="%s" />', esc_url( $canonical ) ); 371 } 372 } 373 add_action( 'login_head', 'wporg_login_canonical_link' ); 374 add_action( 'wp_head', 'wporg_login_canonical_link' );
Note: See TracChangeset
for help on using the changeset viewer.