# wp-ultimate-post-grid/1.7.1/helpers/meta_box_post.php

WP Ultimate Post Grid, version 1.7.1. 35 lines.

- Page: https://pluginprobe.com/plugins/wp-ultimate-post-grid/1.7.1/code/helpers/meta_box_post.php
- Raw: https://pluginprobe.com/plugins/wp-ultimate-post-grid/1.7.1/raw/helpers/meta_box_post.php
- Modified: 2015-09-28T03:11:54+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/wp-ultimate-post-grid/1.7.1/code/helpers/meta_box_post.php#L10-L20`.

```php
<?php

class WPUPG_Meta_Box_Post {

    public function __construct()
    {
        add_action( 'admin_init', array( $this, 'add_meta_box' ), 10 );
    }

    public function add_meta_box()
    {
        $post_types = get_post_types( '', 'objects' );

        unset( $post_types[WPUPG_POST_TYPE] );
        unset( $post_types['revision'] );
        unset( $post_types['nav_menu_item'] );

        foreach( $post_types as $post_type => $options ) {
            add_meta_box(
                'wpupg_meta_box_post',
                'WP Ultimate Post Grid',
                array( $this, 'meta_box_post' ),
                $post_type,
                'normal',
                'high'
            );
        }

    }

    public function meta_box_post( $post )
    {
        include( WPUltimatePostGrid::get()->coreDir . '/helpers/meta_boxes/meta_box_post.php' );
    }
}
```
