Plugin Directory

Changeset 2500482


Ignore:
Timestamp:
03/21/2021 05:00:18 PM (5 years ago)
Author:
theandystratton
Message:

Bug fix for nav.

Location:
pagerestrict
Files:
2 edited
4 copied

Legend:

Unmodified
Added
Removed
  • pagerestrict/tags/2.5.1/pagerestrict.php

    r2500467 r2500482  
    66Author: Matt Martz & Andy Stratton
    77Author URI: http://theandystratton.com
    8 Version: 2.5.0
     8Version: 2.5.1
    99
    1010    Page Restrict is released under the GNU Lesser General Public License (LGPL)
     
    243243    return $error;
    244244}
     245
     246// avoid nav menu title filtering:
     247\add_filter( 'pre_wp_nav_menu', function( $values ){
     248    \remove_filter( 'the_title' , 'pr_page_restrict_title' , 50 );
     249    return $values;
     250});
     251
     252\add_filter( 'wp_nav_menu_items', function( $values ){
     253    \add_filter( 'the_title' , 'pr_page_restrict_title' , 50 );
     254    return $values;
     255});
  • pagerestrict/tags/2.5.1/readme.txt

    r2500467 r2500482  
    4848== Changelog ==
    4949
    50 = 2.4.0 =
     50= 2.5.1 =
     51* Added code to NOT affect the title of nav menu items. Should work on most installations.
     52
     53= 2.5.0 =
    5154* Adds the ability to restrict the page title and customize, with token replacement for the original title.
    5255
  • pagerestrict/trunk/pagerestrict.php

    r2500467 r2500482  
    66Author: Matt Martz & Andy Stratton
    77Author URI: http://theandystratton.com
    8 Version: 2.5.0
     8Version: 2.5.1
    99
    1010    Page Restrict is released under the GNU Lesser General Public License (LGPL)
     
    243243    return $error;
    244244}
     245
     246// avoid nav menu title filtering:
     247\add_filter( 'pre_wp_nav_menu', function( $values ){
     248    \remove_filter( 'the_title' , 'pr_page_restrict_title' , 50 );
     249    return $values;
     250});
     251
     252\add_filter( 'wp_nav_menu_items', function( $values ){
     253    \add_filter( 'the_title' , 'pr_page_restrict_title' , 50 );
     254    return $values;
     255});
  • pagerestrict/trunk/readme.txt

    r2500467 r2500482  
    4848== Changelog ==
    4949
    50 = 2.4.0 =
     50= 2.5.1 =
     51* Added code to NOT affect the title of nav menu items. Should work on most installations.
     52
     53= 2.5.0 =
    5154* Adds the ability to restrict the page title and customize, with token replacement for the original title.
    5255
Note: See TracChangeset for help on using the changeset viewer.