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

render_checkbox() private method

Renders a checkbox element according to the given data.
private render_checkbox ( string $name, string $id, boolean $checked ) : void
$name string Name attribute value.
$id string ID attribute value.
$checked boolean Checked state.
return void
    private function render_checkbox($name, $id, $checked)
    {
        printf('<input type="checkbox" name="%1$s" value="1" id="%2$s"%3$s>', esc_attr($name), esc_attr($id), checked((bool) $checked, true, false));
    }