Changeset 1162285
- Timestamp:
- 05/17/2015 07:41:25 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
the-holiday-calendar/trunk/the-holiday-calendar.php
r1162273 r1162285 33 33 add_action( 'wp_enqueue_scripts', array( 'the_holiday_calendar', 'load_css' ) ); 34 34 add_filter( 'body_class', array( 'the_holiday_calendar', 'add_body_classes') ); 35 add_filter( 'the_title', array( 'the_holiday_calendar', 'override_title') );35 add_filter( 'the_title', array( 'the_holiday_calendar', 'override_title'), 10, 2 ); 36 36 //add_action( 'template_redirect', array( 'the_holiday_calendar', 'override_template') ); 37 37 //add_filter( 'the_content', array( 'the_holiday_calendar', 'override_content') ); … … 174 174 } 175 175 176 function override_title($title) { 176 function override_title($title, $id) { 177 global $post; 177 178 if(get_post_type() == thc_constants::POSTTYPE) 178 179 { … … 186 187 $title = $title . ' (' . self::get_requested_date() . ')'; 187 188 } 188 else if (thc_settings_helper::get_show_date_in_title() == 1 && is_single() && !request_helper::get_surpress_title_filter() )189 else if (thc_settings_helper::get_show_date_in_title() == 1 && is_single() && !request_helper::get_surpress_title_filter() && $id == get_the_ID()) 189 190 { 190 global $post;191 191 192 192 $event_date = get_post_meta( $post->ID, 'eventDate', true );
Note: See TracChangeset
for help on using the changeset viewer.