| @@ -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 ) { |
| @@ -366,17 +344,17 @@ | ||
| 366 | 344 | * Register divider widget controls. |
| 367 | 345 | * |
| 368 | 346 | * Adds different input fields to allow the user to change and customize the widget settings. |
| 369 | 347 | * |
| 370 | - * @since 3.1.0 | |
| 348 | + * @since 1.0.0 | |
| 371 | 349 | * @access protected |
| 372 | 350 | */ |
| 373 | - protected function register_controls() { | |
| 351 | + protected function _register_controls() { | |
| 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,42 +495,28 @@ | ||
| 517 | 495 | ] |
| 518 | 496 | ); |
| 519 | 497 | |
| 520 | 498 | $this->add_control( |
| 521 | - 'text', | |
| 499 | + 'view', | |
| 522 | 500 | [ |
| 523 | - 'label' => esc_html__( 'Text', 'elementor' ), | |
| 524 | - 'type' => Controls_Manager::TEXT, | |
| 525 | - 'condition' => [ | |
| 526 | - 'look' => 'line_text', | |
| 527 | - ], | |
| 528 | - 'default' => esc_html__( 'Divider', 'elementor' ), | |
| 529 | - 'dynamic' => [ | |
| 530 | - 'active' => true, | |
| 531 | - ], | |
| 501 | + 'label' => __( 'View', 'elementor' ), | |
| 502 | + 'type' => Controls_Manager::HIDDEN, | |
| 503 | + 'default' => 'traditional', | |
| 532 | 504 | ] |
| 533 | 505 | ); |
| 534 | 506 | |
| 535 | 507 | $this->add_control( |
| 536 | - 'html_tag', | |
| 508 | + 'text', | |
| 537 | 509 | [ |
| 538 | - 'label' => esc_html__( 'HTML Tag', 'elementor' ), | |
| 539 | - 'type' => Controls_Manager::SELECT, | |
| 510 | + 'label' => __( 'Text', 'elementor' ), | |
| 511 | + 'type' => Controls_Manager::TEXT, | |
| 540 | 512 | 'condition' => [ |
| 541 | 513 | 'look' => 'line_text', |
| 542 | 514 | ], |
| 543 | - 'options' => [ | |
| 544 | - 'h1' => 'H1', | |
| 545 | - 'h2' => 'H2', | |
| 546 | - 'h3' => 'H3', | |
| 547 | - 'h4' => 'H4', | |
| 548 | - 'h5' => 'H5', | |
| 549 | - 'h6' => 'H6', | |
| 550 | - 'div' => 'div', | |
| 551 | - 'span' => 'span', | |
| 552 | - 'p' => 'p', | |
| 515 | + 'default' => __( 'Divider', 'elementor' ), | |
| 516 | + 'dynamic' => [ | |
| 517 | + 'active' => true, | |
| 553 | 518 | ], |
| 554 | - 'default' => 'span', | |
| 555 | 519 | ] |
| 556 | 520 | ); |
| 557 | 521 | |
| 558 | 522 | $this->add_control( |
| @@ -557,9 +521,9 @@ | ||
| 557 | 521 | |
| 558 | 522 | $this->add_control( |
| 559 | 523 | 'icon', |
| 560 | 524 | [ |
| 561 | - 'label' => esc_html__( 'Icon', 'elementor' ), | |
| 525 | + 'label' => __( 'Icon', 'elementor' ), | |
| 562 | 526 | 'type' => Controls_Manager::ICONS, |
| 563 | 527 | 'default' => [ |
| 564 | 528 | 'value' => 'fas fa-star', |
| 565 | 529 | 'library' => 'fa-solid', |
| @@ -574,9 +538,9 @@ | ||
| 574 | 538 | |
| 575 | 539 | $this->start_controls_section( |
| 576 | 540 | 'section_divider_style', |
| 577 | 541 | [ |
| 578 | - 'label' => esc_html__( 'Divider', 'elementor' ), | |
| 542 | + 'label' => __( 'Divider', 'elementor' ), | |
| 579 | 543 | 'tab' => Controls_Manager::TAB_STYLE, |
| 580 | 544 | 'condition' => [ |
| 581 | 545 | 'style!' => 'none', |
| 582 | 546 | ], |
| @@ -585,9 +549,9 @@ | ||
| 585 | 549 | |
| 586 | 550 | $this->add_control( |
| 587 | 551 | 'color', |
| 588 | 552 | [ |
| 589 | - 'label' => esc_html__( 'Color', 'elementor' ), | |
| 553 | + 'label' => __( 'Color', 'elementor' ), | |
| 590 | 554 | 'type' => Controls_Manager::COLOR, |
| 591 | 555 | 'global' => [ |
| 592 | 556 | 'default' => Global_Colors::COLOR_SECONDARY, |
| 593 | 557 | ], |
| @@ -601,11 +565,10 @@ | ||
| 601 | 565 | |
| 602 | 566 | $this->add_control( |
| 603 | 567 | 'weight', |
| 604 | 568 | [ |
| 605 | - 'label' => esc_html__( 'Weight', 'elementor' ), | |
| 569 | + 'label' => __( 'Weight', 'elementor' ), | |
| 606 | 570 | 'type' => Controls_Manager::SLIDER, |
| 607 | - 'size_units' => [ 'px', 'em', 'rem', 'custom' ], | |
| 608 | 571 | 'default' => [ |
| 609 | 572 | 'size' => 1, |
| 610 | 573 | ], |
| 611 | 574 | 'range' => [ |
| @@ -613,16 +576,8 @@ | ||
| 613 | 576 | 'min' => 1, |
| 614 | 577 | 'max' => 10, |
| 615 | 578 | 'step' => 0.1, |
| 616 | 579 | ], |
| 617 | - 'em' => [ | |
| 618 | - 'min' => 0.1, | |
| 619 | - 'max' => 1, | |
| 620 | - ], | |
| 621 | - 'rem' => [ | |
| 622 | - 'min' => 0.1, | |
| 623 | - 'max' => 1, | |
| 624 | - ], | |
| 625 | 580 | ], |
| 626 | 581 | 'render_type' => 'template', |
| 627 | 582 | 'condition' => [ |
| 628 | 583 | 'style' => array_keys( $this->get_options_by_groups( $styles, 'line' )['options'] ), |
| @@ -635,9 +590,9 @@ | ||
| 635 | 590 | |
| 636 | 591 | $this->add_control( |
| 637 | 592 | 'pattern_height', |
| 638 | 593 | [ |
| 639 | - 'label' => esc_html__( 'Size', 'elementor' ), | |
| 594 | + 'label' => __( 'Size', 'elementor' ), | |
| 640 | 595 | 'type' => Controls_Manager::SLIDER, |
| 641 | 596 | 'selectors' => [ |
| 642 | 597 | '{{WRAPPER}}' => '--divider-pattern-height: {{SIZE}}{{UNIT}}', |
| 643 | 598 | ], |
| @@ -663,11 +618,11 @@ | ||
| 663 | 618 | |
| 664 | 619 | $this->add_control( |
| 665 | 620 | 'pattern_size', |
| 666 | 621 | [ |
| 667 | - 'label' => esc_html__( 'Amount', 'elementor' ), | |
| 622 | + 'label' => __( 'Amount', 'elementor' ), | |
| 668 | 623 | 'type' => Controls_Manager::SLIDER, |
| 669 | - 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ], | |
| 624 | + 'size_units' => [ '%', 'px' ], | |
| 670 | 625 | 'selectors' => [ |
| 671 | 626 | '{{WRAPPER}}' => '--divider-pattern-size: {{SIZE}}{{UNIT}}', |
| 672 | 627 | ], |
| 673 | 628 | 'default' => [ |
| @@ -695,9 +650,9 @@ | ||
| 695 | 650 | |
| 696 | 651 | $this->add_responsive_control( |
| 697 | 652 | 'gap', |
| 698 | 653 | [ |
| 699 | - 'label' => esc_html__( 'Gap', 'elementor' ), | |
| 654 | + 'label' => __( 'Gap', 'elementor' ), | |
| 700 | 655 | 'type' => Controls_Manager::SLIDER, |
| 701 | 656 | 'default' => [ |
| 702 | 657 | 'size' => 15, |
| 703 | 658 | ], |
| @@ -707,9 +662,9 @@ | ||
| 707 | 662 | 'max' => 50, |
| 708 | 663 | ], |
| 709 | 664 | ], |
| 710 | 665 | 'selectors' => [ |
| 711 | - '{{WRAPPER}} .elementor-divider' => 'padding-block-start: {{SIZE}}{{UNIT}}; padding-block-end: {{SIZE}}{{UNIT}};', | |
| 666 | + '{{WRAPPER}} .elementor-divider' => 'padding-top: {{SIZE}}{{UNIT}}; padding-bottom: {{SIZE}}{{UNIT}};', | |
| 712 | 667 | ], |
| 713 | 668 | 'separator' => 'before', |
| 714 | 669 | ] |
| 715 | 670 | ); |
| @@ -718,9 +673,9 @@ | ||
| 718 | 673 | |
| 719 | 674 | $this->start_controls_section( |
| 720 | 675 | 'section_text_style', |
| 721 | 676 | [ |
| 722 | - 'label' => esc_html__( 'Text', 'elementor' ), | |
| 677 | + 'label' => __( 'Text', 'elementor' ), | |
| 723 | 678 | 'tab' => Controls_Manager::TAB_STYLE, |
| 724 | 679 | 'condition' => [ |
| 725 | 680 | 'look' => 'line_text', |
| 726 | 681 | ], |
| @@ -729,9 +684,9 @@ | ||
| 729 | 684 | |
| 730 | 685 | $this->add_control( |
| 731 | 686 | 'text_color', |
| 732 | 687 | [ |
| 733 | - 'label' => esc_html__( 'Color', 'elementor' ), | |
| 688 | + 'label' => __( 'Color', 'elementor' ), | |
| 734 | 689 | 'type' => Controls_Manager::COLOR, |
| 735 | 690 | 'global' => [ |
| 736 | 691 | 'default' => Global_Colors::COLOR_SECONDARY, |
| 737 | 692 | ], |
| @@ -751,32 +706,24 @@ | ||
| 751 | 706 | 'selector' => '{{WRAPPER}} .elementor-divider__text', |
| 752 | 707 | ] |
| 753 | 708 | ); |
| 754 | 709 | |
| 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 | 710 | $this->add_control( |
| 764 | 711 | 'text_align', |
| 765 | 712 | [ |
| 766 | - 'label' => esc_html__( 'Position', 'elementor' ), | |
| 713 | + 'label' => __( 'Position', 'elementor' ), | |
| 767 | 714 | 'type' => Controls_Manager::CHOOSE, |
| 768 | 715 | 'options' => [ |
| 769 | 716 | 'left' => [ |
| 770 | - 'title' => esc_html__( 'Left', 'elementor' ), | |
| 717 | + 'title' => __( 'Left', 'elementor' ), | |
| 771 | 718 | 'icon' => 'eicon-h-align-left', |
| 772 | 719 | ], |
| 773 | 720 | 'center' => [ |
| 774 | - 'title' => esc_html__( 'Center', 'elementor' ), | |
| 721 | + 'title' => __( 'Center', 'elementor' ), | |
| 775 | 722 | 'icon' => 'eicon-h-align-center', |
| 776 | 723 | ], |
| 777 | 724 | 'right' => [ |
| 778 | - 'title' => esc_html__( 'Right', 'elementor' ), | |
| 725 | + 'title' => __( 'Right', 'elementor' ), | |
| 779 | 726 | 'icon' => 'eicon-h-align-right', |
| 780 | 727 | ], |
| 781 | 728 | ], |
| 782 | 729 | 'default' => 'center', |
| @@ -786,27 +733,15 @@ | ||
| 786 | 733 | |
| 787 | 734 | $this->add_responsive_control( |
| 788 | 735 | 'text_spacing', |
| 789 | 736 | [ |
| 790 | - 'label' => esc_html__( 'Spacing', 'elementor' ), | |
| 737 | + 'label' => __( 'Spacing', 'elementor' ), | |
| 791 | 738 | 'type' => Controls_Manager::SLIDER, |
| 792 | - 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ], | |
| 793 | 739 | 'range' => [ |
| 794 | 740 | 'px' => [ |
| 741 | + 'min' => 0, | |
| 795 | 742 | 'max' => 50, |
| 796 | 743 | ], |
| 797 | - '%' => [ | |
| 798 | - 'max' => 50, | |
| 799 | - ], | |
| 800 | - 'em' => [ | |
| 801 | - 'max' => 5, | |
| 802 | - ], | |
| 803 | - 'rem' => [ | |
| 804 | - 'max' => 5, | |
| 805 | - ], | |
| 806 | - 'vw' => [ | |
| 807 | - 'max' => 50, | |
| 808 | - ], | |
| 809 | 744 | ], |
| 810 | 745 | 'selectors' => [ |
| 811 | 746 | '{{WRAPPER}}' => '--divider-element-spacing: {{SIZE}}{{UNIT}};', |
| 812 | 747 | ], |
| @@ -817,9 +752,9 @@ | ||
| 817 | 752 | |
| 818 | 753 | $this->start_controls_section( |
| 819 | 754 | 'section_icon_style', |
| 820 | 755 | [ |
| 821 | - 'label' => esc_html__( 'Icon', 'elementor' ), | |
| 756 | + 'label' => __( 'Icon', 'elementor' ), | |
| 822 | 757 | 'tab' => Controls_Manager::TAB_STYLE, |
| 823 | 758 | 'condition' => [ |
| 824 | 759 | 'look' => 'line_icon', |
| 825 | 760 | ], |
| @@ -828,14 +763,14 @@ | ||
| 828 | 763 | |
| 829 | 764 | $this->add_control( |
| 830 | 765 | 'icon_view', |
| 831 | 766 | [ |
| 832 | - 'label' => esc_html__( 'View', 'elementor' ), | |
| 767 | + 'label' => __( 'View', 'elementor' ), | |
| 833 | 768 | 'type' => Controls_Manager::SELECT, |
| 834 | 769 | 'options' => [ |
| 835 | - 'default' => esc_html__( 'Default', 'elementor' ), | |
| 836 | - 'stacked' => esc_html__( 'Stacked', 'elementor' ), | |
| 837 | - 'framed' => esc_html__( 'Framed', 'elementor' ), | |
| 770 | + 'default' => __( 'Default', 'elementor' ), | |
| 771 | + 'stacked' => __( 'Stacked', 'elementor' ), | |
| 772 | + 'framed' => __( 'Framed', 'elementor' ), | |
| 838 | 773 | ], |
| 839 | 774 | 'default' => 'default', |
| 840 | 775 | 'prefix_class' => 'elementor-view-', |
| 841 | 776 | ] |
| @@ -843,21 +778,15 @@ | ||
| 843 | 778 | |
| 844 | 779 | $this->add_responsive_control( |
| 845 | 780 | 'icon_size', |
| 846 | 781 | [ |
| 847 | - 'label' => esc_html__( 'Size', 'elementor' ), | |
| 782 | + 'label' => __( 'Size', 'elementor' ), | |
| 848 | 783 | 'type' => Controls_Manager::SLIDER, |
| 849 | - 'size_units' => [ 'px', 'em', 'rem', 'custom' ], | |
| 850 | 784 | 'range' => [ |
| 851 | 785 | 'px' => [ |
| 852 | - 'max' => 100, | |
| 786 | + 'min' => 6, | |
| 787 | + 'max' => 300, | |
| 853 | 788 | ], |
| 854 | - 'em' => [ | |
| 855 | - 'max' => 10, | |
| 856 | - ], | |
| 857 | - 'rem' => [ | |
| 858 | - 'max' => 10, | |
| 859 | - ], | |
| 860 | 789 | ], |
| 861 | 790 | 'selectors' => [ |
| 862 | 791 | '{{WRAPPER}}' => '--divider-icon-size: {{SIZE}}{{UNIT}};', |
| 863 | 792 | ], |
| @@ -866,26 +795,18 @@ | ||
| 866 | 795 | |
| 867 | 796 | $this->add_control( |
| 868 | 797 | 'icon_padding', |
| 869 | 798 | [ |
| 870 | - 'label' => esc_html__( 'Padding', 'elementor' ), | |
| 799 | + 'label' => __( 'Padding', 'elementor' ), | |
| 871 | 800 | 'type' => Controls_Manager::SLIDER, |
| 872 | - 'size_units' => [ 'px', 'em', 'rem', 'custom' ], | |
| 873 | 801 | 'selectors' => [ |
| 874 | 802 | '{{WRAPPER}} .elementor-icon' => 'padding: {{SIZE}}{{UNIT}};', |
| 875 | 803 | ], |
| 876 | 804 | 'range' => [ |
| 877 | - 'px' => [ | |
| 878 | - 'max' => 50, | |
| 879 | - ], | |
| 880 | 805 | 'em' => [ |
| 881 | 806 | 'min' => 0, |
| 882 | 807 | 'max' => 5, |
| 883 | 808 | ], |
| 884 | - 'rem' => [ | |
| 885 | - 'min' => 0, | |
| 886 | - 'max' => 5, | |
| 887 | - ], | |
| 888 | 809 | ], |
| 889 | 810 | 'condition' => [ |
| 890 | 811 | 'icon_view!' => 'default', |
| 891 | 812 | ], |
| @@ -894,9 +815,9 @@ | ||
| 894 | 815 | |
| 895 | 816 | $this->add_control( |
| 896 | 817 | 'primary_color', |
| 897 | 818 | [ |
| 898 | - 'label' => esc_html__( 'Primary Color', 'elementor' ), | |
| 819 | + 'label' => __( 'Primary Color', 'elementor' ), | |
| 899 | 820 | 'type' => Controls_Manager::COLOR, |
| 900 | 821 | 'default' => '', |
| 901 | 822 | 'selectors' => [ |
| 902 | 823 | '{{WRAPPER}}.elementor-view-stacked .elementor-icon' => 'background-color: {{VALUE}};', |
| @@ -911,9 +832,9 @@ | ||
| 911 | 832 | |
| 912 | 833 | $this->add_control( |
| 913 | 834 | 'secondary_color', |
| 914 | 835 | [ |
| 915 | - 'label' => esc_html__( 'Secondary Color', 'elementor' ), | |
| 836 | + 'label' => __( 'Secondary Color', 'elementor' ), | |
| 916 | 837 | 'type' => Controls_Manager::COLOR, |
| 917 | 838 | 'default' => '', |
| 918 | 839 | 'condition' => [ |
| 919 | 840 | 'icon_view!' => 'default', |
| @@ -928,27 +849,26 @@ | ||
| 928 | 849 | |
| 929 | 850 | $this->add_control( |
| 930 | 851 | 'icon_align', |
| 931 | 852 | [ |
| 932 | - 'label' => esc_html__( 'Position', 'elementor' ), | |
| 853 | + 'label' => __( 'Position', 'elementor' ), | |
| 933 | 854 | 'type' => Controls_Manager::CHOOSE, |
| 934 | 855 | 'options' => [ |
| 935 | 856 | 'left' => [ |
| 936 | - 'title' => esc_html__( 'Left', 'elementor' ), | |
| 857 | + 'title' => __( 'Left', 'elementor' ), | |
| 937 | 858 | 'icon' => 'eicon-h-align-left', |
| 938 | 859 | ], |
| 939 | 860 | 'center' => [ |
| 940 | - 'title' => esc_html__( 'Center', 'elementor' ), | |
| 861 | + 'title' => __( 'Center', 'elementor' ), | |
| 941 | 862 | 'icon' => 'eicon-h-align-center', |
| 942 | 863 | ], |
| 943 | 864 | 'right' => [ |
| 944 | - 'title' => esc_html__( 'Right', 'elementor' ), | |
| 865 | + 'title' => __( 'Right', 'elementor' ), | |
| 945 | 866 | 'icon' => 'eicon-h-align-right', |
| 946 | 867 | ], |
| 947 | 868 | ], |
| 948 | 869 | 'default' => 'center', |
| 949 | 870 | 'prefix_class' => 'elementor-widget-divider--element-align-', |
| 950 | - 'separator' => 'before', | |
| 951 | 871 | ] |
| 952 | 872 | ); |
| 953 | 873 | |
| 954 | 874 | $this->add_responsive_control( |
| @@ -953,26 +873,19 @@ | ||
| 953 | 873 | |
| 954 | 874 | $this->add_responsive_control( |
| 955 | 875 | 'icon_spacing', |
| 956 | 876 | [ |
| 957 | - 'label' => esc_html__( 'Spacing', 'elementor' ), | |
| 877 | + 'label' => __( 'Spacing', 'elementor' ), | |
| 958 | 878 | 'type' => Controls_Manager::SLIDER, |
| 959 | - 'size_units' => [ 'px', 'em', 'rem', 'custom' ], | |
| 960 | 879 | 'range' => [ |
| 961 | 880 | 'px' => [ |
| 881 | + 'min' => 0, | |
| 962 | 882 | 'max' => 50, |
| 963 | 883 | ], |
| 964 | - 'em' => [ | |
| 965 | - 'max' => 5, | |
| 966 | - ], | |
| 967 | - 'rem' => [ | |
| 968 | - 'max' => 5, | |
| 969 | - ], | |
| 970 | 884 | ], |
| 971 | 885 | 'selectors' => [ |
| 972 | 886 | '{{WRAPPER}}' => '--divider-element-spacing: {{SIZE}}{{UNIT}}', |
| 973 | 887 | ], |
| 974 | - 'separator' => 'before', | |
| 975 | 888 | ] |
| 976 | 889 | ); |
| 977 | 890 | |
| 978 | 891 | $this->add_responsive_control( |
| @@ -977,12 +890,13 @@ | ||
| 977 | 890 | |
| 978 | 891 | $this->add_responsive_control( |
| 979 | 892 | 'rotate', |
| 980 | 893 | [ |
| 981 | - 'label' => esc_html__( 'Rotate', 'elementor' ), | |
| 894 | + 'label' => __( 'Rotate', 'elementor' ), | |
| 982 | 895 | 'type' => Controls_Manager::SLIDER, |
| 983 | - 'size_units' => [ 'deg', 'grad', 'rad', 'turn', 'custom' ], | |
| 896 | + 'size_units' => [ 'deg' ], | |
| 984 | 897 | 'default' => [ |
| 898 | + 'size' => 0, | |
| 985 | 899 | 'unit' => 'deg', |
| 986 | 900 | ], |
| 987 | 901 | 'tablet_default' => [ |
| 988 | 902 | 'unit' => 'deg', |
| @@ -998,19 +912,10 @@ | ||
| 998 | 912 | |
| 999 | 913 | $this->add_control( |
| 1000 | 914 | 'icon_border_width', |
| 1001 | 915 | [ |
| 1002 | - 'label' => esc_html__( 'Border Width', 'elementor' ), | |
| 916 | + 'label' => __( 'Border Width', 'elementor' ), | |
| 1003 | 917 | '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 | 918 | 'selectors' => [ |
| 1014 | 919 | '{{WRAPPER}} .elementor-icon' => 'border-width: {{SIZE}}{{UNIT}}', |
| 1015 | 920 | ], |
| 1016 | 921 | 'condition' => [ |
| @@ -1021,11 +926,11 @@ | ||
| 1021 | 926 | |
| 1022 | 927 | $this->add_control( |
| 1023 | 928 | 'border_radius', |
| 1024 | 929 | [ |
| 1025 | - 'label' => esc_html__( 'Border Radius', 'elementor' ), | |
| 930 | + 'label' => __( 'Border Radius', 'elementor' ), | |
| 1026 | 931 | 'type' => Controls_Manager::SLIDER, |
| 1027 | - 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ], | |
| 932 | + 'size_units' => [ 'px', '%' ], | |
| 1028 | 933 | 'selectors' => [ |
| 1029 | 934 | '{{WRAPPER}} .elementor-icon' => 'border-radius: {{SIZE}}{{UNIT}}', |
| 1030 | 935 | ], |
| 1031 | 936 | 'condition' => [ |
| @@ -1114,9 +1019,9 @@ | ||
| 1114 | 1019 | $this->add_render_attribute( 'wrapper', 'style', '--divider-pattern-url: url("data:image/svg+xml,' . $this->svg_to_data_uri( $svg_code ) . '");' ); |
| 1115 | 1020 | } |
| 1116 | 1021 | |
| 1117 | 1022 | ?> |
| 1118 | - <div <?php $this->print_render_attribute_string( 'wrapper' ); ?>> | |
| 1023 | + <div <?php echo $this->get_render_attribute_string( 'wrapper' ); ?>> | |
| 1119 | 1024 | <span class="elementor-divider-separator"> |
| 1120 | 1025 | <?php if ( $has_icon ) : ?> |
| 1121 | 1026 | <div class="elementor-icon elementor-divider__element"> |
| 1122 | 1027 | <?php |
| @@ -1127,25 +1032,11 @@ | ||
| 1127 | 1032 | <?php elseif ( $has_text ) : |
| 1128 | 1033 | $this->add_inline_editing_attributes( 'text' ); |
| 1129 | 1034 | $this->add_render_attribute( 'text', [ 'class' => [ 'elementor-divider__text', 'elementor-divider__element' ] ] ); |
| 1130 | 1035 | ?> |
| 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'] ); ?>> | |
| 1036 | + <span <?php echo $this->get_render_attribute_string( 'text' ); ?>><?php echo $settings['text']; ?></span> | |
| 1136 | 1037 | <?php endif; ?> |
| 1137 | 1038 | </span> |
| 1138 | 1039 | </div> |
| 1139 | 1040 | <?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 | 1041 | } |
| 1151 | 1042 | } |