Making WordPress.org

Changeset 777


Ignore:
Timestamp:
08/01/2014 06:51:13 AM (10 years ago)
Author:
coffee2code
Message:

Code Reference: remove no longer necessary breadcrumb 'handbook' removal hack

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/functions.php

    r775 r777  
    6969
    7070    add_filter( 'breadcrumb_trail_items',  __NAMESPACE__ . '\\breadcrumb_trail_items', 10, 2 );
    71     add_filter( 'breadcrumb_trail_items',  __NAMESPACE__ . '\\breadcrumb_trail_remove_handbook', 10, 2 );
    7271
    7372    treat_comments_as_examples();
     
    101100    // Unset the last element since it shifted up in trail hierarchy
    102101    unset( $items[4] );
    103 
    104     return $items;
    105 }
    106 
    107 /**
    108  * Removes the 'Handbook' segment of the breakcrumb, when present.
    109  *
    110  * There is no handbook page or listing at present.
    111  *
    112  * @param  array $items The breadcrumb trail items
    113  * @param  array $args  Original arg
    114  * @return array
    115  */
    116 function breadcrumb_trail_remove_handbook( $items, $args ) {
    117     if ( false !== strpos( $items[1], '>Handbook</a>' ) ) {
    118         array_splice( $items, 1, 1 );
    119     }
    120102
    121103    return $items;
Note: See TracChangeset for help on using the changeset viewer.