' . __('Keep in mind that this does not work in reverse. E.g. if commenting is disabled in your blog or your theme doesn’t have comments included for all post types not disabling them here does not automatically enabling them.', 'comments') . '
'; echo '' . __('The setting will not overwrite post (type) specific settings. If commenting is disabled for a specific post, allowing it here does not have any effect', 'comments') . '
'; echo '' . __('Comments will not be removed from your database when you disable them here.', 'comments') . '
'; } /** * content of the option to disable comments by post type * * @since 1.0.0 */ public function render_post_type_permission_callback() { /** * get all post types * @link http://codex.wordpress.org/Function_Reference/get_post_types */ $args = array( 'public' => true ); $output = 'objects'; $post_types = get_post_types($args, $output); $post_type_permissions = $this->options('disabled_post_type'); foreach ($post_types as $post_type) { $checked = isset($post_type_permissions[$post_type->name]) ? checked(1, $post_type_permissions[$post_type->name], false) : ''; echo ''; echo ''; echo ''; echo '
'; } } }