Make WordPress Core


Ignore:
Timestamp:
08/24/2006 10:33:16 PM (20 years ago)
Author:
ryan
Message:

Make those chars feel special.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-db.php

    r4041 r4112  
    294294
    295295        $update = false;
     296
    296297        if ( !empty($link_id) )
    297298                $update = true;
    298299
     300        if( trim( $link_name ) == '' )
     301                return 0;
     302        $link_name = apply_filters('pre_link_name', $link_name);
     303
     304        if( trim( $link_url ) == '' )
     305                return 0;
     306        $link_url = apply_filters('pre_link_url', $link_url);
     307
    299308        if ( empty($link_rating) )
    300309                $link_rating = 0;
     310        else
     311                $link_rating = (int) $link_rating;
     312
     313        if ( empty($link_image) )
     314                $link_image = '';
     315        $link_image = apply_filters('pre_link_image', $link_image);
    301316
    302317        if ( empty($link_target) )
    303318                $link_target = '';
     319        $link_target = apply_filters('pre_link_target', $link_target);
    304320
    305321        if ( empty($link_visible) )
    306322                $link_visible = 'Y';
     323        $link_visibile = preg_replace('/[^YNyn]/', '', $link_visible);
    307324
    308325        if ( empty($link_owner) )
    309326                $link_owner = $current_user->id;
     327        else
     328                $link_owner = (int) $link_owner;
    310329
    311330        if ( empty($link_notes) )
    312331                $link_notes = '';
     332        $link_notes = apply_filters('pre_link_notes', $link_notes);
     333
     334        if ( empty($link_description) )
     335                $link_description = '';
     336        $link_description = apply_filters('pre_link_description', $link_description);
     337
     338        if ( empty($link_rss) )
     339                $link_rss = '';
     340        $link_rss = apply_filters('pre_link_rss', $link_rss);
     341
     342        if ( empty($link_rel) )
     343                $link_rel = '';
     344        $link_rel = apply_filters('pre_link_rel', $link_rel);
    313345
    314346        // Make sure we set a valid category
Note: See TracChangeset for help on using the changeset viewer.