?
Current File : /home/c/i/d/cideo/www/wp-includesVIp/js/crop/images/post-formats.tar
content-quote.php000066600000001064151264517050010075 0ustar00<?php // Post Format Quote

// background image
$quote_bg = wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ) );

// get data from custom fields
$rf_quote_content = get_post_meta( $post->ID, 'rf_quote_content', true );
$rf_quote_title	  = get_post_meta( $post->ID, 'rf_quote_title', true );

?>

<!-- Post Quote -->
<div class="link-and-quote quote-wrap" style="background-image: url(<?php echo esc_url( $quote_bg ); ?>);">
	<p><?php echo esc_html($rf_quote_content); ?></p>
	<small><?php echo esc_html($rf_quote_title); ?></small>
</div>content-gallery.php000066600000010177151264517050010404 0ustar00<?php // Post Format Gallery

// get theme cusomizer data
$bPage_general 		= get_option( 'royal_bPage_general' );
$bPost_overlay 		= get_option( 'royal_bPost_overlay' );
$pPost_formats 		= get_option( 'royal_pPost_formats' );
$pPage_general 		= get_option( 'royal_pPage_general' );
$pPost_effects 		= get_option( 'royal_pPost_effects' );

$gallery_general 	= get_option( 'royal_gallery' );
$stacked_caption 	= get_option( 'royal_stacked_caption' );
$gallery_arrows 	= get_option( 'royal_gallery_arrows' );
$gallery_lightbox 	= get_option( 'royal_gallery_lightbox' );


// get post meta data
$rf_gallery_type 	= get_post_meta( $post->ID, 'rf_gallery_type', true );
$rf_gallery_img_ids = get_post_meta( $post->ID, 'rf_gallery_img_ids', true );
$rf_gallery_img_ids = explode( ',', $rf_gallery_img_ids );
$second_featured_img_id = get_post_meta( $post->ID, 'second_featured_img_id', true );

?>

<?php if ( 'royal_portfolio' === get_post_type()  ) : ?>

	<!-- Post Image Overlay -->
	<div class="image-overlay">

		<?php 

		// get image ALT text
		$attachment = get_post( get_post_thumbnail_id() );
		$attachment_title = '';

		if ( $attachment !== null ) {
			$attachment_title = esc_attr( $attachment->post_title );
		}
			
		if ( $pPost_effects['overlay_click'] === 'lightbox' ) {
			$full_size_img 	= wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' );
			$image_id		= ( $pPost_effects['nxt_prev_image'] === true ) ? 'all' : get_the_ID();

			echo '<a href="'. esc_url($full_size_img[0]) .'" rel="prettyPhoto['. $image_id .']" data-title="'. $attachment_title .'">';
				echo '<i class="fa fa-'. $pPost_effects['overlay_icon'] .'"></i>';
			echo '</a>';

		} else {

			echo '<a href="'. esc_url(get_the_permalink()) .'">';
				echo '<i class="fa fa-'. $pPost_effects['overlay_icon'] .'"></i>';
			echo '</a>';
			
		}

		?>

	</div>

	<!-- Post Type Icon -->
	<div class="post-format-icon">
		<i class="fa fa-<?php echo esc_attr($pPost_formats['gallery_icon']); ?>"></i>
	</div>
	
	<?php

	// get current page object
	global $pagename;
	$current_page_obj = get_page_by_path($pagename);

	if ( isset($current_page_obj) ) {
		$current_page_obj = $current_page_obj->post_content;
	} else {
		$current_page_obj = 'empty';
	}

	// Post Thumbnail
	if ( $pPage_general['layout'] === 'fitRows' || strpos( $current_page_obj, 'portfolio_layout_mode="fitRows"' ) !== false ){
		the_post_thumbnail('royal-portfolio-post');
		if ( $second_featured_img_id !== '' ) {
			echo wp_get_attachment_image( $second_featured_img_id, 'royal-portfolio-post' );
		}
	} else {
		the_post_thumbnail();
		if ( $second_featured_img_id !== '' ) {
			echo wp_get_attachment_image( $second_featured_img_id, 'full' );
		}
	}

	?>

<?php else : ?>

	<!-- Post Gallery Slideshow -->
	<div class="gallery-slideshow">

		<div class="cycle-slideshow" data-cycle-slides="> div" data-cycle-timeout="0" data-cycle-prev=".prev-<?php the_ID(); ?>" data-cycle-next=".nxt-<?php the_ID(); ?>" data-cycle-pause-on-hover="true"> 

			<?php foreach ( $rf_gallery_img_ids as $rf_gallery_img_id ) : ?>

				<div class="gallery-slide">
					<?php

					// get current page object
					global $pagename;
					$current_page_obj = get_page_by_path($pagename);

					if ( isset($current_page_obj) ) {
						$current_page_obj = $current_page_obj->post_content;
					} else {
						$current_page_obj = 'empty';
					}

					$thumbnail_size = ( $bPage_general['layout'] === 'fitRows' || strpos( $current_page_obj, 'blog_layout_mode="fitRows"' ) !== false ) ? 'royal-blog-post' : '';

					echo wp_get_attachment_image( $rf_gallery_img_id, $thumbnail_size );

					?>
				</div>

			<?php endforeach; ?>

		</div>

		<!-- Gallery Navigation -->
		<span class="prev-<?php the_ID(); ?> gallery-prev-slide gallery-arrow rf-button">
			<i class="fa fa-<?php echo esc_attr($gallery_arrows['prev_nxt_icon']); ?>-left"></i>
		</span>
		<span class="nxt-<?php the_ID(); ?> gallery-next-slide gallery-arrow rf-button">
			<i class="fa fa-<?php echo esc_attr($gallery_arrows['prev_nxt_icon']); ?>-right"></i>
		</span>

	</div>


<?php endif; ?>content-single-link.php000066600000001502151264517050011151 0ustar00<?php // Post Format Link

// background image
$link_bg = wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ) );

// get data from custom fields
$rf_link_description = get_post_meta( $post->ID, 'rf_link_description', true );
$rf_link_title 		 = get_post_meta( $post->ID, 'rf_link_title', true );
$rf_link_url 		 = get_post_meta( $post->ID, 'rf_link_url', true );

// if post format content is loaded on single page
?>

<!-- Single Featured Media -->
<div class="featured-media">
	
	<!-- Post Link -->
	<div class="link-and-quote link-wrap" style="background-image: url(<?php echo esc_url( $link_bg ); ?>);">
		<p><?php echo esc_html($rf_link_description); ?></p>
		<small><a href="<?php echo esc_url($rf_link_url); ?>" target="_blank"><?php echo esc_html($rf_link_title); ?></a></small>
	</div>
	
</div>content-audio.php000066600000007550151264517050010047 0ustar00<?php // Post Format Audio

// get theme cusomizer data
$bPage_general 	= get_option( 'royal_bPage_general' );
$bPost_overlay 	= get_option( 'royal_bPost_overlay' );
$pPost_formats 	= get_option( 'royal_pPost_formats' );
$pPage_general 	= get_option( 'royal_pPage_general' );
$pPost_effects 	= get_option( 'royal_pPost_effects' );


// get data from custom fields
$rf_audio_type  	= get_post_meta( $post->ID, 'rf_audio_type', true );
$rf_audio_embed 	= get_post_meta( $post->ID, 'rf_audio_embed', true );
$rf_audio_self_mp3  = get_post_meta( $post->ID, 'rf_audio_self_mp3', true );
$rf_audio_self_ogg  = get_post_meta( $post->ID, 'rf_audio_self_ogg', true );
$second_featured_img_id = get_post_meta( $post->ID, 'second_featured_img_id', true );


// allowed html for ifame embed
$allowed_html = array(
	'iframe' => array(
		'src'			=> array(),
		'width'			=> array(),
		'height'		=> array(),
		'frameborder' 	=> array(),
		'scrolling'		=> array()
	)
);


if ( has_post_thumbnail() ) : ?>

	<?php if ( 'royal_portfolio' === get_post_type() ) : ?>

		<!-- Post Image Overlay -->
		<div class="image-overlay">
			<?php 

			// get image ALT text
			$attachment = get_post( get_post_thumbnail_id() );
			$attachment_title = '';

			if ( $attachment !== null ) {
				$attachment_title = esc_attr( $attachment->post_title );
			}

			if ( $pPost_effects['overlay_click'] === 'lightbox' ) {

				$image_id = ( $pPost_effects['nxt_prev_image'] === true ) ? 'all' : get_the_ID();
				$src_length = strpos($rf_audio_embed, 'visual=true"') - strpos($rf_audio_embed, 'src="') + 6;
				$src_position = strpos($rf_audio_embed, 'src="') + 5;
				$rf_audio_embed = substr($rf_audio_embed, $src_position, $src_length);

				echo '<a href="'. esc_url($rf_audio_embed) .'" rel="prettyPhoto['. esc_attr($image_id) .']" data-title="'. esc_attr($attachment_title) .'">';
					echo '<i class="fa fa-'. $pPost_effects['overlay_icon'] .'"></i>';
				echo '</a>';

			} else {

				echo '<a href="'. esc_url(get_the_permalink()) .'">';
					echo '<i class="fa fa-'. esc_attr($pPost_effects['overlay_icon']) .'"></i>';
				echo '</a>';
				
			}

			?>
		</div>

		<!-- Post Type Icon -->
		<div class="post-format-icon">
			<i class="fa fa-<?php echo esc_attr($pPost_formats['audio_icon']); ?>"></i>
		</div>

	<?php else : ?>

		<?php if ( $rf_audio_type === 'embed' ) : ?>

			<!-- Post Audio Media -->
			<div class="audio-media">
				<?php echo wp_kses($rf_audio_embed, $allowed_html); ?>
			</div>

		<?php else : ?>

			<!-- Post Audio Media -->
			<div class="audio-media">
				<audio controls>
				  <source src="<?php echo esc_url( $rf_audio_self_ogg ); ?>" type="audio/ogg">
				  <source src="<?php echo esc_url( $rf_audio_self_mp3 ); ?>" type="audio/mpeg">
				</audio>
			</div>

		<?php endif; ?>

	<?php endif; ?>

	<?php

	// get current page object
	global $pagename;
	$current_page_obj = get_page_by_path($pagename);

	if ( isset($current_page_obj) ) {
		$current_page_obj = $current_page_obj->post_content;
	} else {
		$current_page_obj = 'empty';
	}
	
	// Post Thumbnail
	if ( 'royal_portfolio' === get_post_type() ) {
		if ( $pPage_general['layout'] === 'fitRows' || strpos( $current_page_obj, 'portfolio_layout_mode="fitRows"' ) !== false ) {
			the_post_thumbnail('royal-portfolio-post');
			if ( $second_featured_img_id !== '' ) {
				echo wp_get_attachment_image( $second_featured_img_id, 'royal-portfolio-post' );
			}
		} else {
			the_post_thumbnail();
			if ( $second_featured_img_id !== '' ) {
				echo wp_get_attachment_image( $second_featured_img_id, 'full' );
			}
		}
	} else {
		if ( $bPage_general['layout'] === 'fitRows' || strpos( $current_page_obj, 'blog_layout_mode="fitRows"' ) !== false ) {
			the_post_thumbnail('royal-blog-post');
		} else {
			the_post_thumbnail();
		}
	}

	?>

<?php endif; ?>content-single-quote.php000066600000001270151264517050011353 0ustar00<?php // Post Format Quote

// background image
$quote_bg = wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ) );

// get data from custom fields
$rf_quote_content = get_post_meta( $post->ID, 'rf_quote_content', true );
$rf_quote_title	  = get_post_meta( $post->ID, 'rf_quote_title', true );

// if post format content is loaded on single page
?>

<!-- Single Featured Media -->
<div class="featured-media">

	<!-- Post Quote -->
	<div class="link-and-quote quote-wrap" style="background-image: url(<?php echo esc_url( $quote_bg ); ?>);">
		<p><?php echo esc_html($rf_quote_content); ?></p>
		<small><?php echo esc_html($rf_quote_title); ?></small>
	</div>
	
</div>content-single-audio.php000066600000003263151264517050011323 0ustar00<?php // Post Format Audio

// get theme cusomizer data
$bPage_general 	= get_option( 'royal_bPage_general' );
$bPost_overlay 	= get_option( 'royal_bPost_overlay' );
$pPost_formats 	= get_option( 'royal_pPost_formats' );
$pPage_general 	= get_option( 'royal_pPage_general' );
$pPost_effects 	= get_option( 'royal_pPost_effects' );


// get data from custom fields
$rf_audio_type  	= get_post_meta( $post->ID, 'rf_audio_type', true );
$rf_audio_embed 	= get_post_meta( $post->ID, 'rf_audio_embed', true );
$rf_audio_self_mp3  = get_post_meta( $post->ID, 'rf_audio_self_mp3', true );
$rf_audio_self_ogg  = get_post_meta( $post->ID, 'rf_audio_self_ogg', true );


// allowed html for ifame embed
$allowed_html = array(
	'iframe' => array(
		'src'			=> array(),
		'width'			=> array(),
		'height'		=> array(),
		'frameborder' 	=> array(),
		'scrolling'		=> array()
	)
);


if ( has_post_thumbnail() ) : ?>

	<?php if ( is_single() ) : ?>

		<!-- Single Featured Media -->
		<div class="featured-media">
				
			<?php if ( $rf_audio_type === 'embed' ) : ?>

				<!-- Post Audio Media -->
				<div class="audio-media">
					<?php echo wp_kses($rf_audio_embed, $allowed_html); ?>
				</div>

			<?php elseif ( $rf_audio_type === 'self-hosted' ) : ?>

				<!-- Post Audio Media -->
				<div class="audio-media">
					<audio controls>
					  <source src="<?php echo esc_url( $rf_audio_self_ogg ); ?>" type="audio/ogg">
					  <source src="<?php echo esc_url( $rf_audio_self_mp3 ); ?>" type="audio/mpeg">
					</audio>
				</div>
				
			<?php endif; ?>
			
			<!-- Post Thumbnail -->
			<?php the_post_thumbnail(); ?>

		</div>

	<?php endif; ?>

<?php endif; ?>content-single-video.php000066600000003450151264517050011326 0ustar00<?php // Post Format Video

// get theme cusomizer data
$bPage_general 	= get_option( 'royal_bPage_general' );
$bPost_overlay 	= get_option( 'royal_bPost_overlay' );
$pPost_formats 	= get_option( 'royal_pPost_formats' );
$pPage_general 	= get_option( 'royal_pPage_general' );
$pPost_effects 	= get_option( 'royal_pPost_effects' );


// get data from custom fields
$rf_video_type  	= get_post_meta( $post->ID, 'rf_video_type', true );
$rf_video_embed 	= get_post_meta( $post->ID, 'rf_video_embed', true );
$rf_video_self_mp4  = get_post_meta( $post->ID, 'rf_video_self_mp4', true );
$rf_video_self_ogv  = get_post_meta( $post->ID, 'rf_video_self_ogv', true );


// allowed html for ifame embed
$allowed_html = array(
    'iframe' => array(
        'src'                   => array(),
        'width'                 => array(),
        'height'                => array(),
        'frameborder'           => array(),
        'allowfullscreen'       => array(),
        'mozallowfullscreen'    => array(),
        'webkitallowfullscreen' => array()
    )
);


if ( has_post_thumbnail() ) : ?>

	<?php if ( is_single() ) : ?>

		<!-- Single Featured Media -->
		<div class="featured-media">

			<?php if ( $rf_video_type === 'embed' ) : ?>

				<!-- Post Video Media -->
				<div class="video-media">
					<?php echo wp_kses($rf_video_embed, $allowed_html); ?>
				</div>

			<?php elseif ( $rf_video_type === 'self-hosted' ) : ?>

				<!-- Post Video Media -->
				<div class="video-media">
					<video controls>
					  <source src="<?php echo esc_url( $rf_video_self_mp4 ); ?>" type="video/mp4">
					  <source src="<?php echo esc_url( $rf_video_self_ogv ); ?>" type="video/ogg">
					</video>
				</div>
				
			<?php endif; ?>

		</div>

	<?php endif; ?>

<?php endif; ?>content-link.php000066600000001275151264517050007701 0ustar00<?php // Post Format Link

// background image
$link_bg = wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ) );

// get data from custom fields
$rf_link_description = get_post_meta( $post->ID, 'rf_link_description', true );
$rf_link_title 		 = get_post_meta( $post->ID, 'rf_link_title', true );
$rf_link_url 		 = get_post_meta( $post->ID, 'rf_link_url', true );

?>

<!-- Post Link -->
<div class="link-and-quote link-wrap" style="background-image: url(<?php echo esc_url( $link_bg ); ?>);">
	<p><?php echo esc_html($rf_link_description); ?></p>
	<small><a href="<?php echo esc_url($rf_link_url); ?>" target="_blank"><?php echo esc_html($rf_link_title); ?></a></small>
</div>content.php000066600000005543151264517050006750 0ustar00<?php // Post Format Standard

// get theme cusomizer data
$bPage_general 		= get_option('royal_bPage_general');
$bPost_overlay 		= get_option('royal_bPost_overlay');
$pPage_general 		= get_option('royal_pPage_general');
$pPost_effects 		= get_option('royal_pPost_effects');
$gallery_lightbox 	= get_option( 'royal_gallery_lightbox' );

// get post meta data
$second_featured_img_id = get_post_meta( $post->ID, 'second_featured_img_id', true );

// if post format content is loaded on single page
if ( has_post_thumbnail() ) : ?>

	<?php

	// lightbox
	if ( 'royal_portfolio' === get_post_type()  ) {

		$overlay_link 	= $pPost_effects['overlay_click'];
		$overlay_icon 	= $pPost_effects['overlay_icon'];
		$image_size		= 'royal-portfolio-post';
		$layout_mode	= $pPage_general['layout'];
		$image_id		= ( $pPost_effects['nxt_prev_image'] === true ) ? 'all' : get_the_ID();

	} else {

		$overlay_link 	= $bPost_overlay['click'];
		$overlay_icon 	= $bPost_overlay['icon'];
		$image_size		= 'royal-blog-post';
		$layout_mode	= $bPage_general['layout'];
		$image_id		= get_the_ID();

	}

	?>

	<!-- Post Image Overlay -->
	<div class="image-overlay">
		<?php

		// get image ALT text
		$attachment = get_post( get_post_thumbnail_id() );
		$attachment_title = '';

		if ( $attachment !== null ) {
			$attachment_title = esc_attr( $attachment->post_title );
		}
		
		if ( $overlay_link === 'lightbox' ) {
			$full_size_img = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' );
			echo '<a href="'. esc_url($full_size_img[0]) .'" rel="prettyPhoto['. $image_id .']" data-title="'. $attachment_title .'">';
				echo '<i class="fa fa-'. $overlay_icon .'"></i>';
			echo '</a>';
		} else {
			echo '<a href="'. esc_url(get_the_permalink()) .'">';
				echo '<i class="fa fa-'. $overlay_icon .'"></i>';
			echo '</a>';
		}

		?>
	</div>


	<!-- Post Thumbnail -->
	<?php

	// get current page object
	global $pagename;
	$current_page_obj = get_page_by_path($pagename);
	
	if ( isset($current_page_obj) ) {
		$current_page_obj = $current_page_obj->post_content;
	} else {
		$current_page_obj = 'empty';
	}

	if ( 'royal_portfolio' === get_post_type() ) {

		if ( $layout_mode === 'fitRows' || strpos( $current_page_obj, 'portfolio_layout_mode="fitRows"' ) !== false ) {
			the_post_thumbnail( $image_size );
			if ( $second_featured_img_id !== '' ) {
				echo wp_get_attachment_image( $second_featured_img_id, $image_size );
			}
		} else {
			the_post_thumbnail();
			if ( $second_featured_img_id !== '' ) {
				echo wp_get_attachment_image( $second_featured_img_id, 'full' );
			}
		}

	} else {

		if ( $layout_mode === 'fitRows' || strpos( $current_page_obj, 'blog_layout_mode="fitRows"' ) !== false ) {
			the_post_thumbnail( $image_size );
		} else {
			the_post_thumbnail();
		}

	}

	?>

<?php endif; ?>content-video.php000066600000010650151264517050010047 0ustar00<?php // Post Format Video

// get theme cusomizer data
$bPage_general 	= get_option( 'royal_bPage_general' );
$bPost_overlay 	= get_option( 'royal_bPost_overlay' );
$pPost_formats 	= get_option( 'royal_pPost_formats' );
$pPage_general 	= get_option( 'royal_pPage_general' );
$pPost_effects 	= get_option( 'royal_pPost_effects' );


// get data from custom fields
$rf_video_type  	= get_post_meta( $post->ID, 'rf_video_type', true );
$rf_video_embed 	= get_post_meta( $post->ID, 'rf_video_embed', true );
$rf_video_self_mp4  = get_post_meta( $post->ID, 'rf_video_self_mp4', true );
$rf_video_self_ogv  = get_post_meta( $post->ID, 'rf_video_self_ogv', true );
$second_featured_img_id = get_post_meta( $post->ID, 'second_featured_img_id', true );


// allowed html for ifame embed
$allowed_html = array(
    'iframe' => array(
        'src'                   => array(),
        'width'                 => array(),
        'height'                => array(),
        'frameborder'           => array(),
        'allowfullscreen'       => array(),
        'mozallowfullscreen'    => array(),
        'webkitallowfullscreen' => array()
    )
);


if ( has_post_thumbnail() ) : ?>

	<?php if ( 'royal_portfolio' === get_post_type()  ) : ?>

		<!-- Post Image Overlay -->
		<div class="image-overlay">
			<?php

			// get image ALT text
			$attachment = get_post( get_post_thumbnail_id() );
			$attachment_title = '';

			if ( $attachment !== null ) {
				$attachment_title = esc_attr( $attachment->post_title );
			}
		
			$rf_video_lightbox = '';

			if ( $rf_video_type === 'embed' ) {
				if ( strpos($rf_video_embed, 'www.youtube.com') ) {
					$rf_video_embed = substr($rf_video_embed, strpos($rf_video_embed, 'embed/') + 6, strlen($rf_video_embed));
					$rf_video_embed = substr($rf_video_embed, 0, strpos($rf_video_embed, '"'));
					$rf_video_lightbox = 'https://youtu.be/'. $rf_video_embed;
				} elseif ( strpos($rf_video_embed, 'player.vimeo.com') ) {
					$rf_video_embed = substr($rf_video_embed, strpos($rf_video_embed, 'video/') + 6, strlen($rf_video_embed));
					$rf_video_embed = substr($rf_video_embed, 0, strpos($rf_video_embed, '"'));
					$rf_video_lightbox = 'http://vimeo.com/'. $rf_video_embed;
				}
			} else {
				$full_size_img = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' );
				$rf_video_lightbox = $full_size_img[0];
			}

			if ( $pPost_effects['overlay_click'] === 'lightbox' ) {

				$image_id = ( $pPost_effects['nxt_prev_image'] === true ) ? 'all' : get_the_ID();

				echo '<a href="'. esc_url($rf_video_lightbox) .'" rel="prettyPhoto['. $image_id .']" data-title="'. $attachment_title .'">';
					echo '<i class="fa fa-'. $pPost_effects['overlay_icon'] .'"></i>';
				echo '</a>';

			} else {

				echo '<a href="'. esc_url(get_the_permalink()) .'">';
					echo '<i class="fa fa-'. $pPost_effects['overlay_icon'] .'"></i>';
				echo '</a>';

			}

			?>
		</div>

		<!-- Post Type Icon -->
		<div class="post-format-icon">
			<i class="fa fa-<?php echo esc_attr($pPost_formats['video_icon']); ?>"></i>
		</div>


		<?php

		// get current page object
		global $pagename;
		$current_page_obj = get_page_by_path($pagename);

		if ( isset($current_page_obj) ) {
			$current_page_obj = $current_page_obj->post_content;
		} else {
			$current_page_obj = 'empty';
		}

		// Post Thumbnail
		if ( $pPage_general['layout'] === 'fitRows' || strpos( $current_page_obj, 'portfolio_layout_mode="fitRows"' ) !== false ) {
			the_post_thumbnail('royal-portfolio-post');
			if ( $second_featured_img_id !== '' ) {
				echo wp_get_attachment_image( $second_featured_img_id, 'royal-portfolio-post' );
			}
		} else {
			the_post_thumbnail();
			if ( $second_featured_img_id !== '' ) {
				echo wp_get_attachment_image( $second_featured_img_id, 'full' );
			}
		}

		?>

	<?php else : ?>

		<?php if ( $rf_video_type === 'embed' ) : ?>

			<!-- Post Video Media -->
			<div class="video-media">
				<?php echo wp_kses($rf_video_embed, $allowed_html); ?>
			</div>

		<?php elseif ( $rf_video_type === 'self-hosted' ) : ?>

			<!-- Post Video Media -->
			<div class="video-media">
				<video controls>
				  <source src="<?php echo esc_url( $rf_video_self_mp4 ); ?>" type="video/mp4">
				  <source src="<?php echo esc_url( $rf_video_self_ogv ); ?>" type="video/ogg">
				</video>
			</div>

		<?php endif; ?>

	<?php endif; ?>

<?php endif; ?>content-single-content.php000066600000002666151264517050011702 0ustar00<?php // Post Format Standard

// get theme cusomizer data
$bPage_general 		= get_option('royal_bPage_general');
$bPost_overlay 		= get_option('royal_bPost_overlay');
$pPage_general 		= get_option('royal_pPage_general');
$pPost_effects 		= get_option('royal_pPost_effects');
$gallery_lightbox 	= get_option( 'royal_gallery_lightbox' );

// if post format content is loaded on single page
if ( has_post_thumbnail() ) :

	// get featured image object to display image title in lightbox popup // awaiting moderation
	$attachment = get_post( get_post_thumbnail_id() );
	$url 		= wp_get_attachment_url( get_post_thumbnail_id() );
	$attachment_title = '';

	if ( $attachment !== null ) {
		$attachment_title = esc_attr( $attachment->post_title );
	}

	// get data from custom fields
	$rf_exc_featured_img = get_post_meta( get_the_ID(), 'rf_exc_featured_img', true );

	?>

	<?php if ( $rf_exc_featured_img !== 'yes' ) : ?>

		<!-- Single Featured Media -->
		<div class="featured-media">

			<!-- Post Image Overlay -->
			<div class="image-overlay-wrap lightbox-overlay">

				<a href="<?php echo esc_url( $url ); ?>" class="image-overlay" rel="prettyPhoto" data-title="<?php echo esc_attr($attachment_title); ?>">
					<i class="fa fa-<?php echo esc_attr($gallery_lightbox['icon']);?>"></i>
				</a>

				<!-- Post Thumbnail -->
				<?php the_post_thumbnail(); ?>

			</div>

		</div>

	<?php endif; ?>

<?php endif; ?>content-single-gallery.php000066600000010735151264517050011663 0ustar00<?php // Post Format Gallery

// get theme cusomizer data
$bPage_general 		= get_option( 'royal_bPage_general' );
$bPost_overlay 		= get_option( 'royal_bPost_overlay' );
$pPost_formats 		= get_option( 'royal_pPost_formats' );
$pPage_general 		= get_option( 'royal_pPage_general' );
$pPost_effects 		= get_option( 'royal_pPost_effects' );

$gallery_general 	= get_option( 'royal_gallery' );
$stacked_caption 	= get_option( 'royal_stacked_caption' );
$gallery_arrows 	= get_option( 'royal_gallery_arrows' );
$gallery_lightbox 	= get_option( 'royal_gallery_lightbox' );


// get post meta data
$rf_gallery_type 	= get_post_meta( $post->ID, 'rf_gallery_type', true );
$rf_gallery_img_ids = get_post_meta( $post->ID, 'rf_gallery_img_ids', true );
$rf_gallery_img_ids = explode( ',', $rf_gallery_img_ids );

?>

	<!-- Single Gallery -->
	<div class="gallery-slideshow">

		<?php if ( $rf_gallery_type === 'slideshow' ) : ?>

			<div class="cycle-slideshow" data-cycle-slides="> div" data-cycle-prev=".prev-<?php the_ID(); ?>" data-cycle-next=".nxt-<?php the_ID(); ?>" data-cycle-pager=".gallery-nav" data-cycle-pause-on-hover="true" data-cycle-fx="<?php echo esc_attr($gallery_general['effect']); ?>" data-cycle-speed="<?php echo esc_attr($gallery_general['transition']); ?>" data-cycle-timeout="<?php echo esc_attr($gallery_general['delay']); ?>" data-cycle-easing="swing">

				<?php

				foreach ( $rf_gallery_img_ids as $rf_gallery_img_id ) {

					// gallery slide caption
					$gallery_img 		 = get_post( $rf_gallery_img_id );
					$gallery_img_caption = '';
					$gallery_img_title 	 = '';

					if ( $gallery_img !== null ) {
						$gallery_img_caption = esc_html( $gallery_img->post_excerpt );
						$gallery_img_title	 = esc_attr( $gallery_img->post_title );
					}


					$html  = '<div class="gallery-slide">';

						if ( trim($gallery_img_caption) !== '' ) {
							$html .= '<p class="slideshow-caption">'. $gallery_img_caption .'</p>';
						}		

						$html .= '<div class="image-overlay-wrap lightbox-overlay">';

						$html .= '<a href="'. esc_url(wp_get_attachment_url( $rf_gallery_img_id )) .'" class="image-overlay" rel="prettyPhoto[gallery-slide]" data-title="'. $gallery_img_title .'"><i class="fa fa-'. $gallery_lightbox['icon'] .'"></i></a>';
						$html .= '<img src="'. esc_url(wp_get_attachment_url( $rf_gallery_img_id )) .'" alt="'. $gallery_img_title .'" />';
						
						$html .= '</div>';

					$html .= '</div>';

					echo ''. $html;
				}

				?>

			</div>

			<!-- Gallery Navigation -->
			<span class="prev-<?php the_ID(); ?> gallery-prev-slide gallery-arrow rf-button">
				<i class="fa fa-<?php echo esc_attr($gallery_arrows['prev_nxt_icon']); ?>-left"></i>
			</span>
			<span class="nxt-<?php the_ID(); ?> gallery-next-slide gallery-arrow rf-button">
				<i class="fa fa-<?php echo esc_attr($gallery_arrows['prev_nxt_icon']); ?>-right"></i>
			</span>
			<div class="gallery-nav"></div>

		<?php elseif ( $rf_gallery_type === 'stacked' ) : ?>

			<?php

			foreach ( $rf_gallery_img_ids as $rf_gallery_img_id ) {

				// gallery slide caption
				$gallery_img 		 = get_post( $rf_gallery_img_id );
				$gallery_img_caption = '';
				$gallery_img_title 	 = '';

				if ( $gallery_img !== null ) {
					$gallery_img_caption = esc_html( $gallery_img->post_excerpt );
					$gallery_img_title	 = esc_attr( $gallery_img->post_title );
				}

				$html  = '<div class="gallery-slide" data-caption="'. $stacked_caption['display'] .'">';	

					// caption top
					if ( trim($gallery_img_caption) !== '' && $stacked_caption['position'] === 'top' ) {
						$html .= '<p class="stacked-caption"><span>'. $gallery_img_caption .'</span></p>';
					}

					// image overlay
					$html .= '<div class="image-overlay-wrap lightbox-overlay">';

					$html .= '<a href="'. esc_url(wp_get_attachment_url( $rf_gallery_img_id )) .'" class="image-overlay" rel="prettyPhoto[gallery-slide]" data-title="'. $gallery_img_title .'"><i class="fa fa-'. $gallery_lightbox['icon'] .'"></i></a>';
					$html .= '<img src="'. esc_url(wp_get_attachment_url( $rf_gallery_img_id )) .'" alt="'. $gallery_img_title .'" />';
					
					$html .= '</div>';

					// caption bottom
					if ( trim($gallery_img_caption) !== '' && $stacked_caption['position'] === 'bottom' ) {
						$html .= '<p class="stacked-caption"><span>'. $gallery_img_caption .'</span></p>';
					}	

				$html .= '</div>';

				echo ''. $html;
			}

			?>

		<?php endif; ?>

	</div>