WordPress.org

Make WordPress Core

Changeset 25293


Ignore:
Timestamp:
09/07/13 12:20:57 (18 months ago)
Author:
SergeyBiryukov
Message:

Add 'wp_link_query_args' and 'wp_link_query' filters to allow for customizing the internal linking dialog. props CoenJacobs, goldenapples. fixes #18042.

File:
1 edited

Legend:

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

    r24745 r25293  
    799799        $query['offset'] = $args['pagenum'] > 1 ? $query['posts_per_page'] * ( $args['pagenum'] - 1 ) : 0; 
    800800 
     801        $query = apply_filters( 'wp_link_query_args', $query ); 
     802 
    801803        // Do main query. 
    802804        $get_posts = new WP_Query; 
     
    822824        } 
    823825 
    824         return $results; 
     826        return apply_filters( 'wp_link_query', $results, $query ); 
    825827    } 
    826828 
Note: See TracChangeset for help on using the changeset viewer.