WordPress.org

Make WordPress Core

Ticket #3595: link-manager.php.diff

File link-manager.php.diff, 1.9 KB (added by jhodgdon, 11 years ago)

wp-admin/link-manager.php patch (see also ticket [3599 #3599]

  • E:/EclipseWork/WordPressDev/wp-admin/link-manager.php

     
    8080$select_cat = "<select name=\"cat_id\">\n";
    8181$select_cat .= '<option value="all"'  . (($cat_id == 'all') ? " selected='selected'" : '') . '>' . __('All') . "</option>\n";
    8282foreach ((array) $categories as $cat)
    83         $select_cat .= '<option value="' . $cat->cat_ID . '"' . (($cat->cat_ID == $cat_id) ? " selected='selected'" : '') . '>' . wp_specialchars($cat->cat_name) . "</option>\n";
     83        $select_cat .= '<option value="' . $cat->cat_ID . '"' . (($cat->cat_ID == $cat_id) ? " selected='selected'" : '') . '>' . wp_specialchars(apply_filters('link_category', $cat->cat_name)) . "</option>\n";
    8484$select_cat .= "</select>\n";
    8585
    8686$select_order = "<select name=\"order_by\">\n";
     
    131131        <tbody id="the-list">
    132132<?php
    133133        foreach ($links as $link) {
    134                 $link->link_name = attribute_escape($link->link_name);
    135                 $link->link_description = wp_specialchars($link->link_description);
     134                $link->link_name = attribute_escape(apply_filters('link_title', $link->link_name));
     135                $link->link_description = wp_specialchars(apply_filters('link_description', $link->link_description));
    136136                $link->link_url = attribute_escape($link->link_url);
    137137                $link->link_category = wp_get_link_cats($link->link_id);
    138138                $short_url = str_replace('http://', '', $link->link_url);
     
    160160                                        $cat_names = array();
    161161                                        foreach ($link->link_category as $category) {
    162162                                                $cat_name = get_the_category_by_ID($category);
    163                                                 $cat_name = wp_specialchars($cat_name);
     163                                                $cat_name = wp_specialchars(apply_filters('link_category', $cat_name));
    164164                                                if ( $cat_id != $category )
    165165                                                        $cat_name = "<a href='link-manager.php?cat_id=$category'>$cat_name</a>";
    166166                                                $cat_names[] = $cat_name;