Changeset 2965 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/functions.php
- Timestamp:
- 04/15/2016 08:12:38 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/functions.php
r2938 r2965 96 96 add_action( 'add_meta_boxes', __NAMESPACE__ . '\\rename_comments_meta_box', 10, 2 ); 97 97 98 add_filter( 'post_type_link', __NAMESPACE__ . '\\method_permalink', 10, 2 );98 add_filter( 'post_type_link', __NAMESPACE__ . '\\method_permalink', 9, 2 ); 99 99 add_filter( 'term_link', __NAMESPACE__ . '\\taxonomy_permalink', 10, 3 ); 100 100 add_filter( 'posts_orderby', __NAMESPACE__ . '\\search_posts_orderby', 10, 2 ); … … 336 336 337 337 function method_permalink( $link, $post ) { 338 if ( $post->post_type !== 'wp-parser-method' ) 338 global $wp_rewrite; 339 340 if ( ! $wp_rewrite->using_permalinks() || ( 'wp-parser-method' !== $post->post_type ) ) { 339 341 return $link; 342 } 340 343 341 344 list( $class, $method ) = explode( '-', $post->post_name ); … … 345 348 346 349 function taxonomy_permalink( $link, $term, $taxonomy ) { 350 global $wp_rewrite; 351 352 if ( ! $wp_rewrite->using_permalinks() ) { 353 return $link; 354 } 355 347 356 if ( $taxonomy === 'wp-parser-source-file' ) { 348 357 $slug = $term->slug;
Note: See TracChangeset
for help on using the changeset viewer.