Make WordPress Core

Changeset 25299


Ignore:
Timestamp:
09/07/2013 07:46:26 PM (13 years ago)
Author:
SergeyBiryukov
Message:

Document 'wp_link_query_args' and 'wp_link_query' filters. props DrewAPicture. fixes #18042.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-editor.php

    r25293 r25299  
    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
     
    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        }
Note: See TracChangeset for help on using the changeset viewer.