WordPress.org

Make WordPress Core

Ticket #21623: 21623.diff

File 21623.diff, 465 bytes (added by ericmann, 6 years ago)

Basic addition to include a "search" filter for wp.getPosts

  • wp-includes/class-wp-xmlrpc-server.php

     
    14251425                                $query['order'] = $filter['order'];
    14261426                }
    14271427
     1428                if ( isset( $filter['search'] ) ) {
     1429                        $query['s'] = $filter['search'];
     1430                }
     1431
    14281432                $posts_list = wp_get_recent_posts( $query );
    14291433
    14301434                if ( ! $posts_list )