components/Templates/class-pods_templates.php
public function add_metaboxes( $slug, $post = false ) {

		if ( ! empty( $post ) ) {
			if ( ! in_array( $post->post_type, array( '_pods_template' ), true ) ) {
				return;
			}
		} else {
			$screen = get_current_screen();
			if ( ! in_array( $screen->base, array( '_pods_template' ), true ) ) {
				return;
			}
		}

		$this->plugin_screen_hook_suffix[ $slug ] = $slug;

		// Required Styles for metabox
		wp_enqueue_style( $this->plugin_slug . '-view_template-styles', $this->get_url( 'assets/css/styles-view_template.css', __FILE__ ), array(), self::VERSION );

		// Required scripts for metabox
		wp_enqueue_script( 'jquery-ui-resizable' );
		wp_enqueue_script( $this->plugin_slug . '-handlebarsjs', $this->get_url( 'assets/js/handlebars2.js', __FILE__ ), array( 'jquery' ), self::VERSION, true );
		wp_enqueue_script( $this->plugin_slug . '-baldrickjs', $this->get_url( 'assets/js/jquery.baldrick3.js', __FILE__ ), array( 'jquery' ), self::VERSION, true );
		wp_enqueue_script( $this->plugin_slug . '-handlebars-baldrick', $this->get_url( 'assets/js/handlebars.baldrick2.js', __FILE__ ), array( 'jquery' ), self::VERSION, true );
		wp_enqueue_style( $this->plugin_slug . '-pod_reference-styles', $this->get_url( 'assets/css/styles-pod_reference.css', __FILE__ ), array(), self::VERSION );

		// add metabox
		add_meta_box(
			'view_template', __( 'Template', 'pods' ), array(
				$this,
				'render_metaboxes_custom',
			), '_pods_template', 'normal', 'high', array(
				'slug'   => 'view_template',
				'groups' => array(),
			)
		);
		add_meta_box(
			'pod_reference', __( 'Pod Reference', 'pods' ), array(
				$this,
				'render_metaboxes_custom',
			), '_pods_template', 'side', 'default', array(
				'slug'   => 'pod_reference',
				'groups' => array(),
			)
		);

	}
public function add_metaboxes( $slug, $post = false ) {

		if ( ! empty( $post ) ) {
			if ( ! in_array( $post->post_type, array( '_pods_template' ), true ) ) {
				return;
			}
		} else {
			$screen = get_current_screen();
			if ( ! in_array( $screen->base, array( '_pods_template' ), true ) ) {
				return;
			}
		}

		$this->plugin_screen_hook_suffix[ $slug ] = $slug;

		// Required Styles for metabox
		wp_enqueue_style( $this->plugin_slug . '-view_template-styles', $this->get_url( 'assets/css/styles-view_template.css', __FILE__ ), array(), self::VERSION );

		// Required scripts for metabox
		wp_enqueue_script( 'jquery-ui-resizable' );
		wp_enqueue_script( $this->plugin_slug . '-handlebarsjs', $this->get_url( 'assets/js/handlebars2.js', __FILE__ ), array( 'jquery' ), self::VERSION, true );
		wp_enqueue_script( $this->plugin_slug . '-baldrickjs', $this->get_url( 'assets/js/jquery.baldrick3.js', __FILE__ ), array( 'jquery' ), self::VERSION, true );
		wp_enqueue_script( $this->plugin_slug . '-handlebars-baldrick', $this->get_url( 'assets/js/handlebars.baldrick2.js', __FILE__ ), array( 'jquery' ), self::VERSION, true );
		wp_enqueue_style( $this->plugin_slug . '-pod_reference-styles', $this->get_url( 'assets/css/styles-pod_reference.css', __FILE__ ), array(), self::VERSION );

		// add metabox
		add_meta_box(
			'view_template', __( 'Template', 'pods' ), array(
				$this,
				'render_metaboxes_custom',
			), '_pods_template', 'normal', 'high', array(
				'slug'   => 'view_template',
				'groups' => array(),
			)
		);
		add_meta_box(
			'pod_reference', __( 'Pod Reference', 'pods' ), array(
				$this,
				'render_metaboxes_custom',
			), '_pods_template', 'side', 'default', array(
				'slug'   => 'pod_reference',
				'groups' => array(),
			)
		);

	}
public function add_metaboxes ( $ slug , $ post = false ) { if ( ! empty ( $ post ) ) { if ( ! in_array ( $ post -> post_type , array ( '_pods_template' ) , true ) ) { return ; } } else { $ screen = get_current_screen ( ) ; if ( ! in_array ( $ screen -> base , array ( '_pods_template' ) , true ) ) { return ; } } $ this -> plugin_screen_hook_suffix [ $ slug ] = $ slug ; // Required Styles for metabox wp_enqueue_style ( $ this -> plugin_slug . '-view_template-styles' , $ this -> get_url ( 'assets/css/styles-view_template.css' , __FILE__ ) , array ( ) , self :: VERSION ) ; // Required scripts for metabox wp_enqueue_script ( 'jquery-ui-resizable' ) ; wp_enqueue_script ( $ this -> plugin_slug . '-handlebarsjs' , $ this -> get_url ( 'assets/js/handlebars2.js' , __FILE__ ) , array ( 'jquery' ) , self :: VERSION , true ) ; wp_enqueue_script ( $ this -> plugin_slug . '-baldrickjs' , $ this -> get_url ( 'assets/js/jquery.baldrick3.js' , __FILE__ ) , array ( 'jquery' ) , self :: VERSION , true ) ; wp_enqueue_script ( $ this -> plugin_slug . '-handlebars-baldrick' , $ this -> get_url ( 'assets/js/handlebars.baldrick2.js' , __FILE__ ) , array ( 'jquery' ) , self :: VERSION , true ) ; wp_enqueue_style ( $ this -> plugin_slug . '-pod_reference-styles' , $ this -> get_url ( 'assets/css/styles-pod_reference.css' , __FILE__ ) , array ( ) , self :: VERSION ) ; // add metabox add_meta_box ( 'view_template' , __ ( 'Template' , 'pods' ) , array ( $ this , 'render_metaboxes_custom' , ) , '_pods_template' , 'normal' , 'high' , array ( 'slug' => 'view_template' , 'groups' => array ( ) , ) ) ; add_meta_box ( 'pod_reference' , __ ( 'Pod Reference' , 'pods' ) , array ( $ this , 'render_metaboxes_custom' , ) , '_pods_template' , 'side' , 'default' , array ( 'slug' => 'pod_reference' , 'groups' => array ( ) , ) ) ; }
setup meta boxes.

@param      $slug
@param bool $post

@return null
setup meta boxes .