WordPress.org

Make WordPress Core

Ticket #12421: wp_list_bookmarks_patch.2.patch

File wp_list_bookmarks_patch.2.patch, 503 bytes (added by scribu, 8 years ago)

use trim()

  • wp-includes/bookmark.php

     
    221221                        $orderby = 'rand()';
    222222                        break;
    223223                default:
    224                         $orderby = "link_" . $orderby;
     224                        $orderparams = array();
     225                        foreach ( explode(',', $orderby) as $ordparam )
     226                                $orderparams[] = 'link_' . trim($ordparam);
     227                        $orderby = implode(',', $orderparams);
    225228        }
    226229
    227230        if ( 'link_id' == $orderby )