| @@ -1,20 +1,20 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | - * Media class for Media Options. | |
| 4 | + * Views class for Shortcode generator options. | |
| 5 | 5 | * |
| 6 | 6 | * @link https://themeatelier.net |
| 7 | 7 | * @since 1.0.0 |
| 8 | 8 | * |
| 9 | 9 | * @package darkify |
| 10 | - * @subpackage darkify/src/Admin/Views/Media | |
| 10 | + * @subpackage darkify/src/Admin/Views/ImageStyle | |
| 11 | 11 | * @author ThemeAtelier<[email protected]> |
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | 14 | namespace ThemeAtelier\Darkify\Admin\Views; |
| 15 | 15 | |
| 16 | -use ThemeAtelier\Darkify\Admin\Schema\SchemaRegistry as Darkify; | |
| 16 | +use ThemeAtelier\Darkify\Admin\Framework\Classes\Darkify; | |
| 17 | 17 | |
| 18 | 18 | class Media |
| 19 | 19 | { |
| 20 | 20 | /** |
| @@ -27,9 +27,8 @@ | ||
| 27 | 27 | { |
| 28 | 28 | Darkify::createSection( |
| 29 | 29 | $prefix, |
| 30 | 30 | array( |
| 31 | - 'id' => 'media', | |
| 32 | 31 | 'title' => esc_html__('Media', 'darkify'), |
| 33 | 32 | 'icon' => 'icofont-multimedia', |
| 34 | 33 | 'fields' => array( |
| 35 | 34 | |
| @@ -37,23 +36,11 @@ | ||
| 37 | 36 | 'type' => 'section_tab', |
| 38 | 37 | 'tabs' => array( |
| 39 | 38 | |
| 40 | 39 | array( |
| 41 | - 'id' => 'image-controls', | |
| 42 | 40 | 'title' => esc_html__('Image Controls', 'darkify'), |
| 43 | 41 | 'icon' => 'icofont-file-image', |
| 44 | 42 | 'fields' => array( |
| 45 | - // Intro line, rendered plain above the section cards. | |
| 46 | - array( | |
| 47 | - 'type' => 'page_hint', | |
| 48 | - 'content' => esc_html__('Control how images adapt when dark mode is active.', 'darkify'), | |
| 49 | - ), | |
| 50 | - // ===== BRIGHTNESS ===== | |
| 51 | - array( | |
| 52 | - 'type' => 'heading', | |
| 53 | - 'title' => esc_html__('Brightness', 'darkify'), | |
| 54 | - 'section_start' => true, | |
| 55 | - ), | |
| 56 | 43 | // Low Brightness |
| 57 | 44 | array( |
| 58 | 45 | 'id' => 'brightness', |
| 59 | 46 | 'type' => 'fieldset', |
| @@ -61,32 +48,23 @@ | ||
| 61 | 48 | array( |
| 62 | 49 | 'id' => 'enable_low_image_brightness', |
| 63 | 50 | 'type' => 'switcher', |
| 64 | 51 | 'title' => esc_html__('Low Brightness Images', 'darkify'), |
| 65 | - 'title_help' => | |
| 66 | - '<div class="darkify-info-label">' . | |
| 67 | - __('Enable a low-brightness effect for images when dark mode is active.', 'darkify') . | |
| 68 | - '</div>', | |
| 69 | - | |
| 70 | - 'text_on' => esc_html__('Enabled', 'darkify'), | |
| 71 | - 'text_off' => esc_html__('Disabled', 'darkify'), | |
| 72 | - 'text_width' => 100, | |
| 52 | + 'title_help' => '<div class="darkify-info-label">' . __('Enable brightness effect for images in dark mode.', 'darkify') . '</div><a class="tooltip_btn_primary" href="https://darkifywp.com/image-controls/#image_brightness" target="_blank">' . __('Live Demo', 'darkify') . '</a><a class="tooltip_btn_secondary" href="https://docs.themeatelier.net/docs/darkify-pro/darkify-settings/media/" target="_blank">' . __('Open Docs', 'darkify') . '</a>', | |
| 53 | + 'text_on' => esc_html__('Yes', 'darkify'), | |
| 54 | + 'text_off' => esc_html__('No', 'darkify'), | |
| 73 | 55 | 'default' => true, |
| 74 | 56 | ), |
| 75 | 57 | array( |
| 76 | 58 | 'id' => 'low_image_brightness_label', |
| 77 | 59 | 'type' => 'slider', |
| 78 | - 'title' => esc_html__('Brightness Level', 'darkify'), | |
| 79 | - 'title_help' => '<div class="darkify-info-label">' . | |
| 80 | - __('Adjust the brightness level for images in dark mode.', 'darkify') . | |
| 81 | - '</div>', | |
| 82 | - | |
| 60 | + 'title' => esc_html__('Brightness Label', 'darkify'), | |
| 61 | + 'title_help' => '<div class="darkify-info-label">' . __('Adjust the brightness level for dark mode.', 'darkify') . '</div>', | |
| 83 | 62 | 'min' => 0, |
| 84 | 63 | 'max' => 100, |
| 85 | 64 | 'step' => 5, |
| 86 | 65 | 'default' => '20', |
| 87 | 66 | 'unit' => '%', |
| 88 | - 'panel' => true, | |
| 89 | 67 | 'dependency' => array('enable_low_image_brightness', '==', 'true', 'all'), |
| 90 | 68 | ), |
| 91 | 69 | |
| 92 | 70 | array( |
| @@ -92,28 +70,15 @@ | ||
| 92 | 70 | array( |
| 93 | 71 | 'id' => 'disallowed_low_brightness_images', |
| 94 | 72 | 'type' => 'textarea', |
| 95 | 73 | 'title' => esc_html__('Exclude Images', 'darkify'), |
| 96 | - 'title_help' => | |
| 97 | - '<div class="darkify-info-label">' . | |
| 98 | - __('Exclude specific images from brightness adjustments in dark mode.', 'darkify') . | |
| 99 | - '</div>', | |
| 100 | - 'placeholder' => esc_html__( | |
| 101 | - 'Enter image URLs to exclude (comma-separated or one per line).', | |
| 102 | - 'darkify' | |
| 103 | - ), | |
| 104 | - | |
| 74 | + 'title_help' => '<div class="darkify-info-label">' . __('Exclude brightness adjustments for specific images.', 'darkify') . '</div>', | |
| 105 | 75 | 'class' => 'only_pro', |
| 76 | + 'placeholder' => esc_html__('Enter image URLs (comma-separated or one per line) to exclude from brightness adjustments.', 'darkify'), | |
| 106 | 77 | 'dependency' => array('enable_low_image_brightness', '==', 'true', 'all'), |
| 107 | 78 | ), |
| 108 | 79 | ), |
| 109 | 80 | ), |
| 110 | - // ===== GRAYSCALE ===== | |
| 111 | - array( | |
| 112 | - 'type' => 'heading', | |
| 113 | - 'title' => esc_html__('Grayscale', 'darkify'), | |
| 114 | - 'section_start' => true, | |
| 115 | - ), | |
| 116 | 81 | // Grayscale Image |
| 117 | 82 | array( |
| 118 | 83 | 'id' => 'grayscale', |
| 119 | 84 | 'type' => 'fieldset', |
| @@ -121,32 +86,22 @@ | ||
| 121 | 86 | array( |
| 122 | 87 | 'id' => 'enable_image_grayscale', |
| 123 | 88 | 'type' => 'switcher', |
| 124 | 89 | 'title' => esc_html__('Grayscale Images', 'darkify'), |
| 125 | - 'title_help' => | |
| 126 | - '<div class="darkify-info-label">' . | |
| 127 | - __('Enable grayscale effect for images when dark mode is enabled.', 'darkify') . | |
| 128 | - '</div>', | |
| 129 | - | |
| 130 | - 'text_on' => esc_html__('Enabled', 'darkify'), | |
| 131 | - 'text_off' => esc_html__('Disabled', 'darkify'), | |
| 132 | - 'text_width' => 100, | |
| 90 | + 'title_help' => '<div class="darkify-info-label">' . __('Enable grayscale effect for images in dark mode.', 'darkify') . '</div><a class="tooltip_btn_primary" href="https://darkifywp.com/image-controls/#image_grayscale" target="_blank">' . __('Live Demo', 'darkify') . '</a><a class="tooltip_btn_secondary" href="https://docs.themeatelier.net/docs/darkify-pro/darkify-settings/media/" target="_blank">' . __('Open Docs', 'darkify') . '</a>', | |
| 91 | + 'text_on' => esc_html__('Yes', 'darkify'), | |
| 92 | + 'text_off' => esc_html__('No', 'darkify'), | |
| 133 | 93 | ), |
| 134 | 94 | array( |
| 135 | 95 | 'id' => 'image_grayscale_label', |
| 136 | 96 | 'type' => 'slider', |
| 137 | - 'title' => esc_html__('Grayscale Level', 'darkify'), | |
| 138 | - 'title_help' => | |
| 139 | - '<div class="darkify-info-label">' . | |
| 140 | - __('Adjust the grayscale level for images in dark mode.', 'darkify') . | |
| 141 | - '</div>', | |
| 142 | - | |
| 97 | + 'title' => esc_html__('Grayscale Label', 'darkify'), | |
| 98 | + 'title_help' => '<div class="darkify-info-label">' . __('Adjust the grayscale level for images in dark mode.', 'darkify') . '</div>', | |
| 143 | 99 | 'min' => 0, |
| 144 | 100 | 'max' => 100, |
| 145 | 101 | 'step' => 5, |
| 146 | 102 | 'default' => '80', |
| 147 | 103 | 'unit' => '%', |
| 148 | - 'panel' => true, | |
| 149 | 104 | 'dependency' => array('enable_image_grayscale', '==', 'true', 'all'), |
| 150 | 105 | ), |
| 151 | 106 | |
| 152 | 107 | array( |
| @@ -152,28 +107,16 @@ | ||
| 152 | 107 | array( |
| 153 | 108 | 'id' => 'disallowed_low_grayscale_images', |
| 154 | 109 | 'type' => 'textarea', |
| 155 | 110 | 'title' => esc_html__('Exclude Images', 'darkify'), |
| 156 | - 'title_help' => '<div class="darkify-info-label">' . | |
| 157 | - __('Exclude grayscale effects for specific images.', 'darkify') . | |
| 158 | - '</div>', | |
| 159 | - 'placeholder' => esc_html__( | |
| 160 | - 'Enter image URLs (comma-separated or one per line) to exclude from grayscale effects.', | |
| 161 | - 'darkify' | |
| 162 | - ), | |
| 163 | - | |
| 111 | + 'title_help' => '<div class="darkify-info-label">' . __('Exclude grayscale effects for specific images.', 'darkify') . '</div>', | |
| 164 | 112 | 'class' => 'only_pro', |
| 113 | + 'placeholder' => esc_html__('Enter image URLs (comma-separated or one per line) to exclude from grayscale effects.', 'darkify'), | |
| 165 | 114 | 'dependency' => array('enable_image_grayscale', '==', 'true', 'all'), |
| 166 | 115 | ), |
| 167 | 116 | ), |
| 168 | 117 | ), |
| 169 | 118 | |
| 170 | - // ===== BACKGROUND & INVERSION ===== | |
| 171 | - array( | |
| 172 | - 'type' => 'heading', | |
| 173 | - 'title' => esc_html__('Background & Inversion', 'darkify'), | |
| 174 | - 'section_start' => true, | |
| 175 | - ), | |
| 176 | 119 | // Darken Background Image |
| 177 | 120 | array( |
| 178 | 121 | 'id' => 'darken_background', |
| 179 | 122 | 'type' => 'fieldset', |
| @@ -181,31 +124,23 @@ | ||
| 181 | 124 | array( |
| 182 | 125 | 'id' => 'enable_low_image_darken', |
| 183 | 126 | 'type' => 'switcher', |
| 184 | 127 | 'title' => esc_html__('Darken Background Images', 'darkify'), |
| 185 | - 'title_help' => '<div class="darkify-info-label">' . | |
| 186 | - __('Enable background darkening effect in dark mode.', 'darkify') . | |
| 187 | - '</div>', | |
| 188 | - | |
| 189 | - 'text_on' => esc_html__('Enabled', 'darkify'), | |
| 190 | - 'text_off' => esc_html__('Disabled', 'darkify'), | |
| 191 | - 'text_width' => 100, | |
| 128 | + 'title_help' => '<div class="darkify-info-label">' . __('Enable background darkening effect in dark mode.', 'darkify') . '</div><a class="tooltip_btn_primary" href="https://darkifywp.com/image-controls/#darken_bg" target="_blank">' . __('Live Demo', 'darkify') . '</a><a class="tooltip_btn_secondary" href="https://docs.themeatelier.net/docs/darkify-pro/darkify-settings/media/" target="_blank">' . __('Open Docs', 'darkify') . '</a>', | |
| 129 | + 'text_on' => esc_html__('Yes', 'darkify'), | |
| 130 | + 'text_off' => esc_html__('No', 'darkify'), | |
| 192 | 131 | 'default' => true, |
| 193 | 132 | ), |
| 194 | 133 | array( |
| 195 | 134 | 'id' => 'low_image_darken_label', |
| 196 | 135 | 'type' => 'slider', |
| 197 | - 'title' => esc_html__('Darkening Level', 'darkify'), | |
| 198 | - 'title_help' => '<div class="darkify-info-label">' . | |
| 199 | - __('Adjust the darkening level for background images in dark mode.', 'darkify') . | |
| 200 | - '</div>', | |
| 201 | - | |
| 136 | + 'title' => esc_html__('Darken Label', 'darkify'), | |
| 137 | + 'title_help' => '<div class="darkify-info-label">' . __('Adjust the darkening level for background images in dark mode.', 'darkify') . '</div>', | |
| 202 | 138 | 'min' => 0, |
| 203 | 139 | 'max' => 100, |
| 204 | 140 | 'step' => 5, |
| 205 | 141 | 'default' => '60', |
| 206 | 142 | 'unit' => '%', |
| 207 | - 'panel' => true, | |
| 208 | 143 | 'dependency' => array('enable_low_image_darken', '==', 'true', 'all'), |
| 209 | 144 | ), |
| 210 | 145 | ), |
| 211 | 146 | ), |
| @@ -213,16 +148,9 @@ | ||
| 213 | 148 | array( |
| 214 | 149 | 'id' => 'enable_invert_inline_svg', |
| 215 | 150 | 'type' => 'switcher', |
| 216 | 151 | 'title' => esc_html__('Invert Inline SVGs', 'darkify'), |
| 217 | - 'title_help' => | |
| 218 | - '<div class="darkify-info-label">' . | |
| 219 | - __('Enable automatic inversion of inline SVG images in dark mode.', 'darkify') . | |
| 220 | - '</div>', | |
| 221 | - | |
| 222 | - 'text_on' => esc_html__('Enabled', 'darkify'), | |
| 223 | - 'text_off' => esc_html__('Disabled', 'darkify'), | |
| 224 | - 'text_width' => 100, | |
| 152 | + 'title_help' => '<div class="darkify-info-label">' . __('Enable automatic inversion of inline SVG images in dark mode.', 'darkify') . '</div>', | |
| 225 | 153 | ), |
| 226 | 154 | |
| 227 | 155 | // Image Inversion |
| 228 | 156 | array( |
| @@ -232,16 +160,12 @@ | ||
| 232 | 160 | array( |
| 233 | 161 | 'id' => 'enable_invert_images', |
| 234 | 162 | 'type' => 'switcher', |
| 235 | 163 | 'title' => esc_html__('Invert Specific Images', 'darkify'), |
| 236 | - 'title_help' => '<div class="darkify-info-label">' . | |
| 237 | - __('Enable image inversion for specific images in dark mode.', 'darkify') . | |
| 238 | - '</div>', | |
| 239 | - | |
| 240 | - 'text_on' => esc_html__('Enabled', 'darkify'), | |
| 241 | - 'text_off' => esc_html__('Disabled', 'darkify'), | |
| 242 | - 'text_width' => 100, | |
| 164 | + 'title_help' => '<div class="darkify-info-label">' . __('Enable image inversion in dark mode.', 'darkify') . '</div><a class="tooltip_btn_primary" href="https://darkifywp.com/image-controls/#invert_images" target="_blank">' . __('Live Demo', 'darkify') . '</a><a class="tooltip_btn_secondary" href="https://docs.themeatelier.net/docs/darkify-pro/darkify-settings/media/" target="_blank">' . __('Open Docs', 'darkify') . '</a>', | |
| 243 | 165 | 'class' => 'switcher_pro_only', |
| 166 | + 'text_on' => esc_html__('Yes', 'darkify'), | |
| 167 | + 'text_off' => esc_html__('No', 'darkify'), | |
| 244 | 168 | 'default' => false, |
| 245 | 169 | ), |
| 246 | 170 | array( |
| 247 | 171 | 'id' => 'invert_images_allowed_urls', |
| @@ -246,17 +170,12 @@ | ||
| 246 | 170 | array( |
| 247 | 171 | 'id' => 'invert_images_allowed_urls', |
| 248 | 172 | 'type' => 'textarea', |
| 249 | 173 | 'title' => esc_html__('Image URLs', 'darkify'), |
| 250 | - 'title_help' => '<div class="darkify-info-label">' . | |
| 251 | - __('Apply inversion to specific images, SVGs, or backgrounds.', 'darkify') . | |
| 252 | - '</div>', | |
| 253 | - 'placeholder' => esc_html__( | |
| 254 | - 'Enter URLs (comma-separated or one per line) for images, SVGs, or background images to apply inversion.', | |
| 255 | - 'darkify' | |
| 256 | - ), | |
| 257 | - | |
| 174 | + 'placeholder' => esc_html__('Enter URLs (comma-separated or one per line) for images, SVGs, or background images to apply inversion.', 'darkify'), | |
| 175 | + 'title_help' => '<div class="darkify-info-label">' . __('Apply inversion to specific images, SVGs, or backgrounds.', 'darkify') . '</div>', | |
| 258 | 176 | 'class' => 'only_pro', |
| 177 | + // 'dependency' => array('enable_invert_images', '==', 'true', 'all'), | |
| 259 | 178 | ), |
| 260 | 179 | ), |
| 261 | 180 | ), |
| 262 | 181 | |
| @@ -261,30 +180,19 @@ | ||
| 261 | 180 | ), |
| 262 | 181 | |
| 263 | 182 | |
| 264 | 183 | array( |
| 265 | - 'type' => 'heading', | |
| 266 | - 'title' => esc_html__('Replace Images', 'darkify'), | |
| 267 | - 'section_start' => true, | |
| 268 | - ), | |
| 269 | - array( | |
| 270 | 184 | 'id' => 'image_replacements', |
| 271 | 185 | 'type' => 'repeater', |
| 272 | 186 | 'class' => 'replacement_repeater repeater_pro_only', |
| 273 | - 'title' => esc_html__('Replace Images', 'darkify'), | |
| 274 | - 'title_help' => | |
| 275 | - '<div class="darkify-info-label">' . | |
| 276 | - __('Replace specified images when dark mode is active.', 'darkify') . | |
| 277 | - '</div>' . | |
| 278 | - '' . | |
| 279 | - '', | |
| 280 | - | |
| 187 | + 'title' => esc_html__('Replace Images', 'darkify'), | |
| 188 | + 'title_help' => '<div class="darkify-info-label">' . __('Replace specefied images when darkmode is active.', 'darkify') . '</div><a class="tooltip_btn_primary" href="https://darkifywp.com/image-controls/#replace_images" target="_blank">' . __('Live Demo', 'darkify') . '</a><a class="tooltip_btn_secondary" href="https://docs.themeatelier.net/docs/darkify-pro/darkify-settings/media/" target="_blank">' . __('Open Docs', 'darkify') . '</a>', | |
| 281 | 189 | 'fields' => array( |
| 282 | 190 | array( |
| 283 | 191 | 'id' => 'normal_image', |
| 284 | 192 | 'type' => 'upload', |
| 193 | + 'title' => esc_html__('Normal Mode', 'darkify'), | |
| 285 | 194 | 'library' => 'image', |
| 286 | - 'title' => esc_html__('Normal Mode Image', 'darkify'), | |
| 287 | 195 | 'placeholder' => esc_html__('Image URL', 'darkify'), |
| 288 | 196 | 'button_title' => esc_html__('Add Image', 'darkify'), |
| 289 | 197 | 'remove_title' => esc_html__('Remove Image', 'darkify'), |
| 290 | 198 | ), |
| @@ -291,10 +199,10 @@ | ||
| 291 | 199 | |
| 292 | 200 | array( |
| 293 | 201 | 'id' => 'dark_image', |
| 294 | 202 | 'type' => 'upload', |
| 203 | + 'title' => esc_html__('Dark Mode', 'darkify'), | |
| 295 | 204 | 'library' => 'image', |
| 296 | - 'title' => esc_html__('Dark Mode Image', 'darkify'), | |
| 297 | 205 | 'placeholder' => esc_html__('Image URL', 'darkify'), |
| 298 | 206 | 'button_title' => esc_html__('Add Image', 'darkify'), |
| 299 | 207 | 'remove_title' => esc_html__('Remove Image', 'darkify'), |
| 300 | 208 | ), |
| @@ -310,23 +218,12 @@ | ||
| 310 | 218 | |
| 311 | 219 | ) |
| 312 | 220 | ), |
| 313 | 221 | array( |
| 314 | - 'id' => 'video-controls', | |
| 315 | 222 | 'title' => esc_html__('Video Controls', 'darkify'), |
| 316 | 223 | 'icon' => 'icofont-file-video', |
| 317 | 224 | 'fields' => array( |
| 318 | - // Intro line, rendered plain above the section cards. | |
| 319 | - array( | |
| 320 | - 'type' => 'page_hint', | |
| 321 | - 'content' => esc_html__('Control how videos respond to dark mode.', 'darkify'), | |
| 322 | - ), | |
| 323 | - // ===== BRIGHTNESS ===== | |
| 324 | - array( | |
| 325 | - 'type' => 'heading', | |
| 326 | - 'title' => esc_html__('Brightness', 'darkify'), | |
| 327 | - 'section_start' => true, | |
| 328 | - ), | |
| 225 | + | |
| 329 | 226 | // Low Brightness |
| 330 | 227 | array( |
| 331 | 228 | 'id' => 'video_brightness', |
| 332 | 229 | 'type' => 'fieldset', |
| @@ -334,43 +231,28 @@ | ||
| 334 | 231 | array( |
| 335 | 232 | 'id' => 'enable_low_video_brightness', |
| 336 | 233 | 'type' => 'switcher', |
| 337 | 234 | 'title' => esc_html__('Low Brightness Videos', 'darkify'), |
| 338 | - 'title_help' => | |
| 339 | - '<div class="darkify-info-label">' . | |
| 340 | - __('Enable brightness effect for videos in dark mode.', 'darkify') . | |
| 341 | - '</div>', | |
| 342 | - | |
| 343 | - 'text_on' => esc_html__('Enabled', 'darkify'), | |
| 344 | - 'text_off' => esc_html__('Disabled', 'darkify'), | |
| 345 | - 'text_width' => 100, | |
| 235 | + 'title_help' => '<div class="darkify-info-label">' . __('Enable brightness effect for videos in dark mode.', 'darkify') . '</div><a class="tooltip_btn_primary" href="https://darkifywp.com/video-controls/#video_brightness" target="_blank">' . __('Live Demo', 'darkify') . '</a><a class="tooltip_btn_secondary" href="https://docs.themeatelier.net/docs/darkify-pro/darkify-settings/media/#video_control" target="_blank">' . __('Open Docs', 'darkify') . '</a>', | |
| 236 | + 'text_on' => esc_html__('Yes', 'darkify'), | |
| 237 | + 'text_off' => esc_html__('No', 'darkify'), | |
| 346 | 238 | 'default' => true, |
| 347 | 239 | ), |
| 348 | 240 | array( |
| 349 | 241 | 'id' => 'low_video_brightness_label', |
| 350 | 242 | 'type' => 'slider', |
| 351 | - 'title' => esc_html__('Brightness Level', 'darkify'), | |
| 352 | - 'title_help' => '<div class="darkify-info-label">' . | |
| 353 | - __('Adjust the brightness level for videos in dark mode.', 'darkify') . | |
| 354 | - '</div>', | |
| 355 | - | |
| 243 | + 'title' => esc_html__('Brightness Label', 'darkify'), | |
| 244 | + 'title_help' => '<div class="darkify-info-label">' . __('Adjust the brightness level for dark mode.', 'darkify') . '</div>', | |
| 356 | 245 | 'min' => 0, |
| 357 | 246 | 'max' => 100, |
| 358 | 247 | 'step' => 5, |
| 359 | 248 | 'default' => '20', |
| 360 | 249 | 'unit' => '%', |
| 361 | - 'panel' => true, | |
| 362 | 250 | 'dependency' => array('enable_low_video_brightness', '==', 'true', 'all'), |
| 363 | 251 | ), |
| 364 | 252 | ), |
| 365 | 253 | ), |
| 366 | 254 | |
| 367 | - // ===== GRAYSCALE ===== | |
| 368 | - array( | |
| 369 | - 'type' => 'heading', | |
| 370 | - 'title' => esc_html__('Grayscale', 'darkify'), | |
| 371 | - 'section_start' => true, | |
| 372 | - ), | |
| 373 | 255 | // Grayscale Video |
| 374 | 256 | array( |
| 375 | 257 | 'id' => 'video_grayscale', |
| 376 | 258 | 'type' => 'fieldset', |
| @@ -378,72 +260,53 @@ | ||
| 378 | 260 | array( |
| 379 | 261 | 'id' => 'enable_video_grayscale', |
| 380 | 262 | 'type' => 'switcher', |
| 381 | 263 | 'title' => esc_html__('Grayscale Videos', 'darkify'), |
| 382 | - 'title_help' => | |
| 383 | - '<div class="darkify-info-label">' . | |
| 384 | - __('Enable grayscale effect for videos in dark mode.', 'darkify') . | |
| 385 | - '</div>', | |
| 386 | - | |
| 387 | - 'text_on' => esc_html__('Enabled', 'darkify'), | |
| 388 | - 'text_off' => esc_html__('Disabled', 'darkify'), | |
| 389 | - 'text_width' => 100, | |
| 264 | + 'title_help' => '<div class="darkify-info-label">' . __('Enable grayscale effect for videos in dark mode.', 'darkify') . '</div><a class="tooltip_btn_primary" href="https://darkifywp.com/video-controls/#video_brightness" target="_blank">' . __('Live Demo', 'darkify') . '</a><a class="tooltip_btn_secondary" href="https://docs.themeatelier.net/docs/darkify-pro/darkify-settings/media/#video_control" target="_blank">' . __('Open Docs', 'darkify') . '</a>', | |
| 265 | + 'text_on' => esc_html__('Yes', 'darkify'), | |
| 266 | + 'text_off' => esc_html__('No', 'darkify'), | |
| 390 | 267 | ), |
| 391 | 268 | array( |
| 392 | 269 | 'id' => 'video_grayscale_label', |
| 393 | 270 | 'type' => 'slider', |
| 394 | - 'title' => esc_html__('Grayscale Level', 'darkify'), | |
| 395 | - 'title_help' => '<div class="darkify-info-label">' . | |
| 396 | - __('Adjust the grayscale level for videos in dark mode.', 'darkify') . | |
| 397 | - '</div>', | |
| 398 | - | |
| 271 | + 'title' => esc_html__('Grayscale Label', 'darkify'), | |
| 272 | + 'title_help' => '<div class="darkify-info-label">' . __('Adjust the grayscale level for dark mode.', 'darkify') . '</div>', | |
| 399 | 273 | 'min' => 0, |
| 400 | 274 | 'max' => 100, |
| 401 | 275 | 'step' => 5, |
| 402 | 276 | 'default' => '80', |
| 403 | 277 | 'unit' => '%', |
| 404 | - 'panel' => true, | |
| 405 | 278 | 'dependency' => array('enable_video_grayscale', '==', 'true', 'all'), |
| 406 | 279 | ), |
| 407 | 280 | ), |
| 408 | 281 | ), |
| 409 | 282 | |
| 410 | - | |
| 411 | 283 | array( |
| 412 | - 'type' => 'heading', | |
| 413 | - 'title' => esc_html__('Replace Videos', 'darkify'), | |
| 414 | - 'section_start' => true, | |
| 415 | - ), | |
| 416 | - array( | |
| 417 | 284 | 'id' => 'video_replacements', |
| 418 | 285 | 'type' => 'repeater', |
| 419 | 286 | 'class' => 'replacement_repeater repeater_pro_only', |
| 420 | 287 | 'title' => esc_html__('Replace Videos', 'darkify'), |
| 421 | - 'title_help' => '<div class="darkify-info-label">' . | |
| 422 | - __('Replace specified videos (self-hosted, YouTube, Vimeo, or Dailymotion) when dark mode is active.', 'darkify') . | |
| 423 | - '</div>', | |
| 288 | + 'title_help' => '<div class="darkify-info-label">' . __('Replace specified videos (self-hosted, youtube, vimeo or dailymotion) when dark mode is active.', 'darkify') . '</div><a class="tooltip_btn_primary" href="https://darkifywp.com/video-controls/#replace_videos" target="_blank">' . __('Live Demo', 'darkify') . '</a><a class="tooltip_btn_secondary" href="https://docs.themeatelier.net/docs/darkify-pro/darkify-settings/media/#video_control" target="_blank">' . __('Open Docs', 'darkify') . '</a>', | |
| 289 | + 'fields' => array( | |
| 424 | 290 | |
| 425 | - 'fields' => array( | |
| 426 | 291 | array( |
| 427 | 292 | 'id' => 'normal_video', |
| 428 | 293 | 'type' => 'upload', |
| 294 | + 'title' => esc_html__('Normal Mode Video', 'darkify'), | |
| 429 | 295 | 'library' => 'video', |
| 430 | - 'title' => esc_html__('Normal Mode Video', 'darkify'), | |
| 431 | 296 | 'placeholder' => esc_html__('Video URL', 'darkify'), |
| 432 | 297 | 'button_title' => esc_html__('Add Video', 'darkify'), |
| 433 | 298 | 'remove_title' => esc_html__('Remove Video', 'darkify'), |
| 434 | - | |
| 435 | 299 | ), |
| 436 | 300 | |
| 437 | 301 | array( |
| 438 | 302 | 'id' => 'dark_video', |
| 439 | 303 | 'type' => 'upload', |
| 304 | + 'title' => esc_html__('Dark Mode Video', 'darkify'), | |
| 440 | 305 | 'library' => 'video', |
| 441 | - 'title' => esc_html__('Dark Mode Video', 'darkify'), | |
| 442 | - 'placeholder' => esc_html__('Video URL', 'darkify'), | |
| 306 | + 'placeholder' => esc_html__('Video URL', 'darkify'), | |
| 443 | 307 | 'button_title' => esc_html__('Add Video', 'darkify'), |
| 444 | 308 | 'remove_title' => esc_html__('Remove Video', 'darkify'), |
| 445 | - | |
| 446 | 309 | ), |
| 447 | 310 | |
| 448 | 311 | ), |
| 449 | 312 | 'default' => array( |