Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/**
*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