PluginProbe
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News / 2.4.0
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News v2.4.0
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 2.3.5 2.3.6 2.4.0 2.4.1 2.4.10 2.4.11 2.4.12 2.4.13 2.4.14 2.4.15 2.4.16 2.4.17 2.4.18 2.4.19 2.4.2 2.4.20 2.4.21 All 88 releases
post-carousel / admin / views / class-sps-tools.php

class-sps-tools.php in Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News 2.4.0, at admin/views/class-sps-tools.php

103 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The main class for Settings configurations.
4 *
5 * @package Smart_Post_Show
6 * @subpackage Smart_Post_Show/admin/views
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 die; } // Cannot access pages directly.
11
12 /**
13 * Settings.
14 */
15 class SPS_Tools {
16
17 /**
18 * Create a settings page.
19 *
20 * @param string $prefix The settings.
21 * @return void
22 */
23 public static function tools( $prefix ) {
24 SP_PC::createOptions(
25 $prefix,
26 array(
27 'menu_title' => __( 'Tools', 'smart-post-show' ),
28 'menu_parent' => 'edit.php?post_type=sp_post_carousel',
29 'menu_type' => 'submenu', // menu, submenu, options, theme, etc.
30 'menu_slug' => 'pcp_tools',
31 'theme' => 'light',
32 'show_all_options' => false,
33 'show_search' => false,
34 'show_footer' => false,
35 'show_bar_menu' => false,
36 'class' => 'sp-pc-settings pcp_tools',
37 'framework_title' => __( 'Tools', 'smart-post-show' ),
38 'show_buttons' => false, // Custom show button option added for hide save button in tools page.
39 )
40 );
41
42 SP_PC::createSection(
43 $prefix,
44 array(
45 'title' => __( 'Export', 'smart-post-show' ),
46 'fields' => array(
47 array(
48 'id' => 'pcp_what_export',
49 'type' => 'radio',
50 'class' => 'pcp_what_export',
51 'title' => __( 'Choose What To Export', 'smart-post-show' ),
52 'multiple' => false,
53 'options' => array(
54 'all_shortcodes' => __( 'All Shows (Shortcodes)', 'smart-post-show' ),
55 'selected_shortcodes' => __( 'Selected Show(s)', 'smart-post-show' ),
56 ),
57 'default' => 'all_shortcodes',
58 ),
59 array(
60 'id' => 'pcp_post',
61 'class' => 'pcp_post_ids',
62 'type' => 'select',
63 'title' => ' ',
64 'options' => 'sp_post_carousel',
65 'chosen' => true,
66 'sortable' => false,
67 'multiple' => true,
68 'placeholder' => __( 'Choose show(s)', 'smart-post-show' ),
69 'query_args' => array(
70 'posts_per_page' => -1,
71 ),
72 'dependency' => array( 'pcp_what_export', '==', 'selected_shortcodes', true ),
73
74 ),
75 array(
76 'id' => 'export',
77 'class' => 'pcp_export',
78 'type' => 'button_set',
79 'title' => ' ',
80 'options' => array(
81 '' => __( 'Export', 'smart-post-show' ),
82 ),
83 ),
84 ),
85 )
86 );
87 SP_PC::createSection(
88 $prefix,
89 array(
90 'title' => __( 'Import', 'smart-post-show' ),
91 'fields' => array(
92 array(
93 'class' => 'pcp_import',
94 'type' => 'custom_import',
95 'title' => __( 'Import JSON File To Upload', 'smart-post-show' ),
96 ),
97 ),
98 )
99 );
100 }
101
102 }
103