← All changes
|
libraries/cmb2/includes/rest-api/CMB2_REST_Controller.php
+4
-1
6.0.1
→
6.0.3
View file →
| @@ -1,5 +1,8 @@ | ||
| 1 | 1 | <?php |
| 2 | +// Exit if accessed directly | |
| 3 | +if( !defined( 'ABSPATH' ) ) exit; | |
| 4 | + | |
| 2 | 5 | if ( ! class_exists( 'WP_REST_Controller' ) ) { |
| 3 | 6 | // Shim the WP_REST_Controller class if wp-api plugin not installed, & not in core. |
| 4 | 7 | require_once cmb2_dir( 'includes/shim/WP_REST_Controller.php' ); |
| 5 | 8 | } |
| @@ -4,9 +7,9 @@ | ||
| 4 | 7 | require_once cmb2_dir( 'includes/shim/WP_REST_Controller.php' ); |
| 5 | 8 | } |
| 6 | 9 | |
| 7 | 10 | /** |
| 8 | - * Creates CMB2 objects/fields endpoint for WordPres REST API. | |
| 11 | + * Creates CMB2 objects/fields endpoint for WordPress REST API. | |
| 9 | 12 | * Allows access to fields registered to a specific post type and more. |
| 10 | 13 | * |
| 11 | 14 | * @todo Add better documentation. |
| 12 | 15 | * @todo Research proper schema. |