PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 28.2
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v28.2
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
wordpress-seo / admin / metabox / class-metabox-section-readability.php

class-metabox-section-readability.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 28.2, at admin/metabox/class-metabox-section-readability.php

47 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * WPSEO plugin file.
4 *
5 * @package WPSEO\Admin
6 */
7
8 /**
9 * Generates and displays the React root element for a metabox section.
10 */
11 class WPSEO_Metabox_Section_Readability implements WPSEO_Metabox_Section {
12
13 /**
14 * Name of the section, used as an identifier in the HTML.
15 *
16 * @var string
17 */
18 public $name = 'readability';
19
20 /**
21 * Outputs the section link.
22 *
23 * @return void
24 */
25 public function display_link() {
26 printf(
27 '<li role="presentation"><a role="tab" href="#wpseo-meta-section-%1$s" id="wpseo-meta-tab-%1$s" aria-controls="wpseo-meta-section-%1$s" class="wpseo-meta-section-link">
28 <div class="wpseo-score-icon-container" id="wpseo-readability-score-icon"></div><span>%2$s</span></a></li>',
29 esc_attr( $this->name ),
30 esc_html__( 'Readability', 'wordpress-seo' ),
31 );
32 }
33
34 /**
35 * Outputs the section content.
36 *
37 * @return void
38 */
39 public function display_content() {
40 printf(
41 '<div role="tabpanel" id="wpseo-meta-section-%1$s" aria-labelledby="wpseo-meta-tab-%1$s" tabindex="0" class="wpseo-meta-section">',
42 esc_attr( $this->name ),
43 );
44 echo '<div id="wpseo-metabox-readability-root" class="wpseo-metabox-root"></div>', '</div>';
45 }
46 }
47