PluginProbe
WP Ultimate Post Grid / 2.8.0
WP Ultimate Post Grid v2.8.0
4.1.1 trunk 1.5 1.6 1.7 1.7.1 1.7.2 1.8 1.9 2.0 2.1 2.2 2.3 2.4.0 2.5.0 2.6.0 2.7.0 2.8.0 2.8.2 3.0.0 3.3.0 3.4.0 3.5.0 3.6.0 3.7.0 All 32 releases
wp-ultimate-post-grid / helpers / meta_box.php

meta_box.php in WP Ultimate Post Grid 2.8.0, at helpers/meta_box.php

229 lines 6.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 class WPUPG_Meta_Box {
4
5 public function __construct()
6 {
7 add_action( 'admin_init', array( $this, 'add_meta_box' ), 10 );
8 add_action( 'admin_init', array( $this, 'add_meta_box_general' ), 11 );
9 add_action( 'admin_init', array( $this, 'add_meta_box_data_source' ), 12 );
10 add_action( 'admin_init', array( $this, 'add_meta_box_filter' ), 14 );
11 add_action( 'admin_init', array( $this, 'add_meta_box_grid' ), 16 );
12 add_action( 'admin_init', array( $this, 'add_meta_box_pagination' ), 18 );
13 }
14
15 public function add_meta_box()
16 {
17 add_meta_box(
18 'wpupg_meta_box_shortcode',
19 __( 'Shortcode', 'wp-ultimate-post-grid' ),
20 array( $this, 'meta_box_shortcode' ),
21 WPUPG_POST_TYPE,
22 'side',
23 'high'
24 );
25
26 if( !WPUltimatePostGrid::is_premium_active() ) {
27 add_meta_box(
28 'wpupg_meta_box_premium_only',
29 __( 'Premium Only', 'wp-ultimate-post-grid' ),
30 array( $this, 'meta_box_premium_only' ),
31 WPUPG_POST_TYPE,
32 'side',
33 'default'
34 );
35 }
36 }
37
38 public function add_meta_box_general()
39 {
40 add_meta_box(
41 'wpupg_meta_box_general',
42 __( 'General', 'wp-ultimate-post-grid' ),
43 array( $this, 'meta_box_general' ),
44 WPUPG_POST_TYPE,
45 'normal',
46 'high'
47 );
48 }
49
50 public function add_meta_box_data_source()
51 {
52 add_meta_box(
53 'wpupg_meta_box_data_source',
54 __( 'Data Source', 'wp-ultimate-post-grid' ),
55 array( $this, 'meta_box_data_source' ),
56 WPUPG_POST_TYPE,
57 'normal',
58 'high'
59 );
60
61 add_meta_box(
62 'wpupg_meta_box_data_source_terms',
63 __( 'Data Source', 'wp-ultimate-post-grid' ),
64 array( $this, 'meta_box_data_source_terms' ),
65 WPUPG_POST_TYPE,
66 'normal',
67 'high'
68 );
69
70 add_meta_box(
71 'wpupg_meta_box_limit_posts',
72 __( 'Limit Items', 'wp-ultimate-post-grid' ),
73 array( $this, 'meta_box_limit_posts' ),
74 WPUPG_POST_TYPE,
75 'normal',
76 'high'
77 );
78
79 add_meta_box(
80 'wpupg_meta_box_limit_terms',
81 __( 'Limit Terms', 'wp-ultimate-post-grid' ),
82 array( $this, 'meta_box_limit_terms' ),
83 WPUPG_POST_TYPE,
84 'normal',
85 'high'
86 );
87 }
88
89 public function add_meta_box_filter()
90 {
91 add_meta_box(
92 'wpupg_meta_box_filter',
93 __( 'Filter', 'wp-ultimate-post-grid' ),
94 array( $this, 'meta_box_filter' ),
95 WPUPG_POST_TYPE,
96 'normal',
97 'high'
98 );
99
100 add_meta_box(
101 'wpupg_meta_box_text_filter',
102 __( 'Text Search Filter', 'wp-ultimate-post-grid' ),
103 array( $this, 'meta_box_text_filter' ),
104 WPUPG_POST_TYPE,
105 'normal',
106 'high'
107 );
108
109 add_meta_box(
110 'wpupg_meta_box_isotope_filter',
111 __( 'Isotope Filter', 'wp-ultimate-post-grid' ),
112 array( $this, 'meta_box_isotope_filter' ),
113 WPUPG_POST_TYPE,
114 'normal',
115 'high'
116 );
117 }
118
119 public function add_meta_box_grid()
120 {
121 add_meta_box(
122 'wpupg_meta_box_grid',
123 __( 'Grid', 'wp-ultimate-post-grid' ),
124 array( $this, 'meta_box_grid' ),
125 WPUPG_POST_TYPE,
126 'normal',
127 'high'
128 );
129 }
130
131 public function add_meta_box_pagination()
132 {
133 add_meta_box(
134 'wpupg_meta_box_pagination',
135 __( 'Pagination', 'wp-ultimate-post-grid' ),
136 array( $this, 'meta_box_pagination' ),
137 WPUPG_POST_TYPE,
138 'normal',
139 'high'
140 );
141
142 add_meta_box(
143 'wpupg_meta_box_pagination_style',
144 __( 'Pagination Style', 'wp-ultimate-post-grid' ),
145 array( $this, 'meta_box_pagination_style' ),
146 WPUPG_POST_TYPE,
147 'normal',
148 'high'
149 );
150 }
151
152 public function meta_box_shortcode( $post )
153 {
154 $grid = WPUPG_Grid_Manager::get( $post );
155 include( WPUltimatePostGrid::get()->coreDir . '/helpers/meta_boxes/meta_box_shortcode.php' );
156 }
157
158 public function meta_box_premium_only( $post )
159 {
160 $grid = WPUPG_Grid_Manager::get( $post );
161 include( WPUltimatePostGrid::get()->coreDir . '/helpers/meta_boxes/meta_box_premium_only.php' );
162 }
163
164 public function meta_box_general( $post )
165 {
166 $grid = WPUPG_Grid_Manager::get( $post );
167 include( WPUltimatePostGrid::get()->coreDir . '/helpers/meta_boxes/meta_box_general.php' );
168 }
169
170 public function meta_box_data_source( $post )
171 {
172 $grid = WPUPG_Grid_Manager::get( $post );
173 include( WPUltimatePostGrid::get()->coreDir . '/helpers/meta_boxes/meta_box_data_source.php' );
174 }
175
176 public function meta_box_data_source_terms( $post )
177 {
178 $grid = WPUPG_Grid_Manager::get( $post );
179 include( WPUltimatePostGrid::get()->coreDir . '/helpers/meta_boxes/meta_box_data_source_terms.php' );
180 }
181
182 public function meta_box_limit_posts( $post )
183 {
184 $grid = WPUPG_Grid_Manager::get( $post );
185 include( WPUltimatePostGrid::get()->coreDir . '/helpers/meta_boxes/meta_box_limit_posts.php' );
186 }
187
188 public function meta_box_limit_terms( $post )
189 {
190 $grid = WPUPG_Grid_Manager::get( $post );
191 include( WPUltimatePostGrid::get()->coreDir . '/helpers/meta_boxes/meta_box_limit_terms.php' );
192 }
193
194 public function meta_box_filter( $post )
195 {
196 $grid = WPUPG_Grid_Manager::get( $post );
197 include( WPUltimatePostGrid::get()->coreDir . '/helpers/meta_boxes/meta_box_filter.php' );
198 }
199
200 public function meta_box_text_filter( $post )
201 {
202 $grid = WPUPG_Grid_Manager::get( $post );
203 include( WPUltimatePostGrid::get()->coreDir . '/helpers/meta_boxes/meta_box_text_filter.php' );
204 }
205
206 public function meta_box_isotope_filter( $post )
207 {
208 $grid = WPUPG_Grid_Manager::get( $post );
209 include( WPUltimatePostGrid::get()->coreDir . '/helpers/meta_boxes/meta_box_isotope_filter.php' );
210 }
211
212 public function meta_box_grid( $post )
213 {
214 $grid = WPUPG_Grid_Manager::get( $post );
215 include( WPUltimatePostGrid::get()->coreDir . '/helpers/meta_boxes/meta_box_grid.php' );
216 }
217
218 public function meta_box_pagination( $post )
219 {
220 $grid = WPUPG_Grid_Manager::get( $post );
221 include( WPUltimatePostGrid::get()->coreDir . '/helpers/meta_boxes/meta_box_pagination.php' );
222 }
223
224 public function meta_box_pagination_style( $post )
225 {
226 $grid = WPUPG_Grid_Manager::get( $post );
227 include( WPUltimatePostGrid::get()->coreDir . '/helpers/meta_boxes/meta_box_pagination_style.php' );
228 }
229 }