$title ) { if ( $key == 'menu_locations' ) { add_submenu_page( 'maxmegamenu', __( 'Max Mega Menu', 'megamenu' ) . ' - ' . $title, $title, $capability, 'maxmegamenu', array( $this, 'page' ) ); } else { add_submenu_page( 'maxmegamenu', __( 'Max Mega Menu', 'megamenu' ) . ' - ' . $title, $title, $capability, 'maxmegamenu_' . $key, array( $this, 'page' ) ); } } } /** * Main settings page wrapper. * * @since 1.4 */ public function page() { $tab = isset( $_GET['page'] ) ? substr( $_GET['page'], 12 ) : false; // backwards compatibility if ( isset( $_GET['tab'] ) ) { $tab = $_GET['tab']; } if ( ! $tab ) { $tab = 'menu_locations'; } $header_links = apply_filters( 'megamenu_header_links', array( 'homepage' => array( 'url' => 'https://www.megamenu.com/?utm_source=free&utm_medium=settings&utm_campaign=pro', 'target' => '_mmmpro', 'text' => __( 'Homepage', 'megamenu' ), 'class' => '', ), 'documentation' => array( 'url' => 'https://www.megamenu.com/documentation/installation/?utm_source=free&utm_medium=settings&utm_campaign=pro', 'text' => __( 'Documentation', 'megamenu' ), 'target' => '_mmmpro', 'class' => '', ), 'troubleshooting' => array( 'url' => 'https://www.megamenu.com/articles/troubleshooting/?utm_source=free&utm_medium=settings&utm_campaign=pro', 'text' => __( 'Troubleshooting', 'megamenu' ), 'target' => '_mmmpro', 'class' => '', ), ) ); if ( ! is_plugin_active( 'megamenu-pro/megamenu-pro.php' ) ) { $header_links['pro'] = array( 'url' => 'https://www.megamenu.com/upgrade/?utm_source=free&utm_medium=settings&utm_campaign=pro', 'target' => '_mmmpro', 'text' => __( 'Upgrade to Pro', 'megamenu' ), 'class' => 'mega-highlight', ); } $versions = apply_filters( 'megamenu_versions', array( 'core' => array( 'version' => MEGAMENU_VERSION, 'text' => __( 'Core version', 'megamenu' ), ), 'pro' => array( 'version' => "not installed", 'text' => __( 'Pro extension', 'megamenu' ), ), ) ); ?>

$data ) { echo $data['text'] . ': ' . $data['version'] . ''; $count = $count + 1; if ( $total > 0 && $count != $total ) { echo $separator; } } ?>
"; var_dump( get_option("megamenu_settings") ); echo ""; } ?>
    $title ) { $class = $tab == $key ? 'active' : ''; if ( $key == 'menu_locations' ) { $args = array( 'page' => 'maxmegamenu' ); } else { $args = array( 'page' => 'maxmegamenu_' . $key ); } $url = esc_url( add_query_arg( $args, admin_url( 'admin.php' ) ) ); echo "
  • {$title}
  • "; } ?>
print_messages(); ?>
" . __( 'Please enable Dashicons in the Clearfy plugin options. Max Mega Menu requires Dashicons.', 'megamenu' ) . '

'; } } } do_action( 'megamenu_print_messages' ); } /** * Enqueue admin scripts * * @since 1.8.3 */ public function enqueue_scripts( $hook ) { wp_deregister_style( 'select2' ); wp_deregister_script( 'select2' ); wp_enqueue_style( 'select2', MEGAMENU_BASE_URL . 'js/select2/select2.css', false, MEGAMENU_VERSION ); wp_enqueue_script( 'mega-menu-select2', MEGAMENU_BASE_URL . 'js/select2/select2.min.js', array(), MEGAMENU_VERSION ); wp_enqueue_style( 'mega-menu-settings', MEGAMENU_BASE_URL . 'css/admin/admin.css', false, MEGAMENU_VERSION ); wp_enqueue_style( 'mega-colorpicker', MEGAMENU_BASE_URL . 'js/colorpicker/colorpicker.css', false, MEGAMENU_VERSION ); wp_enqueue_script( 'mega-colorpicker', MEGAMENU_BASE_URL . 'js/colorpicker/colorpicker.js', array( 'jquery' ), MEGAMENU_VERSION ); wp_localize_script( 'spectrum', 'megamenu_spectrum_settings', apply_filters( 'megamenu_spectrum_localisation', array() ) ); wp_enqueue_script( 'mega-menu-theme-editor', MEGAMENU_BASE_URL . 'js/settings.js', array( 'jquery', 'mega-colorpicker', 'code-editor' ), MEGAMENU_VERSION ); wp_localize_script( 'mega-menu-theme-editor', 'megamenu_settings', array( 'saving' => __( 'Saving', 'megamenu' ), 'confirm' => __( 'Are you sure?', 'megamenu' ), 'theme_save_error' => __( 'Error saving theme.', 'megamenu' ), 'theme_save_error_refresh' => __( 'Please try refreshing the page.', 'megamenu' ), 'theme_save_error_exhausted' => __( 'The server ran out of memory whilst trying to regenerate the menu CSS.', 'megamenu' ), 'theme_save_error_memory_limit' => __( 'Try disabling unusued plugins to increase the available memory. Alternatively, for details on how to increase your server memory limit see:', 'megamenu' ), 'theme_save_error_500' => __( 'The server returned a 500 error. The server did not provide an error message (you should find details of the error in your server error log), but this is usually due to your server memory limit being reached.', 'megamenu' ), 'increase_memory_limit_url' => 'http://www.wpbeginner.com/wp-tutorials/fix-wordpress-memory-exhausted-error-increase-php-memory/', 'increase_memory_limit_anchor_text' => 'How to increase the WordPress memory limit', ) ); if ( function_exists( 'wp_enqueue_code_editor' ) ) { wp_deregister_style( 'codemirror' ); wp_deregister_script( 'codemirror' ); $cm_settings['codeEditor'] = wp_enqueue_code_editor( array( 'type' => 'text/x-scss' ) ); wp_localize_script( 'mega-menu-theme-editor', 'cm_settings', $cm_settings ); wp_enqueue_style( 'wp-codemirror' ); } } } endif;