PluginProbe
Elementor Website Builder – more than just a page builder / 3.32.0-dev2
Elementor Website Builder – more than just a page builder v3.32.0-dev2
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 +20 -85 4.1.33.32.0-dev2 View file →
@@ -265,10 +265,10 @@
265 265 [
266 266 'label' => esc_html__( 'Alignment', 'elementor' ),
267 267 'type' => Controls_Manager::CHOOSE,
268 268 'options' => [
269 - 'start' => [
270 - 'title' => esc_html__( 'Start', 'elementor' ),
269 + 'left' => [
270 + 'title' => esc_html__( 'Left', 'elementor' ),
271 271 'icon' => 'eicon-text-align-left',
272 272 ],
273 273 'center' => [
274 274 'title' => esc_html__( 'Center', 'elementor' ),
@@ -273,10 +273,10 @@
273 273 'center' => [
274 274 'title' => esc_html__( 'Center', 'elementor' ),
275 275 'icon' => 'eicon-text-align-center',
276 276 ],
277 - 'end' => [
278 - 'title' => esc_html__( 'End', 'elementor' ),
277 + 'right' => [
278 + 'title' => esc_html__( 'Right', 'elementor' ),
279 279 'icon' => 'eicon-text-align-right',
280 280 ],
281 281 'justify' => [
282 282 'title' => esc_html__( 'Justified', 'elementor' ),
@@ -282,13 +282,8 @@
282 282 'title' => esc_html__( 'Justified', 'elementor' ),
283 283 'icon' => 'eicon-text-align-justify',
284 284 ],
285 285 ],
286 - 'classes' => 'elementor-control-start-end',
287 - 'selectors_dictionary' => [
288 - 'left' => is_rtl() ? 'end' : 'start',
289 - 'right' => is_rtl() ? 'start' : 'end',
290 - ],
291 286 'default' => '',
292 287 'selectors' => [
293 288 '{{WRAPPER}}' => 'text-align: {{VALUE}};',
294 289 ],
@@ -459,93 +454,33 @@
459 454 // PHPCS - the variable $title_html holds safe data.
460 455 echo $title_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
461 456 }
462 457
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 458 public function maybe_add_ally_heading_hint() {
492 459 $notice_id = 'ally_heading_notice';
493 460 $plugin_slug = 'pojo-accessibility';
494 -
495 461 if ( ! Hints::should_display_hint( $notice_id ) ) {
496 462 return;
497 463 }
464 + $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 465
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 );
466 + $campaign_data = [
467 + 'name' => 'elementor_ea11y_campaign',
468 + 'campaign' => 'acc-scanner-plg-heading',
469 + 'source' => 'editor-heading-widget',
470 + 'medium' => 'editor',
471 + ];
502 472
503 - if ( $is_active ) {
504 - return;
505 - }
473 + $button_text = __( 'Install Plugin', 'elementor' );
474 + $action_url = Admin_Notices::add_plg_campaign_data( Hints::get_plugin_action_url( $plugin_slug ), $campaign_data );
506 475
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 - ];
476 + if ( Hints::is_plugin_installed( $plugin_slug ) && ! Hints::is_plugin_active( $plugin_slug ) ) {
477 + $button_text = __( 'Activate Plugin', 'elementor' );
478 + } else if ( Hints::is_plugin_active( $plugin_slug ) && empty( get_option( 'ea11y_access_token' ) ) ) {
479 + $button_text = __( 'Connect to Ally', 'elementor' );
480 + $action_url = admin_url( 'admin.php?page=accessibility-settings' );
544 481 }
545 482
546 - $notice_heading = esc_html__( 'Accessible structure matters', 'elementor' );
547 -
548 483 $this->add_control(
549 484 $notice_id,
550 485 [
551 486 'type' => Controls_Manager::RAW_HTML,
@@ -550,9 +485,9 @@
550 485 [
551 486 'type' => Controls_Manager::RAW_HTML,
552 487 'raw' => Hints::get_notice_template( [
553 488 'display' => ! Hints::is_dismissed( $notice_id ),
554 - 'heading' => $notice_heading,
489 + 'heading' => esc_html__( 'Accessible structure matters', 'elementor' ),
555 490 'type' => 'info',
556 491 'content' => $notice_content,
557 492 'icon' => true,
558 493 'dismissible' => $notice_id,
@@ -558,9 +493,9 @@
558 493 'dismissible' => $notice_id,
559 494 'button_text' => $button_text,
560 495 'button_event' => $notice_id,
561 496 'button_data' => [
562 - 'action_url' => Admin_Notices::add_plg_campaign_data( $button_url, $campaign_data ),
497 + 'action_url' => $action_url,
563 498 ],
564 499 ], true ),
565 500 ]
566 501 );