@@ 17-23 (lines=7) @@ | ||
14 | ||
15 | global $wp_version; |
|
16 | ||
17 | if ( is_admin() ) { |
|
18 | add_action( 'admin_footer-nav-menus.php', array( $this, 'update_menus_edited' ) ); |
|
19 | add_action( 'wp_ajax_menu-locations-save', array( $this, 'update_menus_edited' ), 0 ); |
|
20 | add_action( 'wp_ajax_customize_save', array( $this, 'customize_save' ), 0 ); |
|
21 | ||
22 | return; |
|
23 | } |
|
24 | ||
25 | add_filter( 'pre_wp_nav_menu', array( $this, 'pre_wp_nav_menu' ), 10, 2 ); |
|
26 | add_filter( 'wp_nav_menu_objects', array( $this, 'wp_nav_menu_objects' ) ); |
|
@@ 38-44 (lines=7) @@ | ||
35 | */ |
|
36 | public function disable() { |
|
37 | ||
38 | if ( is_admin() ) { |
|
39 | remove_action( 'admin_footer-nav-menus.php', array( $this, 'update_menus_edited' ) ); |
|
40 | remove_action( 'wp_ajax_menu-locations-save', array( $this, 'update_menus_edited' ), 0 ); |
|
41 | remove_action( 'wp_ajax_customize_save', array( $this, 'customize_save' ), 0 ); |
|
42 | ||
43 | return; |
|
44 | } |
|
45 | ||
46 | remove_filter( 'pre_wp_nav_menu', array( $this, 'pre_wp_nav_menu' ), 10 ); |
|
47 | remove_filter( 'wp_nav_menu_objects', array( $this, 'wp_nav_menu_objects' ) ); |