' . $first_char . '' . mb_substr( $subtitle, 1 ); } $title = get_post_meta( wpgrade::lang_page_id( get_the_ID() ), wpgrade::prefix() . 'page_cover_title', true ); if ( empty( $title ) ) { //use the page title if empty $title = get_the_title(); } $description = get_post_meta( wpgrade::lang_page_id( get_the_ID() ), wpgrade::prefix() . 'page_cover_description', true ); //filter the content with some limitations to avoid having plugins doing nasty things to it $description = wpgrade::filter_content( $description, 'default' ); /* FIRST TEST FOR CONTACT PAGE TEMPLATE */ //get the Google Maps URL to test if empty $gmap_url = get_post_meta( wpgrade::lang_page_id( get_the_ID() ), wpgrade::prefix() . 'gmap_url', true ); if ( get_page_template_slug( get_the_ID() ) == 'page-templates/contact.php' ) { if ( ! empty( $gmap_url ) ) { //set the global so everybody knows that we are in dire need of the Google Maps API $is_gmap = true; $gmap_custom_style = get_post_meta( wpgrade::lang_page_id( get_the_ID() ), wpgrade::prefix() . 'gmap_custom_style', true ); $gmap_marker_content = get_post_meta( wpgrade::lang_page_id( get_the_ID() ), wpgrade::prefix() . 'gmap_marker_content', true ); $gmap_height = get_post_meta( wpgrade::lang_page_id( get_the_ID() ), wpgrade::prefix() . 'page_gmap_height', true ); if ( empty( $gmap_height ) ) { $gmap_height = 'half-height'; //the default } $classes .= ' ' . $gmap_height; ?>
data-markercontent="">
'attachment', 'posts_per_page' => - 1, 'orderby' => "post__in", 'post__in' => $gallery_ids ) ); } else { $attachments = array(); } if ( ! empty( $attachments ) ) { //let's grab the info regarding the slider $image_scale_mode = get_post_meta( get_the_ID(), wpgrade::prefix() . 'post_slider_image_scale_mode', true ); $slider_visiblenearby = get_post_meta( get_the_ID(), wpgrade::prefix() . 'post_slider_visiblenearby', true ); $slider_transition = get_post_meta( get_the_ID(), wpgrade::prefix() . 'post_slider_transition', true ); $slider_autoplay = get_post_meta( get_the_ID(), wpgrade::prefix() . 'post_slider_autoplay', true ); if ( $slider_autoplay ) { $slider_delay = get_post_meta( get_the_ID(), wpgrade::prefix() . 'post_slider_delay', true ); } ?>
' . $subtitle . '' . PHP_EOL; } ?>

' . $description . '' . PHP_EOL; } ?>
> ID, 'full-size' ); $attachment_fields = get_post_custom( $attachment->ID ); // prepare the video url if there is one $video_url = ( isset( $attachment_fields['_video_url'][0] ) && ! empty( $attachment_fields['_video_url'][0] ) ) ? esc_url( $attachment_fields['_video_url'][0] ) : ''; // should the video auto play? $video_autoplay = ( isset( $attachment_fields['_video_autoplay'][0] ) && ! empty( $attachment_fields['_video_autoplay'][0] ) && $attachment_fields['_video_autoplay'][0] === 'on' ) ? $attachment_fields['_video_autoplay'][0] : ''; if ( true === $set_cover ) { ?>
<?php the_title(); ?>
' . $subtitle . '' . PHP_EOL; } ?>

' . $description . '
' . PHP_EOL; } ?>