PluginProbe
WP Ultimate Post Grid / 2.6.0
WP Ultimate Post Grid v2.6.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_post.php

meta_box_post.php in WP Ultimate Post Grid 2.6.0, at helpers/meta_box_post.php

38 lines 1013 B
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_Post {
4
5 public function __construct()
6 {
7 add_action( 'admin_init', array( $this, 'add_meta_box' ), 10 );
8 }
9
10 public function add_meta_box()
11 {
12 $post_types = get_post_types( '', 'objects' );
13
14 unset( $post_types[WPUPG_POST_TYPE] );
15 unset( $post_types['revision'] );
16 unset( $post_types['nav_menu_item'] );
17
18 foreach( $post_types as $post_type => $options ) {
19
20 if( !in_array( $post_type, WPUltimatePostGrid::option( 'meta_box_hide', array() ) ) ) {
21 add_meta_box(
22 'wpupg_meta_box_post',
23 'WP Ultimate Post Grid',
24 array( $this, 'meta_box_post' ),
25 $post_type,
26 'normal',
27 'high'
28 );
29 }
30 }
31
32 }
33
34 public function meta_box_post( $post )
35 {
36 include( WPUltimatePostGrid::get()->coreDir . '/helpers/meta_boxes/meta_box_post.php' );
37 }
38 }