# post-carousel/2.4.2/admin/views/class-sps-tools.php

Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog &amp; News, version 2.4.2. 103 lines.

- Page: https://pluginprobe.com/plugins/post-carousel/2.4.2/code/admin/views/class-sps-tools.php
- Raw: https://pluginprobe.com/plugins/post-carousel/2.4.2/raw/admin/views/class-sps-tools.php
- Modified: 2021-12-13T11:10:58+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/post-carousel/2.4.2/code/admin/views/class-sps-tools.php#L10-L20`.

```php
<?php
/**
 * The main class for Settings configurations.
 *
 * @package Smart_Post_Show
 * @subpackage Smart_Post_Show/admin/views
 */

if ( ! defined( 'ABSPATH' ) ) {
	die; } // Cannot access pages directly.

/**
 * Settings.
 */
class SPS_Tools {

	/**
	 * Create a settings page.
	 *
	 * @param string $prefix The settings.
	 * @return void
	 */
	public static function tools( $prefix ) {
		SP_PC::createOptions(
			$prefix,
			array(
				'menu_title'       => __( 'Tools', 'smart-post-show' ),
				'menu_parent'      => 'edit.php?post_type=sp_post_carousel',
				'menu_type'        => 'submenu', // menu, submenu, options, theme, etc.
				'menu_slug'        => 'pcp_tools',
				'theme'            => 'light',
				'show_all_options' => false,
				'show_search'      => false,
				'show_footer'      => false,
				'show_bar_menu'    => false,
				'class'            => 'sp-pc-settings pcp_tools',
				'framework_title'  => __( 'Tools', 'smart-post-show' ),
				'show_buttons'     => false, // Custom show button option added for hide save button in tools page.
			)
		);

		SP_PC::createSection(
			$prefix,
			array(
				'title'  => __( 'Export', 'smart-post-show' ),
				'fields' => array(
					array(
						'id'       => 'pcp_what_export',
						'type'     => 'radio',
						'class'    => 'pcp_what_export',
						'title'    => __( 'Choose What To Export', 'smart-post-show' ),
						'multiple' => false,
						'options'  => array(
							'all_shortcodes'      => __( 'All Shows (Shortcodes)', 'smart-post-show' ),
							'selected_shortcodes' => __( 'Selected Show(s)', 'smart-post-show' ),
						),
						'default'  => 'all_shortcodes',
					),
					array(
						'id'          => 'pcp_post',
						'class'       => 'pcp_post_ids',
						'type'        => 'select',
						'title'       => ' ',
						'options'     => 'sp_post_carousel',
						'chosen'      => true,
						'sortable'    => false,
						'multiple'    => true,
						'placeholder' => __( 'Choose show(s)', 'smart-post-show' ),
						'query_args'  => array(
							'posts_per_page' => -1,
						),
						'dependency'  => array( 'pcp_what_export', '==', 'selected_shortcodes', true ),

					),
					array(
						'id'      => 'export',
						'class'   => 'pcp_export',
						'type'    => 'button_set',
						'title'   => ' ',
						'options' => array(
							'' => __( 'Export', 'smart-post-show' ),
						),
					),
				),
			)
		);
		SP_PC::createSection(
			$prefix,
			array(
				'title'  => __( 'Import', 'smart-post-show' ),
				'fields' => array(
					array(
						'class' => 'pcp_import',
						'type'  => 'custom_import',
						'title' => __( 'Import JSON File To Upload', 'smart-post-show' ),
					),
				),
			)
		);
	}

}

```
