public static function get_icon_style( $meta, $keys, $as_attribute = true ) {
		$style_a = array();
		$style_s = '';

		foreach ( $keys as $key ) {
			if ( ! isset( self::$default_style[ $key ] ) ) {
				continue;
			}

			$rule = self::$default_style[ $key ];

			if ( ! isset( $meta[ $key ] ) || $meta[ $key ] === $rule['value'] ) {
				continue;
			}

			$value = $meta[ $key ];
			if ( ! empty( $rule['unit'] ) ) {
				$value .= $rule['unit'];
			}

			$style_a[ $rule['property'] ] = $value;
		}

		if ( empty( $style_a ) ) {
			return $style_s;
		}

		foreach ( $style_a as $key => $value ) {
			$style_s .= "{$key}:{$value};";
		}

		$style_s = esc_attr( $style_s );

		if ( $as_attribute  ) {
			$style_s = sprintf( ' style="%s"', $style_s );
		}

		return $style_s;
	}
public static function get_icon_style( $meta, $keys, $as_attribute = true ) {
		$style_a = array();
		$style_s = '';

		foreach ( $keys as $key ) {
			if ( ! isset( self::$default_style[ $key ] ) ) {
				continue;
			}

			$rule = self::$default_style[ $key ];

			if ( ! isset( $meta[ $key ] ) || $meta[ $key ] === $rule['value'] ) {
				continue;
			}

			$value = $meta[ $key ];
			if ( ! empty( $rule['unit'] ) ) {
				$value .= $rule['unit'];
			}

			$style_a[ $rule['property'] ] = $value;
		}

		if ( empty( $style_a ) ) {
			return $style_s;
		}

		foreach ( $style_a as $key => $value ) {
			$style_s .= "{$key}:{$value};";
		}

		$style_s = esc_attr( $style_s );

		if ( $as_attribute  ) {
			$style_s = sprintf( ' style="%s"', $style_s );
		}

		return $style_s;
	}
public static function get_icon_style ( $ meta , $ keys , $ as_attribute = true ) { $ style_a = array ( ) ; $ style_s = '' ; foreach ( $ keys as $ key ) { if ( ! isset ( self :: $ default_style [ $ key ] ) ) { continue ; } $ rule = self :: $ default_style [ $ key ] ; if ( ! isset ( $ meta [ $ key ] ) || $ meta [ $ key ] === $ rule [ 'value' ] ) { continue ; } $ value = $ meta [ $ key ] ; if ( ! empty ( $ rule [ 'unit' ] ) ) { $ value .= $ rule [ 'unit' ] ; } $ style_a [ $ rule [ 'property' ] ] = $ value ; } if ( empty ( $ style_a ) ) { return $ style_s ; } foreach ( $ style_a as $ key => $ value ) { $ style_s .= "{$key}:{$value};" ; } $ style_s = esc_attr ( $ style_s ) ; if ( $ as_attribute ) { $ style_s = sprintf ( ' style="%s"' , $ style_s ) ; } return $ style_s ; }
Get icon style

@since  0.9.0
@param  array   $meta         Menu item meta value.
@param  array   $keys         Style properties.
@param  bool    $as_attribute Optional. Whether to output the style as HTML attribute or value only.
Defaults to TRUE.
@return string
Get icon style