Astra_Ext_Advanced_Hooks_Meta::setup_meta_box()

Setup Metabox


Description


Source

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

		public function setup_meta_box() {

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

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

					if ( 'attachment' !== $type ) {
						add_meta_box(
							'advanced-hook-settings',                // Id.
							__( 'Custom Layout Settings', 'astra-addon' ), // Title.
							array( $this, 'markup_meta_box' ),      // Callback.
							$type,                                  // Post_type.
							'normal',                               // Context.
							'high'                                  // Priority.
						);
					}
				}
			}
		}

User Contributed Notes

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