| @@ -9,8 +9,16 @@ | ||
| 9 | 9 | * @package Automatic_YouTube_Gallery |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | 12 | $fields = ayg_get_editor_fields(); |
| 13 | + | |
| 14 | +$pagination_type = 'more'; | |
| 15 | +foreach ( $fields['gallery']['fields'] as $field ) { | |
| 16 | + if ( 'pagination_type' == $field['name'] ) { | |
| 17 | + $pagination_type = $field['value']; | |
| 18 | + break; | |
| 19 | + } | |
| 20 | +} | |
| 13 | 21 | ?> |
| 14 | 22 | |
| 15 | 23 | <div id="ayg-shortcode-builder"> |
| 16 | 24 | <!-- Shortcode Builder --> |
| @@ -15,9 +23,9 @@ | ||
| 15 | 23 | <div id="ayg-shortcode-builder"> |
| 16 | 24 | <!-- Shortcode Builder --> |
| 17 | 25 | <div class="ayg-left-col"> |
| 18 | 26 | <div class="ayg-col-content"> |
| 19 | - <div class="ayg-editor ayg-editor-field-type-playlist ayg-editor-field-theme-classic"> | |
| 27 | + <div class="ayg-editor ayg-editor-field-type-playlist ayg-editor-field-theme-classic ayg-editor-field-pagination_type-<?php echo esc_attr( $pagination_type ); ?>"> | |
| 20 | 28 | <?php |
| 21 | 29 | foreach ( $fields as $key => $value ) : |
| 22 | 30 | ?> |
| 23 | 31 | <div class="ayg-editor-section ayg-editor-section-<?php echo esc_attr( $key ); ?> <?php if ( 'source' == $key ) echo 'ayg-active'; ?>"> |
| @@ -35,15 +43,15 @@ | ||
| 35 | 43 | } |
| 36 | 44 | ?> |
| 37 | 45 | <div class="ayg-editor-control ayg-editor-control-<?php echo esc_attr( $field['name'] ); ?>"> |
| 38 | 46 | <?php if ( 'text' == $field['type'] || 'url' == $field['type'] || 'number' == $field['type'] ) : ?> |
| 39 | - <label><strong><?php echo esc_html( $field['label'] ); ?></strong></label> | |
| 47 | + <label><?php echo esc_html( $field['label'] ); ?></label> | |
| 40 | 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'] ); ?>" /> |
| 41 | 49 | <?php elseif ( 'textarea' == $field['type'] ) : ?> |
| 42 | - <label><strong><?php echo esc_html( $field['label'] ); ?></strong></label> | |
| 50 | + <label><?php echo esc_html( $field['label'] ); ?></label> | |
| 43 | 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> |
| 44 | 52 | <?php elseif ( 'select' == $field['type'] || 'radio' == $field['type'] ) : ?> |
| 45 | - <label><strong><?php echo esc_html( $field['label'] ); ?></strong></label> | |
| 53 | + <label><?php echo esc_html( $field['label'] ); ?></label> | |
| 46 | 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'] ); ?>"> |
| 47 | 55 | <?php |
| 48 | 56 | foreach ( $field['options'] as $value => $label ) { |
| 49 | 57 | printf( '<option value="%s"%s>%s</option>', esc_attr( $value ), selected( $value, $field['value'], false ), esc_html( $label ) ); |
| @@ -52,12 +60,12 @@ | ||
| 52 | 60 | </select> |
| 53 | 61 | <?php elseif ( 'checkbox' == $field['type'] ) : ?> |
| 54 | 62 | <label> |
| 55 | 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'] ); ?> /> |
| 56 | - <strong><?php echo esc_html( $field['label'] ); ?></strong> | |
| 64 | + <?php echo esc_html( $field['label'] ); ?> | |
| 57 | 65 | </label> |
| 58 | 66 | <?php elseif ( 'color' == $field['type'] ) : ?> |
| 59 | - <label><strong><?php echo esc_html( $field['label'] ); ?></strong></label> | |
| 67 | + <label><?php echo esc_html( $field['label'] ); ?></label> | |
| 60 | 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'] ); ?>" /> |
| 61 | 69 | <?php endif; ?> |
| 62 | 70 | |
| 63 | 71 | <!-- Hint --> |
| @@ -88,9 +96,9 @@ | ||
| 88 | 96 | <div class="ayg-col-content"> |
| 89 | 97 | <p class="about-description"><?php esc_html_e( '"Automatic YouTube Gallery" provides several methods to build your gallery. Choose one of the following methods best suited for you,', 'automatic-youtube-gallery' ); ?></p> |
| 90 | 98 | <p><span class="dashicons dashicons-arrow-left-alt"></span> <?php esc_html_e( 'Use the shortcode builder in this page to build your gallery shortcode, then add it in your POST/PAGE.', 'automatic-youtube-gallery' ); ?></p> |
| 91 | 99 | <p>2. <?php printf( __( 'Use our "Automatic YouTube Gallery" <a href="%s" target="_blank">Gutenberg block</a> to build the gallery directly in your POST/PAGE.', 'automatic-youtube-gallery' ), 'https://plugins360.com/automatic-youtube-gallery/building-youtube-gallery-using-gutenberg/' ); ?></p> |
| 92 | - <p>3. <?php esc_html_e( 'Use our "Automatic YouTube Gallery" widget to add the gallery in your website sidebars. This is a PRO feature.', 'automatic-youtube-gallery' ); ?></p> | |
| 100 | + <p>3. <?php esc_html_e( 'Use our "Automatic YouTube Gallery" widget to add the gallery in your website sidebars.', 'automatic-youtube-gallery' ); ?></p> | |
| 93 | 101 | </div> |
| 94 | 102 | </div> |
| 95 | 103 | </div> |
| 96 | 104 | |