Changeset 2856489
- Timestamp:
- 01/29/2023 01:40:38 PM (3 years ago)
- Location:
- multilevel-navigation-menu/trunk
- Files:
-
- 2 edited
-
multilevel-navigation-menu.php (modified) (23 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
multilevel-navigation-menu/trunk/multilevel-navigation-menu.php
r2672695 r2856489 6 6 * Author: Laxman Prajapati 7 7 * Author URI: https://laxmanprajapati.wordpress.com/ 8 * Version: 1.0. 78 * Version: 1.0.8 9 9 * Text Domain: multilevel-navigation-menu 10 10 * … … 23 23 * @package MultilevelNavigationMenu 24 24 * @author Laxman Prajapati 25 * @version 1.0. 725 * @version 1.0.8 26 26 */ 27 27 … … 55 55 * 56 56 */ 57 public function mnmwp_menu_selection_admin_notice() {57 public static function mnmwp_menu_selection_admin_notice() { 58 58 if ( ! has_nav_menu( 'mnmwp_register_main_menu' ) ) : 59 59 echo '<div class="notice notice-success notice-error is-dismissible"> … … 68 68 * @return void 69 69 */ 70 public function mnmwp_active_function() {70 public static function mnmwp_active_function() { 71 71 add_option( 'mnmwp-switch', 1 ); 72 72 } … … 77 77 * @return void 78 78 */ 79 public function mnmwp_activation_redirect( $plugin ) {79 public static function mnmwp_activation_redirect( $plugin ) { 80 80 if ( plugin_basename( __FILE__ ) === $plugin ) { 81 81 exit( esc_url( wp_safe_redirect( admin_url( 'themes.php?page=multilevel-navigation-menu' ) ) ) ); … … 88 88 * @return void 89 89 */ 90 public function mnmwp_assets() {90 public static function mnmwp_assets() { 91 91 wp_enqueue_style( 'wp-color-picker' ); 92 92 wp_enqueue_style( 'mnmwp-backend-css', plugin_dir_url( __FILE__ ) . 'assets/css/mnmwp-backend.css', array(), '1.0.1', false ); … … 99 99 * @return void 100 100 */ 101 public function mnmwp_frontend_assets() {101 public static function mnmwp_frontend_assets() { 102 102 wp_enqueue_style( 'mnmwp-frontend-css', plugin_dir_url( __FILE__ ) . 'assets/css/mnmwp-front.css', array(), '1.0.1', false ); 103 103 wp_enqueue_script( 'mnmwp-frontend-js', plugin_dir_url( __FILE__ ) . 'assets/js/mnmwp-front.js', array('jquery'), '1.0.1', false ); … … 109 109 * @return void 110 110 */ 111 public function mnmwp_add_menu() {111 public static function mnmwp_add_menu() { 112 112 add_theme_page( 113 113 __( 'Multilevel Navigation Menu', 'multilevel-navigation-menu' ), … … 124 124 * 125 125 */ 126 public function mnmwp_register_menu() {126 public static function mnmwp_register_menu() { 127 127 add_theme_support( 'nav-menus' ); 128 128 register_nav_menu( 'mnmwp_register_main_menu', __( 'MNM Header Menu', 'multilevel-navigation-menu' ) ); … … 134 134 * @return array 135 135 */ 136 public function mnmwp_add_link( $links ) {136 public static function mnmwp_add_link( $links ) { 137 137 return array_merge( 138 138 array( … … 150 150 * Plugin Pages 151 151 */ 152 public function mnmwp_menu_page() {152 public static function mnmwp_menu_page() { 153 153 printf( '<div class="wrap">' ); 154 154 printf( '<div class="mnmsection">' ); … … 168 168 * @return void 169 169 */ 170 public function mnmwp_setting_display() {170 public static function mnmwp_setting_display() { 171 171 /**-- Setting Page Section Title --**/ 172 172 add_settings_section( 'mnmwp_setting_section', esc_html__( '', 'multilevel-navigation-menu' ), array( __CLASS__, 'mnmwp_content_callback' ), 'multilevel-navigation-menu' ); … … 292 292 * @return void 293 293 */ 294 public function mnmwp_content_callback() {294 public static function mnmwp_content_callback() { 295 295 esc_html_e( '', 'multilevel-navigation-menu' ); 296 296 } … … 303 303 304 304 /** First Level Menu Color Field Function **/ 305 public function mnmwp_first_background_color() {305 public static function mnmwp_first_background_color() { 306 306 printf( '<input type="text" name="mnmwp-first-back-color" id="mnmwp-first-back-color" class="mnmwp-menu-color" value="%1$s" /><p class="description" id="tagline-description">Default</p>', esc_html( get_option( 'mnmwp-first-back-color' ) ) ); 307 307 printf( '<input type="text" name="mnmwp-first-back-color-hover" id="mnmwp-first-back-color-hover" class="mnmwp-menu-color" value="%1$s" /><p class="description" id="tagline-description">On Hover</p>', esc_html( get_option( 'mnmwp-first-back-color-hover' ) ) ); 308 308 printf( '<input type="text" name="mnmwp-first-back-color-active" id="mnmwp-first-back-color-active" class="mnmwp-menu-color" value="%1$s" /><p class="description" id="tagline-description">On Active</p>', esc_html( get_option( 'mnmwp-first-back-color-active' ) ) ); 309 309 } 310 public function mnmwp_first_font_color() {310 public static function mnmwp_first_font_color() { 311 311 printf( '<input type="text" name="mnmwp-first-font-color" id="mnmwp-first-font-color" class="mnmwp-menu-color" value="%1$s" /><p class="description" id="tagline-description">Default</p>', esc_html( get_option( 'mnmwp-first-font-color' ) ) ); 312 312 printf( '<input type="text" name="mnmwp-first-font-color-hover" id="mnmwp-first-font-color-hover" class="mnmwp-menu-color" value="%1$s" /><p class="description" id="tagline-description">On Hover</p>', esc_html( get_option( 'mnmwp-first-font-color-hover' ) ) ); … … 315 315 316 316 /** Second Level Menu Color Field Function **/ 317 public function mnmwp_second_background_color() {317 public static function mnmwp_second_background_color() { 318 318 printf( '<input type="text" name="mnmwp-second-back-color" id="mnmwp-second-back-color" class="mnmwp-menu-color" value="%1$s" /><p class="description" id="tagline-description">Default</p>', esc_html( get_option( 'mnmwp-second-back-color' ) ) ); 319 319 printf( '<input type="text" name="mnmwp-second-back-color-hover" id="mnmwp-second-back-color-hover" class="mnmwp-menu-color" value="%1$s" /><p class="description" id="tagline-description">On Hover</p>', esc_html( get_option( 'mnmwp-second-back-color-hover' ) ) ); 320 320 printf( '<input type="text" name="mnmwp-second-back-color-active" id="mnmwp-second-back-color-active" class="mnmwp-menu-color" value="%1$s" /><p class="description" id="tagline-description">On Active</p>', esc_html( get_option( 'mnmwp-second-back-color-active' ) ) ); 321 321 } 322 public function mnmwp_second_font_color() {322 public static function mnmwp_second_font_color() { 323 323 printf( '<input type="text" name="mnmwp-second-font-color" id="mnmwp-second-font-color" class="mnmwp-menu-color" value="%1$s" /><p class="description" id="tagline-description">Default</p>', esc_html( get_option( 'mnmwp-second-font-color' ) ) ); 324 324 printf( '<input type="text" name="mnmwp-second-font-color-hover" id="mnmwp-second-font-color-hover" class="mnmwp-menu-color" value="%1$s" /><p class="description" id="tagline-description">On Hover</p>', esc_html( get_option( 'mnmwp-second-font-color-hover' ) ) ); … … 327 327 328 328 /** Rest All Level Menu Color Field Function **/ 329 public function mnmwp_rest_background_color() {329 public static function mnmwp_rest_background_color() { 330 330 printf( '<input type="text" name="mnmwp-rest-back-color" id="mnmwp-rest-back-color" class="mnmwp-menu-color" value="%1$s" /><p class="description" id="tagline-description">Default</p>', esc_html( get_option( 'mnmwp-rest-back-color' ) ) ); 331 331 printf( '<input type="text" name="mnmwp-rest-back-color-hover" id="mnmwp-rest-back-color-hover" class="mnmwp-menu-color" value="%1$s" /><p class="description" id="tagline-description">On Hover</p>', esc_html( get_option( 'mnmwp-rest-back-color-hover' ) ) ); 332 332 printf( '<input type="text" name="mnmwp-rest-back-color-active" id="mnmwp-rest-back-color-active" class="mnmwp-menu-color" value="%1$s" /><p class="description" id="tagline-description">On Active</p>', esc_html( get_option( 'mnmwp-rest-back-color-active' ) ) ); 333 333 } 334 public function mnmwp_rest_font_color() {334 public static function mnmwp_rest_font_color() { 335 335 printf( '<input type="text" name="mnmwp-rest-font-color" id="mnmwp-rest-font-color" class="mnmwp-menu-color" value="%1$s" /><p class="description" id="tagline-description">Default</p>', esc_html( get_option( 'mnmwp-rest-font-color' ) ) ); 336 336 printf( '<input type="text" name="mnmwp-rest-font-color-hover" id="mnmwp-rest-font-color-hover" class="mnmwp-menu-color" value="%1$s" /><p class="description" id="tagline-description">On Hover</p>', esc_html( get_option( 'mnmwp-rest-font-color-hover' ) ) ); … … 339 339 340 340 /** MNM Menu Icon Field **/ 341 public function mnmwp_menu_icon_color() {341 public static function mnmwp_menu_icon_color() { 342 342 printf( '<input type="text" name="mnmwp-menu-icon-color" id="mnmwp-menu-icon-color" class="mnmwp-menu-color" value="%1$s" /><p class="description" id="tagline-description">Mobile Menu Icon Color (Default set is #333333)</p>', esc_html( get_option( 'mnmwp-menu-icon-color' ) ) ); 343 343 } 344 344 345 345 /** Navigation Menu Outer Width Function **/ 346 public function mnmwp_menu_outer_width() {346 public static function mnmwp_menu_outer_width() { 347 347 printf( '<input type="text" name="mnmwp-menu-outer-width" id="mnmwp-menu-outer-width" class="mnmwp-menu-width" value="%1$s" /><span class="description" id="mnmwp-description"> 348 348 Insert Width with "px" or "%%". (Default set is 100%%)</span>', esc_html( get_option( 'mnmwp-menu-outer-width' ) ) ); … … 350 350 351 351 /** Navigation Menu Inner Width Function **/ 352 public function mnmwp_menu_inner_width() {352 public static function mnmwp_menu_inner_width() { 353 353 printf( '<input type="text" name="mnmwp-menu-inner-width" id="mnmwp-menu-inner-width" class="mnmwp-menu-width" value="%1$s" /><span class="description" id="mnmwp-description"> 354 354 Insert Width with "px" or "%%". (Default set is 100px)</span>', esc_html( get_option( 'mnmwp-menu-inner-width' ) ) ); … … 356 356 357 357 /** Mobile Menu Breakpoint Function **/ 358 public function mnmwp_mobile_menu_breakpoint() {358 public static function mnmwp_mobile_menu_breakpoint() { 359 359 printf( '<input type="text" name="mnmwp-mobile-menu-breakpoint" id="mnmwp-mobile-menu-breakpoint" class="mnmwp-mobile-menu-breakpoint" value="%1$s" /><span class="description" id="mnmwp-description"> 360 360 Insert Breakpoint with "px". (Default set is 767px)</span>', esc_html( get_option( 'mnmwp-mobile-menu-breakpoint' ) ) ); … … 362 362 363 363 /** MNM Menu Shortcode Field **/ 364 public function mnmwp_menu_shortcode() {364 public static function mnmwp_menu_shortcode() { 365 365 printf( '<input type="text" name="mnmwp-menu-shortcode" id="mnmwp-menu-shortcode" class="mnmwp-menu-shortcode" value="<?php echo do_shortcode('[multilevel_navigation_menu]'); ?>" readonly /><span class="description" id="mnmwp-description"> 366 366 This is your shortcode.</span>', esc_html( get_option( 'mnmwp-menu-shortcode' ) ) ); … … 374 374 * @return void 375 375 */ 376 public function mnmwp_setting_element() {376 public static function mnmwp_setting_element() { 377 377 $mnmwp_enable = get_option( 'mnmwp-switch' ); 378 378 printf( '<label class="switch"><input type="checkbox" name="mnmwp-switch" id="mnmwp-switch" value="1" %1$s /><span class="slider round"></span></label><p class="description" id="tagline-description">Enable Or Disable?</p>', ( ( '0' !== $mnmwp_enable ) ? ( esc_attr( 'checked' ) ) : '' ) ); … … 384 384 * @return integer 385 385 */ 386 public function mnmwp_sanitize_checkbox( $input ) {386 public static function mnmwp_sanitize_checkbox( $input ) { 387 387 return ( '1' !== $input ) ? 0 : 1; 388 388 } … … 392 392 * 393 393 */ 394 public function mnmwp_menu_section_sc($atts){394 public static function mnmwp_menu_section_sc($atts){ 395 395 $mnmwp_menu_switch = get_option( 'mnmwp-switch' ); 396 396 -
multilevel-navigation-menu/trunk/readme.txt
r2672695 r2856489 5 5 Tags: full screen menu, navigation menu, navmenu, nav menu, menus, multilevel menu, menu, dropdown menu, mobile, responsive, shortcode, responsive menu, mobile menu 6 6 Requires at least: 4.7 7 Tested up to: 5.97 Tested up to: 6.1.1 8 8 Requires PHP: 5.6 9 9 License: GPLv2 or later … … 84 84 = 1.0.7 - 04/02/2022 = 85 85 * Fix Minor bugs. 86 87 = 1.0.8 - 29/01/2023 = 88 *Release Date - 29 January 2023* 89 * Fix Minor bugs. 90 * Tested up to PHP 8.1
Note: See TracChangeset
for help on using the changeset viewer.