Make WordPress Core

Ticket #18042: 18042-docs.3.diff

File 18042-docs.3.diff, 1.5 KB (added by DrewAPicture, 13 years ago)

point to WP_Query for args

  • src/wp-includes/class-wp-editor.php

     
    798798
    799799                $query['offset'] = $args['pagenum'] > 1 ? $query['posts_per_page'] * ( $args['pagenum'] - 1 ) : 0;
    800800
     801                /**
     802                 * Filter the link query arguments.
     803                 *
     804                 * Allows modification of the link query arguments before querying.
     805                 *
     806                 * @see WP_Query for a full list of arguments
     807                 *
     808                 * @since 3.7.0
     809                 *
     810                 * @param array $query An array of WP_Query arguments.
     811                 */
    801812                $query = apply_filters( 'wp_link_query_args', $query );
    802813
    803814                // Do main query.
     
    823834                        );
    824835                }
    825836
     837                /**
     838                 * Filter the link query results.
     839                 *
     840                 * Allows modification of the returned link query results.
     841                 *
     842                 * @since 3.7.0
     843                 *
     844                 * @param array $results {
     845                 *     An associative array of query results.
     846                 *
     847                 *     @type array {
     848                 *         @type int    'ID'        The post id.
     849                 *         @type string 'title'     The trimmed, escaped post title.
     850                 *         @type string 'permalink' The post permalink.
     851                 *         @type string 'info'      A 'Y/m/d'-formatted date for 'post' post type, the 'singular_name' post type label otherwise.
     852                 *     }
     853                 * }
     854                 * @param array $query   An array of WP_Query arguments. @see 'wp_link_query_args' filter
     855                 */
    826856                return apply_filters( 'wp_link_query', $results, $query );
    827857        }
    828858