WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/22/2010 05:17:31 PM (9 years ago)
Author:
scribu
Message:

Document url_shorten() and use in more places. Props latz for initial patch. Fixes #15540

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-links-list-table.php

    r16182 r16536  
    106106            $link->link_category = wp_get_link_cats( $link->link_id );
    107107
    108             $short_url = str_replace( 'http://', '', $link->link_url );
    109             $short_url = preg_replace( '/^www\./i', '', $short_url );
    110             if ( '/' == substr( $short_url, -1 ) )
    111                 $short_url = substr( $short_url, 0, -1 );
    112             if ( strlen( $short_url ) > 35 )
    113                 $short_url = substr( $short_url, 0, 32 ).'...';
     108            $short_url = url_shorten( $link->link_url );
    114109
    115110            $visible = ( $link->link_visible == 'Y' ) ? __( 'Yes' ) : __( 'No' );
Note: See TracChangeset for help on using the changeset viewer.