PluginProbe
Elementor Website Builder – more than just a page builder / 3.34.1
Elementor Website Builder – more than just a page builder v3.34.1
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/heading.php +16 -76 4.2.0-dev23.34.1 View file →
@@ -459,93 +459,33 @@
459 459 // PHPCS - the variable $title_html holds safe data.
460 460 echo $title_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
461 461 }
462 462
463 - public function render_markdown(): string {
464 - $settings = $this->get_settings_for_display();
465 -
466 - if ( '' === $settings['title'] ) {
467 - return '';
468 - }
469 -
470 - $tag = $settings['header_size'] ?? 'h2';
471 - $level_map = [
472 - 'h1' => 1,
473 - 'h2' => 2,
474 - 'h3' => 3,
475 - 'h4' => 4,
476 - 'h5' => 5,
477 - 'h6' => 6,
478 - ];
479 - $level = $level_map[ $tag ] ?? 2;
480 - $title = Utils::html_to_plain_text( $settings['title'] );
481 -
482 - $md = str_repeat( '#', $level ) . ' ' . $title;
483 -
484 - if ( ! empty( $settings['link']['url'] ) ) {
485 - $md = str_repeat( '#', $level ) . ' [' . $title . '](' . esc_url( $settings['link']['url'] ) . ')';
486 - }
487 -
488 - return $md;
489 - }
490 -
491 463 public function maybe_add_ally_heading_hint() {
492 464 $notice_id = 'ally_heading_notice';
493 465 $plugin_slug = 'pojo-accessibility';
494 -
495 466 if ( ! Hints::should_display_hint( $notice_id ) ) {
496 467 return;
497 468 }
469 + $notice_content = esc_html__( 'Make sure your page is structured with accessibility in mind. Ally helps detect and fix common issues across your site.', 'elementor' );
498 470
499 - $one_subscription = Hints::is_plugin_connected_to_one_subscription();
500 - $is_installed = Hints::is_plugin_installed( $plugin_slug );
501 - $is_active = Hints::is_plugin_active( $plugin_slug );
471 + $campaign_data = [
472 + 'name' => 'elementor_ea11y_campaign',
473 + 'campaign' => 'acc-scanner-plg-heading',
474 + 'source' => 'editor-heading-widget',
475 + 'medium' => 'editor',
476 + ];
502 477
503 - if ( $is_active ) {
504 - return;
505 - }
478 + $button_text = __( 'Install Plugin', 'elementor' );
479 + $action_url = Admin_Notices::add_plg_campaign_data( Hints::get_plugin_action_url( $plugin_slug ), $campaign_data );
506 480
507 - if ( $one_subscription ) {
508 - if ( ! $is_installed ) {
509 - $notice_content = esc_html__( 'Want to ensure this heading is accessible? Your ONE subscription includes Ally. Install it and scan your page.', 'elementor' );
510 - $button_text = esc_html__( 'Install now', 'elementor' );
511 - $button_url = Hints::get_plugin_install_url( $plugin_slug );
512 - $campaign_data = [
513 - 'name' => 'elementor_ea11y_campaign',
514 - 'campaign' => 'acc-scanner-plg-heading-one-install',
515 - 'source' => 'editor-heading-widget-one-install',
516 - 'medium' => 'editor-one',
517 - ];
518 - } elseif ( ! $is_active ) {
519 - $notice_content = esc_html__( 'Keep your content accessible. Activate Ally, included in ONE, to scan this page.', 'elementor' );
520 - $button_text = esc_html__( 'Activate now', 'elementor' );
521 - $button_url = Hints::get_plugin_activate_url( $plugin_slug );
522 - $campaign_data = [
523 - 'name' => 'elementor_ea11y_campaign',
524 - 'campaign' => 'acc-scanner-plg-heading-one-activate',
525 - 'source' => 'editor-heading-widget-one-non-activate',
526 - 'medium' => 'editor-one',
527 - ];
528 - }
529 - } else {
530 - $notice_content = esc_html__( 'Make sure your page is structured with accessibility in mind. Ally helps detect and fix common issues across your site.', 'elementor' );
531 - if ( ! $is_installed ) {
532 - $button_text = esc_html__( 'Install now', 'elementor' );
533 - $button_url = Hints::get_plugin_install_url( $plugin_slug );
534 - } elseif ( ! $is_active ) {
535 - $button_text = esc_html__( 'Activate now', 'elementor' );
536 - $button_url = Hints::get_plugin_activate_url( $plugin_slug );
537 - }
538 - $campaign_data = [
539 - 'name' => 'elementor_ea11y_campaign',
540 - 'campaign' => 'acc-scanner-plg-heading',
541 - 'source' => 'editor-heading-widget',
542 - 'medium' => 'editor',
543 - ];
481 + if ( Hints::is_plugin_installed( $plugin_slug ) && ! Hints::is_plugin_active( $plugin_slug ) ) {
482 + $button_text = __( 'Activate Plugin', 'elementor' );
483 + } elseif ( Hints::is_plugin_active( $plugin_slug ) && empty( get_option( 'ea11y_access_token' ) ) ) {
484 + $button_text = __( 'Connect to Ally', 'elementor' );
485 + $action_url = admin_url( 'admin.php?page=accessibility-settings' );
544 486 }
545 487
546 - $notice_heading = esc_html__( 'Accessible structure matters', 'elementor' );
547 -
548 488 $this->add_control(
549 489 $notice_id,
550 490 [
551 491 'type' => Controls_Manager::RAW_HTML,
@@ -550,9 +490,9 @@
550 490 [
551 491 'type' => Controls_Manager::RAW_HTML,
552 492 'raw' => Hints::get_notice_template( [
553 493 'display' => ! Hints::is_dismissed( $notice_id ),
554 - 'heading' => $notice_heading,
494 + 'heading' => esc_html__( 'Accessible structure matters', 'elementor' ),
555 495 'type' => 'info',
556 496 'content' => $notice_content,
557 497 'icon' => true,
558 498 'dismissible' => $notice_id,
@@ -558,9 +498,9 @@
558 498 'dismissible' => $notice_id,
559 499 'button_text' => $button_text,
560 500 'button_event' => $notice_id,
561 501 'button_data' => [
562 - 'action_url' => Admin_Notices::add_plg_campaign_data( $button_url, $campaign_data ),
502 + 'action_url' => $action_url,
563 503 ],
564 504 ], true ),
565 505 ]
566 506 );