mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-04 22:57:20 +00:00
AJAX: add a new function, wp_doing_ajax(), which can replace... (wait for it...) DOING_AJAX checks via the constant.
Props Mte90, sebastian.pisula, swissspidy. Fixes #25669. git-svn-id: https://develop.svn.wordpress.org/trunk@38334 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -966,7 +966,7 @@ function wp_dashboard_rss_output( $widget_id ) {
|
||||
*/
|
||||
function wp_dashboard_cached_rss_widget( $widget_id, $callback, $check_urls = array() ) {
|
||||
$loading = '<p class="widget-loading hide-if-no-js">' . __( 'Loading…' ) . '</p><p class="hide-if-js">' . __( 'This widget requires JavaScript.' ) . '</p>';
|
||||
$doing_ajax = ( defined('DOING_AJAX') && DOING_AJAX );
|
||||
$doing_ajax = wp_doing_ajax();
|
||||
|
||||
if ( empty($check_urls) ) {
|
||||
$widgets = get_option( 'dashboard_widget_options' );
|
||||
|
||||
Reference in New Issue
Block a user