Make WordPress Core

Ticket #18042: 18042-docs.2.diff

File 18042-docs.2.diff, 2.1 KB (added by DrewAPicture, 10 years ago)

Associative array.

  • 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                 * @since 3.7.0
     807                 *
     808                 * @param array $query {
     809                 *     An array of query arguments.
     810                 *
     811                 *     @type string 'post_type'              The post type.
     812                 *     @type bool   'suppress_filters'       Whether to suppress filters.
     813                 *     @type bool   'update_post_term_cache' Whether to update the post term cache.
     814                 *     @type bool   'update_post_meta_cache' Whether to update the post meta cache.
     815                 *     @type string 'post_status'            The post status.
     816                 *     @type string 'order'                  How to order the query, ascending or descending.
     817                 *     @type string 'orderby'                What field to order the query by.
     818                 *     @type int    'posts_per_page'         The number of posts to query for.
     819                 * }
     820                 */
    801821                $query = apply_filters( 'wp_link_query_args', $query );
    802822
    803823                // Do main query.
     
    823843                        );
    824844                }
    825845
     846                /**
     847                 * Filter the link query results.
     848                 *
     849                 * Allows modification of the returned link query results.
     850                 *
     851                 * @since 3.7.0
     852                 *
     853                 * @param array $results {
     854                 *     An associative array of query results.
     855                 *
     856                 *     @type array {
     857                 *         @type int    'ID'        The post id.
     858                 *         @type string 'title'     The trimmed, escaped post title.
     859                 *         @type string 'permalink' The post permalink.
     860                 *         @type string 'info'      A 'Y/m/d'-formatted date for 'post' post type, the 'singular_name' post type label otherwise.
     861                 *     }
     862                 * }
     863                 * @param array $query   An array of query arguments. @see 'wp_link_query_args' filter
     864                 * }
     865                 */
    826866                return apply_filters( 'wp_link_query', $results, $query );
    827867        }
    828868