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:
nacin
2010-11-18 07:59:05 +00:00
parent 9820a48b54
commit 485daddde1
8 changed files with 164 additions and 18 deletions
+14 -2
View File
@@ -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;