Changeset 10858
- Timestamp:
- 03/29/2021 07:10:25 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/jobs.wordpress.net/public_html/wp-content/plugins/jobswp/jobswp.php
r10856 r10858 131 131 132 132 add_filter( 'wp_sitemaps_add_provider', array( $this, 'disable_users_sitemap' ), 10, 2 ); 133 134 add_action( 'wp_head', array( $this, 'rel_canonical_link' ) ); 133 135 } 134 136 … … 1072 1074 return $provider; 1073 1075 } 1076 1077 /** 1078 * Outputs a rel="canonical" link tag. 1079 */ 1080 public function rel_canonical_link() { 1081 $url = ''; 1082 1083 if ( is_front_page() ) { 1084 $url = home_url( '/' ); 1085 } 1086 1087 if ( $url ) { 1088 printf( '<link rel="canonical" href="%s" />' . "\n", esc_url( $url ) ); 1089 } 1090 } 1091 1074 1092 } 1075 1093
Note: See TracChangeset
for help on using the changeset viewer.