| @@ -42,9 +42,9 @@ | ||
| 42 | 42 | * |
| 43 | 43 | * @return string Widget title. |
| 44 | 44 | */ |
| 45 | 45 | public function get_title() { |
| 46 | - return esc_html__( 'Divider', 'elementor' ); | |
| 46 | + return __( 'Divider', 'elementor' ); | |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | /** |
| 50 | 50 | * Get widget icon. |
| @@ -89,30 +89,8 @@ | ||
| 89 | 89 | public function get_keywords() { |
| 90 | 90 | return [ 'divider', 'hr', 'line', 'border' ]; |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | - protected function is_dynamic_content(): bool { | |
| 94 | - return false; | |
| 95 | - } | |
| 96 | - | |
| 97 | - public function has_widget_inner_wrapper(): bool { | |
| 98 | - return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' ); | |
| 99 | - } | |
| 100 | - | |
| 101 | - /** | |
| 102 | - * Get style dependencies. | |
| 103 | - * | |
| 104 | - * Retrieve the list of style dependencies the widget requires. | |
| 105 | - * | |
| 106 | - * @since 3.24.0 | |
| 107 | - * @access public | |
| 108 | - * | |
| 109 | - * @return array Widget style dependencies. | |
| 110 | - */ | |
| 111 | - public function get_style_depends(): array { | |
| 112 | - return [ 'widget-divider' ]; | |
| 113 | - } | |
| 114 | - | |
| 115 | 93 | private static function get_additional_styles() { |
| 116 | 94 | static $additional_styles = null; |
| 117 | 95 | |
| 118 | 96 | if ( null !== $additional_styles ) { |
| @@ -136,9 +114,9 @@ | ||
| 136 | 114 | return array_merge( |
| 137 | 115 | self::get_additional_styles(), |
| 138 | 116 | [ |
| 139 | 117 | 'curly' => [ |
| 140 | - 'label' => esc_html_x( 'Curly', 'Shapes', 'elementor' ), | |
| 118 | + 'label' => _x( 'Curly', 'shapes', 'elementor' ), | |
| 141 | 119 | 'shape' => '<path d="M0,21c3.3,0,8.3-0.9,15.7-7.1c6.6-5.4,4.4-9.3,2.4-10.3c-3.4-1.8-7.7,1.3-7.3,8.8C11.2,20,17.1,21,24,21"/>', |
| 142 | 120 | 'preserve_aspect_ratio' => false, |
| 143 | 121 | 'supports_amount' => true, |
| 144 | 122 | 'round' => false, |
| @@ -144,9 +122,9 @@ | ||
| 144 | 122 | 'round' => false, |
| 145 | 123 | 'group' => 'line', |
| 146 | 124 | ], |
| 147 | 125 | 'curved' => [ |
| 148 | - 'label' => esc_html_x( 'Curved', 'Shapes', 'elementor' ), | |
| 126 | + 'label' => _x( 'Curved', 'shapes', 'elementor' ), | |
| 149 | 127 | 'shape' => '<path d="M0,6c6,0,6,13,12,13S18,6,24,6"/>', |
| 150 | 128 | 'preserve_aspect_ratio' => false, |
| 151 | 129 | 'supports_amount' => true, |
| 152 | 130 | 'round' => false, |
| @@ -152,9 +130,9 @@ | ||
| 152 | 130 | 'round' => false, |
| 153 | 131 | 'group' => 'line', |
| 154 | 132 | ], |
| 155 | 133 | 'multiple' => [ |
| 156 | - 'label' => esc_html_x( 'Multiple', 'Shapes', 'elementor' ), | |
| 134 | + 'label' => _x( 'Multiple', 'shapes', 'elementor' ), | |
| 157 | 135 | 'shape' => '<path d="M24,8v12H0V8H24z M24,4v1H0V4H24z"/>', |
| 158 | 136 | 'preserve_aspect_ratio' => false, |
| 159 | 137 | 'supports_amount' => false, |
| 160 | 138 | 'round' => false, |
| @@ -160,9 +138,9 @@ | ||
| 160 | 138 | 'round' => false, |
| 161 | 139 | 'group' => 'pattern', |
| 162 | 140 | ], |
| 163 | 141 | 'slashes' => [ |
| 164 | - 'label' => esc_html_x( 'Slashes', 'Shapes', 'elementor' ), | |
| 142 | + 'label' => _x( 'Slashes', 'shapes', 'elementor' ), | |
| 165 | 143 | 'shape' => '<g transform="translate(-12.000000, 0)"><path d="M28,0L10,18"/><path d="M18,0L0,18"/><path d="M48,0L30,18"/><path d="M38,0L20,18"/></g>', |
| 166 | 144 | 'preserve_aspect_ratio' => false, |
| 167 | 145 | 'supports_amount' => true, |
| 168 | 146 | 'round' => false, |
| @@ -169,9 +147,9 @@ | ||
| 169 | 147 | 'view_box' => '0 0 20 16', |
| 170 | 148 | 'group' => 'line', |
| 171 | 149 | ], |
| 172 | 150 | 'squared' => [ |
| 173 | - 'label' => esc_html_x( 'Squared', 'Shapes', 'elementor' ), | |
| 151 | + 'label' => _x( 'Squared', 'shapes', 'elementor' ), | |
| 174 | 152 | 'shape' => '<polyline points="0,6 6,6 6,18 18,18 18,6 24,6 "/>', |
| 175 | 153 | 'preserve_aspect_ratio' => false, |
| 176 | 154 | 'supports_amount' => true, |
| 177 | 155 | 'round' => false, |
| @@ -177,9 +155,9 @@ | ||
| 177 | 155 | 'round' => false, |
| 178 | 156 | 'group' => 'line', |
| 179 | 157 | ], |
| 180 | 158 | 'wavy' => [ |
| 181 | - 'label' => esc_html_x( 'Wavy', 'Shapes', 'elementor' ), | |
| 159 | + 'label' => _x( 'Wavy', 'shapes', 'elementor' ), | |
| 182 | 160 | 'shape' => '<path d="M0,6c6,0,0.9,11.1,6.9,11.1S18,6,24,6"/>', |
| 183 | 161 | 'preserve_aspect_ratio' => false, |
| 184 | 162 | 'supports_amount' => true, |
| 185 | 163 | 'round' => false, |
| @@ -185,9 +163,9 @@ | ||
| 185 | 163 | 'round' => false, |
| 186 | 164 | 'group' => 'line', |
| 187 | 165 | ], |
| 188 | 166 | 'zigzag' => [ |
| 189 | - 'label' => esc_html_x( 'Zigzag', 'Shapes', 'elementor' ), | |
| 167 | + 'label' => _x( 'Zigzag', 'shapes', 'elementor' ), | |
| 190 | 168 | 'shape' => '<polyline points="0,18 12,6 24,18 "/>', |
| 191 | 169 | 'preserve_aspect_ratio' => false, |
| 192 | 170 | 'supports_amount' => true, |
| 193 | 171 | 'round' => false, |
| @@ -193,9 +171,9 @@ | ||
| 193 | 171 | 'round' => false, |
| 194 | 172 | 'group' => 'line', |
| 195 | 173 | ], |
| 196 | 174 | 'arrows' => [ |
| 197 | - 'label' => esc_html_x( 'Arrows', 'Shapes', 'elementor' ), | |
| 175 | + 'label' => _x( 'Arrows', 'shapes', 'elementor' ), | |
| 198 | 176 | 'shape' => '<path d="M14.2,4c0.3,0,0.5,0.1,0.7,0.3l7.9,7.2c0.2,0.2,0.3,0.4,0.3,0.7s-0.1,0.5-0.3,0.7l-7.9,7.2c-0.2,0.2-0.4,0.3-0.7,0.3s-0.5-0.1-0.7-0.3s-0.3-0.4-0.3-0.7l0-2.9l-11.5,0c-0.4,0-0.7-0.3-0.7-0.7V9.4C1,9,1.3,8.7,1.7,8.7l11.5,0l0-3.6c0-0.3,0.1-0.5,0.3-0.7S13.9,4,14.2,4z"/>', |
| 199 | 177 | 'preserve_aspect_ratio' => true, |
| 200 | 178 | 'supports_amount' => true, |
| 201 | 179 | 'round' => true, |
| @@ -201,9 +179,9 @@ | ||
| 201 | 179 | 'round' => true, |
| 202 | 180 | 'group' => 'pattern', |
| 203 | 181 | ], |
| 204 | 182 | 'pluses' => [ |
| 205 | - 'label' => esc_html_x( 'Pluses', 'Shapes', 'elementor' ), | |
| 183 | + 'label' => _x( 'Pluses', 'shapes', 'elementor' ), | |
| 206 | 184 | 'shape' => '<path d="M21.4,9.6h-7.1V2.6c0-0.9-0.7-1.6-1.6-1.6h-1.6c-0.9,0-1.6,0.7-1.6,1.6v7.1H2.6C1.7,9.6,1,10.3,1,11.2v1.6c0,0.9,0.7,1.6,1.6,1.6h7.1v7.1c0,0.9,0.7,1.6,1.6,1.6h1.6c0.9,0,1.6-0.7,1.6-1.6v-7.1h7.1c0.9,0,1.6-0.7,1.6-1.6v-1.6C23,10.3,22.3,9.6,21.4,9.6z"/>', |
| 207 | 185 | 'preserve_aspect_ratio' => true, |
| 208 | 186 | 'supports_amount' => true, |
| 209 | 187 | 'round' => false, |
| @@ -209,9 +187,9 @@ | ||
| 209 | 187 | 'round' => false, |
| 210 | 188 | 'group' => 'pattern', |
| 211 | 189 | ], |
| 212 | 190 | 'rhombus' => [ |
| 213 | - 'label' => esc_html_x( 'Rhombus', 'Shapes', 'elementor' ), | |
| 191 | + 'label' => _x( 'Rhombus', 'shapes', 'elementor' ), | |
| 214 | 192 | 'shape' => '<path d="M12.7,2.3c-0.4-0.4-1.1-0.4-1.5,0l-8,9.1c-0.3,0.4-0.3,0.9,0,1.2l8,9.1c0.4,0.4,1.1,0.4,1.5,0l8-9.1c0.3-0.4,0.3-0.9,0-1.2L12.7,2.3z"/>', |
| 215 | 193 | 'preserve_aspect_ratio' => false, |
| 216 | 194 | 'supports_amount' => true, |
| 217 | 195 | 'round' => false, |
| @@ -217,9 +195,9 @@ | ||
| 217 | 195 | 'round' => false, |
| 218 | 196 | 'group' => 'pattern', |
| 219 | 197 | ], |
| 220 | 198 | 'parallelogram' => [ |
| 221 | - 'label' => esc_html_x( 'Parallelogram', 'Shapes', 'elementor' ), | |
| 199 | + 'label' => _x( 'Parallelogram', 'shapes', 'elementor' ), | |
| 222 | 200 | 'shape' => '<polygon points="9.4,2 24,2 14.6,21.6 0,21.6"/>', |
| 223 | 201 | 'preserve_aspect_ratio' => false, |
| 224 | 202 | 'supports_amount' => true, |
| 225 | 203 | 'round' => false, |
| @@ -225,9 +203,9 @@ | ||
| 225 | 203 | 'round' => false, |
| 226 | 204 | 'group' => 'pattern', |
| 227 | 205 | ], |
| 228 | 206 | 'rectangles' => [ |
| 229 | - 'label' => esc_html_x( 'Rectangles', 'Shapes', 'elementor' ), | |
| 207 | + 'label' => _x( 'Rectangles', 'shapes', 'elementor' ), | |
| 230 | 208 | 'shape' => '<rect x="15" y="0" width="30" height="30"/>', |
| 231 | 209 | 'preserve_aspect_ratio' => false, |
| 232 | 210 | 'supports_amount' => true, |
| 233 | 211 | 'round' => true, |
| @@ -234,9 +212,9 @@ | ||
| 234 | 212 | 'group' => 'pattern', |
| 235 | 213 | 'view_box' => '0 0 60 30', |
| 236 | 214 | ], |
| 237 | 215 | 'dots_tribal' => [ |
| 238 | - 'label' => esc_html_x( 'Dots', 'Shapes', 'elementor' ), | |
| 216 | + 'label' => _x( 'Dots', 'shapes', 'elementor' ), | |
| 239 | 217 | 'shape' => '<path d="M3,10.2c2.6,0,2.6,2,2.6,3.2S4.4,16.5,3,16.5s-3-1.4-3-3.2S0.4,10.2,3,10.2z M18.8,10.2c1.7,0,3.2,1.4,3.2,3.2s-1.4,3.2-3.2,3.2c-1.7,0-3.2-1.4-3.2-3.2S17,10.2,18.8,10.2z M34.6,10.2c1.5,0,2.6,1.4,2.6,3.2s-0.5,3.2-1.9,3.2c-1.5,0-3.4-1.4-3.4-3.2S33.1,10.2,34.6,10.2z M50.5,10.2c1.7,0,3.2,1.4,3.2,3.2s-1.4,3.2-3.2,3.2c-1.7,0-3.3-0.9-3.3-2.6S48.7,10.2,50.5,10.2z M66.2,10.2c1.5,0,3.4,1.4,3.4,3.2s-1.9,3.2-3.4,3.2c-1.5,0-2.6-0.4-2.6-2.1S64.8,10.2,66.2,10.2z M82.2,10.2c1.7,0.8,2.6,1.4,2.6,3.2s-0.1,3.2-1.6,3.2c-1.5,0-3.7-1.4-3.7-3.2S80.5,9.4,82.2,10.2zM98.6,10.2c1.5,0,2.6,0.4,2.6,2.1s-1.2,4.2-2.6,4.2c-1.5,0-3.7-0.4-3.7-2.1S97.1,10.2,98.6,10.2z M113.4,10.2c1.2,0,2.2,0.9,2.2,3.2s-0.1,3.2-1.3,3.2s-3.1-1.4-3.1-3.2S112.2,10.2,113.4,10.2z"/>', |
| 240 | 218 | 'preserve_aspect_ratio' => true, |
| 241 | 219 | 'supports_amount' => false, |
| 242 | 220 | 'round' => false, |
| @@ -243,9 +221,9 @@ | ||
| 243 | 221 | 'group' => 'tribal', |
| 244 | 222 | 'view_box' => '0 0 126 26', |
| 245 | 223 | ], |
| 246 | 224 | 'trees_2_tribal' => [ |
| 247 | - 'label' => esc_html_x( 'Fir Tree', 'Shapes', 'elementor' ), | |
| 225 | + 'label' => _x( 'Fir Tree', 'shapes', 'elementor' ), | |
| 248 | 226 | 'shape' => '<path d="M111.9,18.3v3.4H109v-3.4H111.9z M90.8,18.3v3.4H88v-3.4H90.8z M69.8,18.3v3.4h-2.9v-3.4H69.8z M48.8,18.3v3.4h-2.9v-3.4H48.8z M27.7,18.3v3.4h-2.9v-3.4H27.7z M6.7,18.3v3.4H3.8v-3.4H6.7z M46.4,4l4.3,4.8l-1.8,0l3.5,4.4l-2.2-0.1l3,3.3l-11,0.4l3.6-3.8l-2.9-0.1l3.1-4.2l-1.9,0L46.4,4z M111.4,4l2.4,4.8l-1.8,0l3.5,4.4l-2.5-0.1l3.3,3.3h-11l3.1-3.4l-2.5-0.1l3.1-4.2l-1.9,0L111.4,4z M89.9,4l2.9,4.8l-1.9,0l3.2,4.2l-2.5,0l3.5,3.5l-11-0.4l3-3.1l-2.4,0L88,8.8l-1.9,0L89.9,4z M68.6,4l3,4.4l-1.9,0.1l3.4,4.1l-2.7,0.1l3.8,3.7H63.8l2.9-3.6l-2.9,0.1L67,8.7l-2,0.1L68.6,4z M26.5,4l3,4.4l-1.9,0.1l3.7,4.7l-2.5-0.1l3.3,3.3H21l3.1-3.4l-2.5-0.1l3.2-4.3l-2,0.1L26.5,4z M4.9,4l3.7,4.8l-1.5,0l3.1,4.2L7.6,13l3.4,3.4H0l3-3.3l-2.3,0.1l3.5-4.4l-2.3,0L4.9,4z"/>', |
| 249 | 227 | 'preserve_aspect_ratio' => true, |
| 250 | 228 | 'supports_amount' => false, |
| 251 | 229 | 'round' => false, |
| @@ -252,9 +230,9 @@ | ||
| 252 | 230 | 'group' => 'tribal', |
| 253 | 231 | 'view_box' => '0 0 126 26', |
| 254 | 232 | ], |
| 255 | 233 | 'rounds_tribal' => [ |
| 256 | - 'label' => esc_html_x( 'Half Rounds', 'Shapes', 'elementor' ), | |
| 234 | + 'label' => _x( 'Half Rounds', 'shapes', 'elementor' ), | |
| 257 | 235 | 'shape' => '<path d="M11.9,15.9L11.9,15.9L0,16c-0.2-3.7,1.5-5.7,4.9-6C10,9.6,12.4,14.2,11.9,15.9zM26.9,15.9L26.9,15.9L15,16c0.5-3.7,2.5-5.7,5.9-6C26,9.6,27.4,14.2,26.9,15.9z M37.1,10c3.4,0.3,5.1,2.3,4.9,6H30.1C29.5,14.4,31.9,9.6,37.1,10z M57,15.9L57,15.9L45,16c0-3.4,1.6-5.4,4.9-5.9C54.8,9.3,57.4,14.2,57,15.9z M71.9,15.9L71.9,15.9L60,16c-0.2-3.7,1.5-5.7,4.9-6C70,9.6,72.4,14.2,71.9,15.9z M82.2,10c3.4,0.3,5,2.3,4.8,6H75.3C74,13,77.1,9.6,82.2,10zM101.9,15.9L101.9,15.9L90,16c-0.2-3.7,1.5-5.7,4.9-6C100,9.6,102.4,14.2,101.9,15.9z M112.1,10.1c2.7,0.5,4.3,2.5,4.9,5.9h-11.9l0,0C104.5,14.4,108,9.3,112.1,10.1z"/>', |
| 258 | 236 | 'preserve_aspect_ratio' => true, |
| 259 | 237 | 'supports_amount' => false, |
| 260 | 238 | 'round' => false, |
| @@ -261,9 +239,9 @@ | ||
| 261 | 239 | 'group' => 'tribal', |
| 262 | 240 | 'view_box' => '0 0 120 26', |
| 263 | 241 | ], |
| 264 | 242 | 'leaves_tribal' => [ |
| 265 | - 'label' => esc_html_x( 'Leaves', 'Shapes', 'elementor' ), | |
| 243 | + 'label' => _x( 'Leaves', 'shapes', 'elementor' ), | |
| 266 | 244 | 'shape' => '<path d="M3,1.5C5,4.9,6,8.8,6,13s-1.7,8.1-5,11.5C0.3,21.1,0,17.2,0,13S1,4.9,3,1.5z M16,1.5c2,3.4,3,7.3,3,11.5s-1,8.1-3,11.5c-2-4.1-3-8.3-3-12.5S14,4.3,16,1.5z M29,1.5c2,4.8,3,9.3,3,13.5s-1,7.4-3,9.5c-2-3.4-3-7.3-3-11.5S27,4.9,29,1.5z M41.1,1.5C43.7,4.9,45,8.8,45,13s-1,8.1-3,11.5c-2-3.4-3-7.3-3-11.5S39.7,4.9,41.1,1.5zM55,1.5c2,2.8,3,6.3,3,10.5s-1.3,8.4-4,12.5c-1.3-3.4-2-7.3-2-11.5S53,4.9,55,1.5z M68,1.5c2,3.4,3,7.3,3,11.5s-0.7,8.1-2,11.5c-2.7-4.8-4-9.3-4-13.5S66,3.6,68,1.5z M82,1.5c1.3,4.8,2,9.3,2,13.5s-1,7.4-3,9.5c-2-3.4-3-7.3-3-11.5S79.3,4.9,82,1.5z M94,1.5c2,3.4,3,7.3,3,11.5s-1.3,8.1-4,11.5c-1.3-1.4-2-4.3-2-8.5S92,6.9,94,1.5z M107,1.5c2,2.1,3,5.3,3,9.5s-0.7,8.7-2,13.5c-2.7-3.4-4-7.3-4-11.5S105,4.9,107,1.5z"/>', |
| 267 | 245 | 'preserve_aspect_ratio' => true, |
| 268 | 246 | 'supports_amount' => false, |
| 269 | 247 | 'round' => false, |
| @@ -270,9 +248,9 @@ | ||
| 270 | 248 | 'group' => 'tribal', |
| 271 | 249 | 'view_box' => '0 0 117 26', |
| 272 | 250 | ], |
| 273 | 251 | 'stripes_tribal' => [ |
| 274 | - 'label' => esc_html_x( 'Stripes', 'Shapes', 'elementor' ), | |
| 252 | + 'label' => _x( 'Stripes', 'shapes', 'elementor' ), | |
| 275 | 253 | 'shape' => '<path d="M54,1.6V26h-9V2.5L54,1.6z M69,1.6v23.3L60,26V1.6H69z M24,1.6v23.5l-9-0.6V1.6H24z M30,0l9,0.7v24.5h-9V0z M9,2.5v22H0V3.7L9,2.5z M75,1.6l9,0.9v22h-9V1.6z M99,2.7v21.7h-9V3.8L99,2.7z M114,3.8v20.7l-9-0.5V3.8L114,3.8z"/>', |
| 276 | 254 | 'preserve_aspect_ratio' => true, |
| 277 | 255 | 'supports_amount' => false, |
| 278 | 256 | 'round' => false, |
| @@ -279,9 +257,9 @@ | ||
| 279 | 257 | 'group' => 'tribal', |
| 280 | 258 | 'view_box' => '0 0 120 26', |
| 281 | 259 | ], |
| 282 | 260 | 'squares_tribal' => [ |
| 283 | - 'label' => esc_html_x( 'Squares', 'Shapes', 'elementor' ), | |
| 261 | + 'label' => _x( 'Squares', 'shapes', 'elementor' ), | |
| 284 | 262 | 'shape' => '<path d="M46.8,7.8v11.5L36,18.6V7.8H46.8z M82.4,7.8L84,18.6l-12,0.7L70.4,7.8H82.4z M0,7.8l12,0.9v9.9H1.3L0,7.8z M30,7.8v10.8H19L18,7.8H30z M63.7,7.8L66,18.6H54V9.5L63.7,7.8z M89.8,7L102,7.8v10.8H91.2L89.8,7zM108,7.8l12,0.9v8.9l-12,1V7.8z"/>', |
| 285 | 263 | 'preserve_aspect_ratio' => true, |
| 286 | 264 | 'supports_amount' => false, |
| 287 | 265 | 'round' => false, |
| @@ -288,9 +266,9 @@ | ||
| 288 | 266 | 'group' => 'tribal', |
| 289 | 267 | 'view_box' => '0 0 126 26', |
| 290 | 268 | ], |
| 291 | 269 | 'trees_tribal' => [ |
| 292 | - 'label' => esc_html_x( 'Trees', 'Shapes', 'elementor' ), | |
| 270 | + 'label' => _x( 'Trees', 'shapes', 'elementor' ), | |
| 293 | 271 | 'shape' => '<path d="M6.4,2l4.2,5.7H7.7v2.7l3.8,5.2l-3.8,0v7.8H4.8v-7.8H0l4.8-5.2V7.7H1.1L6.4,2z M25.6,2L31,7.7h-3.7v2.7l4.8,5.2h-4.8v7.8h-2.8v-7.8l-3.8,0l3.8-5.2V7.7h-2.9L25.6,2z M47.5,2l4.2,5.7h-3.3v2.7l3.8,5.2l-3.8,0l0.4,7.8h-2.8v-7.8H41l4.8-5.2V7.7h-3.7L47.5,2z M66.2,2l5.4,5.7h-3.7v2.7l4.8,5.2h-4.8v7.8H65v-7.8l-3.8,0l3.8-5.2V7.7h-2.9L66.2,2zM87.4,2l4.8,5.7h-2.9v3.1l3.8,4.8l-3.8,0v7.8h-2.8v-7.8h-4.8l4.8-4.8V7.7h-3.7L87.4,2z M107.3,2l5.4,5.7h-3.7v2.7l4.8,5.2h-4.8v7.8H106v-7.8l-3.8,0l3.8-5.2V7.7h-2.9L107.3,2z"/>', |
| 294 | 272 | 'preserve_aspect_ratio' => true, |
| 295 | 273 | 'supports_amount' => false, |
| 296 | 274 | 'round' => false, |
| @@ -297,9 +275,9 @@ | ||
| 297 | 275 | 'group' => 'tribal', |
| 298 | 276 | 'view_box' => '0 0 123 26', |
| 299 | 277 | ], |
| 300 | 278 | 'planes_tribal' => [ |
| 301 | - 'label' => esc_html_x( 'Tribal', 'Shapes', 'elementor' ), | |
| 279 | + 'label' => _x( 'Tribal', 'shapes', 'elementor' ), | |
| 302 | 280 | 'shape' => '<path d="M29.6,10.3l2.1,2.2l-3.6,3.3h7v2.9h-7l3.6,3.5l-2.1,1.7l-5.2-5.2h-5.8v-2.9h5.8L29.6,10.3z M70.9,9.6l2.1,1.7l-3.6,3.5h7v2.9h-7l3.6,3.3l-2.1,2.2l-5.2-5.5h-5.8v-2.9h5.8L70.9,9.6z M111.5,9.6l2.1,1.7l-3.6,3.5h7v2.9h-7l3.6,3.3l-2.1,2.2l-5.2-5.5h-5.8v-2.9h5.8L111.5,9.6z M50.2,2.7l2.1,1.7l-3.6,3.5h7v2.9h-7l3.6,3.3l-2.1,2.2L45,10.7h-5.8V7.9H45L50.2,2.7z M11,2l2.1,1.7L9.6,7.2h7V10h-7l3.6,3.3L11,15.5L5.8,10H0V7.2h5.8L11,2z M91.5,2l2.1,2.2l-3.6,3.3h7v2.9h-7l3.6,3.5l-2.1,1.7l-5.2-5.2h-5.8V7.5h5.8L91.5,2z"/>', |
| 303 | 281 | 'preserve_aspect_ratio' => true, |
| 304 | 282 | 'supports_amount' => false, |
| 305 | 283 | 'round' => false, |
| @@ -306,9 +284,9 @@ | ||
| 306 | 284 | 'group' => 'tribal', |
| 307 | 285 | 'view_box' => '0 0 121 26', |
| 308 | 286 | ], |
| 309 | 287 | 'x_tribal' => [ |
| 310 | - 'label' => esc_html_x( 'X', 'Shapes', 'elementor' ), | |
| 288 | + 'label' => _x( 'X', 'shapes', 'elementor' ), | |
| 311 | 289 | 'shape' => '<path d="M10.7,6l2.5,2.6l-4,4.3l4,5.4l-2.5,1.9l-4.5-5.2l-3.9,4.2L0.7,17L4,13.1L0,8.6l2.3-1.3l3.9,3.9L10.7,6z M23.9,6.6l4.2,4.5L32,7.2l2.3,1.3l-4,4.5l3.2,3.9L32,19.1l-3.9-3.3l-4.5,4.3l-2.5-1.9l4.4-5.1l-4.2-3.9L23.9,6.6zM73.5,6L76,8.6l-4,4.3l4,5.4l-2.5,1.9l-4.5-5.2l-3.9,4.2L63.5,17l4.1-4.7L63.5,8l2.3-1.3l4.1,3.6L73.5,6z M94,6l2.5,2.6l-4,4.3l4,5.4L94,20.1l-3.9-5l-3.9,4.2L84,17l3.2-3.9L84,8.6l2.3-1.3l3.2,3.9L94,6z M106.9,6l4.5,5.1l3.9-3.9l2.3,1.3l-4,4.5l3.2,3.9l-1.6,2.1l-3.9-4.2l-4.5,5.2l-2.5-1.9l4-5.4l-4-4.3L106.9,6z M53.1,6l2.5,2.6l-4,4.3l4,4.6l-2.5,1.9l-4.5-4.5l-3.5,4.5L43.1,17l3.2-3.9l-4-4.5l2.3-1.3l3.9,3.9L53.1,6z"/>', |
| 312 | 290 | 'preserve_aspect_ratio' => true, |
| 313 | 291 | 'supports_amount' => false, |
| 314 | 292 | 'round' => false, |
| @@ -315,9 +293,9 @@ | ||
| 315 | 293 | 'group' => 'tribal', |
| 316 | 294 | 'view_box' => '0 0 126 26', |
| 317 | 295 | ], |
| 318 | 296 | 'zigzag_tribal' => [ |
| 319 | - 'label' => esc_html_x( 'Zigzag', 'Shapes', 'elementor' ), | |
| 297 | + 'label' => _x( 'Zigzag', 'shapes', 'elementor' ), | |
| 320 | 298 | 'shape' => '<polygon points="0,14.4 0,21 11.5,12.4 21.3,20 30.4,11.1 40.3,20 51,12.4 60.6,20 69.6,11.1 79.3,20 90.1,12.4 99.6,20 109.7,11.1 120,21 120,14.4 109.7,5 99.6,13 90.1,5 79.3,14.5 71,5.7 60.6,12.4 51,5 40.3,14.5 31.1,5 21.3,13 11.5,5 "/>', |
| 321 | 299 | 'preserve_aspect_ratio' => true, |
| 322 | 300 | 'supports_amount' => false, |
| 323 | 301 | 'round' => false, |
| @@ -327,10 +305,10 @@ | ||
| 327 | 305 | ] |
| 328 | 306 | ); |
| 329 | 307 | } |
| 330 | 308 | |
| 331 | - private function filter_styles_by( $styles_array, $key, $value ) { | |
| 332 | - return array_filter( $styles_array, function( $style ) use ( $key, $value ) { | |
| 309 | + private function filter_styles_by( $array, $key, $value ) { | |
| 310 | + return array_filter( $array, function( $style ) use ( $key, $value ) { | |
| 333 | 311 | return $value === $style[ $key ]; |
| 334 | 312 | } ); |
| 335 | 313 | } |
| 336 | 314 | |
| @@ -336,14 +314,14 @@ | ||
| 336 | 314 | |
| 337 | 315 | private function get_options_by_groups( $styles, $group = false ) { |
| 338 | 316 | $groups = [ |
| 339 | 317 | 'line' => [ |
| 340 | - 'label' => esc_html__( 'Line', 'elementor' ), | |
| 318 | + 'label' => __( 'Line', 'elementor' ), | |
| 341 | 319 | 'options' => [ |
| 342 | - 'solid' => esc_html__( 'Solid', 'elementor' ), | |
| 343 | - 'double' => esc_html__( 'Double', 'elementor' ), | |
| 344 | - 'dotted' => esc_html__( 'Dotted', 'elementor' ), | |
| 345 | - 'dashed' => esc_html__( 'Dashed', 'elementor' ), | |
| 320 | + 'solid' => __( 'Solid', 'elementor' ), | |
| 321 | + 'double' => __( 'Double', 'elementor' ), | |
| 322 | + 'dotted' => __( 'Dotted', 'elementor' ), | |
| 323 | + 'dashed' => __( 'Dashed', 'elementor' ), | |
| 346 | 324 | ], |
| 347 | 325 | ], |
| 348 | 326 | ]; |
| 349 | 327 | foreach ( $styles as $key => $style ) { |
| @@ -374,9 +352,9 @@ | ||
| 374 | 352 | $styles = $this->get_separator_styles(); |
| 375 | 353 | $this->start_controls_section( |
| 376 | 354 | 'section_divider', |
| 377 | 355 | [ |
| 378 | - 'label' => esc_html__( 'Divider', 'elementor' ), | |
| 356 | + 'label' => __( 'Divider', 'elementor' ), | |
| 379 | 357 | ] |
| 380 | 358 | ); |
| 381 | 359 | |
| 382 | 360 | $this->add_control( |
| @@ -381,9 +359,9 @@ | ||
| 381 | 359 | |
| 382 | 360 | $this->add_control( |
| 383 | 361 | 'style', |
| 384 | 362 | [ |
| 385 | - 'label' => esc_html__( 'Style', 'elementor' ), | |
| 363 | + 'label' => __( 'Style', 'elementor' ), | |
| 386 | 364 | 'type' => Controls_Manager::SELECT, |
| 387 | 365 | 'groups' => array_values( $this->get_options_by_groups( $styles ) ), |
| 388 | 366 | 'render_type' => 'template', |
| 389 | 367 | 'default' => 'solid', |
| @@ -439,11 +417,11 @@ | ||
| 439 | 417 | |
| 440 | 418 | $this->add_responsive_control( |
| 441 | 419 | 'width', |
| 442 | 420 | [ |
| 443 | - 'label' => esc_html__( 'Width', 'elementor' ), | |
| 421 | + 'label' => __( 'Width', 'elementor' ), | |
| 444 | 422 | 'type' => Controls_Manager::SLIDER, |
| 445 | - 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ], | |
| 423 | + 'size_units' => [ '%', 'px' ], | |
| 446 | 424 | 'range' => [ |
| 447 | 425 | 'px' => [ |
| 448 | 426 | 'max' => 1000, |
| 449 | 427 | ], |
| @@ -466,21 +444,21 @@ | ||
| 466 | 444 | |
| 467 | 445 | $this->add_responsive_control( |
| 468 | 446 | 'align', |
| 469 | 447 | [ |
| 470 | - 'label' => esc_html__( 'Alignment', 'elementor' ), | |
| 448 | + 'label' => __( 'Alignment', 'elementor' ), | |
| 471 | 449 | 'type' => Controls_Manager::CHOOSE, |
| 472 | 450 | 'options' => [ |
| 473 | 451 | 'left' => [ |
| 474 | - 'title' => esc_html__( 'Left', 'elementor' ), | |
| 452 | + 'title' => __( 'Left', 'elementor' ), | |
| 475 | 453 | 'icon' => 'eicon-text-align-left', |
| 476 | 454 | ], |
| 477 | 455 | 'center' => [ |
| 478 | - 'title' => esc_html__( 'Center', 'elementor' ), | |
| 456 | + 'title' => __( 'Center', 'elementor' ), | |
| 479 | 457 | 'icon' => 'eicon-text-align-center', |
| 480 | 458 | ], |
| 481 | 459 | 'right' => [ |
| 482 | - 'title' => esc_html__( 'Right', 'elementor' ), | |
| 460 | + 'title' => __( 'Right', 'elementor' ), | |
| 483 | 461 | 'icon' => 'eicon-text-align-right', |
| 484 | 462 | ], |
| 485 | 463 | ], |
| 486 | 464 | 'selectors' => [ |
| @@ -492,22 +470,22 @@ | ||
| 492 | 470 | |
| 493 | 471 | $this->add_control( |
| 494 | 472 | 'look', |
| 495 | 473 | [ |
| 496 | - 'label' => esc_html__( 'Add Element', 'elementor' ), | |
| 474 | + 'label' => __( 'Add Element', 'elementor' ), | |
| 497 | 475 | 'type' => Controls_Manager::CHOOSE, |
| 498 | 476 | 'default' => 'line', |
| 499 | 477 | 'options' => [ |
| 500 | 478 | 'line' => [ |
| 501 | - 'title' => esc_html__( 'None', 'elementor' ), | |
| 479 | + 'title' => __( 'None', 'elementor' ), | |
| 502 | 480 | 'icon' => 'eicon-ban', |
| 503 | 481 | ], |
| 504 | 482 | 'line_text' => [ |
| 505 | - 'title' => esc_html__( 'Text', 'elementor' ), | |
| 483 | + 'title' => __( 'Text', 'elementor' ), | |
| 506 | 484 | 'icon' => 'eicon-t-letter-bold', |
| 507 | 485 | ], |
| 508 | 486 | 'line_icon' => [ |
| 509 | - 'title' => esc_html__( 'Icon', 'elementor' ), | |
| 487 | + 'title' => __( 'Icon', 'elementor' ), | |
| 510 | 488 | 'icon' => 'eicon-star', |
| 511 | 489 | ], |
| 512 | 490 | ], |
| 513 | 491 | 'separator' => 'before', |
| @@ -517,16 +495,25 @@ | ||
| 517 | 495 | ] |
| 518 | 496 | ); |
| 519 | 497 | |
| 520 | 498 | $this->add_control( |
| 499 | + 'view', | |
| 500 | + [ | |
| 501 | + 'label' => __( 'View', 'elementor' ), | |
| 502 | + 'type' => Controls_Manager::HIDDEN, | |
| 503 | + 'default' => 'traditional', | |
| 504 | + ] | |
| 505 | + ); | |
| 506 | + | |
| 507 | + $this->add_control( | |
| 521 | 508 | 'text', |
| 522 | 509 | [ |
| 523 | - 'label' => esc_html__( 'Text', 'elementor' ), | |
| 510 | + 'label' => __( 'Text', 'elementor' ), | |
| 524 | 511 | 'type' => Controls_Manager::TEXT, |
| 525 | 512 | 'condition' => [ |
| 526 | 513 | 'look' => 'line_text', |
| 527 | 514 | ], |
| 528 | - 'default' => esc_html__( 'Divider', 'elementor' ), | |
| 515 | + 'default' => __( 'Divider', 'elementor' ), | |
| 529 | 516 | 'dynamic' => [ |
| 530 | 517 | 'active' => true, |
| 531 | 518 | ], |
| 532 | 519 | ] |
| @@ -534,9 +521,9 @@ | ||
| 534 | 521 | |
| 535 | 522 | $this->add_control( |
| 536 | 523 | 'html_tag', |
| 537 | 524 | [ |
| 538 | - 'label' => esc_html__( 'HTML Tag', 'elementor' ), | |
| 525 | + 'label' => __( 'HTML Tag', 'elementor' ), | |
| 539 | 526 | 'type' => Controls_Manager::SELECT, |
| 540 | 527 | 'condition' => [ |
| 541 | 528 | 'look' => 'line_text', |
| 542 | 529 | ], |
| @@ -557,9 +544,9 @@ | ||
| 557 | 544 | |
| 558 | 545 | $this->add_control( |
| 559 | 546 | 'icon', |
| 560 | 547 | [ |
| 561 | - 'label' => esc_html__( 'Icon', 'elementor' ), | |
| 548 | + 'label' => __( 'Icon', 'elementor' ), | |
| 562 | 549 | 'type' => Controls_Manager::ICONS, |
| 563 | 550 | 'default' => [ |
| 564 | 551 | 'value' => 'fas fa-star', |
| 565 | 552 | 'library' => 'fa-solid', |
| @@ -574,9 +561,9 @@ | ||
| 574 | 561 | |
| 575 | 562 | $this->start_controls_section( |
| 576 | 563 | 'section_divider_style', |
| 577 | 564 | [ |
| 578 | - 'label' => esc_html__( 'Divider', 'elementor' ), | |
| 565 | + 'label' => __( 'Divider', 'elementor' ), | |
| 579 | 566 | 'tab' => Controls_Manager::TAB_STYLE, |
| 580 | 567 | 'condition' => [ |
| 581 | 568 | 'style!' => 'none', |
| 582 | 569 | ], |
| @@ -585,9 +572,9 @@ | ||
| 585 | 572 | |
| 586 | 573 | $this->add_control( |
| 587 | 574 | 'color', |
| 588 | 575 | [ |
| 589 | - 'label' => esc_html__( 'Color', 'elementor' ), | |
| 576 | + 'label' => __( 'Color', 'elementor' ), | |
| 590 | 577 | 'type' => Controls_Manager::COLOR, |
| 591 | 578 | 'global' => [ |
| 592 | 579 | 'default' => Global_Colors::COLOR_SECONDARY, |
| 593 | 580 | ], |
| @@ -601,11 +588,10 @@ | ||
| 601 | 588 | |
| 602 | 589 | $this->add_control( |
| 603 | 590 | 'weight', |
| 604 | 591 | [ |
| 605 | - 'label' => esc_html__( 'Weight', 'elementor' ), | |
| 592 | + 'label' => __( 'Weight', 'elementor' ), | |
| 606 | 593 | 'type' => Controls_Manager::SLIDER, |
| 607 | - 'size_units' => [ 'px', 'em', 'rem', 'custom' ], | |
| 608 | 594 | 'default' => [ |
| 609 | 595 | 'size' => 1, |
| 610 | 596 | ], |
| 611 | 597 | 'range' => [ |
| @@ -613,16 +599,8 @@ | ||
| 613 | 599 | 'min' => 1, |
| 614 | 600 | 'max' => 10, |
| 615 | 601 | 'step' => 0.1, |
| 616 | 602 | ], |
| 617 | - 'em' => [ | |
| 618 | - 'min' => 0.1, | |
| 619 | - 'max' => 1, | |
| 620 | - ], | |
| 621 | - 'rem' => [ | |
| 622 | - 'min' => 0.1, | |
| 623 | - 'max' => 1, | |
| 624 | - ], | |
| 625 | 603 | ], |
| 626 | 604 | 'render_type' => 'template', |
| 627 | 605 | 'condition' => [ |
| 628 | 606 | 'style' => array_keys( $this->get_options_by_groups( $styles, 'line' )['options'] ), |
| @@ -635,9 +613,9 @@ | ||
| 635 | 613 | |
| 636 | 614 | $this->add_control( |
| 637 | 615 | 'pattern_height', |
| 638 | 616 | [ |
| 639 | - 'label' => esc_html__( 'Size', 'elementor' ), | |
| 617 | + 'label' => __( 'Size', 'elementor' ), | |
| 640 | 618 | 'type' => Controls_Manager::SLIDER, |
| 641 | 619 | 'selectors' => [ |
| 642 | 620 | '{{WRAPPER}}' => '--divider-pattern-height: {{SIZE}}{{UNIT}}', |
| 643 | 621 | ], |
| @@ -663,11 +641,11 @@ | ||
| 663 | 641 | |
| 664 | 642 | $this->add_control( |
| 665 | 643 | 'pattern_size', |
| 666 | 644 | [ |
| 667 | - 'label' => esc_html__( 'Amount', 'elementor' ), | |
| 645 | + 'label' => __( 'Amount', 'elementor' ), | |
| 668 | 646 | 'type' => Controls_Manager::SLIDER, |
| 669 | - 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ], | |
| 647 | + 'size_units' => [ '%', 'px' ], | |
| 670 | 648 | 'selectors' => [ |
| 671 | 649 | '{{WRAPPER}}' => '--divider-pattern-size: {{SIZE}}{{UNIT}}', |
| 672 | 650 | ], |
| 673 | 651 | 'default' => [ |
| @@ -695,9 +673,9 @@ | ||
| 695 | 673 | |
| 696 | 674 | $this->add_responsive_control( |
| 697 | 675 | 'gap', |
| 698 | 676 | [ |
| 699 | - 'label' => esc_html__( 'Gap', 'elementor' ), | |
| 677 | + 'label' => __( 'Gap', 'elementor' ), | |
| 700 | 678 | 'type' => Controls_Manager::SLIDER, |
| 701 | 679 | 'default' => [ |
| 702 | 680 | 'size' => 15, |
| 703 | 681 | ], |
| @@ -707,9 +685,9 @@ | ||
| 707 | 685 | 'max' => 50, |
| 708 | 686 | ], |
| 709 | 687 | ], |
| 710 | 688 | 'selectors' => [ |
| 711 | - '{{WRAPPER}} .elementor-divider' => 'padding-block-start: {{SIZE}}{{UNIT}}; padding-block-end: {{SIZE}}{{UNIT}};', | |
| 689 | + '{{WRAPPER}} .elementor-divider' => 'padding-top: {{SIZE}}{{UNIT}}; padding-bottom: {{SIZE}}{{UNIT}};', | |
| 712 | 690 | ], |
| 713 | 691 | 'separator' => 'before', |
| 714 | 692 | ] |
| 715 | 693 | ); |
| @@ -718,9 +696,9 @@ | ||
| 718 | 696 | |
| 719 | 697 | $this->start_controls_section( |
| 720 | 698 | 'section_text_style', |
| 721 | 699 | [ |
| 722 | - 'label' => esc_html__( 'Text', 'elementor' ), | |
| 700 | + 'label' => __( 'Text', 'elementor' ), | |
| 723 | 701 | 'tab' => Controls_Manager::TAB_STYLE, |
| 724 | 702 | 'condition' => [ |
| 725 | 703 | 'look' => 'line_text', |
| 726 | 704 | ], |
| @@ -729,9 +707,9 @@ | ||
| 729 | 707 | |
| 730 | 708 | $this->add_control( |
| 731 | 709 | 'text_color', |
| 732 | 710 | [ |
| 733 | - 'label' => esc_html__( 'Color', 'elementor' ), | |
| 711 | + 'label' => __( 'Color', 'elementor' ), | |
| 734 | 712 | 'type' => Controls_Manager::COLOR, |
| 735 | 713 | 'global' => [ |
| 736 | 714 | 'default' => Global_Colors::COLOR_SECONDARY, |
| 737 | 715 | ], |
| @@ -751,32 +729,24 @@ | ||
| 751 | 729 | 'selector' => '{{WRAPPER}} .elementor-divider__text', |
| 752 | 730 | ] |
| 753 | 731 | ); |
| 754 | 732 | |
| 755 | - $this->add_group_control( | |
| 756 | - Group_Control_Text_Stroke::get_type(), | |
| 757 | - [ | |
| 758 | - 'name' => 'text_stroke', | |
| 759 | - 'selector' => '{{WRAPPER}} .elementor-divider__text', | |
| 760 | - ] | |
| 761 | - ); | |
| 762 | - | |
| 763 | 733 | $this->add_control( |
| 764 | 734 | 'text_align', |
| 765 | 735 | [ |
| 766 | - 'label' => esc_html__( 'Position', 'elementor' ), | |
| 736 | + 'label' => __( 'Position', 'elementor' ), | |
| 767 | 737 | 'type' => Controls_Manager::CHOOSE, |
| 768 | 738 | 'options' => [ |
| 769 | 739 | 'left' => [ |
| 770 | - 'title' => esc_html__( 'Left', 'elementor' ), | |
| 740 | + 'title' => __( 'Left', 'elementor' ), | |
| 771 | 741 | 'icon' => 'eicon-h-align-left', |
| 772 | 742 | ], |
| 773 | 743 | 'center' => [ |
| 774 | - 'title' => esc_html__( 'Center', 'elementor' ), | |
| 744 | + 'title' => __( 'Center', 'elementor' ), | |
| 775 | 745 | 'icon' => 'eicon-h-align-center', |
| 776 | 746 | ], |
| 777 | 747 | 'right' => [ |
| 778 | - 'title' => esc_html__( 'Right', 'elementor' ), | |
| 748 | + 'title' => __( 'Right', 'elementor' ), | |
| 779 | 749 | 'icon' => 'eicon-h-align-right', |
| 780 | 750 | ], |
| 781 | 751 | ], |
| 782 | 752 | 'default' => 'center', |
| @@ -786,27 +756,15 @@ | ||
| 786 | 756 | |
| 787 | 757 | $this->add_responsive_control( |
| 788 | 758 | 'text_spacing', |
| 789 | 759 | [ |
| 790 | - 'label' => esc_html__( 'Spacing', 'elementor' ), | |
| 760 | + 'label' => __( 'Spacing', 'elementor' ), | |
| 791 | 761 | 'type' => Controls_Manager::SLIDER, |
| 792 | - 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ], | |
| 793 | 762 | 'range' => [ |
| 794 | 763 | 'px' => [ |
| 764 | + 'min' => 0, | |
| 795 | 765 | 'max' => 50, |
| 796 | 766 | ], |
| 797 | - '%' => [ | |
| 798 | - 'max' => 50, | |
| 799 | - ], | |
| 800 | - 'em' => [ | |
| 801 | - 'max' => 5, | |
| 802 | - ], | |
| 803 | - 'rem' => [ | |
| 804 | - 'max' => 5, | |
| 805 | - ], | |
| 806 | - 'vw' => [ | |
| 807 | - 'max' => 50, | |
| 808 | - ], | |
| 809 | 767 | ], |
| 810 | 768 | 'selectors' => [ |
| 811 | 769 | '{{WRAPPER}}' => '--divider-element-spacing: {{SIZE}}{{UNIT}};', |
| 812 | 770 | ], |
| @@ -817,9 +775,9 @@ | ||
| 817 | 775 | |
| 818 | 776 | $this->start_controls_section( |
| 819 | 777 | 'section_icon_style', |
| 820 | 778 | [ |
| 821 | - 'label' => esc_html__( 'Icon', 'elementor' ), | |
| 779 | + 'label' => __( 'Icon', 'elementor' ), | |
| 822 | 780 | 'tab' => Controls_Manager::TAB_STYLE, |
| 823 | 781 | 'condition' => [ |
| 824 | 782 | 'look' => 'line_icon', |
| 825 | 783 | ], |
| @@ -828,14 +786,14 @@ | ||
| 828 | 786 | |
| 829 | 787 | $this->add_control( |
| 830 | 788 | 'icon_view', |
| 831 | 789 | [ |
| 832 | - 'label' => esc_html__( 'View', 'elementor' ), | |
| 790 | + 'label' => __( 'View', 'elementor' ), | |
| 833 | 791 | 'type' => Controls_Manager::SELECT, |
| 834 | 792 | 'options' => [ |
| 835 | - 'default' => esc_html__( 'Default', 'elementor' ), | |
| 836 | - 'stacked' => esc_html__( 'Stacked', 'elementor' ), | |
| 837 | - 'framed' => esc_html__( 'Framed', 'elementor' ), | |
| 793 | + 'default' => __( 'Default', 'elementor' ), | |
| 794 | + 'stacked' => __( 'Stacked', 'elementor' ), | |
| 795 | + 'framed' => __( 'Framed', 'elementor' ), | |
| 838 | 796 | ], |
| 839 | 797 | 'default' => 'default', |
| 840 | 798 | 'prefix_class' => 'elementor-view-', |
| 841 | 799 | ] |
| @@ -843,21 +801,15 @@ | ||
| 843 | 801 | |
| 844 | 802 | $this->add_responsive_control( |
| 845 | 803 | 'icon_size', |
| 846 | 804 | [ |
| 847 | - 'label' => esc_html__( 'Size', 'elementor' ), | |
| 805 | + 'label' => __( 'Size', 'elementor' ), | |
| 848 | 806 | 'type' => Controls_Manager::SLIDER, |
| 849 | - 'size_units' => [ 'px', 'em', 'rem', 'custom' ], | |
| 850 | 807 | 'range' => [ |
| 851 | 808 | 'px' => [ |
| 852 | - 'max' => 100, | |
| 809 | + 'min' => 6, | |
| 810 | + 'max' => 300, | |
| 853 | 811 | ], |
| 854 | - 'em' => [ | |
| 855 | - 'max' => 10, | |
| 856 | - ], | |
| 857 | - 'rem' => [ | |
| 858 | - 'max' => 10, | |
| 859 | - ], | |
| 860 | 812 | ], |
| 861 | 813 | 'selectors' => [ |
| 862 | 814 | '{{WRAPPER}}' => '--divider-icon-size: {{SIZE}}{{UNIT}};', |
| 863 | 815 | ], |
| @@ -866,26 +818,18 @@ | ||
| 866 | 818 | |
| 867 | 819 | $this->add_control( |
| 868 | 820 | 'icon_padding', |
| 869 | 821 | [ |
| 870 | - 'label' => esc_html__( 'Padding', 'elementor' ), | |
| 822 | + 'label' => __( 'Padding', 'elementor' ), | |
| 871 | 823 | 'type' => Controls_Manager::SLIDER, |
| 872 | - 'size_units' => [ 'px', 'em', 'rem', 'custom' ], | |
| 873 | 824 | 'selectors' => [ |
| 874 | 825 | '{{WRAPPER}} .elementor-icon' => 'padding: {{SIZE}}{{UNIT}};', |
| 875 | 826 | ], |
| 876 | 827 | 'range' => [ |
| 877 | - 'px' => [ | |
| 878 | - 'max' => 50, | |
| 879 | - ], | |
| 880 | 828 | 'em' => [ |
| 881 | 829 | 'min' => 0, |
| 882 | 830 | 'max' => 5, |
| 883 | 831 | ], |
| 884 | - 'rem' => [ | |
| 885 | - 'min' => 0, | |
| 886 | - 'max' => 5, | |
| 887 | - ], | |
| 888 | 832 | ], |
| 889 | 833 | 'condition' => [ |
| 890 | 834 | 'icon_view!' => 'default', |
| 891 | 835 | ], |
| @@ -894,9 +838,9 @@ | ||
| 894 | 838 | |
| 895 | 839 | $this->add_control( |
| 896 | 840 | 'primary_color', |
| 897 | 841 | [ |
| 898 | - 'label' => esc_html__( 'Primary Color', 'elementor' ), | |
| 842 | + 'label' => __( 'Primary Color', 'elementor' ), | |
| 899 | 843 | 'type' => Controls_Manager::COLOR, |
| 900 | 844 | 'default' => '', |
| 901 | 845 | 'selectors' => [ |
| 902 | 846 | '{{WRAPPER}}.elementor-view-stacked .elementor-icon' => 'background-color: {{VALUE}};', |
| @@ -911,9 +855,9 @@ | ||
| 911 | 855 | |
| 912 | 856 | $this->add_control( |
| 913 | 857 | 'secondary_color', |
| 914 | 858 | [ |
| 915 | - 'label' => esc_html__( 'Secondary Color', 'elementor' ), | |
| 859 | + 'label' => __( 'Secondary Color', 'elementor' ), | |
| 916 | 860 | 'type' => Controls_Manager::COLOR, |
| 917 | 861 | 'default' => '', |
| 918 | 862 | 'condition' => [ |
| 919 | 863 | 'icon_view!' => 'default', |
| @@ -928,27 +872,26 @@ | ||
| 928 | 872 | |
| 929 | 873 | $this->add_control( |
| 930 | 874 | 'icon_align', |
| 931 | 875 | [ |
| 932 | - 'label' => esc_html__( 'Position', 'elementor' ), | |
| 876 | + 'label' => __( 'Position', 'elementor' ), | |
| 933 | 877 | 'type' => Controls_Manager::CHOOSE, |
| 934 | 878 | 'options' => [ |
| 935 | 879 | 'left' => [ |
| 936 | - 'title' => esc_html__( 'Left', 'elementor' ), | |
| 880 | + 'title' => __( 'Left', 'elementor' ), | |
| 937 | 881 | 'icon' => 'eicon-h-align-left', |
| 938 | 882 | ], |
| 939 | 883 | 'center' => [ |
| 940 | - 'title' => esc_html__( 'Center', 'elementor' ), | |
| 884 | + 'title' => __( 'Center', 'elementor' ), | |
| 941 | 885 | 'icon' => 'eicon-h-align-center', |
| 942 | 886 | ], |
| 943 | 887 | 'right' => [ |
| 944 | - 'title' => esc_html__( 'Right', 'elementor' ), | |
| 888 | + 'title' => __( 'Right', 'elementor' ), | |
| 945 | 889 | 'icon' => 'eicon-h-align-right', |
| 946 | 890 | ], |
| 947 | 891 | ], |
| 948 | 892 | 'default' => 'center', |
| 949 | 893 | 'prefix_class' => 'elementor-widget-divider--element-align-', |
| 950 | - 'separator' => 'before', | |
| 951 | 894 | ] |
| 952 | 895 | ); |
| 953 | 896 | |
| 954 | 897 | $this->add_responsive_control( |
| @@ -953,26 +896,19 @@ | ||
| 953 | 896 | |
| 954 | 897 | $this->add_responsive_control( |
| 955 | 898 | 'icon_spacing', |
| 956 | 899 | [ |
| 957 | - 'label' => esc_html__( 'Spacing', 'elementor' ), | |
| 900 | + 'label' => __( 'Spacing', 'elementor' ), | |
| 958 | 901 | 'type' => Controls_Manager::SLIDER, |
| 959 | - 'size_units' => [ 'px', 'em', 'rem', 'custom' ], | |
| 960 | 902 | 'range' => [ |
| 961 | 903 | 'px' => [ |
| 904 | + 'min' => 0, | |
| 962 | 905 | 'max' => 50, |
| 963 | 906 | ], |
| 964 | - 'em' => [ | |
| 965 | - 'max' => 5, | |
| 966 | - ], | |
| 967 | - 'rem' => [ | |
| 968 | - 'max' => 5, | |
| 969 | - ], | |
| 970 | 907 | ], |
| 971 | 908 | 'selectors' => [ |
| 972 | 909 | '{{WRAPPER}}' => '--divider-element-spacing: {{SIZE}}{{UNIT}}', |
| 973 | 910 | ], |
| 974 | - 'separator' => 'before', | |
| 975 | 911 | ] |
| 976 | 912 | ); |
| 977 | 913 | |
| 978 | 914 | $this->add_responsive_control( |
| @@ -977,12 +913,13 @@ | ||
| 977 | 913 | |
| 978 | 914 | $this->add_responsive_control( |
| 979 | 915 | 'rotate', |
| 980 | 916 | [ |
| 981 | - 'label' => esc_html__( 'Rotate', 'elementor' ), | |
| 917 | + 'label' => __( 'Rotate', 'elementor' ), | |
| 982 | 918 | 'type' => Controls_Manager::SLIDER, |
| 983 | - 'size_units' => [ 'deg', 'grad', 'rad', 'turn', 'custom' ], | |
| 919 | + 'size_units' => [ 'deg' ], | |
| 984 | 920 | 'default' => [ |
| 921 | + 'size' => 0, | |
| 985 | 922 | 'unit' => 'deg', |
| 986 | 923 | ], |
| 987 | 924 | 'tablet_default' => [ |
| 988 | 925 | 'unit' => 'deg', |
| @@ -998,19 +935,10 @@ | ||
| 998 | 935 | |
| 999 | 936 | $this->add_control( |
| 1000 | 937 | 'icon_border_width', |
| 1001 | 938 | [ |
| 1002 | - 'label' => esc_html__( 'Border Width', 'elementor' ), | |
| 939 | + 'label' => __( 'Border Width', 'elementor' ), | |
| 1003 | 940 | 'type' => Controls_Manager::SLIDER, |
| 1004 | - 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ], | |
| 1005 | - 'range' => [ | |
| 1006 | - 'px' => [ | |
| 1007 | - 'max' => 20, | |
| 1008 | - ], | |
| 1009 | - 'em' => [ | |
| 1010 | - 'max' => 2, | |
| 1011 | - ], | |
| 1012 | - ], | |
| 1013 | 941 | 'selectors' => [ |
| 1014 | 942 | '{{WRAPPER}} .elementor-icon' => 'border-width: {{SIZE}}{{UNIT}}', |
| 1015 | 943 | ], |
| 1016 | 944 | 'condition' => [ |
| @@ -1021,11 +949,11 @@ | ||
| 1021 | 949 | |
| 1022 | 950 | $this->add_control( |
| 1023 | 951 | 'border_radius', |
| 1024 | 952 | [ |
| 1025 | - 'label' => esc_html__( 'Border Radius', 'elementor' ), | |
| 953 | + 'label' => __( 'Border Radius', 'elementor' ), | |
| 1026 | 954 | 'type' => Controls_Manager::SLIDER, |
| 1027 | - 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ], | |
| 955 | + 'size_units' => [ 'px', '%' ], | |
| 1028 | 956 | 'selectors' => [ |
| 1029 | 957 | '{{WRAPPER}} .elementor-icon' => 'border-radius: {{SIZE}}{{UNIT}}', |
| 1030 | 958 | ], |
| 1031 | 959 | 'condition' => [ |
| @@ -1114,9 +1042,9 @@ | ||
| 1114 | 1042 | $this->add_render_attribute( 'wrapper', 'style', '--divider-pattern-url: url("data:image/svg+xml,' . $this->svg_to_data_uri( $svg_code ) . '");' ); |
| 1115 | 1043 | } |
| 1116 | 1044 | |
| 1117 | 1045 | ?> |
| 1118 | - <div <?php $this->print_render_attribute_string( 'wrapper' ); ?>> | |
| 1046 | + <div <?php echo $this->get_render_attribute_string( 'wrapper' ); ?>> | |
| 1119 | 1047 | <span class="elementor-divider-separator"> |
| 1120 | 1048 | <?php if ( $has_icon ) : ?> |
| 1121 | 1049 | <div class="elementor-icon elementor-divider__element"> |
| 1122 | 1050 | <?php |
| @@ -1127,25 +1055,11 @@ | ||
| 1127 | 1055 | <?php elseif ( $has_text ) : |
| 1128 | 1056 | $this->add_inline_editing_attributes( 'text' ); |
| 1129 | 1057 | $this->add_render_attribute( 'text', [ 'class' => [ 'elementor-divider__text', 'elementor-divider__element' ] ] ); |
| 1130 | 1058 | ?> |
| 1131 | - <<?php Utils::print_validated_html_tag( $settings['html_tag'] ); ?> <?php $this->print_render_attribute_string( 'text' ); ?>> | |
| 1132 | - <?php | |
| 1133 | - // PHPCS - the main text of a widget should not be escaped. | |
| 1134 | - echo $settings['text']; // phpcs:ignore WordPress.Security.EscapeOutput ?> | |
| 1135 | - </<?php Utils::print_validated_html_tag( $settings['html_tag'] ); ?>> | |
| 1059 | + <<?php echo $settings['html_tag'] . ' ' . $this->get_render_attribute_string( 'text' ); ?>><?php echo $settings['text']; ?></<?php echo $settings['html_tag']; ?>> | |
| 1136 | 1060 | <?php endif; ?> |
| 1137 | 1061 | </span> |
| 1138 | 1062 | </div> |
| 1139 | 1063 | <?php |
| 1140 | - } | |
| 1141 | - | |
| 1142 | - public function render_markdown(): string { | |
| 1143 | - $settings = $this->get_settings_for_display(); | |
| 1144 | - | |
| 1145 | - if ( 'line_text' === ( $settings['look'] ?? '' ) && ! empty( $settings['text'] ) ) { | |
| 1146 | - return '--- ' . Utils::html_to_plain_text( $settings['text'] ) . ' ---'; | |
| 1147 | - } | |
| 1148 | - | |
| 1149 | - return '---'; | |
| 1150 | 1064 | } |
| 1151 | 1065 | } |