mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-04 22:57:20 +00:00
Third pass on internal linking preloading. Or, what I left out of the second pass commit. see #11420.
git-svn-id: https://develop.svn.wordpress.org/trunk@16459 602fd350-edb4-49c9-b593-d223f7449a82
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