| @@ -32,9 +32,9 @@ | ||
| 32 | 32 | 'type' => Controls_Manager::SWITCHER, |
| 33 | 33 | 'label_on' => esc_html__( 'Show', 'elementor' ), |
| 34 | 34 | 'label_off' => esc_html__( 'Hide', 'elementor' ), |
| 35 | 35 | 'default' => 'yes', |
| 36 | - 'editor_available' => true, | |
| 36 | + 'frontend_available' => true, | |
| 37 | 37 | ]; |
| 38 | 38 | |
| 39 | 39 | $responsive_unit_defaults = $this->get_responsive_unit_defaults(); |
| 40 | 40 | |
| @@ -63,9 +63,9 @@ | ||
| 63 | 63 | 'selectors' => [ |
| 64 | 64 | '{{SELECTOR}}' => '--e-con-grid-template-columns: repeat({{SIZE}}, 1fr)', |
| 65 | 65 | ], |
| 66 | 66 | 'responsive' => true, |
| 67 | - 'editor_available' => true, | |
| 67 | + 'frontend_available' => true, | |
| 68 | 68 | ] + $responsive_unit_defaults; |
| 69 | 69 | |
| 70 | 70 | $fields['rows_grid'] = [ |
| 71 | 71 | 'label' => esc_html__( 'Rows', 'elementor' ), |
| @@ -88,28 +88,23 @@ | ||
| 88 | 88 | 'selectors' => [ |
| 89 | 89 | '{{SELECTOR}}' => '--e-con-grid-template-rows: repeat({{SIZE}}, 1fr)', |
| 90 | 90 | ], |
| 91 | 91 | 'responsive' => true, |
| 92 | - 'editor_available' => true, | |
| 92 | + 'frontend_available' => true, | |
| 93 | 93 | ] + $responsive_unit_defaults; |
| 94 | 94 | |
| 95 | 95 | $fields['gaps'] = [ |
| 96 | 96 | 'label' => esc_html__( 'Gaps', 'elementor' ), |
| 97 | 97 | 'type' => Controls_Manager::GAPS, |
| 98 | - 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ], | |
| 98 | + 'size_units' => [ 'px', '%', 'em', 'rem', 'vm', 'custom' ], | |
| 99 | 99 | 'default' => [ |
| 100 | 100 | 'unit' => 'px', |
| 101 | 101 | ], |
| 102 | 102 | 'separator' => 'before', |
| 103 | 103 | 'selectors' => [ |
| 104 | - '{{SELECTOR}}' => '--gap: {{ROW}}{{UNIT}} {{COLUMN}}{{UNIT}};--row-gap: {{ROW}}{{UNIT}};--column-gap: {{COLUMN}}{{UNIT}};', | |
| 104 | + '{{SELECTOR}}' => '--gap: {{ROW}}{{UNIT}} {{COLUMN}}{{UNIT}}', | |
| 105 | 105 | ], |
| 106 | 106 | 'responsive' => true, |
| 107 | - 'validators' => [ | |
| 108 | - 'Number' => [ | |
| 109 | - 'min' => 0, | |
| 110 | - ], | |
| 111 | - ], | |
| 112 | 107 | ]; |
| 113 | 108 | |
| 114 | 109 | $fields['auto_flow'] = [ |
| 115 | 110 | 'label' => esc_html__( 'Auto Flow', 'elementor' ), |
| @@ -123,29 +118,28 @@ | ||
| 123 | 118 | 'selectors' => [ |
| 124 | 119 | '{{SELECTOR}}' => '--grid-auto-flow: {{VALUE}}', |
| 125 | 120 | ], |
| 126 | 121 | 'responsive' => true, |
| 127 | - 'editor_available' => true, | |
| 128 | - ] + $this->get_responsive_autoflow_defaults(); | |
| 122 | + ]; | |
| 129 | 123 | |
| 130 | 124 | $fields['justify_items'] = [ |
| 131 | - 'label' => esc_html__( 'Justify Items', 'elementor' ), | |
| 125 | + 'label' => esc_html_x( 'Justify Items', 'Grid Container Control', 'elementor' ), | |
| 132 | 126 | 'type' => Controls_Manager::CHOOSE, |
| 133 | 127 | 'options' => [ |
| 134 | 128 | 'start' => [ |
| 135 | - 'title' => esc_html__( 'Start', 'elementor' ), | |
| 129 | + 'title' => esc_html_x( 'Start', 'Grid Container Control', 'elementor' ), | |
| 136 | 130 | 'icon' => 'eicon-align-' . $icon_start . '-h', |
| 137 | 131 | ], |
| 138 | 132 | 'center' => [ |
| 139 | - 'title' => esc_html__( 'Center', 'elementor' ), | |
| 133 | + 'title' => esc_html_x( 'Center', 'Grid Container Control', 'elementor' ), | |
| 140 | 134 | 'icon' => 'eicon-align-center-h', |
| 141 | 135 | ], |
| 142 | 136 | 'end' => [ |
| 143 | - 'title' => esc_html__( 'End', 'elementor' ), | |
| 137 | + 'title' => esc_html_x( 'End', 'Grid Container Control', 'elementor' ), | |
| 144 | 138 | 'icon' => 'eicon-align-' . $icon_end . '-h', |
| 145 | 139 | ], |
| 146 | 140 | 'stretch' => [ |
| 147 | - 'title' => esc_html__( 'Stretch', 'elementor' ), | |
| 141 | + 'title' => esc_html_x( 'Stretch', 'Grid Container Control', 'elementor' ), | |
| 148 | 142 | 'icon' => 'eicon-align-stretch-h', |
| 149 | 143 | ], |
| 150 | 144 | ], |
| 151 | 145 | 'default' => '', |
| @@ -155,25 +149,25 @@ | ||
| 155 | 149 | 'responsive' => true, |
| 156 | 150 | ]; |
| 157 | 151 | |
| 158 | 152 | $fields['align_items'] = [ |
| 159 | - 'label' => esc_html__( 'Align Items', 'elementor' ), | |
| 153 | + 'label' => esc_html_x( 'Align Items', 'Grid Container Control', 'elementor' ), | |
| 160 | 154 | 'type' => Controls_Manager::CHOOSE, |
| 161 | 155 | 'options' => [ |
| 162 | 156 | 'start' => [ |
| 163 | - 'title' => esc_html__( 'Start', 'elementor' ), | |
| 157 | + 'title' => esc_html_x( 'Start', 'Grid Container Control', 'elementor' ), | |
| 164 | 158 | 'icon' => 'eicon-align-start-v', |
| 165 | 159 | ], |
| 166 | 160 | 'center' => [ |
| 167 | - 'title' => esc_html__( 'Center', 'elementor' ), | |
| 161 | + 'title' => esc_html_x( 'Center', 'Grid Container Control', 'elementor' ), | |
| 168 | 162 | 'icon' => 'eicon-align-center-v', |
| 169 | 163 | ], |
| 170 | 164 | 'end' => [ |
| 171 | - 'title' => esc_html__( 'End', 'elementor' ), | |
| 165 | + 'title' => esc_html_x( 'End', 'Grid Container Control', 'elementor' ), | |
| 172 | 166 | 'icon' => 'eicon-align-end-v', |
| 173 | 167 | ], |
| 174 | 168 | 'stretch' => [ |
| 175 | - 'title' => esc_html__( 'Stretch', 'elementor' ), | |
| 169 | + 'title' => esc_html_x( 'Stretch', 'Grid Container Control', 'elementor' ), | |
| 176 | 170 | 'icon' => 'eicon-align-stretch-v', |
| 177 | 171 | ], |
| 178 | 172 | ], |
| 179 | 173 | 'selectors' => [ |
| @@ -182,35 +176,35 @@ | ||
| 182 | 176 | 'responsive' => true, |
| 183 | 177 | ]; |
| 184 | 178 | |
| 185 | 179 | $fields['justify_content'] = [ |
| 186 | - 'label' => esc_html__( 'Justify Content', 'elementor' ), | |
| 180 | + 'label' => esc_html_x( 'Justify Content', 'Grid Container Control', 'elementor' ), | |
| 187 | 181 | 'type' => Controls_Manager::CHOOSE, |
| 188 | 182 | 'label_block' => true, |
| 189 | 183 | 'default' => '', |
| 190 | 184 | 'options' => [ |
| 191 | 185 | 'start' => [ |
| 192 | - 'title' => esc_html__( 'Start', 'elementor' ), | |
| 186 | + 'title' => esc_html_x( 'Start', 'Grid Container Control', 'elementor' ), | |
| 193 | 187 | 'icon' => 'eicon-justify-start-h', |
| 194 | 188 | ], |
| 195 | 189 | 'center' => [ |
| 196 | - 'title' => esc_html__( 'Middle', 'elementor' ), | |
| 190 | + 'title' => esc_html_x( 'Middle', 'Grid Container Control', 'elementor' ), | |
| 197 | 191 | 'icon' => 'eicon-justify-center-h', |
| 198 | 192 | ], |
| 199 | 193 | 'end' => [ |
| 200 | - 'title' => esc_html__( 'End', 'elementor' ), | |
| 194 | + 'title' => esc_html_x( 'End', 'Grid Container Control', 'elementor' ), | |
| 201 | 195 | 'icon' => 'eicon-justify-end-h', |
| 202 | 196 | ], |
| 203 | 197 | 'space-between' => [ |
| 204 | - 'title' => esc_html__( 'Space Between', 'elementor' ), | |
| 198 | + 'title' => esc_html_x( 'Space Between', 'Grid Container Control', 'elementor' ), | |
| 205 | 199 | 'icon' => 'eicon-justify-space-between-h', |
| 206 | 200 | ], |
| 207 | 201 | 'space-around' => [ |
| 208 | - 'title' => esc_html__( 'Space Around', 'elementor' ), | |
| 202 | + 'title' => esc_html_x( 'Space Around', 'Grid Container Control', 'elementor' ), | |
| 209 | 203 | 'icon' => 'eicon-justify-space-around-h', |
| 210 | 204 | ], |
| 211 | 205 | 'space-evenly' => [ |
| 212 | - 'title' => esc_html__( 'Space Evenly', 'elementor' ), | |
| 206 | + 'title' => esc_html_x( 'Space Evenly', 'Grid Container Control', 'elementor' ), | |
| 213 | 207 | 'icon' => 'eicon-justify-space-evenly-h', |
| 214 | 208 | ], |
| 215 | 209 | ], |
| 216 | 210 | 'selectors' => [ |
| @@ -222,35 +216,35 @@ | ||
| 222 | 216 | 'responsive' => true, |
| 223 | 217 | ]; |
| 224 | 218 | |
| 225 | 219 | $fields['align_content'] = [ |
| 226 | - 'label' => esc_html__( 'Align Content', 'elementor' ), | |
| 220 | + 'label' => esc_html_x( 'Align Content', 'Grid Container Control', 'elementor' ), | |
| 227 | 221 | 'type' => Controls_Manager::CHOOSE, |
| 228 | 222 | 'label_block' => true, |
| 229 | 223 | 'default' => '', |
| 230 | 224 | 'options' => [ |
| 231 | 225 | 'start' => [ |
| 232 | - 'title' => esc_html__( 'Start', 'elementor' ), | |
| 226 | + 'title' => esc_html_x( 'Start', 'Grid Container Control', 'elementor' ), | |
| 233 | 227 | 'icon' => 'eicon-justify-start-v', |
| 234 | 228 | ], |
| 235 | 229 | 'center' => [ |
| 236 | - 'title' => esc_html__( 'Middle', 'elementor' ), | |
| 230 | + 'title' => esc_html_x( 'Middle', 'Grid Container Control', 'elementor' ), | |
| 237 | 231 | 'icon' => 'eicon-justify-center-v', |
| 238 | 232 | ], |
| 239 | 233 | 'end' => [ |
| 240 | - 'title' => esc_html__( 'End', 'elementor' ), | |
| 234 | + 'title' => esc_html_x( 'End', 'Grid Container Control', 'elementor' ), | |
| 241 | 235 | 'icon' => 'eicon-justify-end-v', |
| 242 | 236 | ], |
| 243 | 237 | 'space-between' => [ |
| 244 | - 'title' => esc_html__( 'Space Between', 'elementor' ), | |
| 238 | + 'title' => esc_html_x( 'Space Between', 'Grid Container Control', 'elementor' ), | |
| 245 | 239 | 'icon' => 'eicon-justify-space-between-v', |
| 246 | 240 | ], |
| 247 | 241 | 'space-around' => [ |
| 248 | - 'title' => esc_html__( 'Space Around', 'elementor' ), | |
| 242 | + 'title' => esc_html_x( 'Space Around', 'Grid Container Control', 'elementor' ), | |
| 249 | 243 | 'icon' => 'eicon-justify-space-around-v', |
| 250 | 244 | ], |
| 251 | 245 | 'space-evenly' => [ |
| 252 | - 'title' => esc_html__( 'Space Evenly', 'elementor' ), | |
| 246 | + 'title' => esc_html_x( 'Space Evenly', 'Grid Container Control', 'elementor' ), | |
| 253 | 247 | 'icon' => 'eicon-justify-space-evenly-v', |
| 254 | 248 | ], |
| 255 | 249 | ], |
| 256 | 250 | 'selectors' => [ |
| @@ -298,19 +292,8 @@ | ||
| 298 | 292 | ]; |
| 299 | 293 | } |
| 300 | 294 | |
| 301 | 295 | return $responsive_unit_defaults; |
| 302 | - } | |
| 303 | - | |
| 304 | - protected function get_responsive_autoflow_defaults() { | |
| 305 | - $responsive_autoflow_defaults = []; | |
| 306 | - $active_breakpoints = Plugin::$instance->breakpoints->get_active_breakpoints(); | |
| 307 | - | |
| 308 | - foreach ( $active_breakpoints as $breakpoint_name => $breakpoint ) { | |
| 309 | - $responsive_autoflow_defaults[ $breakpoint_name . '_default' ] = 'row'; | |
| 310 | - } | |
| 311 | - | |
| 312 | - return $responsive_autoflow_defaults; | |
| 313 | 296 | } |
| 314 | 297 | |
| 315 | 298 | protected function get_default_options() { |
| 316 | 299 | return [ |