Third pass on internal linking preloading. Or, what I left out of the second pass commit. see #11420.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
+14
-2
@@ -1074,9 +1074,21 @@ case 'menu-quick-search':
|
||||
exit;
|
||||
break;
|
||||
case 'wp-link-ajax':
|
||||
require_once ABSPATH . WPINC . '/js/tinymce/wp-mce-link.php';
|
||||
require_once ABSPATH . 'wp-admin/includes/internal-linking.php';
|
||||
|
||||
wp_link_ajax( $_POST );
|
||||
$args = array();
|
||||
|
||||
if ( isset( $_POST['title'] ) )
|
||||
$args['s'] = stripslashes( $_POST['title'] );
|
||||
$args['pagenum'] = ! empty( $_POST['page'] ) ? absint( $_POST['page'] ) : 1;
|
||||
|
||||
$results = wp_link_query( $args );
|
||||
|
||||
if ( ! isset( $results ) )
|
||||
die( '0' );
|
||||
|
||||
echo json_encode( $results );
|
||||
echo "\n";
|
||||
|
||||
exit;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user