Plugin Directory

Changeset 3411552


Ignore:
Timestamp:
12/05/2025 12:31:15 AM (4 months ago)
Author:
lovor
Message:

primary menu not set error fixed

Location:
page-navigation-by-menu/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • page-navigation-by-menu/trunk/index.php

    r3202461 r3411552  
    1212 * Plugin URI:
    1313 * Description:       Output navigation
    14  * Version:           1.1.0
     14 * Version:           1.1.1
    1515 * Requires at least: 4.9
    1616 * Requires PHP:      5.6
     
    4040 * @return string resulting HTML
    4141 */
    42 $primary_menu = get_nav_menu_locations()['primary'];
     42$mie_primary_menu = isset(get_nav_menu_locations()['primary']) ? get_nav_menu_locations()['primary'] : null;
    4343
    4444function get_the_pages_navigation( $menu = -1, $start_position = 0, $end_position = 0 ) {
     45    global $mie_primary_menu;
     46
    4547    if ( $menu === -1 ) {
    46         $menu = $primary_menu;
     48        if (is_null($mie_primary_menu)) {
     49            return '';
     50        }
     51        $menu = $mie_primary_menu;
    4752    };
    4853    if ( $menu ) {
  • page-navigation-by-menu/trunk/readme.txt

    r3411547 r3411552  
    55Tested up to: 6.9
    66Requires PHP: 5.6
    7 Stable tag: 1.1.0
     7Stable tag: 1.1.1
    88License: Mozilla Public License Version 2.0
    99License URI: https://www.mozilla.org/en-US/MPL/2.0
Note: See TracChangeset for help on using the changeset viewer.