public function settings_api_init()
{
add_settings_section('cptp_setting_section', __('Permalink Settings for Custom Post Types', 'custom-post-type-permalinks'), array($this, 'setting_section_callback_function'), 'permalink');
$post_types = CPTP_Util::get_post_types();
foreach ($post_types as $post_type) {
add_settings_field($post_type . '_structure', $post_type, array($this, 'setting_structure_callback_function'), 'permalink', 'cptp_setting_section', array('label_for' => $post_type . '_structure', 'post_type' => $post_type));
register_setting('permalink', $post_type . '_structure');
}
add_settings_field('no_taxonomy_structure', __('Use custom permalink of custom taxonomy archive.', 'custom-post-type-permalinks'), array($this, 'setting_no_tax_structure_callback_function'), 'permalink', 'cptp_setting_section', array('label_for' => 'no_taxonomy_structure'));
register_setting('permalink', 'no_taxonomy_structure');
add_settings_field('add_post_type_for_tax', __('Add <code>post_type</code> query for custom taxonomy archive.', 'custom-post-type-permalinks'), array($this, 'add_post_type_for_tax_callback_function'), 'permalink', 'cptp_setting_section', array('label_for' => 'add_post_type_for_tax'));
register_setting('permalink', 'no_taxonomy_structure');
}