Make WordPress Core

Ticket #1486: template-functions-post.patch

File template-functions-post.patch, 737 bytes (added by skippy, 20 years ago)

add '&authors=' parameter to get_pages() and wp_list_pages()

Line 
1290a291,310
2>       $authors = '';
3>       if (!empty($r['authors'])) {
4>               $auths = preg_split('/[\s,]+/',$r['authors']);
5>               if (count($auths)) {
6>                       foreach ($auths as $auth) {
7>                               if (is_string($auth)) {
8>                                       $author_ID = $wpdb->get_var("SELECT ID from $wpdb->users WHERE user_login = '$auth'");
9>                                       if (! $author_ID) next;
10>                                       $auth = $author_ID;
11>                               }
12>                               if ('' == $authors) {
13>                                       $authors .= ' post_author = ' intval($auth) . ' ';
14>                               } else {
15>                                       $authors .= ' OR post_author = ' intval($auth) . ' ';
16>                               }
17>                       }
18>                       $authors = " AND ($authors) ";
19>               }
20>       }
21>
22294c314
23<                                                                                                                       "$exclusions " .
24---
25>                                                                                                                       "$exclusions $authors " .
26315a336
27>       if ( !isset($r['authors']) ) $r['authors'] = '';