PluginProbe
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News / 2.3.6
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News v2.3.6
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-metaboxes.php

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

109 lines 2.2 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 Meta-box 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 * Smart Post Show Metaboxes.
14 */
15 class SPS_Metaboxes {
16
17 /**
18 * Layout Metabox function.
19 *
20 * @param string $prefix The meta-key for this metabox.
21 * @return void
22 */
23 public static function layout_metabox( $prefix ) {
24 SP_PC::createMetabox(
25 $prefix,
26 array(
27 'title' => __( 'Smart Post Show', 'smart-post-show' ),
28 'post_type' => 'sp_post_carousel',
29 'show_restore' => false,
30 'context' => 'normal',
31 )
32 );
33
34 SPS_Layout::section( $prefix );
35
36 }
37 /**
38 * Preview metabox.
39 *
40 * @param string $prefix The metabox main Key.
41 * @return void
42 */
43 public static function preview_metabox( $prefix ) {
44 SP_PC::createMetabox(
45 $prefix,
46 array(
47 'title' => __( 'Live Preview', 'smart-post-show' ),
48 'post_type' => 'sp_post_carousel',
49 'show_restore' => false,
50 'context' => 'normal',
51 )
52 );
53 SP_PC::createSection(
54 $prefix,
55 array(
56 'fields' => array(
57 array(
58 'type' => 'preview',
59 ),
60 ),
61 )
62 );
63 }
64 /**
65 * Option Metabox function
66 *
67 * @param string $prefix The metabox key.
68 * @return void
69 */
70 public static function option_metabox( $prefix ) {
71 SP_PC::createMetabox(
72 $prefix,
73 array(
74 'title' => __( 'View Options', 'smart-post-show' ),
75 'post_type' => 'sp_post_carousel',
76 'show_restore' => false,
77 'theme' => 'light',
78 )
79 );
80
81 SPS_FilterPost::section( $prefix );
82 SPS_Display::section( $prefix );
83 SPS_Carousel::section( $prefix );
84 SPS_DetailSettings::section( $prefix );
85 SPS_Typography::section( $prefix );
86 }
87 /**
88 * Shortcode Metabox function
89 *
90 * @param string $prefix The metabox key.
91 * @return void
92 */
93 public static function shortcode_metabox( $prefix ) {
94 SP_PC::createMetabox(
95 $prefix,
96 array(
97 'title' => __( 'How To Use', 'smart-post-show' ),
98 'post_type' => 'sp_post_carousel',
99 'context' => 'side',
100 'show_restore' => false,
101 )
102 );
103
104 SPS_Shortcode::section( $prefix );
105
106 }
107
108 }
109