Created
January 18, 2018 11:57
-
-
Save anonymous/553f2455f940f6e81c05c3140cacd592 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
*Change the name of the tab | |
*/ | |
function wp_travel_custom_tab_name_mod( $wp_travel_itinerary_tabs ){ | |
global $wp_travel_itinerary; | |
$no_details_found_message = '<p class="wp-travel-no-detail-found-msg">' . __( 'No details found.', 'wp-travel' ) . '</p>'; | |
$trip_outline = $wp_travel_itinerary->get_outline() ? $wp_travel_itinerary->get_outline() : $no_details_found_message; | |
$wp_travel_itinerary_tabs['trip_outline'] = array( 'label' => __( 'Accommodation Details', 'wp-travel' ), 'label_class' => '', 'content' => $trip_outline ); | |
return $wp_travel_itinerary_tabs; | |
} | |
add_filter( 'wp_travel_itinerary_tabs', 'wp_travel_custom_tab_name_mod', 99 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment