Enum Class TaxonomyMarker

java.lang.Object
java.lang.Enum<TaxonomyMarker>
net.ygbstudio.powerwp4j.models.taxonomies.TaxonomyMarker
All Implemented Interfaces:
Serializable, Comparable<TaxonomyMarker>, Constable, ClassMarkerEnum, FriendlyEnum

public enum TaxonomyMarker extends Enum<TaxonomyMarker> implements ClassMarkerEnum
Enum class for the WordPress cache taxonomy key markers.

A taxonomy marker is a prefix or identifier used in the 'class_list' field of a post (in the WordPress Posts JSON file) to indicate the type of taxonomy (e.g., tag, category, post type, status).

Example: "tag-python", "category-tutorial", "status-published"

These markers help extract and group related metadata from posts.

Author:
Yoham Gabriel @ YGBStudio
  • Enum Constant Details

    • TAG

      public static final TaxonomyMarker TAG
      Tag taxonomy marker.
    • CATEGORY

      public static final TaxonomyMarker CATEGORY
      Category taxonomy marker.
    • POST

      public static final TaxonomyMarker POST
      Post taxonomy marker.
    • TYPE

      public static final TaxonomyMarker TYPE
      Type taxonomy marker.
    • STATUS

      public static final TaxonomyMarker STATUS
      Status taxonomy marker.
  • Method Details

    • values

      public static TaxonomyMarker[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TaxonomyMarker valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • value

      public String value()
      Description copied from interface: FriendlyEnum
      Returns the value of the enum constant, which is the actual string to be used in the API.

      Example: If an enum constant is named STATUS_PENDING, the value returned by this method would be "pending", which is the value provided in its constructor.

      Specified by:
      value in interface FriendlyEnum
      Returns:
      the value of the enum constant