Skip to content

Instantly share code, notes, and snippets.

function tp_philosophy_pro_posted_on() {
$time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string = '<time class="entry-date published" datetime="%1$s"><a href="%5$s">%2$s</a></time><time class="updated" datetime="%3$s">%4$s</time>';
}
$year = get_the_date( 'Y' );
$month = get_the_date( 'm' );
$day = get_the_date( 'd' );
$time_string = sprintf( $time_string,
<?php
/**
* Itinerary Single Contnet Template
*
* This template can be overridden by copying it to yourtheme/wp-travel/content-single-itineraries.php.
*
* HOWEVER, on occasion wp-travel will need to update template files and you (the theme developer).
* will need to copy the new files to your theme to maintain compatibility. We try to do this.
* as little as possible, but it does happen. When this occurs the version of the template file will.
* be bumped and the readme will list any important changes.
function wp_travel_info_customize(){
?>
<li>
<div class="travel-info">
<strong class="title">Field Title</strong>
</div>
<div class="travel-info">
<span class="value">
Your Value
</span>
remove_action( 'wp_travel_single_itinerary_after_trip_meta_list', 'wp_travel_single_location', 1 );
function wp_travel_single_location_customize( $post_id ) {
if ( ! $post_id ) {
return;
}
$terms = get_the_terms( $post_id, 'travel_locations' );
$start_date = get_post_meta( $post_id, 'wp_travel_start_date', true );
$end_date = get_post_meta( $post_id, 'wp_travel_end_date', true );
button, a.button, input[type="button"], input[type="reset"], input[type="submit"] {
background: #ffd700 none repeat scroll 0 0;
}
button:hover, a.button:hover, input[type="button"]:hover, input[type="reset"]:hover, input[type="submit"]:hover {
background-color: #ffd700;
}
a {
color: #ffd700;
text-decoration: inherit;
}
function wp_travel_customize_price_display( $s, $c, $d ) {
global $wp_travel_itinerary;
if ( $wp_travel_itinerary->is_sale_enabled() ) {
return $s;
}
return sprintf( esc_html__('N%1s %2s', 'wp-travel' ), $c, $d );
}
add_filter( 'wp_travel_itinerary_price', 'wp_travel_customize_price_display', 99, 3 );
function wp_travel_customize_sale_price_display( $s, $c, $d ) {
return sprintf( esc_html__('N%1s %2s', 'wp-travel' ), $c, $d );
/**
* Main header
*
* @since Biography 1.0.0
*
* @param null
* @return null
*
*/
function biography_pro_child_update_option_vals( $value, $old_value ) {
update_option( 'theme_mods_' . get_template(), $value );
return $old_value; // prevent update to child theme mods
}
function biography_pro_child_customizer_default_vals_update( $default ) {
return get_option( 'theme_mods_' . get_template(), $default );
}
function biography_pro_child_customizer_parent_options_import() {
function travel_log_front_page_slider_content() {
$defaults = travel_log_default_values();
$enabled = travel_log_get_theme_option( 'home_slider_enable' );
if ( false === $enabled ) {
return;
}
/**
* Header end html codes
*
* @since Chrisporate Pro 1.0.0
*
*/
function chrisporate_pro_header_banner() {
$options = chrisporate_pro_get_theme_options();
$vid_class = ( has_header_video() && chrisporate_pro_is_frontpage() ) ? 'video-enabled' : '';