mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- fixed navmenus;
- added priority filter for modal windows in footer;
This commit is contained in:
@@ -30,13 +30,14 @@ if ( ! class_exists( 'um\admin\core\Admin_Navmenu' ) ) {
|
||||
);
|
||||
|
||||
if ( $wp_version < '5.4' ) {
|
||||
add_action( 'wp_update_nav_menu_item', array( &$this, '_save' ), 10, 3 );
|
||||
add_action( 'admin_footer-nav-menus.php', array( &$this, '_wp_template' ) );
|
||||
add_action( 'load-nav-menus.php', array( &$this, 'enqueue_nav_menus_scripts' ) );
|
||||
} else {
|
||||
add_action( 'load-customize.php', array( &$this, 'enqueue_nav_menus_scripts' ) );
|
||||
}
|
||||
|
||||
add_action( 'wp_update_nav_menu_item', array( &$this, '_save' ), 10, 3 );
|
||||
|
||||
add_action( 'wp_nav_menu_item_custom_fields', array( $this, 'wp_nav_menu_item_custom_fields' ), 20, 5 );
|
||||
//add_action( 'wp_nav_menu_item_custom_fields_customize_template', array( $this, 'wp_nav_menu_item_custom_fields_customize_template' ), 20 ); //waiting wp.org answer
|
||||
}
|
||||
|
||||
@@ -21,7 +21,15 @@ if ( ! class_exists( 'um\core\Modal' ) ) {
|
||||
* Modal constructor.
|
||||
*/
|
||||
function __construct() {
|
||||
add_action( 'wp_footer', array(&$this, 'load_modal_content' ), 9 );
|
||||
add_action( 'wp_footer', array( &$this, 'load_modal_content' ), $this->get_priority() );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
function get_priority() {
|
||||
return apply_filters( 'um_core_includes_modals_priority', 9 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user