File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -798,6 +798,17 @@ public static function wp_link_query( $args = array() ) {
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.
@@ -823,6 +834,25 @@ public static function wp_link_query( $args = array() ) {
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
You can’t perform that action at this time.
0 commit comments