AnsPress_Admin::tax_menu_correction( string $parent_file )

Description #

Highlight the proper top level menu.

Parameters #

  • $parent_file
    string (Required) parent menu item.

Source #

File: admin/anspress-admin.php

	public static function tax_menu_correction( $parent_file ) {
		global $current_screen;
		$taxonomy = $current_screen->taxonomy;

		if ( 'question_category' === $taxonomy || 'question_tag' === $taxonomy || 'question_label' === $taxonomy || 'rank' === $taxonomy || 'badge' === $taxonomy ) {
			$parent_file = 'anspress';
		}
		return $parent_file;
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment