| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Views class for Shortcode generator options. |
| 5 |
* |
| 6 |
* @link https://themeatelier.net |
| 7 |
* @since 1.0.0 |
| 8 |
* |
| 9 |
* @package darkify |
| 10 |
* @subpackage darkify/src/Admin/Views/VideoStyle |
| 11 |
* @author ThemeAtelier<themeatelierbd@gmail.com> |
| 12 |
*/ |
| 13 |
|
| 14 |
namespace ThemeAtelier\Darkify\Admin\Views; |
| 15 |
|
| 16 |
use ThemeAtelier\Darkify\Admin\Framework\Classes\Darkify; |
| 17 |
|
| 18 |
class VideoStyle |
| 19 |
{ |
| 20 |
/** |
| 21 |
* Create Option fields for the setting options. |
| 22 |
* |
| 23 |
* @param string $prefix Option setting key prefix. |
| 24 |
* @return void |
| 25 |
*/ |
| 26 |
public static function options($prefix) |
| 27 |
{ |
| 28 |
Darkify::createSection($prefix, array( |
| 29 |
'title' => esc_html__('VIDEO STYLE', 'darkify'), |
| 30 |
'icon' => 'icofont-video-clapper', |
| 31 |
'fields' => array( |
| 32 |
|
| 33 |
// Appearance Control |
| 34 |
array( |
| 35 |
'type' => 'heading', |
| 36 |
'content' => esc_html__('Appearance Control', 'darkify'), |
| 37 |
), |
| 38 |
|
| 39 |
// Low Brightness |
| 40 |
array( |
| 41 |
'id' => 'video_brightness', |
| 42 |
'type' => 'fieldset', |
| 43 |
'fields' => array( |
| 44 |
array( |
| 45 |
'id' => 'enable_low_video_brightness', |
| 46 |
'type' => 'switcher', |
| 47 |
'title' => esc_html__('Low Brightness', 'darkify'), |
| 48 |
'desc' => esc_html__('Switch and select the brightness level of videos on dark mode.', 'darkify'), |
| 49 |
'text_on' => esc_html__('Yes', 'darkify'), |
| 50 |
'text_off' => esc_html__('No', 'darkify'), |
| 51 |
'default' => true, |
| 52 |
), |
| 53 |
array( |
| 54 |
'id' => 'low_video_brightness_label', |
| 55 |
'type' => 'select', |
| 56 |
'title' => esc_html__('Brightness Label', 'darkify'), |
| 57 |
'options' => array( |
| 58 |
'0' => esc_html__('0% Brightness', 'darkify'), |
| 59 |
'10' => esc_html__('10% Brightness', 'darkify'), |
| 60 |
'20' => esc_html__('20% Brightness', 'darkify'), |
| 61 |
'30' => esc_html__('30% Brightness', 'darkify'), |
| 62 |
'40' => esc_html__('40% Brightness', 'darkify'), |
| 63 |
'50' => esc_html__('50% Brightness', 'darkify'), |
| 64 |
'60' => esc_html__('60% Brightness', 'darkify'), |
| 65 |
'70' => esc_html__('70% Brightness', 'darkify'), |
| 66 |
'80' => esc_html__('80% Brightness', 'darkify'), |
| 67 |
'90' => esc_html__('90% Brightness', 'darkify'), |
| 68 |
'100' => esc_html__('100% Brightness', 'darkify'), |
| 69 |
), |
| 70 |
'default' => '80', |
| 71 |
'dependency' => array('enable_low_video_brightness', '==', 'true', 'all'), |
| 72 |
), |
| 73 |
), |
| 74 |
), |
| 75 |
|
| 76 |
// Grayscale Video |
| 77 |
array( |
| 78 |
'id' => 'video_grayscale', |
| 79 |
'type' => 'fieldset', |
| 80 |
'fields' => array( |
| 81 |
array( |
| 82 |
'id' => 'enable_video_grayscale', |
| 83 |
'type' => 'switcher', |
| 84 |
'title' => esc_html__('Grayscale Video', 'darkify'), |
| 85 |
'desc' => esc_html__('Switch and select the grayscale level of videos on dark mode.', 'darkify'), |
| 86 |
'text_on' => esc_html__('Yes', 'darkify'), |
| 87 |
'text_off' => esc_html__('No', 'darkify'), |
| 88 |
'default' => false, |
| 89 |
), |
| 90 |
array( |
| 91 |
'id' => 'video_grayscale_label', |
| 92 |
'type' => 'select', |
| 93 |
'title' => esc_html__('Grayscale Label', 'darkify'), |
| 94 |
'options' => array( |
| 95 |
'0' => esc_html__('0% Brightness', 'darkify'), |
| 96 |
'10' => esc_html__('10% Grayscale', 'darkify'), |
| 97 |
'20' => esc_html__('20% Grayscale', 'darkify'), |
| 98 |
'30' => esc_html__('30% Grayscale', 'darkify'), |
| 99 |
'40' => esc_html__('40% Grayscale', 'darkify'), |
| 100 |
'50' => esc_html__('50% Grayscale', 'darkify'), |
| 101 |
'60' => esc_html__('60% Grayscale', 'darkify'), |
| 102 |
'70' => esc_html__('70% Grayscale', 'darkify'), |
| 103 |
'80' => esc_html__('80% Grayscale', 'darkify'), |
| 104 |
'90' => esc_html__('90% Grayscale', 'darkify'), |
| 105 |
'100' => esc_html__('100% Grayscale', 'darkify'), |
| 106 |
), |
| 107 |
'default' => '80', |
| 108 |
'dependency' => array('enable_video_grayscale', '==', 'true', 'all'), |
| 109 |
), |
| 110 |
), |
| 111 |
), |
| 112 |
// Video Replacement |
| 113 |
array( |
| 114 |
'type' => 'heading', |
| 115 |
'content' => esc_html__('Video Replacement', 'darkify'), |
| 116 |
), |
| 117 |
|
| 118 |
array( |
| 119 |
'id' => 'video_replacements', |
| 120 |
'type' => 'repeater', |
| 121 |
'class' => 'repeater_pro_only', |
| 122 |
'title' => esc_html__('Replace video', 'darkify'), |
| 123 |
'fields' => array( |
| 124 |
|
| 125 |
array( |
| 126 |
'id' => 'normal_video', |
| 127 |
'type' => 'upload', |
| 128 |
'title' => esc_html__('Normal Mode Video', 'darkify'), |
| 129 |
'library' => 'video', |
| 130 |
'placeholder' => esc_html__('Video URL', 'darkify'), |
| 131 |
'button_title' => esc_html__('Add Video', 'darkify'), |
| 132 |
'remove_title' => esc_html__('Remove Video', 'darkify'), |
| 133 |
), |
| 134 |
|
| 135 |
array( |
| 136 |
'id' => 'dark_video', |
| 137 |
'type' => 'upload', |
| 138 |
'title' => esc_html__('Dark Mode Video', 'darkify'), |
| 139 |
'library' => 'video', |
| 140 |
'placeholder' => esc_html__('Video URL', 'darkify'), |
| 141 |
'button_title' => esc_html__('Add Video', 'darkify'), |
| 142 |
'remove_title' => esc_html__('Remove Video', 'darkify'), |
| 143 |
), |
| 144 |
|
| 145 |
), |
| 146 |
'default' => array( |
| 147 |
array( |
| 148 |
'normal_video' => '', |
| 149 |
'dark_video' => '', |
| 150 |
), |
| 151 |
) |
| 152 |
), |
| 153 |
) |
| 154 |
)); |
| 155 |
} |
| 156 |
} |
| 157 |
|