- fixed navmenus;

- added priority filter for modal windows in footer;
This commit is contained in:
nikitasinelnikov
2020-06-04 18:19:40 +03:00
parent d93dd00249
commit a41cad52e1
2 changed files with 11 additions and 2 deletions
+2 -1
View File
@@ -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
}
+9 -1
View File
@@ -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 );
}