Yoast\WP\SEO\Bulk_Editor\Domain\Content_Types

Content_Type{} │ Yoast 1.0

This class describes a content type for the bulk editor.

Хуков нет.

Использование

$Content_Type = new Content_Type();
// use class methods

Методы

  1. public __construct( string $name, string $label, string $singular_label )
  2. public get_label()
  3. public get_name()
  4. public get_singular_label()
  5. ERROR: no method name found on line `$this->label = $label;`
  6. ERROR: no method name found on line `}`
  7. ERROR: no method name found on line `}`
  8. ERROR: no method name found on line `}`
  9. ERROR: no method name found on line ``

Код Content_Type{} Yoast 28.7

class Content_Type {

	/**
	 * The name of the content type.
	 *
	 * @var string
	 */
	private $name;

	/**
	 * The label of the content type.
	 *
	 * @var string
	 */
	private $label;

	/**
	 * The singular label of the content type.
	 *
	 * @var string
	 */
	private $singular_label;

	/**
	 * The constructor.
	 *
	 * @param string $name           The name of the content type.
	 * @param string $label          The label of the content type.
	 * @param string $singular_label The singular label of the content type.
	 */
	public function __construct( string $name, string $label, string $singular_label ) {
		$this->name           = $name;
		$this->label          = $label;
		$this->singular_label = $singular_label;
	}

	/**
	 * Gets the name of the content type.
	 *
	 * @return string The name of the content type.
	 */
	public function get_name(): string {
		return $this->name;
	}

	/**
	 * Gets the label of the content type.
	 *
	 * @return string The label of the content type.
	 */
	public function get_label(): string {
		return $this->label;
	}

	/**
	 * Gets the singular label of the content type.
	 *
	 * @return string The singular label of the content type.
	 */
	public function get_singular_label(): string {
		return $this->singular_label;
	}
}