| @@ -61,10 +61,9 @@ | ||
| 61 | 61 | 'ayg_block', |
| 62 | 62 | array( |
| 63 | 63 | 'options' => $fields, |
| 64 | 64 | 'i18n' => array( |
| 65 | - 'selected_color' => __( 'Selected Color', 'automatic-youtube-gallery' ), | |
| 66 | - 'is_loading' => __( 'Loading...', 'automatic-youtube-gallery' ) | |
| 65 | + 'selected_color' => __( 'Selected Color', 'automatic-youtube-gallery' ) | |
| 67 | 66 | ) |
| 68 | 67 | ) |
| 69 | 68 | ); |
| 70 | 69 | } |
| @@ -123,10 +122,19 @@ | ||
| 123 | 122 | if ( ! empty( $atts['is_admin'] ) ) { |
| 124 | 123 | $atts['autoplay'] = false; |
| 125 | 124 | } |
| 126 | 125 | |
| 127 | - if ( ! empty( $atts['uid'] ) ) { | |
| 128 | - $atts['uid'] = md5( $atts['uid'] ); | |
| 126 | + // Deprecated since v2.5.8. Retained for backward compatibility. | |
| 127 | + if ( ! empty( $atts['uid'] ) ) { | |
| 128 | + $atts['deprecated_uid'] = md5( $atts['uid'] ); | |
| 129 | + unset( $atts['uid'] ); | |
| 130 | + } | |
| 131 | + | |
| 132 | + // If popup is enabled and type is video, force theme to popup | |
| 133 | + if ( isset( $atts['popup'] ) && ! empty( $atts['popup'] ) ) { | |
| 134 | + if ( isset( $atts['type'] ) && 'video' == $atts['type'] ) { | |
| 135 | + $atts['theme'] = 'popup'; | |
| 136 | + } | |
| 129 | 137 | } |
| 130 | 138 | |
| 131 | 139 | // Output |
| 132 | 140 | $output = '<div ' . get_block_wrapper_attributes() . '>'; |