WordPress.org

Make WordPress Core

Ticket #3595: bookmark-template.php.diff

File bookmark-template.php.diff, 1.2 KB (added by jhodgdon, 11 years ago)

Patch of wp-includes/bookmark-template.php to implement link and link category filtering

  • E:/EclipseWork/WordPressDev/wp-includes/bookmark-template.php

     
    101101                if ( '' != $rel )
    102102                        $rel = ' rel="' . $rel . '"';
    103103
    104                 $desc = attribute_escape($row->link_description);
    105                 $name = attribute_escape($row->link_name);
     104                $desc = attribute_escape(apply_filters('link_description', $row->link_description));
     105                $name = attribute_escape(apply_filters('link_title', $row->link_name));
    106106                $title = $desc;
    107107
    108108                if ( $show_updated )
     
    230230                        // Handle each category.
    231231
    232232                        // Display the category name
    233                         echo '  <li id="linkcat-' . $cat->cat_ID . '" class="linkcat"><h2>' . $cat->cat_name . "</h2>\n\t<ul>\n";
     233                        $catname = apply_filters('link_category', $cat->cat_name);
     234                        echo '  <li id="linkcat-' . $cat->cat_ID . '" class="linkcat"><h2>' . $catname . "</h2>\n\t<ul>\n";
    234235                        // Call get_links() with all the appropriate params
    235236                        get_links($cat->cat_ID, '<li>', "</li>", "\n", true, 'name', false);
    236237