This repository has been archived by the owner on May 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
content-portfolio-media.php
86 lines (66 loc) · 2.32 KB
/
content-portfolio-media.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
/**
* The file is for displaying the single portfolio media
* It is called via single-portfolio.php
*
* @package Trim
* @link https://themebeans.com/themes/trim
*/
/*
===================================================================*/
/*
GET PORTFOLIO META
/*
===================================================================*/
// PORTFOLIO TYPES
$portfolio_type_audio = get_post_meta( $post->ID, '_bean_portfolio_type_audio', true );
$portfolio_type_video = get_post_meta( $post->ID, '_bean_portfolio_type_video', true );
// AUDIO META
$audio_mp3 = get_post_meta( $post->ID, '_bean_audio_mp3', true );
// VIDEO META
$embed = get_post_meta( $post->ID, '_bean_portfolio_embed_code', true );
$embed2 = get_post_meta( $post->ID, '_bean_portfolio_embed_code_2', true );
$embed3 = get_post_meta( $post->ID, '_bean_portfolio_embed_code_3', true );
$embed4 = get_post_meta( $post->ID, '_bean_portfolio_embed_code_4', true );
if ( ! post_password_required() ) { // START PASSWORD PROTECTED
/*
===================================================================*/
/*
AUDIO PORTFOLIO
/*===================================================================*/
if ( $portfolio_type_audio == 'on' ) {
if ( $audio_mp3 ) { ?>
<div class="audio-no-feat">
<?php bean_audio( $post->ID ); ?>
</div><!-- END .audio-no-feat -->
<?php
}//END if ( $audio_mp3 )
} // END if ( $portfolio_type_audio == 'on')
/*
===================================================================*/
/*
VIDEO PORTFOLIO
/*===================================================================*/
if ( $portfolio_type_video == 'on' ) {
if ( $embed ) {
echo '<div class="video-frame">';
echo stripslashes( htmlspecialchars_decode( $embed ) );
echo '</div>';
} //END if($embed)
if ( $embed2 ) {
echo '<div class="video-frame">';
echo stripslashes( htmlspecialchars_decode( $embed2 ) );
echo '</div>';
} //END if($embed2)
if ( $embed3 ) {
echo '<div class="video-frame">';
echo stripslashes( htmlspecialchars_decode( $embed3 ) );
echo '</div>';
} //END if($embed3)
if ( $embed4 ) {
echo '<div class="video-frame">';
echo stripslashes( htmlspecialchars_decode( $embed4 ) );
echo '</div>';
} //END if($embed4)
} // END if ( $portfolio_type_video == 'on')
} //END if ( !post_password_required() )