Inpsyde\MultilingualPress\Module\CustomPostTypeSupport\CustomPostTypeSupportSettingsBox::markup PHP Method

markup() public method

Returns the markup for the settings box.
Since: 3.0.0
public markup ( ) : string
return string The markup for the settings box.
    public function markup()
    {
        if (!$this->post_types) {
            return '';
        }
        $settings = (array) get_site_option('inpsyde_multilingual_cpt', []);
        $settings = empty($settings['post_types']) ? [] : (array) $settings['post_types'];
        $markup = \Inpsyde\MultilingualPress\nonce_field($this->nonce) . '<table><tbody>';
        ob_start();
        array_walk($this->post_types, [$this, 'render_table_row'], $settings);
        $markup .= ob_get_clean() . '</tbody></table>';
        return $markup;
    }