Jetpack_RelatedPosts::print_setting_html PHP Метод

print_setting_html() публичный Метод

HTML for admin settings page.
public print_setting_html ( )
    public function print_setting_html()
    {
        $options = $this->get_options();
        $ui_settings_template = <<<EOT
<ul id="settings-reading-relatedposts-customize">
\t<li>
\t\t<label><input name="jetpack_relatedposts[show_headline]" type="checkbox" value="1" %s /> %s</label>
\t</li>
\t<li>
\t\t<label><input name="jetpack_relatedposts[show_thumbnails]" type="checkbox" value="1" %s /> %s</label>
\t</li>
</ul>
<div id='settings-reading-relatedposts-preview'>
\t%s
\t<div id="jp-relatedposts" class="jp-relatedposts"></div>
</div>
EOT;
        $ui_settings = sprintf($ui_settings_template, checked($options['show_headline'], true, false), esc_html__('Show a "Related" header to more clearly separate the related section from posts', 'jetpack'), checked($options['show_thumbnails'], true, false), esc_html__('Use a large and visually striking layout', 'jetpack'), esc_html__('Preview:', 'jetpack'));
        if (!$this->_allow_feature_toggle()) {
            $template = <<<EOT
<input type="hidden" name="jetpack_relatedposts[enabled]" value="1" />
%s
EOT;
            printf($template, $ui_settings);
        } else {
            $template = <<<EOT
<ul id="settings-reading-relatedposts">
\t<li>
\t\t<label><input type="radio" name="jetpack_relatedposts[enabled]" value="0" class="tog" %s /> %s</label>
\t</li>
\t<li>
\t\t<label><input type="radio" name="jetpack_relatedposts[enabled]" value="1" class="tog" %s /> %s</label>
\t\t%s
\t</li>
</ul>
EOT;
            printf($template, checked($options['enabled'], false, false), esc_html__('Hide related content after posts', 'jetpack'), checked($options['enabled'], true, false), esc_html__('Show related content after posts', 'jetpack'), $ui_settings);
        }
    }