Changeset 10859
- Timestamp:
- 03/29/2021 07:17:35 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/jobs.wordpress.net/public_html/wp-content/plugins/jobswp/jobswp.php
r10858 r10859 1079 1079 */ 1080 1080 public function rel_canonical_link() { 1081 global $wp_rewrite; 1082 1081 1083 $url = ''; 1082 1084 1083 1085 if ( is_front_page() ) { 1084 1086 $url = home_url( '/' ); 1087 } elseif ( is_tax( 'job_category' ) ) { 1088 $url = get_term_link( get_queried_object_id(), 'job_category' ); 1089 } 1090 1091 if ( $url && is_paged() && (int) get_query_var( 'paged' ) > 1 ) { 1092 if ( false !== stripos( $url, '?' ) ) { 1093 // We're not actually sure 100% here if the current url supports rewrite rules. 1094 $url = add_query_arg( 'paged', (int) get_query_var( 'paged' ), $url ); 1095 } else { 1096 $url = rtrim( $url, '/' ) . '/' . $wp_rewrite->pagination_base . '/' . (int) get_query_var( 'paged' ) . '/'; 1097 } 1085 1098 } 1086 1099
Note: See TracChangeset
for help on using the changeset viewer.