PluginProbe ʕ •ᴥ•ʔ
EmbedPress – PDF Embedder, 3D PDF FlipBook, Google Reviews, YouTube Videos, Upload & Embed PDF documents / 3.3.0
EmbedPress – PDF Embedder, 3D PDF FlipBook, Google Reviews, YouTube Videos, Upload & Embed PDF documents v3.3.0
4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 trunk 1.0.0 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.3.0 1.3.1 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.5.0 1.6.0 1.6.1 1.6.2 1.6.3 1.7.0 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 2.0.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.2.0 2.2.1 2.2.2 2.3.0 2.3.1 2.3.2 2.3.3 2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.6.0 2.6.1 2.6.2 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.1.2 3.1.3 3.2.0 3.2.1 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.4.0 3.4.1 3.4.2 3.4.3 3.5.0 3.5.1 3.5.2 3.5.3 3.6.0 3.6.1 3.6.2 3.6.3 3.6.4 3.6.5 3.6.6 3.6.7 3.6.8 3.7.0 3.7.1 3.7.2 3.7.3 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.9.0 3.9.1 3.9.10 3.9.11 3.9.12 3.9.13 3.9.14 3.9.15 3.9.16 3.9.17 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 3.9.7 3.9.8 3.9.9 4.0.0 4.0.1 4.0.10 4.0.11 4.0.12 4.0.13 4.0.14 4.0.2 4.0.3 4.0.4 4.0.5 4.0.6 4.0.7 4.0.8 4.0.9 4.1.0 4.1.1 4.1.10 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7 4.1.8 4.1.9 4.2.0 4.2.1 4.2.2 4.2.3 4.2.4 4.2.5 4.2.6 4.2.7 4.2.8 4.2.9 4.3.0 4.3.1 4.4.0 4.4.1 4.4.10 4.4.11 4.4.2 4.4.3 4.4.4 4.4.5 4.4.6 4.4.7 4.4.8 4.4.9 4.5.0 4.5.1
embedpress / EmbedPress / Ends / Back / Settings / templates / youtube.php
embedpress / EmbedPress / Ends / Back / Settings / templates Last commit date
partials 4 years ago custom-logo.php 4 years ago dailymotion.php 4 years ago elements.php 4 years ago general.php 5 years ago go-premium.php 4 years ago google-calendar.php 4 years ago license.php 5 years ago main-template.php 5 years ago shortcode.php 5 years ago soundcloud.php 5 years ago spotify.php 5 years ago twitch.php 4 years ago vimeo.php 4 years ago wistia.php 4 years ago youtube.php 4 years ago
youtube.php
273 lines
1 <?php
2 /*
3 * YouTube Settings page
4 * All undefined vars comes from 'render_settings_page' method
5 * */
6 $yt_settings = get_option( EMBEDPRESS_PLG_NAME.':youtube');
7 $start_time = isset( $yt_settings['start_time']) ? $yt_settings['start_time'] : 0;
8 $end_time = isset( $yt_settings['end_time']) ? $yt_settings['end_time'] : 0;
9 $autoplay = isset( $yt_settings['autoplay']) ? $yt_settings['autoplay'] : '';
10 $controls = isset( $yt_settings['controls']) ? $yt_settings['controls'] : 1;
11 $fs = isset( $yt_settings['fs']) ? $yt_settings['fs'] : 1;
12 $iv_load_policy = isset( $yt_settings['iv_load_policy']) ? $yt_settings['iv_load_policy'] : 1;
13 $color = isset( $yt_settings['color']) ? $yt_settings['color'] : 'red';
14 $rel = isset( $yt_settings['rel']) ? $yt_settings['rel'] : 1;
15 // pro
16
17 $cc_load_policy = isset( $yt_settings['cc_load_policy']) ? $yt_settings['cc_load_policy'] : '';
18 $modestbranding = isset( $yt_settings['modestbranding']) ? $yt_settings['modestbranding'] : 0;
19 $yt_lc_show = isset( $yt_settings['yt_lc_show']) ? $yt_settings['yt_lc_show'] : '';
20 // Subscription - Pro
21 $yt_sub_channel = isset( $yt_settings['yt_sub_channel']) ? $yt_settings['yt_sub_channel'] : '';
22 $yt_sub_text = isset( $yt_settings['yt_sub_text']) ? $yt_settings['yt_sub_text'] : '';
23 $yt_sub_layout = isset( $yt_settings['yt_sub_layout']) ? $yt_settings['yt_sub_layout'] : '';
24 $yt_sub_theme = isset( $yt_settings['yt_sub_theme']) ? $yt_settings['yt_sub_theme'] : '';
25 $yt_sub_count = isset( $yt_settings['yt_sub_count']) ? $yt_settings['yt_sub_count'] : '';
26
27 ?>
28
29 <div class="embedpress__settings background__white radius-25 p40">
30 <h3><?php esc_html_e( "YouTube Settings", "embedpress" ); ?></h3>
31 <div class="embedpress__settings__form">
32 <form action="" method="post" class="embedpress-settings-form" >
33 <?php
34 do_action( 'embedpress_before_youtube_settings_fields');
35 echo $nonce_field ; ?>
36 <div class="form__group">
37 <p class="form__label" ><?php esc_html_e( "Start Time (In Seconds)", "embedpress" ); ?> </p>
38 <div class="form__control__wrap">
39 <input type="number" name="start_time" id="start_time" class="form__control" data-default="<?php echo esc_attr( $start_time); ?>" value="<?php echo esc_attr( $start_time); ?>" >
40 <p><?php esc_html_e( "You can put a custom time in seconds to start the video. Example: 500", "embedpress" ); ?></p>
41 </div>
42
43 </div>
44 <div class="form__group">
45 <p class="form__label" ><?php esc_html_e( "End Time (In Seconds)", "embedpress" ); ?> </p>
46 <div class="form__control__wrap">
47 <input type="number" name="end_time" id="end_time" class="form__control" data-default="<?php echo esc_attr( $end_time); ?>" value="<?php echo esc_attr( $end_time); ?>" >
48 <p><?php esc_html_e( "You can put a custom time in seconds to end the video.", "embedpress" ); ?></p>
49 </div>
50
51 </div>
52 <div class="form__group">
53 <p class="form__label"><?php esc_html_e( "Auto Play", "embedpress" ); ?></p>
54 <div class="form__control__wrap">
55 <div class="input__flex input__radio_wrap" data-default="<?php echo esc_attr( $autoplay ); ?>" data-value="<?php echo esc_attr( $autoplay ); ?>">
56 <label class="input__radio">
57 <input type="radio" name="autoplay" value="" <?php checked( '', $autoplay); ?>>
58 <span><?php esc_html_e( "No", "embedpress" ); ?></span>
59 </label>
60 <label class="input__radio">
61 <input type="radio" name="autoplay" value="1" <?php checked( '1', $autoplay); ?>>
62 <span><?php esc_html_e( "Yes", "embedpress" ); ?></span>
63 </label>
64 </div>
65 <p><?php esc_html_e( "Automatically start to play the videos when the player loads.", "embedpress" ); ?></p>
66 </div>
67 </div>
68 <div class="form__group">
69 <label class="form__label" for="color"><?php esc_html_e( "Progress Bar Color", "embedpress" ); ?></label>
70 <div class="form__control__wrap">
71 <div class="embedpress__select ">
72 <span><i class="ep-icon ep-caret-down"></i></span>
73 <select name="color" id="color" data-default="<?php echo esc_attr( $color ); ?>">
74 <option value="red" <?php selected( 'red', $color); ?> ><?php esc_html_e( "Red", "embedpress" ); ?></option>
75 <option value="white" <?php selected( 'white', $color); ?> ><?php esc_html_e( "White", "embedpress" ); ?></option>
76 </select>
77 </div>
78 <p><?php printf( esc_html__( "Specifies the color that will be used in the player's video progress bar to highlight the amount of the video that the viewer has already seen. %s Note: Setting the color to white will disable the Modest Branding option (causing a YouTube logo to be displayed in the control bar).", 'embedpress'), '<br>'); ?></p>
79 </div>
80 </div>
81 <div class="form__group">
82 <p class="form__label"><?php esc_html_e( "Force Closed Captions", "embedpress" ); echo !$pro_active ? ' <span class="isPro">PRO</span>': ''; ?></p>
83 <div class="form__control__wrap">
84 <div class="input__flex input__radio_wrap <?php echo $pro_active ? '': 'isPro'; ?>" data-default="<?php echo esc_attr( $cc_load_policy ); ?>" data-value="<?php echo esc_attr( $cc_load_policy ); ?>">
85 <label class="input__radio">
86 <input type="radio" name="cc_load_policy" value="" <?php echo !$pro_active ? 'disabled ' : ''; checked( '', $cc_load_policy); ?>>
87 <span><?php esc_html_e( "No", "embedpress" ); ?></span>
88 </label>
89 <label class="input__radio">
90 <input type="radio" name="cc_load_policy" value="1" <?php echo !$pro_active ? 'disabled ' : ''; checked( '1', $cc_load_policy);?>>
91 <span><?php esc_html_e( "Yes", "embedpress" ); ?></span>
92 </label>
93 </div>
94 <?php if ( !$pro_active ) { include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-pro.php'; } ?>
95
96 <p><?php printf( esc_html__( "Setting this option to %s causes closed captions to be shown by default, even if the user has turned captions off. This will be based on user preference otherwise.", "embedpress" ), '<strong>Yes</strong>'); ?></p>
97 </div>
98 </div>
99 <div class="form__group">
100 <p class="form__label"><?php esc_html_e( "Display Controls", "embedpress" ); ?></p>
101 <div class="form__control__wrap">
102 <div class="embedpress__select">
103 <span><i class="ep-icon ep-caret-down"></i></span>
104 <select name="controls" data-default="<?php echo esc_attr( $controls); ?>">
105 <option value="1" <?php selected( '1', $controls); ?>><?php esc_html_e( 'Display immediately', 'embedpress'); ?></option>
106 <option value="2" <?php selected( '2', $controls); ?>><?php esc_html_e( 'Display after user initiation', 'embedpress'); ?></option>
107 <option value="0" <?php selected( '0', $controls); ?>><?php esc_html_e( 'Hide controls', 'embedpress'); ?></option>
108 </select>
109 </div>
110 <p><?php esc_html_e( 'Indicates whether the video player controls are displayed.', 'embedpress'); ?> </p>
111 </div>
112 </div>
113 <div class="form__group">
114 <p class="form__label"><?php esc_html_e( "Enable Fullscreen Button", "embedpress" ); ?></p>
115 <div class="form__control__wrap">
116 <div class="input__flex input__radio_wrap" data-default="<?php echo esc_attr( $fs ); ?>" data-value="<?php echo esc_attr( $fs ); ?>">
117 <label class="input__radio">
118 <input type="radio" name="fs" value="" <?php checked( '', $fs); ?> >
119 <span><?php esc_html_e( "No", "embedpress" ); ?></span>
120 </label>
121 <label class="input__radio">
122 <input type="radio" name="fs" value="1" <?php checked( '1', $fs); ?>>
123 <span><?php esc_html_e( "Yes", "embedpress" ); ?></span>
124 </label>
125 </div>
126 <p><?php esc_html_e( "Indicates whether the fullscreen button is enabled.", "embedpress" ); ?></p>
127 </div>
128 </div>
129 <div class="form__group">
130 <p class="form__label"><?php esc_html_e( "Display Video Annotations", "embedpress" ); ?></p>
131 <div class="form__control__wrap">
132 <div class="embedpress__select">
133 <span><i class="ep-icon ep-caret-down"></i></span>
134 <select name="iv_load_policy" data-default="<?php echo esc_attr( $iv_load_policy ); ?>">
135 <option value="1" <?php selected( '1', $iv_load_policy); ?>><?php esc_html_e( "Show", "embedpress" ); ?></option>
136 <option value="3" <?php selected( '3', $iv_load_policy); ?>><?php esc_html_e( "Hide", "embedpress" ); ?></option>
137 </select>
138 </div>
139 <p><?php esc_html_e( "Indicates whether video annotations are displayed.", "embedpress" ); ?></p>
140 </div>
141 </div>
142 <div class="form__group">
143 <p class="form__label"><?php esc_html_e( "Display Related Videos", "embedpress" ); ?></p>
144 <div class="form__control__wrap">
145 <div class="embedpress__select">
146 <span><i class="ep-icon ep-caret-down"></i></span>
147 <select name="rel" data-default="<?php echo esc_attr( $rel); ?>">
148 <option value="" <?php selected( '', $rel); ?>><?php esc_html_e( "From the same channel of the video", "embedpress" ); ?></option>
149 <option value="1" <?php selected( '1', $rel); ?>><?php esc_html_e( "Based on User's watch history", "embedpress" ); ?></option>
150 </select>
151 </div>
152 <p><?php esc_html_e( "Indicates how the player should show related videos when playback of the video pauses or ends.", "embedpress" ); ?></p>
153 </div>
154 </div>
155
156
157 <div class="form__group">
158 <p class="form__label"><?php esc_html_e( "Modest Branding", "embedpress" ); echo !$pro_active ? ' <span class="isPro">PRO</span>' : ''; ?></p>
159 <div class="form__control__wrap">
160 <div class="embedpress__select <?php echo $pro_active ? '': 'isPro'; ?>">
161 <span><i class="ep-icon ep-caret-down"></i></span>
162 <select name="modestbranding" data-default="<?php echo esc_attr( $modestbranding); ?>" <?php echo !$pro_active ? 'disabled' : ''; ?>>
163 <option value="1" <?php selected( '1', $modestbranding); ?>><?php esc_html_e( "Hide", "embedpress" ); ?></option>
164 <option value="0" <?php selected( '0', $modestbranding); ?>><?php esc_html_e( "Show", "embedpress" ); ?></option>
165 </select>
166 </div>
167 <?php if ( !$pro_active ) { include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-pro.php'; } ?>
168
169 <p><?php esc_html_e( "Indicates whether the player should display a YouTube logo in the control bar.", "embedpress" ); ?></p>
170 </div>
171 </div>
172
173 <!-- Live Chat-->
174 <div class="form__group">
175 <p class="form__label"><?php esc_html_e( " Live Chat", "embedpress" ); echo !$pro_active ? ' <span class="isPro">PRO</span>': ''; ?></p>
176 <div class="form__control__wrap">
177 <div class="input__flex input__radio_wrap <?php echo $pro_active ? '': 'isPro'; ?>" data-default="<?php echo esc_attr( $yt_lc_show ); ?>" data-value="<?php echo esc_attr( $yt_lc_show ); ?>">
178 <label class="input__radio">
179 <input type="radio" name="yt_lc_show" value="" <?php echo !$pro_active ? 'disabled ' : ''; checked( '', $yt_lc_show); ?>>
180 <span><?php esc_html_e( "No", "embedpress" ); ?></span>
181 </label>
182 <label class="input__radio">
183 <input type="radio" name="yt_lc_show" value="yes" <?php echo !$pro_active ? 'disabled ' : ''; checked( 'yes', $yt_lc_show);?>>
184 <span><?php esc_html_e( "Yes", "embedpress" ); ?></span>
185 </label>
186 </div>
187 <?php if ( !$pro_active ) { include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-pro.php'; } ?>
188
189 <p><?php printf( esc_html__( "Enabling this option will show chat on all YouTube videos. However, YouTube Live Chat feature only works with Live Streaming videos.", "embedpress" ), '<strong>Yes</strong>'); ?></p>
190 </div>
191 </div>
192
193 <!-- SUBSCRIPTION-->
194 <h3><?php esc_html_e( "Subscription Button", "embedpress" ); ?></h3>
195
196 <div class="form__group">
197 <p class="form__label"><?php esc_html_e( "Channel Link or ID", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?> </p>
198 <div class="form__control__wrap <?php echo $pro_active ? '': 'isPro'; ?>">
199 <input type="text" class="form__control" data-default="<?php echo esc_attr( $yt_sub_channel ); ?>" value="<?php echo esc_attr( $yt_sub_channel ); ?>" name="yt_sub_channel" <?php echo $pro_active ? '' : 'disabled'; ?> placeholder="Enter Channel link or ID">
200
201 <p><?php esc_html_e( "You can use either your channel link or channel ID to show the subscription button.", "embedpress" ); ?></p>
202 </div>
203 <?php if ( !$pro_active ) { include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-pro.php'; } ?>
204
205 </div>
206
207 <div class="form__group">
208 <p class="form__label"><?php esc_html_e( "Subscription Text", "embedpress" ); echo $pro_active ? '': ' <span class="isPro">PRO</span>'; ?> </p>
209 <div class="form__control__wrap <?php echo $pro_active ? '': 'isPro'; ?>">
210 <input type="text" class="form__control" data-default="<?php echo esc_attr( $yt_sub_text ); ?>" value="<?php echo esc_attr( $yt_sub_text ); ?>" name="yt_sub_text" <?php echo $pro_active ? '' : 'disabled'; ?> placeholder="<?php esc_attr_e( 'Eg. Don\'t miss out! Subscribe', 'embedpress' ) ?>">
211
212 <p><?php esc_html_e( "Optionally you can output some CTA text before the subscriber button.", "embedpress" ); ?></p>
213 </div>
214 <?php if ( !$pro_active ) { include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-pro.php'; } ?>
215
216 </div>
217
218 <div class="form__group">
219 <p class="form__label"><?php esc_html_e( "Layout", "embedpress" ); echo !$pro_active ? ' <span class="isPro">PRO</span>' : ''; ?></p>
220 <div class="form__control__wrap">
221 <div class="embedpress__select <?php echo $pro_active ? '': 'isPro'; ?>">
222 <span><i class="ep-icon ep-caret-down"></i></span>
223 <select name="yt_sub_layout" data-default="<?php echo esc_attr( $yt_sub_layout); ?>" <?php echo !$pro_active ? 'disabled' : ''; ?>>
224 <option value="" <?php selected( 'default', $yt_sub_layout); ?>><?php esc_html_e( "Default", "embedpress" ); ?></option>
225 <option value="full" <?php selected( 'full', $yt_sub_layout); ?>><?php esc_html_e( "Full", "embedpress" ); ?></option>
226 </select>
227 </div>
228 <?php if ( !$pro_active ) { include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-pro.php'; } ?>
229
230 <p><?php esc_html_e( "Full layout shows channel image. Default layout shows only channel name and subscription button.", "embedpress" ); ?></p>
231 </div>
232 </div>
233
234 <div class="form__group">
235 <p class="form__label"><?php esc_html_e( "Theme", "embedpress" ); echo !$pro_active ? ' <span class="isPro">PRO</span>' : ''; ?></p>
236 <div class="form__control__wrap">
237 <div class="embedpress__select <?php echo $pro_active ? '': 'isPro'; ?>">
238 <span><i class="ep-icon ep-caret-down"></i></span>
239 <select name="yt_sub_theme" data-default="<?php echo esc_attr( $yt_sub_theme); ?>" <?php echo !$pro_active ? 'disabled' : ''; ?>>
240 <option value="" <?php selected( 'default', $yt_sub_theme); ?>><?php esc_html_e( "Default", "embedpress" ); ?></option>
241 <option value="dark" <?php selected( 'dark', $yt_sub_theme); ?>><?php esc_html_e( "Dark", "embedpress" ); ?></option>
242 </select>
243 </div>
244 <?php if ( !$pro_active ) { include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-pro.php'; } ?>
245
246 <p><?php esc_html_e( "Default theme is good for white background. Dark theme is good for black background.", "embedpress" ); ?></p>
247 </div>
248 </div>
249
250 <div class="form__group">
251 <p class="form__label"><?php esc_html_e( "Show Subscriber Count", "embedpress" ); echo !$pro_active ? ' <span class="isPro">PRO</span>': ''; ?></p>
252 <div class="form__control__wrap">
253 <div class="input__flex input__radio_wrap <?php echo $pro_active ? '': 'isPro'; ?>" data-default="<?php echo esc_attr( $yt_sub_count ); ?>" data-value="<?php echo esc_attr( $yt_sub_count ); ?>">
254 <label class="input__radio">
255 <input type="radio" name="yt_sub_count" value="" <?php echo !$pro_active ? 'disabled ' : ''; checked( '', $yt_sub_count); ?>>
256 <span><?php esc_html_e( "No", "embedpress" ); ?></span>
257 </label>
258 <label class="input__radio">
259 <input type="radio" name="yt_sub_count" value="1" <?php echo !$pro_active ? 'disabled ' : ''; checked( '1', $yt_sub_count);?>>
260 <span><?php esc_html_e( "Yes", "embedpress" ); ?></span>
261 </label>
262 </div>
263 <?php if ( !$pro_active ) { include EMBEDPRESS_SETTINGS_PATH . 'templates/partials/alert-pro.php'; } ?>
264 </div>
265 </div>
266
267
268 <?php do_action( 'embedpress_after_youtube_settings_fields'); ?>
269 <button class="button button__themeColor radius-10 embedpress-submit-btn" name="submit" value="youtube"><?php esc_html_e( 'Save Changes', 'embedpress'); ?></button>
270 </form>
271 </div>
272 </div>
273