Changeset 797
- Timestamp:
- 08/14/2014 08:07:04 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/extras.php
r783 r797 105 105 * Appends parentheses to titles in archive view for functions and methods. 106 106 * 107 * @param string $title The title. 107 * @param string $title The title. 108 * @param int|WP_Post $post The post ID or post object. 108 109 * @return string 109 110 */ 110 function wporg_filter_archive_title( $title ) {111 if ( ( ! is_single() || doing_filter( 'single_post_title' ) ) && in_array( get_post_type( ), array( 'wp-parser-function', 'wp-parser-method' ) ) ) {111 function wporg_filter_archive_title( $title, $post ) { 112 if ( ( ! is_single() || doing_filter( 'single_post_title' ) ) && in_array( get_post_type( $post ), array( 'wp-parser-function', 'wp-parser-method' ) ) ) { 112 113 $title .= '()'; 113 114 } … … 115 116 return $title; 116 117 } 117 add_filter( 'the_title', 'wporg_filter_archive_title');118 add_filter( 'single_post_title', 'wporg_filter_archive_title' );118 add_filter( 'the_title', 'wporg_filter_archive_title', 10, 2 ); 119 add_filter( 'single_post_title', 'wporg_filter_archive_title', 10, 2 );
Note: See TracChangeset
for help on using the changeset viewer.