Changeset 2959621
- Timestamp:
- 08/29/2023 01:01:54 AM (3 years ago)
- Location:
- menu-manager-ultra/trunk
- Files:
-
- 2 edited
-
menu-manager-ultra.php (modified) (7 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
menu-manager-ultra/trunk/menu-manager-ultra.php
r2948647 r2959621 1 1 <?php 2 3 2 /** 4 3 * Menu Manager Ultra … … 11 10 * Requires at least: 5.8 12 11 * Requires PHP: 7.0 13 * Version: 1.0. 812 * Version: 1.0.9 14 13 * Author: JK Plugins 15 14 * Text Domain: mm_ultra … … 19 18 * @package jk-plugins 20 19 */ 20 21 21 require __DIR__ . '/vendor/autoload.php'; 22 $this_dir_base_path = dirname( __FILE__ ) . DIRECTORY_SEPARATOR; 23 require_once $this_dir_base_path . 'src' . DIRECTORY_SEPARATOR . 'util' . DIRECTORY_SEPARATOR . 'constants.php'; 24 require_once $this_dir_base_path . 'src' . DIRECTORY_SEPARATOR . 'util' . DIRECTORY_SEPARATOR . 'menu-manager-array-utils.php'; 25 require_once $this_dir_base_path . DIRECTORY_SEPARATOR . 'menu-manager-routes.php'; 22 23 24 $this_dir_base_path = dirname(__FILE__). DIRECTORY_SEPARATOR; 25 26 require_once($this_dir_base_path . 'src' . DIRECTORY_SEPARATOR . 'util' . DIRECTORY_SEPARATOR . 'constants.php'); 27 require_once($this_dir_base_path . 'src' . DIRECTORY_SEPARATOR . 'util' . DIRECTORY_SEPARATOR . 'menu-manager-array-utils.php'); 28 require_once($this_dir_base_path . DIRECTORY_SEPARATOR . 'menu-manager-routes.php'); 29 26 30 add_action( 'admin_menu', 'mmultra_init_menu' ); 31 27 32 /** 28 33 * Init Admin Menu. … … 30 35 * @return void 31 36 */ 32 function mmultra_init_menu() 33 { 34 add_theme_page( 35 "Menu Manager Ultra", 36 "Menu Manager Ultra", 37 'edit_theme_options', 38 'menu-manager-ultra', 39 'mmultra_admin_page' 40 ); 37 function mmultra_init_menu() { 38 39 add_theme_page( 40 "Menu Manager Ultra", 41 "Menu Manager Ultra", 42 'edit_theme_options', 43 'menu-manager-ultra', 44 'mmultra_admin_page' 45 ); 46 41 47 } 42 48 … … 46 52 * @return void 47 53 */ 48 function mmultra_admin_page() 49 { 54 function mmultra_admin_page() { 50 55 require_once plugin_dir_path( __FILE__ ) . 'templates/app.php'; 51 56 } 52 57 53 58 add_action( 'admin_enqueue_scripts', 'mmultra_admin_enqueue_scripts' ); 59 54 60 /** 55 61 * Enqueue scripts and styles. … … 57 63 * @return void 58 64 */ 59 function mmultra_admin_enqueue_scripts() 60 { 65 function mmultra_admin_enqueue_scripts() { 61 66 wp_enqueue_style( 'mm-ultra-style', plugin_dir_url( __FILE__ ) . 'build/main.css' ); 62 67 wp_enqueue_script( 63 'mm-ultra-script', 64 plugin_dir_url( __FILE__ ) . 'build/index.js', 65 array( 'wp-element', 'wp-api-fetch' ), 66 '1.0.0', 67 true 68 'mm-ultra-script', plugin_dir_url( __FILE__ ) . 'build/index.js', 69 array('wp-element', 'wp-api-fetch'), 70 '1.0.0', true 68 71 ); 69 72 } … … 72 75 * Create custom post type for revisions 73 76 */ 74 function mmultra_custom_post_types() 75 { 76 register_post_type( 'mmu_revision', array( 77 'labels' => array( 78 'name' => __( 'Menu Revisions' ), 79 'singular_name' => __( 'Menu Revision' ), 80 ), 81 'public' => false, 82 'has_archive' => false, 83 'show_in_rest' => true, 84 ) ); 77 function mmultra_custom_post_types() { 78 79 register_post_type( 'mmu_revision', 80 array( 81 'labels' => array( 82 'name' => __( 'Menu Revisions' ), 83 'singular_name' => __( 'Menu Revision' ) 84 ), 85 'public' => false, 86 'has_archive' => false, 87 'show_in_rest' => true, 88 89 ) 90 ); 85 91 } 86 92 87 93 add_action( 'init', 'mmultra_custom_post_types' ); 94 88 95 /** 89 96 * Freemius integration code 90 97 */ 98 if ( ! function_exists( 'mmultra_fs' ) ) { 99 // Create a helper function for easy SDK access. 100 function mmultra_fs() { 101 global $mmultra_fs; 91 102 92 if ( !function_exists( 'mmultra_fs' ) ) { 93 // Create a helper function for easy SDK access. 94 function mmultra_fs() 95 { 96 global $mmultra_fs ; 97 98 if ( !isset( $mmultra_fs ) ) { 99 // Include Freemius SDK. 100 require_once dirname( __FILE__ ) . '/freemius/start.php'; 101 $mmultra_fs = fs_dynamic_init( array( 102 'id' => '11982', 103 'slug' => 'menu-manager-ultra', 104 'type' => 'plugin', 105 'public_key' => 'pk_a6319041fb80c1585655b9be45407', 106 'is_premium' => false, 107 'premium_suffix' => 'Pro', 108 'has_addons' => false, 109 'has_paid_plans' => true, 110 'trial' => array( 103 if ( ! isset( $mmultra_fs ) ) { 104 // Include Freemius SDK. 105 require_once dirname(__FILE__) . '/freemius/start.php'; 106 107 $mmultra_fs = fs_dynamic_init( array( 108 'id' => '11982', 109 'slug' => 'menu-manager-ultra', 110 'type' => 'plugin', 111 'public_key' => 'pk_a6319041fb80c1585655b9be45407', 112 'is_premium' => true, 113 'premium_suffix' => 'Pro', 114 // If your plugin is a serviceware, set this option to false. 115 'has_premium_version' => true, 116 'has_addons' => false, 117 'has_paid_plans' => true, 118 'trial' => array( 111 119 'days' => 14, 112 120 'is_require_payment' => false, 113 121 ), 114 'menu' => array( 115 'slug' => 'menu-manager-ultra', 116 'support' => false, 117 'parent' => array( 118 'slug' => 'themes.php', 122 'menu' => array( 123 'slug' => 'menu-manager-ultra', 124 'support' => false, 125 'parent' => array( 126 'slug' => 'themes.php', 127 ), 119 128 ), 120 ), 121 'is_live' => true, 122 ) ); 123 } 124 125 return $mmultra_fs; 126 } 127 128 // Init Freemius. 129 mmultra_fs(); 130 // Signal that SDK was initiated. 131 do_action( 'mmultra_fs_loaded' ); 132 function mmultra_add_licensing_helper() 133 { 134 echo '<script type="text/javascript"> 129 // Set the SDK to work in a sandbox mode (for development & testing). 130 // IMPORTANT: MAKE SURE TO REMOVE SECRET KEY BEFORE DEPLOYMENT. 131 'secret_key' => '02bde5c1c82defa33991f01dbad5f00e', 132 ) ); 133 } 134 135 return $mmultra_fs; 136 } 137 138 // Init Freemius. 139 mmultra_fs(); 140 // Signal that SDK was initiated. 141 do_action( 'mmultra_fs_loaded' ); 142 143 function mmultra_add_licensing_helper() { 144 echo '<script type="text/javascript"> 135 145 (function(){ 136 146 window.MMU = {}; 137 window.MMU.upgrade_url = ' . json_encode( mmultra_fs()->get_upgrade_url()) . ';147 window.MMU.upgrade_url = ' . json_encode(mmultra_fs()->get_upgrade_url()) . '; 138 148 window.MMU.can_use_premium_code = ' . json_encode( mmultra_fs()->can_use_premium_code() ) . '; 139 149 })(); 140 </script>' ;141 }142 143 add_action( 'admin_head', 'mmultra_add_licensing_helper');150 </script>'; 151 } 152 153 add_action('admin_head', 'mmultra_add_licensing_helper'); 144 154 } 155 156 -
menu-manager-ultra/trunk/readme.txt
r2948647 r2959621 3 3 Tags: menu, menu manager, large menu, menu edit 4 4 Requires at least: 5.8 5 Tested up to: 6. 25 Tested up to: 6.3 6 6 Requires PHP: 7.0 7 7 License: GPLv2 … … 12 12 License: GPLv3 or later 13 13 License URI: http://www.gnu.org/licenses/gpl-3.0.html 14 Stable tag: 1.0. 814 Stable tag: 1.0.9 15 15 16 16 == Description == 17 17 18 NEW FOR 2023!18 NEW! Menu Manager for sites with large or deep menus. This is a drag and drop menu manager that allows content managers to add, edit, remove, or re-order their WordPress menus. 19 19 20 20 Other plugins with similar functionality suffer from usability or crashing problems on large sites - Menu Manager Ultra solves them all!
Note: See TracChangeset
for help on using the changeset viewer.