Changeset 7381
- Timestamp:
- 07/06/2018 06:46:39 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/functions.php
r7278 r7381 260 260 } 261 261 262 /** 263 * Filters the permalink for a wp-parser-method post. 264 * 265 * @param string $link The post's permalink. 266 * @param \WP_Post $post The post in question. 267 * @return string 268 */ 262 269 function method_permalink( $link, $post ) { 263 270 global $wp_rewrite; … … 267 274 } 268 275 269 list( $class, $method ) = explode( '-', $post->post_name ); 270 $link = home_url( user_trailingslashit( "reference/classes/$class/$method" ) ); 271 return $link; 276 $parts = explode( '-', $post->post_name ); 277 $method = array_pop( $parts ); 278 $class = implode( '-', $parts ); 279 280 return home_url( user_trailingslashit( "reference/classes/$class/$method" ) ); 272 281 } 273 282
Note: See TracChangeset
for help on using the changeset viewer.