| @@ -574,34 +574,5 @@ | ||
| 574 | 574 | </div> |
| 575 | 575 | </div> |
| 576 | 576 | <?php |
| 577 | 577 | } |
| 578 | - | |
| 579 | - public function render_markdown(): string { | |
| 580 | - $settings = $this->get_settings_for_display(); | |
| 581 | - $title = Utils::html_to_plain_text( $settings['title'] ?? '' ); | |
| 582 | - $inner_text = Utils::html_to_plain_text( $settings['inner_text'] ?? '' ); | |
| 583 | - $percent = $settings['percent']['size'] ?? ( $settings['percent'] ?? '' ); | |
| 584 | - | |
| 585 | - $parts = []; | |
| 586 | - | |
| 587 | - if ( ! empty( $title ) ) { | |
| 588 | - $parts[] = $title; | |
| 589 | - } | |
| 590 | - | |
| 591 | - if ( ! empty( $inner_text ) ) { | |
| 592 | - $parts[] = $inner_text; | |
| 593 | - } | |
| 594 | - | |
| 595 | - if ( empty( $parts ) && empty( $percent ) ) { | |
| 596 | - return ''; | |
| 597 | - } | |
| 598 | - | |
| 599 | - $label = implode( ' - ', $parts ); | |
| 600 | - | |
| 601 | - if ( ! empty( $percent ) ) { | |
| 602 | - return ! empty( $label ) ? $label . ': ' . $percent . '%' : $percent . '%'; | |
| 603 | - } | |
| 604 | - | |
| 605 | - return $label; | |
| 606 | - } | |
| 607 | 578 | } |