Make WordPress Core


Ignore:
Timestamp:
03/10/2007 01:13:49 AM (20 years ago)
Author:
ryan
Message:

Link filters from jhodgdon. fixes #3595

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/link-manager.php

    r4700 r5011  
    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
    … …  
    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);
    … …  
    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>";
Note: See TracChangeset for help on using the changeset viewer.