X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/61343b82c4f0da4c68e4c6373daafff4a81efdd1..256a3b381f63716209b3527d0a14442ae570c283:/wp-includes/class-wp-editor.php diff --git a/wp-includes/class-wp-editor.php b/wp-includes/class-wp-editor.php index 9ab3feb5..16a2e5e1 100644 --- a/wp-includes/class-wp-editor.php +++ b/wp-includes/class-wp-editor.php @@ -127,7 +127,6 @@ final class _WP_Editors { if ( !empty($buttons) || $set['media_buttons'] ) { echo '
'; - echo $buttons; if ( $set['media_buttons'] ) { self::$has_medialib = true; @@ -139,6 +138,8 @@ final class _WP_Editors { do_action('media_buttons', $editor_id); echo "
\n"; } + + echo '
' . $buttons . "
\n"; echo "\n"; } @@ -786,8 +787,6 @@ final class _WP_Editors { 'update_post_term_cache' => false, 'update_post_meta_cache' => false, 'post_status' => 'publish', - 'order' => 'DESC', - 'orderby' => 'post_date', 'posts_per_page' => 20, ); @@ -798,6 +797,19 @@ final class _WP_Editors { $query['offset'] = $args['pagenum'] > 1 ? $query['posts_per_page'] * ( $args['pagenum'] - 1 ) : 0; + /** + * Filter the link query arguments. + * + * Allows modification of the link query arguments before querying. + * + * @see WP_Query for a full list of arguments + * + * @since 3.7.0 + * + * @param array $query An array of WP_Query arguments. + */ + $query = apply_filters( 'wp_link_query_args', $query ); + // Do main query. $get_posts = new WP_Query; $posts = $get_posts->query( $query ); @@ -821,7 +833,26 @@ final class _WP_Editors { ); } - return $results; + /** + * Filter the link query results. + * + * Allows modification of the returned link query results. + * + * @since 3.7.0 + * + * @param array $results { + * An associative array of query results. + * + * @type array { + * @type int 'ID' The post ID. + * @type string 'title' The trimmed, escaped post title. + * @type string 'permalink' The post permalink. + * @type string 'info' A 'Y/m/d'-formatted date for 'post' post type, the 'singular_name' post type label otherwise. + * } + * } + * @param array $query An array of WP_Query arguments. @see 'wp_link_query_args' filter + */ + return apply_filters( 'wp_link_query', $results, $query ); } /**