Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Untitled Snippet

class Bannerid_Metabox {

	public function __construct() {

		if ( is_admin() ) {
			add_action( 'load-post.php',     array( $this, 'init_metabox' ) );
			add_action( 'load-post-new.php', array( $this, 'init_metabox' ) );
		}

	}

	public function init_metabox() {

		add_action( 'add_meta_boxes',        array( $this, 'add_metabox' )         );
		add_action( 'save_post',             array( $this, 'save_metabox' ), 10, 2 );

	}

	public function add_metabox() {

		add_meta_box(
			'bannerid_metabox',
			__( 'Banner script ids', 'dagens_banner_system' ),
			array( $this, 'render_metabox' ),
			'ad_placements',
			'normal',
			'high'
		);

	}

	public function render_metabox( $post ) {

	}

	public function save_metabox( $post_id, $post ) {

	}

}

new Bannerid_Metabox;