PluginProbe
Elementor Website Builder – more than just a page builder / 3.2.0
Elementor Website Builder – more than just a page builder v3.2.0
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
← All changes | includes/widgets/toggle.php +65 -19 3.1.43.2.0 View file →
@@ -223,8 +223,17 @@
223 223 'separator' => 'before',
224 224 ]
225 225 );
226 226
227 + $this->add_control(
228 + 'faq_schema',
229 + [
230 + 'label' => __( 'FAQ Schema', 'elementor' ),
231 + 'type' => Controls_Manager::SWITCHER,
232 + 'separator' => 'before',
233 + ]
234 + );
235 +
227 236 $this->end_controls_section();
228 237
229 238 $this->start_controls_section(
230 239 'section_toggle_style',
@@ -245,10 +254,10 @@
245 254 'max' => 10,
246 255 ],
247 256 ],
248 257 'selectors' => [
249 - '{{WRAPPER}} .elementor-toggle .elementor-tab-title' => 'border-width: {{SIZE}}{{UNIT}};',
250 - '{{WRAPPER}} .elementor-toggle .elementor-tab-content' => 'border-width: {{SIZE}}{{UNIT}};',
258 + '{{WRAPPER}} .elementor-tab-title' => 'border-width: {{SIZE}}{{UNIT}};',
259 + '{{WRAPPER}} .elementor-tab-content' => 'border-width: {{SIZE}}{{UNIT}};',
251 260 ],
252 261 ]
253 262 );
254 263
@@ -257,10 +266,10 @@
257 266 [
258 267 'label' => __( 'Border Color', 'elementor' ),
259 268 'type' => Controls_Manager::COLOR,
260 269 'selectors' => [
261 - '{{WRAPPER}} .elementor-toggle .elementor-tab-content' => 'border-bottom-color: {{VALUE}};',
262 - '{{WRAPPER}} .elementor-toggle .elementor-tab-title' => 'border-color: {{VALUE}};',
270 + '{{WRAPPER}} .elementor-tab-content' => 'border-bottom-color: {{VALUE}};',
271 + '{{WRAPPER}} .elementor-tab-title' => 'border-color: {{VALUE}};',
263 272 ],
264 273 ]
265 274 );
266 275
@@ -275,9 +284,9 @@
275 284 'max' => 100,
276 285 ],
277 286 ],
278 287 'selectors' => [
279 - '{{WRAPPER}} .elementor-toggle .elementor-toggle-item:not(:last-child)' => 'margin-bottom: {{SIZE}}{{UNIT}}',
288 + '{{WRAPPER}} .elementor-toggle-item:not(:last-child)' => 'margin-bottom: {{SIZE}}{{UNIT}}',
280 289 ],
281 290 ]
282 291 );
283 292
@@ -284,9 +293,9 @@
284 293 $this->add_group_control(
285 294 Group_Control_Box_Shadow::get_type(),
286 295 [
287 296 'name' => 'box_shadow',
288 - 'selector' => '{{WRAPPER}} .elementor-toggle .elementor-toggle-item',
297 + 'selector' => '{{WRAPPER}} .elementor-toggle-item',
289 298 ]
290 299 );
291 300
292 301 $this->end_controls_section();
@@ -304,9 +313,9 @@
304 313 [
305 314 'label' => __( 'Background', 'elementor' ),
306 315 'type' => Controls_Manager::COLOR,
307 316 'selectors' => [
308 - '{{WRAPPER}} .elementor-toggle .elementor-tab-title' => 'background-color: {{VALUE}};',
317 + '{{WRAPPER}} .elementor-tab-title' => 'background-color: {{VALUE}};',
309 318 ],
310 319 ]
311 320 );
312 321
@@ -342,9 +351,9 @@
342 351 $this->add_group_control(
343 352 Group_Control_Typography::get_type(),
344 353 [
345 354 'name' => 'title_typography',
346 - 'selector' => '{{WRAPPER}} .elementor-toggle .elementor-toggle-title',
355 + 'selector' => '{{WRAPPER}} .elementor-toggle-title',
347 356 'global' => [
348 357 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
349 358 ],
350 359 ]
@@ -349,8 +358,16 @@
349 358 ],
350 359 ]
351 360 );
352 361
362 + $this->add_group_control(
363 + Group_Control_Text_Shadow::get_type(),
364 + [
365 + 'name' => 'title_shadow',
366 + 'selector' => '{{WRAPPER}} .elementor-toggle-title',
367 + ]
368 + );
369 +
353 370 $this->add_responsive_control(
354 371 'title_padding',
355 372 [
356 373 'label' => __( 'Padding', 'elementor' ),
@@ -356,9 +373,9 @@
356 373 'label' => __( 'Padding', 'elementor' ),
357 374 'type' => Controls_Manager::DIMENSIONS,
358 375 'size_units' => [ 'px', 'em', '%' ],
359 376 'selectors' => [
360 - '{{WRAPPER}} .elementor-toggle .elementor-tab-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
377 + '{{WRAPPER}} .elementor-tab-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
361 378 ],
362 379 ]
363 380 );
364 381
@@ -400,10 +417,10 @@
400 417 [
401 418 'label' => __( 'Color', 'elementor' ),
402 419 'type' => Controls_Manager::COLOR,
403 420 'selectors' => [
404 - '{{WRAPPER}} .elementor-toggle .elementor-tab-title .elementor-toggle-icon i:before' => 'color: {{VALUE}};',
405 - '{{WRAPPER}} .elementor-toggle .elementor-tab-title .elementor-toggle-icon svg' => 'fill: {{VALUE}};',
421 + '{{WRAPPER}} .elementor-tab-title .elementor-toggle-icon i:before' => 'color: {{VALUE}};',
422 + '{{WRAPPER}} .elementor-tab-title .elementor-toggle-icon svg' => 'fill: {{VALUE}};',
406 423 ],
407 424 ]
408 425 );
409 426
@@ -412,10 +429,10 @@
412 429 [
413 430 'label' => __( 'Active Color', 'elementor' ),
414 431 'type' => Controls_Manager::COLOR,
415 432 'selectors' => [
416 - '{{WRAPPER}} .elementor-toggle .elementor-tab-title.elementor-active .elementor-toggle-icon i:before' => 'color: {{VALUE}};',
417 - '{{WRAPPER}} .elementor-toggle .elementor-tab-title.elementor-active .elementor-toggle-icon svg' => 'fill: {{VALUE}};',
433 + '{{WRAPPER}} .elementor-tab-title.elementor-active .elementor-toggle-icon i:before' => 'color: {{VALUE}};',
434 + '{{WRAPPER}} .elementor-tab-title.elementor-active .elementor-toggle-icon svg' => 'fill: {{VALUE}};',
418 435 ],
419 436 ]
420 437 );
421 438
@@ -430,10 +447,10 @@
430 447 'max' => 100,
431 448 ],
432 449 ],
433 450 'selectors' => [
434 - '{{WRAPPER}} .elementor-toggle .elementor-toggle-icon.elementor-toggle-icon-left' => 'margin-right: {{SIZE}}{{UNIT}};',
435 - '{{WRAPPER}} .elementor-toggle .elementor-toggle-icon.elementor-toggle-icon-right' => 'margin-left: {{SIZE}}{{UNIT}};',
451 + '{{WRAPPER}} .elementor-toggle-icon.elementor-toggle-icon-left' => 'margin-right: {{SIZE}}{{UNIT}};',
452 + '{{WRAPPER}} .elementor-toggle-icon.elementor-toggle-icon-right' => 'margin-left: {{SIZE}}{{UNIT}};',
436 453 ],
437 454 ]
438 455 );
439 456
@@ -452,9 +469,9 @@
452 469 [
453 470 'label' => __( 'Background', 'elementor' ),
454 471 'type' => Controls_Manager::COLOR,
455 472 'selectors' => [
456 - '{{WRAPPER}} .elementor-toggle .elementor-tab-content' => 'background-color: {{VALUE}};',
473 + '{{WRAPPER}} .elementor-tab-content' => 'background-color: {{VALUE}};',
457 474 ],
458 475 ]
459 476 );
460 477
@@ -463,9 +480,9 @@
463 480 [
464 481 'label' => __( 'Color', 'elementor' ),
465 482 'type' => Controls_Manager::COLOR,
466 483 'selectors' => [
467 - '{{WRAPPER}} .elementor-toggle .elementor-tab-content' => 'color: {{VALUE}};',
484 + '{{WRAPPER}} .elementor-tab-content' => 'color: {{VALUE}};',
468 485 ],
469 486 'global' => [
470 487 'default' => Global_Colors::COLOR_TEXT,
471 488 ],
@@ -475,9 +492,9 @@
475 492 $this->add_group_control(
476 493 Group_Control_Typography::get_type(),
477 494 [
478 495 'name' => 'content_typography',
479 - 'selector' => '{{WRAPPER}} .elementor-toggle .elementor-tab-content',
496 + 'selector' => '{{WRAPPER}} .elementor-tab-content',
480 497 'global' => [
481 498 'default' => Global_Typography::TYPOGRAPHY_TEXT,
482 499 ],
483 500 ]
@@ -482,8 +499,16 @@
482 499 ],
483 500 ]
484 501 );
485 502
503 + $this->add_group_control(
504 + Group_Control_Text_Shadow::get_type(),
505 + [
506 + 'name' => 'content_shadow',
507 + 'selector' => '{{WRAPPER}} .elementor-tab-content',
508 + ]
509 + );
510 +
486 511 $this->add_responsive_control(
487 512 'content_padding',
488 513 [
489 514 'label' => __( 'Padding', 'elementor' ),
@@ -489,9 +514,9 @@
489 514 'label' => __( 'Padding', 'elementor' ),
490 515 'type' => Controls_Manager::DIMENSIONS,
491 516 'size_units' => [ 'px', 'em', '%' ],
492 517 'selectors' => [
493 - '{{WRAPPER}} .elementor-toggle .elementor-tab-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
518 + '{{WRAPPER}} .elementor-tab-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
494 519 ],
495 520 ]
496 521 );
497 522
@@ -571,8 +596,29 @@
571 596 </<?php echo Utils::validate_html_tag( $settings['title_html_tag'] ); ?>>
572 597 <div <?php echo $this->get_render_attribute_string( $tab_content_setting_key ); ?>><?php echo $this->parse_text_editor( $item['tab_content'] ); ?></div>
573 598 </div>
574 599 <?php endforeach; ?>
600 + <?php
601 + if ( isset( $settings['faq_schema'] ) && 'yes' === $settings['faq_schema'] ) {
602 + $json = [
603 + '@context' => 'https://schema.org',
604 + '@type' => 'FAQPage',
605 + 'mainEntity' => [],
606 + ];
607 +
608 + foreach ( $settings['tabs'] as $index => $item ) {
609 + $json['mainEntity'][] = [
610 + '@type' => 'Question',
611 + 'name' => wp_strip_all_tags( $item['tab_title'] ),
612 + 'acceptedAnswer' => [
613 + '@type' => 'Answer',
614 + 'text' => $this->parse_text_editor( $item['tab_content'] ),
615 + ],
616 + ];
617 + }
618 + ?>
619 + <script type="application/ld+json"><?php echo wp_json_encode( $json ); ?></script>
620 + <?php } ?>
575 621 </div>
576 622 <?php
577 623 }
578 624