diff --git a/wp-ajax.php b/wp-ajax.php new file mode 100644 index 0000000000..f4c3dc7b9f --- /dev/null +++ b/wp-ajax.php @@ -0,0 +1,30 @@ + \ No newline at end of file diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 1c02cf9b5d..05b734a300 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -2015,4 +2015,24 @@ function rel_canonical() { echo "\n"; } +/** + * Prints the ajax url on the front end + * + * @since 3.0 + **/ +function _wp_ajaxurl() { + echo '\n"; +} + +/** + * Hooks _wp_ajaxurl() to wp_head + * + * @since 3.0 + **/ +function wp_ajaxurl() { + add_action('wp_head', '_wp_ajaxurl', 1); +} + ?> diff --git a/wp-settings.php b/wp-settings.php index dd55baf69d..f9bdbd3dc2 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -289,7 +289,7 @@ do_action( 'init' ); /** * This hook is fired once WP, all plugins, and the theme are fully loaded and instantiated. * - * AJAX requests should use wp-admin/admin-ajax.php. + * AJAX requests should use wp-ajax.php and wp-admin/admin-ajax.php instead. * * @since 3.0.0 */