Make WordPress Core

Ticket #9550: dont_use_get_catname.9550.diff

File dont_use_get_catname.9550.diff, 2.8 KB (added by filosofo, 15 years ago)
  • wp-includes/functions.php

     
    22442244                $trans['update']['attachment'] = array( __( 'Your attempt to edit this attachment: "%s" has failed.' ), 'get_the_title' );
    22452245
    22462246                $trans['add']['category']      = array( __( 'Your attempt to add this category has failed.' ), false );
    2247                 $trans['delete']['category']   = array( __( 'Your attempt to delete this category: "%s" has failed.' ), 'get_catname' );
    2248                 $trans['update']['category']   = array( __( 'Your attempt to edit this category: "%s" has failed.' ), 'get_catname' );
     2247                $trans['delete']['category']   = array( __( 'Your attempt to delete this category: "%s" has failed.' ), 'get_cat_name' );
     2248                $trans['update']['category']   = array( __( 'Your attempt to edit this category: "%s" has failed.' ), 'get_cat_name' );
    22492249
    22502250                $trans['delete']['comment']    = array( __( 'Your attempt to delete this comment: "%s" has failed.' ), 'use_id' );
    22512251                $trans['unapprove']['comment'] = array( __( 'Your attempt to unapprove this comment: "%s" has failed.' ), 'use_id' );
  • wp-admin/categories.php

     
    4040        if ( !current_user_can('manage_categories') )
    4141                wp_die(__('Cheatin’ uh?'));
    4242
    43         $cat_name = get_catname($cat_ID);
     43        $cat_name = get_cat_name($cat_ID);
    4444
    4545        // Don't delete the default cats.
    4646        if ( $cat_ID == get_option('default_category') )
     
    6060                wp_die( __('You are not allowed to delete categories.') );
    6161
    6262        foreach ( (array) $_GET['delete'] as $cat_ID ) {
    63                 $cat_name = get_catname($cat_ID);
     63                $cat_name = get_cat_name($cat_ID);
    6464
    6565                // Don't delete the default cats.
    6666                if ( $cat_ID == get_option('default_category') )
     
    234234</form>
    235235
    236236<div class="form-wrap">
    237 <p><?php printf(__('<strong>Note:</strong><br />Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the category <strong>%s</strong>.'), apply_filters('the_category', get_catname(get_option('default_category')))) ?></p>
     237<p><?php printf(__('<strong>Note:</strong><br />Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the category <strong>%s</strong>.'), apply_filters('the_category', get_cat_name(get_option('default_category')))) ?></p>
    238238<p><?php printf(__('Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.'), 'admin.php?import=wp-cat2tag') ?></p>
    239239</div>
    240240