Capabilities.php
3 weeks ago
HookNames.php
3 weeks ago
HookTypes.php
3 weeks ago
MenuTypes.php
3 weeks ago
HookNames.php
40 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Named constants for WordPress action and filter hook strings used by the framework. |
| 5 | * Covers init, admin, REST, mail, and template hooks among others. |
| 6 | * Prevents typos and enables IDE autocompletion for hook registration. |
| 7 | * |
| 8 | * @package Framework |
| 9 | * @subpackage Wordpress\Constants |
| 10 | * @since 1.0.0 |
| 11 | */ |
| 12 | namespace Kirki\Framework\Wordpress\Constants; |
| 13 | |
| 14 | \defined('ABSPATH') || exit; |
| 15 | class HookNames |
| 16 | { |
| 17 | public const WP = 'wp'; |
| 18 | public const PLUGINS_LOADED = 'plugins_loaded'; |
| 19 | public const INIT = 'init'; |
| 20 | public const ADMIN_INIT = 'admin_init'; |
| 21 | public const ADMIN_NOTICES = 'admin_notices'; |
| 22 | public const REST_API_INIT = 'rest_api_init'; |
| 23 | public const ADMIN_MENU = 'admin_menu'; |
| 24 | public const ADMIN_ENQUEUE_SCRIPT = 'admin_enqueue_scripts'; |
| 25 | public const WP_ENQUEUE_SCRIPT = 'wp_enqueue_scripts'; |
| 26 | public const REGISTER_ROLE = 'register_role'; |
| 27 | public const REGISTER_TAXONOMY = 'register_taxonomy'; |
| 28 | public const REGISTER_POST_TYPE = 'register_post_type'; |
| 29 | public const AJAX_QUERY_ATTACHMENTS_ARGS = 'ajax_query_attachments_args'; |
| 30 | public const ADMIN_COMMENT_TYPES_DROPDOWN = 'admin_comment_types_dropdown'; |
| 31 | public const WP_MAIL_FROM = 'wp_mail_from'; |
| 32 | public const WP_MAIL_FROM_NAME = 'wp_mail_from_name'; |
| 33 | public const WP_PHP_MAILER_INIT = 'phpmailer_init'; |
| 34 | public const EDITABLE_ROLES = 'editable_roles'; |
| 35 | public const WP_TRASH_POST = 'wp_trash_post'; |
| 36 | public const LOGIN_REDIRECT = 'login_redirect'; |
| 37 | public const TEMPLATE_INCLUDE = 'template_include'; |
| 38 | public const GET_BLOCK_TEMPLATES = 'get_block_templates'; |
| 39 | } |
| 40 |