PluginProbe
Automatic YouTube Gallery – Embed Auto-Updating YouTube Video Galleries, Feeds, Playlists & Channels / 1.2.0
Automatic YouTube Gallery – Embed Auto-Updating YouTube Video Galleries, Feeds, Playlists & Channels v1.2.0
2.9.1 2.9.0 trunk 1.0.0 1.1.0 1.2.0 1.3.0 1.4.0 1.5.0 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 2.0.0 2.1.0 2.2.0 2.3.2 2.3.3 2.3.5 2.3.6 2.3.8 2.3.9 2.4.3 All 37 releases
automatic-youtube-gallery / admin / templates / shortcode-builder.php

shortcode-builder.php in Automatic YouTube Gallery – Embed Auto-Updating YouTube Video Galleries, Feeds, Playlists & Channels 1.2.0, at admin/templates/shortcode-builder.php

97 lines 7.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Shortcode Builder.
5 *
6 * @link https://plugins360.com
7 * @since 1.0.0
8 *
9 * @package Automatic_YouTube_Gallery
10 */
11 ?>
12
13 <div id="ayg-shortcode-builder">
14 <div class="ayg-modal" style="display: none;">
15 <div class="ayg-modal-bg"></div>
16 <div class="ayg-modal-content">
17 <div class="ayg-modal-body">
18 <span class="ayg-modal-close">&times;</span>
19
20 <div class="ayg-editor ayg-editor-field-type-playlist ayg-editor-field-theme-classic">
21 <p class="ayg-editor-title">
22 <span class="dashicons dashicons-video-alt3"></span>
23 <strong><?php esc_html_e( 'Automatic YouTube Gallery', 'automatic-youtube-gallery' ); ?></strong>
24 - <?php esc_html_e( 'Building Dynamic Video Galleries', 'automatic-youtube-gallery' ); ?>
25 </p>
26
27 <!-- Fields -->
28 <?php
29 foreach ( $fields as $key => $value ) :
30 ?>
31 <div class="ayg-editor-section ayg-editor-section-<?php echo esc_attr( $key ); ?> <?php if ( 'source' == $key ) echo 'ayg-active'; ?>">
32 <h2 class="ayg-editor-section-header">
33 <span class="dashicons-before dashicons-plus"></span>
34 <span class="dashicons-before dashicons-minus"></span>
35 <?php echo esc_html( $value['label'] ); ?>
36 </h2>
37
38 <div class="ayg-editor-controls" <?php if ( 'source' != $key ) echo 'style="display: none;"'; ?>>
39 <?php
40 foreach ( $value['fields'] as $field ) :
41 if ( ! isset( $field['placeholder'] ) ) {
42 $field['placeholder'] = '';
43 }
44 ?>
45 <div class="ayg-editor-control ayg-editor-control-<?php echo esc_attr( $field['name'] ); ?>">
46 <?php if ( 'text' == $field['type'] || 'url' == $field['type'] || 'number' == $field['type'] ) : ?>
47 <label><strong><?php echo esc_html( $field['label'] ); ?></strong></label>
48 <input type="text" name="<?php echo esc_attr( $field['name'] ); ?>" class="ayg-editor-field ayg-editor-field-<?php echo esc_attr( $field['name'] ); ?> widefat" placeholder="<?php echo esc_attr( $field['placeholder'] ); ?>" value="<?php echo esc_attr( $field['value'] ); ?>" data-default="<?php echo esc_attr( $field['value'] ); ?>" />
49 <?php elseif ( 'textarea' == $field['type'] ) : ?>
50 <label><strong><?php echo esc_html( $field['label'] ); ?></strong></label>
51 <textarea name="<?php echo esc_attr( $field['name'] ); ?>" rows="8" class="ayg-editor-field ayg-editor-field-<?php echo esc_attr( $field['name'] ); ?> widefat" placeholder="<?php echo esc_attr( $field['placeholder'] ); ?>" data-default="<?php echo esc_attr( $field['value'] ); ?>"><?php echo esc_textarea( $field['value'] ); ?></textarea>
52 <?php elseif ( 'select' == $field['type'] || 'radio' == $field['type'] ) : ?>
53 <label><strong><?php echo esc_html( $field['label'] ); ?></strong></label>
54 <select name="<?php echo esc_attr( $field['name'] ); ?>" class="ayg-editor-field ayg-editor-field-<?php echo esc_attr( $field['name'] ); ?> widefat" data-default="<?php echo esc_attr( $field['value'] ); ?>">
55 <?php
56 foreach ( $field['options'] as $value => $label ) {
57 printf( '<option value="%s"%s>%s</option>', esc_attr( $value ), selected( $value, $field['value'], false ), esc_html( $label ) );
58 }
59 ?>
60 </select>
61 <?php elseif ( 'checkbox' == $field['type'] ) : ?>
62 <label>
63 <input type="checkbox" name="<?php echo esc_attr( $field['name'] ); ?>" class="ayg-editor-field ayg-editor-field-<?php echo esc_attr( $field['name'] ); ?>" value="1" data-default="<?php echo esc_attr( $field['value'] ); ?>" <?php checked( $field['value'] ); ?> />
64 <strong><?php echo esc_html( $field['label'] ); ?></strong>
65 </label>
66 <?php elseif ( 'color' == $field['type'] ) : ?>
67 <label><strong><?php echo esc_html( $field['label'] ); ?></strong></label>
68 <input type="text" name="<?php echo esc_attr( $field['name'] ); ?>" class="ayg-editor-field ayg-editor-field-<?php echo esc_attr( $field['name'] ); ?> ayg-color-picker widefat" value="<?php echo esc_attr( $field['value'] ); ?>" data-default="<?php echo esc_attr( $field['value'] ); ?>" />
69 <?php endif; ?>
70
71 <!-- Hint -->
72 <?php if ( isset( $field['description'] ) ) : ?>
73 <p class="description"><?php echo wp_kses_post( $field['description'] ); ?></p>
74 <?php endif; ?>
75 </div>
76 <?php
77 endforeach;
78 ?>
79 </div>
80
81 </div>
82
83 <?php
84 endforeach;
85 ?>
86
87 <!-- Action Buttons -->
88 <p class="submit">
89 <a id="ayg-close-shortcode-builder" class="button-secondary"><?php esc_html_e( 'Cancel', 'automatic-youtube-gallery' ); ?></a>
90 <input type="button" id="ayg-insert-shortcode" class="button-primary" value="<?php esc_attr_e( 'Insert Shortcode', 'automatic-youtube-gallery' ); ?>" />
91 </p>
92 </div> <!-- END ayg-editor -->
93
94 </div> <!-- END ayg-modal-body -->
95 </div> <!-- END ayg-modal-content -->
96 </div> <!-- END ayg-modal -->
97 </div>