Changeset 9991
- Timestamp:
- 07/02/2020 06:24:42 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/wporg-seo/canonical.php
r9872 r9991 147 147 } 148 148 149 // Add order/orderby to Archives.150 if ( is_archive() || is_search() || is_home() ) {151 // Check $wp since `get_query_var()` will return default values too.152 if ( !empty( $wp->query_vars[ 'order'] ) && in_array( $wp->query_vars[ 'order'], [ 'asc', 'desc' ], true ) ) {153 $url = add_query_arg( 'order', get_query_var( 'order' ), $url );154 }155 if ( !empty( $wp->query_vars[ 'orderby'] ) ) {156 $url = add_query_arg( 'orderby', strtolower( get_query_var( 'orderby' ) ), $url );157 }158 }159 160 149 $url = apply_filters( 'wporg_canonical_url', $url ); 161 150
Note: See TracChangeset
for help on using the changeset viewer.