| @@ -459,36 +459,8 @@ | ||
| 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 | 466 | |