Astra_Ext_Advanced_Headers_Meta::menu_highlight()

Keep the Astra menu open when editing the advanced headers.


Description

Highlights the wanted admin (sub-) menu items for the CPT.


Source

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

		public function menu_highlight() {
			global $parent_file, $submenu_file, $post_type;
			if ( 'astra_adv_header' == $post_type ) :
				$parent_file  = 'themes.php'; // phpcs:ignoreFile WordPress.WP.GlobalVariablesOverride.Prohibited
				$submenu_file = 'edit.php?post_type=astra_adv_header'; // phpcs:ignoreFile WordPress.WP.GlobalVariablesOverride.Prohibited

				/* Same display rule assign notice */
				$option = array(
					'location'  => 'ast-advanced-headers-location',
					'exclusion' => 'ast-advanced-headers-exclusion',
					'users'     => 'ast-advanced-headers-users',
				);
				Astra_Target_Rules_Fields::same_display_on_notice( 'astra_adv_header', $option );
			endif;

		}

Changelog

Changelog
Version Description
1.0.0 Introduced.


User Contributed Notes

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