PluginProbe ʕ •ᴥ•ʔ
Kubio AI Page Builder / trunk
Kubio AI Page Builder vtrunk
2.8.1 trunk 1.0.0 1.0.1 1.1.0 1.2.0 1.2.1 1.2.2 1.2.3 1.3.0 1.3.1 1.3.2 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.7.0 1.7.1 1.7.2 1.7.3 1.8.0 1.8.1 1.8.2 1.9.0 2.0.0 2.1.1 2.1.2 2.1.3 2.2.0 2.2.3 2.2.4 2.2.5 2.3.0 2.3.1 2.3.3 2.3.4 2.4.0 2.4.1 2.4.2 2.4.3 2.4.5 2.5.0 2.5.1 2.5.2 2.5.3 2.6.0 2.6.1 2.6.2 2.6.3 2.6.5 2.6.6 2.6.7 2.7.0 2.7.1 2.7.2 2.7.3 2.8.0
kubio / lib / menu / index.php
kubio / lib / menu Last commit date
class-kubio-menu-wallker.php 1 year ago class-wp-rest-menu-locations-controller.php 4 years ago class-wp-rest-menus-controller.php 1 year ago index.php 1 year ago locations.php 1 year ago menu-rest-controller.php 1 year ago
index.php
48 lines
1 <?php
2
3
4
5 if ( ! defined( 'ABSPATH' ) ) {
6 die( '-1' );
7 }
8
9 require_once __DIR__ . '/locations.php';
10
11
12 function kubio_register_rest_menu_location() {
13 $nav_menu_location = new WP_REST_Menu_Locations_Controller();
14 $nav_menu_location->register_routes();
15 }
16
17 function kubio_api_nav_menus_taxonomy_args( $args, $taxonomy ) {
18 if ( 'nav_menu' === $taxonomy ) {
19 $args['show_in_rest'] = true;
20 $args['rest_base'] = 'menus';
21 $args['rest_controller_class'] = 'WP_REST_Menus_Controller';
22 }
23
24 return $args;
25 }
26
27 if ( class_exists( 'WP_REST_Controller' ) ) {
28 require_once __DIR__ . '/menu-rest-controller.php';
29
30 if ( ! class_exists( 'WP_REST_Menus_Controller' ) ) {
31 require_once __DIR__ . '/class-wp-rest-menus-controller.php';
32 add_filter( 'register_taxonomy_args', 'kubio_api_nav_menus_taxonomy_args', 10, 2 );
33 }
34
35
36 if ( ! class_exists( 'WP_REST_Menu_Locations_Controller' ) ) {
37 require_once __DIR__ . '/class-wp-rest-menu-locations-controller.php';
38 add_action( 'rest_api_init', 'kubio_register_rest_menu_location' );
39 }
40
41 function kubio_register_rest_menu_controller() {
42 $nav_menu_location = new Kubio_Menu_Rest_Controller();
43 $nav_menu_location->register_routes();
44 }
45
46 add_action( 'rest_api_init', 'kubio_register_rest_menu_controller' );
47 }
48