WordPress.org

Make WordPress Core

Changeset 20190


Ignore:
Timestamp:
03/15/2012 01:20:00 PM (8 years ago)
Author:
nacin
Message:

Remove index-extra.php. Move dashboard widget XHR callbacks to ajax-actions.php. fixes #20242.

Location:
trunk/wp-admin
Files:
3 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r20179 r20190  
    3535do_action( 'admin_init' );
    3636
    37 $core_actions_get = array( 'fetch-list', 'ajax-tag-search', 'wp-compression-test', 'imgedit-preview', 'oembed-cache', 'autocomplete-user' );
     37$core_actions_get = array(
     38    'fetch-list', 'ajax-tag-search', 'wp-compression-test', 'imgedit-preview', 'oembed-cache',
     39    'autocomplete-user', 'dashboard-widgets',
     40);
    3841
    3942$core_actions_post = array(
  • trunk/wp-admin/includes/ajax-actions.php

    r20179 r20190  
    185185
    186186    wp_die( json_encode( $return ) );
     187}
     188
     189function wp_ajax_dashboard_widgets() {
     190    require ABSPATH . 'wp-admin/includes/dashboard.php';
     191
     192    switch ( $_GET['widget'] ) {
     193        case 'dashboard_incoming_links' :
     194            wp_dashboard_incoming_links();
     195            break;
     196        case 'dashboard_primary' :
     197            wp_dashboard_primary();
     198            break;
     199        case 'dashboard_secondary' :
     200            wp_dashboard_secondary();
     201            break;
     202        case 'dashboard_plugins' :
     203            wp_dashboard_plugins();
     204            break;
     205    }
     206    wp_die();
    187207}
    188208
  • trunk/wp-admin/includes/update-core.php

    r19940 r20190  
    328328// 3.4
    329329'wp-admin/images/logo-login.png',
     330'wp-admin/index-extra.php',
     331'wp-admin/network/index-extra.php',
     332'wp-admin/user/index-extra.php',
    330333);
    331334
  • trunk/wp-admin/js/dashboard.dev.js

    r19684 r20190  
    4242                p = e.parent();
    4343                setTimeout( function(){
    44                     p.load( ajaxurl.replace( '/admin-ajax.php', '' ) + '/index-extra.php?jax=' + id, '', function() {
     44                    p.load( ajaxurl + '?action=dashboard-widgets&widget=' + id, '', function() {
    4545                        p.hide().slideDown('normal', function(){
    4646                            $(this).css('display', '');
Note: See TracChangeset for help on using the changeset viewer.