original_string: public static function _add_icon( $title, $id ) {
  		$meta = Menu_Icons_Meta::get( $id );
  		$icon = self::get_icon( $meta );
  
  		if ( empty( $icon ) ) {
  			return $title;
  		}
  
  		$title_class   = ! empty( $meta['hide_label'] ) ? self::$hidden_label_class : '';
  		$title_wrapped = sprintf(
  			'<span%s>%s</span>',
  			( ! empty( $title_class ) ) ? sprintf( ' class="%s"', esc_attr( $title_class ) ) : '',
  			$title
  		);
  
  		if ( 'after' === $meta['position'] ) {
  			$title_with_icon = "{$title_wrapped}{$icon}";
  		} else {
  			$title_with_icon = "{$icon}{$title_wrapped}";
  		}
  
  		/**
  		 * Allow plugins/themes to override menu item markup
  		 *
  		 * @since 0.8.0
  		 *
  		 * @param string  $title_with_icon Menu item markup after the icon is added.
  		 * @param integer $id              Menu item ID.
  		 * @param array   $meta            Menu item metadata values.
  		 * @param string  $title           Original menu item title.
  		 *
  		 * @return string
  		 */
  		$title_with_icon = apply_filters( 'menu_icons_item_title', $title_with_icon, $id, $meta, $title );
  
  		return $title_with_icon;
  	}
code: public static function _add_icon( $title, $id ) {
  		$meta = Menu_Icons_Meta::get( $id );
  		$icon = self::get_icon( $meta );
  
  		if ( empty( $icon ) ) {
  			return $title;
  		}
  
  		$title_class   = ! empty( $meta['hide_label'] ) ? self::$hidden_label_class : '';
  		$title_wrapped = sprintf(
  			'<span%s>%s</span>',
  			( ! empty( $title_class ) ) ? sprintf( ' class="%s"', esc_attr( $title_class ) ) : '',
  			$title
  		);
  
  		if ( 'after' === $meta['position'] ) {
  			$title_with_icon = "{$title_wrapped}{$icon}";
  		} else {
  			$title_with_icon = "{$icon}{$title_wrapped}";
  		}
  
  		/**
  		 * Allow plugins/themes to override menu item markup
  		 *
  		 * @since 0.8.0
  		 *
  		 * @param string  $title_with_icon Menu item markup after the icon is added.
  		 * @param integer $id              Menu item ID.
  		 * @param array   $meta            Menu item metadata values.
  		 * @param string  $title           Original menu item title.
  		 *
  		 * @return string
  		 */
  		$title_with_icon = apply_filters( 'menu_icons_item_title', $title_with_icon, $id, $meta, $title );
  
  		return $title_with_icon;
  	}
code_tokens: public static function _add_icon ( $ title , $ id ) { $ meta = Menu_Icons_Meta :: get ( $ id ) ; $ icon = self :: get_icon ( $ meta ) ; if ( empty ( $ icon ) ) { return $ title ; } $ title_class = ! empty ( $ meta [ 'hide_label' ] ) ? self :: $ hidden_label_class : '' ; $ title_wrapped = sprintf ( '<span%s>%s</span>' , ( ! empty ( $ title_class ) ) ? sprintf ( ' class="%s"' , esc_attr ( $ title_class ) ) : '' , $ title ) ; if ( 'after' === $ meta [ 'position' ] ) { $ title_with_icon = "{$title_wrapped}{$icon}" ; } else { $ title_with_icon = "{$icon}{$title_wrapped}" ; } /**
  		 * Allow plugins/themes to override menu item markup
  		 *
  		 * @since 0.8.0
  		 *
  		 * @param string  $title_with_icon Menu item markup after the icon is added.
  		 * @param integer $id              Menu item ID.
  		 * @param array   $meta            Menu item metadata values.
  		 * @param string  $title           Original menu item title.
  		 *
  		 * @return string
  		 */ $ title_with_icon = apply_filters ( 'menu_icons_item_title' , $ title_with_icon , $ id , $ meta , $ title ) ; return $ title_with_icon ; }
docstring: Add icon to menu item title
  
  @since   0.1.0
  @since   0.9.0   Renamed the method to `add_icon()`.
  @wp_hook filter  the_title
  @param   string  $title     Menu item title.
  @param   int     $id        Menu item ID.
  
  @return string
docstring_tokens: Add icon to menu item title