WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/11/2010 10:50:36 PM (9 years ago)
Author:
nacin
Message:

Remove more create_function calls. props huichen, see #14424.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/category-template.php

    r16307 r16313  
    678678        $tag_id = isset($tags[ $key ]->id) ? $tags[ $key ]->id : $key;
    679679        $tag_name = $tags[ $key ]->name;
    680         $a[] = "<a href='$tag_link' class='tag-link-$tag_id' title='" . esc_attr( $topic_count_text_callback( $real_count ) ) . "' style='font-size: " .
     680        $a[] = "<a href='$tag_link' class='tag-link-$tag_id' title='" . esc_attr( call_user_func( 'topic_count_text_callback', $real_count ) ) . "' style='font-size: " .
    681681            ( $smallest + ( ( $count - $min_count ) * $font_step ) )
    682682            . "$unit;'>$tag_name</a>";
     
    701701    else
    702702        return $return;
     703}
     704
     705/**
     706 * Callback for comparing tags based on name
     707 *
     708 * @since 3.1.0
     709 * @access private
     710 */
     711function _wp_tag_cloud_name_sort_cb( $a, $b ) {
     712    return strnatcasecmp( $a->name, $b->name );
     713}
     714
     715/**
     716 * Callback for comparing tags based on count
     717 *
     718 * @since 3.1.0
     719 * @access private
     720 */
     721function _wp_tag_cloud_count_sort_cb( $a, $b ) {
     722    return ( $a->count > $b->count );
    703723}
    704724
Note: See TracChangeset for help on using the changeset viewer.