<?php
/**
 * WP Function Class
 *
 * @package errigal
 * @since 1.2.0
 */

namespace Errigal\Constant;

defined( 'ABSPATH' ) || exit;

/**
 * This class is in charge of providing WordPress functions.
 *
 * @since 1.2.0
 */
class Errigal_WP_Function {
	/**
	 * Sanitise function: Escaping for HTML attributes.
	 *
	 * @since 1.2.0
	 *
	 * @link https://developer.wordpress.org/reference/functions/esc_attr/
	 *
	 * @var string
	 */
	public const ESC_ATTR = 'esc_attr';

	/**
	 * Sanitise function: Escaping for HTML blocks.
	 *
	 * @since 1.2.0
	 *
	 * @link https://developer.wordpress.org/reference/functions/esc_html/
	 *
	 * @var string
	 */
	public const ESC_HTML = 'esc_html';

	/**
	 * Sanitise function: Checks and cleans URL.
	 *
	 * @since 1.2.0
	 *
	 * @link https://developer.wordpress.org/reference/functions/esc_url/
	 *
	 * @var string
	 */
	public const ESC_URL = 'esc_url';

	/**
	 * Sanitise function: Sanitizes HTML classname to ensure it only contains valid characters.
	 *
	 * @since 1.2.0
	 *
	 * @link https://developer.wordpress.org/reference/functions/sanitize_html_class/
	 *
	 * @var string
	 */
	public const SANITIZE_HTML_CLASS = 'sanitize_html_class';

	/**
	 * Sanitise function: Sanitizes string key.
	 *
	 * @since 1.2.0
	 *
	 * @link https://developer.wordpress.org/reference/functions/sanitize_key/
	 *
	 * @var string
	 */
	public const SANITIZE_KEY = 'sanitize_key';

	/**
	 * Sanitise function: Sanitises string from user input or from database.
	 *
	 * @since 1.2.0
	 *
	 * @link https://developer.wordpress.org/reference/functions/sanitize_text_field/
	 *
	 * @var string
	 */
	public const SANITIZE_TEXT_FIELD = 'sanitize_text_field';

	/**
	 * Sanitise function: Strips all HTML from text string.
	 *
	 * @since 1.2.0
	 *
	 * @link https://developer.wordpress.org/reference/functions/wp_filter_nohtml_kses/
	 *
	 * @var string
	 */
	public const WP_FILTER_NOHTML_KSES = 'wp_filter_nohtml_kses';

	/**
	 * Sanitise function: Sanitises content for allowed HTML tags for post content.
	 *
	 * @since 1.2.0
	 *
	 * @link https://developer.wordpress.org/reference/functions/wp_kses_post/
	 *
	 * @var string
	 */
	public const WP_KSES_POST = 'wp_kses_post';
}
