run(); } run_threed_menu_awesome(); // init carbon field add_action( 'after_setup_theme', 'threed_menu_awesome_crb_load' ); function threed_menu_awesome_crb_load() { require_once( 'vendor/autoload.php' ); \Carbon_Fields\Carbon_Fields::boot(); } // all themesawesome threed-menu-awesome options require plugin_dir_path( __FILE__ ) . 'threed-menu-awesome-options.php'; function threed_menu_open_body() { $threed_menu_menu_button_style_choice = carbon_get_theme_option( 'threed_menu_menu_button_style_choice' ); $threed_menu_custom_menu_label = carbon_get_theme_option( 'threed_menu_custom_menu_label' ); $threed_menu_button_menu_style = carbon_get_theme_option( 'threed_menu_button_menu_style' ); $threed_menu_btn_icon_pos = carbon_get_theme_option( 'threed_menu_btn_icon_pos' ); // menu layout $threed_menu_style_choice = carbon_get_theme_option( 'threed_menu_style_choice' ); if(!empty($threed_menu_custom_menu_label)) { $ta_3d_btn_label = esc_html($threed_menu_custom_menu_label); } else { $ta_3d_btn_label = esc_html__('Show Menu', 'threed-menu-awesome'); } ?>
add_fields( array( Field::make( 'icon', 'threed_single_menu_icon', esc_html__('Icon', 'threed-menu-awesome') ), )); } //Register Menus add_action( 'after_setup_theme', 'threed_menu_awesome_register_my_menu' ); function threed_menu_awesome_register_my_menu() { register_nav_menu( '3d-menu', esc_html__( '3D Menu', 'threed_menu_awesome' ) ); } //MAIN MENU function threed_menu_awesome_main_nav_menu(){ wp_nav_menu( array( 'theme_location' => '3d-menu', )); } $threed_menu_menu_button_style_choice = get_option( '_threed_menu_menu_button_style_choice' ); function threed_menu_awesome_custom_menu_btn($items, $args) { $threed_menu_button_menu_style = get_option( '_threed_menu_button_menu_style' ); $threed_menu_custom_menu_label = get_option( '_threed_menu_custom_menu_label' ); $threed_menu_button_menu_position_screen = get_option( '_threed_menu_button_menu_position_screen' ); if(!empty($threed_menu_custom_menu_label)) { $threed_menu_custom_menu_label = $threed_menu_custom_menu_label; } else { $threed_menu_custom_menu_label = ''; } $threed_menu_btn_icon_pos = get_option( '_threed_menu_btn_icon_pos' ); if($threed_menu_button_menu_style == 'style-1') { wp_enqueue_style( 'threed-menu-awesome-btn1', plugin_dir_url( __FILE__ ) . 'public/css/threed-menu-awesome-btn1.css', array(), '', 'all' ); $items .= ''; } elseif($threed_menu_button_menu_style == 'style-2') { wp_enqueue_style( 'threed-menu-awesome-btn2', plugin_dir_url( __FILE__ ) . 'public/css/threed-menu-awesome-btn2.css', array(), '', 'all' ); $items .= ''; } else { $items .= ''; } return $items; } if($threed_menu_menu_button_style_choice == 'wordpress-menu') { add_filter('wp_nav_menu_items', 'threed_menu_awesome_custom_menu_btn', 10, 2); } function threed_menu_awesome_menu_button_style() { $threed_menu_menu_button_style_choice = carbon_get_theme_option( 'threed_menu_menu_button_style_choice' ); $threed_menu_button_menu_style = carbon_get_theme_option( 'threed_menu_button_menu_style' ); $threed_menu_btn_icon_pos = carbon_get_theme_option( 'threed_menu_btn_icon_pos' ); $threed_menu_button_menu_position_screen = carbon_get_theme_option( 'threed_menu_button_menu_position_screen' ); $threed_menu_custom_menu_label = carbon_get_theme_option( 'threed_menu_custom_menu_label' ); if(!empty($threed_menu_custom_menu_label)) { $ta_3d_btn_label = esc_html($threed_menu_custom_menu_label); } else { $ta_3d_btn_label = ''; } if($threed_menu_menu_button_style_choice == 'manual') { if($threed_menu_button_menu_style == 'style-1') { wp_enqueue_style( 'threed-menu-awesome-btn1', plugin_dir_url( __FILE__ ) . 'public/css/threed-menu-awesome-btn1.css', array(), '', 'all' ); ?>