Astra_Ext_Advanced_Headers_Meta::setup_meta_box()

Setup Metabox


Description


Source

File: addons/advanced-headers/classes/class-astra-ext-advanced-headers-meta.php

		public function setup_meta_box() {

			// Get all posts.
			$post_types = get_post_types();

			if ( 'astra_adv_header' == get_post_type() ) {
				// Enable for all posts.
				foreach ( $post_types as $type ) {

					if ( 'attachment' !== $type ) {
						add_meta_box(
							'astra_advanced_headers_settings',              // Id.
							__( 'Page Headers Settings', 'astra-addon' ), // Title.
							array( $this, 'markup_meta_box' ),    // Callback.
							$type,                                // Post_type.
							'normal',                               // Context.
							'default'                             // Priority.
						);
					}
				}
			}
		}

User Contributed Notes

You must log in before being able to contribute a note or feedback.