includes/managers/class-fs-admin-menu-manager.php
function add_counter_to_menu_item( $counter = 1, $class = '' ) {
			global $menu, $submenu;

			$mask = '%s <span class="update-plugins %s count-%3$s" aria-hidden="true"><span>%3$s<span class="screen-reader-text">%3$s notifications</span></span></span>';

			/**
			 * This method is NOT executed for WordPress.org themes.
			 * Since we maintain only one version of the SDK we added this small
			 * hack to avoid the error from Theme Check since it's a false-positive.
			 *
			 * @author Vova Feldman (@svovaf)
			 * @since  1.2.2.7
			 */
			$menu_ref    = &$menu;
			$submenu_ref = &$submenu;

			if ( $this->_is_top_level ) {
				// Find main menu item.
				$found_menu = $this->find_top_level_menu();

				if ( false !== $found_menu ) {
					// Override menu label.
					$menu_ref[ $found_menu['position'] ][0] = sprintf(
						$mask,
						$found_menu['menu'][0],
						$class,
						$counter
					);
				}
			} else {
				$found_submenu = $this->find_main_submenu();

				if ( false !== $found_submenu ) {
					// Override menu label.
					$submenu_ref[ $found_submenu['parent_slug'] ][ $found_submenu['position'] ][0] = sprintf(
						$mask,
						$found_submenu['menu'][0],
						$class,
						$counter
					);
				}
			}
		}
function add_counter_to_menu_item( $counter = 1, $class = '' ) {
			global $menu, $submenu;

			$mask = '%s <span class="update-plugins %s count-%3$s" aria-hidden="true"><span>%3$s<span class="screen-reader-text">%3$s notifications</span></span></span>';

			/**
			 * This method is NOT executed for WordPress.org themes.
			 * Since we maintain only one version of the SDK we added this small
			 * hack to avoid the error from Theme Check since it's a false-positive.
			 *
			 * @author Vova Feldman (@svovaf)
			 * @since  1.2.2.7
			 */
			$menu_ref    = &$menu;
			$submenu_ref = &$submenu;

			if ( $this->_is_top_level ) {
				// Find main menu item.
				$found_menu = $this->find_top_level_menu();

				if ( false !== $found_menu ) {
					// Override menu label.
					$menu_ref[ $found_menu['position'] ][0] = sprintf(
						$mask,
						$found_menu['menu'][0],
						$class,
						$counter
					);
				}
			} else {
				$found_submenu = $this->find_main_submenu();

				if ( false !== $found_submenu ) {
					// Override menu label.
					$submenu_ref[ $found_submenu['parent_slug'] ][ $found_submenu['position'] ][0] = sprintf(
						$mask,
						$found_submenu['menu'][0],
						$class,
						$counter
					);
				}
			}
		}
function add_counter_to_menu_item ( $ counter = 1 , $ class = '' ) { global $ menu , $ submenu ; $ mask = '%s <span class="update-plugins %s count-%3$s" aria-hidden="true"><span>%3$s<span class="screen-reader-text">%3$s notifications</span></span></span>' ; /**
			 * This method is NOT executed for WordPress.org themes.
			 * Since we maintain only one version of the SDK we added this small
			 * hack to avoid the error from Theme Check since it's a false-positive.
			 *
			 * @author Vova Feldman (@svovaf)
			 * @since  1.2.2.7
			 */ $ menu_ref = & $ menu ; $ submenu_ref = & $ submenu ; if ( $ this -> _is_top_level ) { // Find main menu item. $ found_menu = $ this -> find_top_level_menu ( ) ; if ( false !== $ found_menu ) { // Override menu label. $ menu_ref [ $ found_menu [ 'position' ] ] [ 0 ] = sprintf ( $ mask , $ found_menu [ 'menu' ] [ 0 ] , $ class , $ counter ) ; } } else { $ found_submenu = $ this -> find_main_submenu ( ) ; if ( false !== $ found_submenu ) { // Override menu label. $ submenu_ref [ $ found_submenu [ 'parent_slug' ] ] [ $ found_submenu [ 'position' ] ] [ 0 ] = sprintf ( $ mask , $ found_submenu [ 'menu' ] [ 0 ] , $ class , $ counter ) ; } } }
Adds a counter to the module's top level menu item.

@author Vova Feldman (@svovaf)
@since  1.2.1.5

@param int    $counter
@param string $class
Adds a counter to the module s top level menu item .