File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * Plugin Name: Abilities API
4+ * Plugin URI: https://github.com/WordPress/abilities-api
5+ * Description: Provides a standardized API for registering and executing abilities in WordPress
6+ * Version: 0.1.0
7+ * Author: WordPress Contributors
8+ * License: GPL v2 or later
9+ * Text Domain: abilities-api
10+ *
11+ * @package Abilities_API
12+ */
13+
14+ // Prevent direct access
15+ if ( ! defined ( 'ABSPATH ' ) ) {
16+ exit ;
17+ }
18+
19+ // TODO: https://github.com/WordPress/abilities-api/pull/4/ also contains this
20+
21+ // Load plugin files
22+ require_once __DIR__ . '/src/class-wp-ability.php ' ;
23+ require_once __DIR__ . '/src/class-wp-abilities-registry.php ' ;
24+ require_once __DIR__ . '/src/abilities-api.php ' ;
25+ require_once __DIR__ . '/src/rest/class-wp-rest-abilities-init.php ' ;
26+
27+ /**
28+ * Initialize the Abilities API.
29+ *
30+ * @since 0.1.0
31+ */
32+ function abilities_api_init () {
33+ /**
34+ * Fires when the Abilities API is ready to register abilities.
35+ *
36+ * @since 0.1.0
37+ */
38+ do_action ( 'abilities_api_init ' );
39+ }
40+ add_action ( 'init ' , 'abilities_api_init ' , 0 );
You can’t perform that action at this time.
0 commit comments