Make WordPress Core


Ignore:
Timestamp:
03/21/2010 06:06:18 AM (15 years ago)
Author:
dd32
Message:

Cleanup of Custom Background. Move JS to external file, Add @since, Remove redundant steps functionality, Preview of Image alignment. See #12186

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/script-loader.php

    r13766 r13788  
    407407            'warnDelete' => __( "You are about to permanently delete this menu. \n 'Cancel' to stop, 'OK' to delete." ),
    408408        ) );
     409
     410        $scripts->add( 'custom-background', "/wp-admin/js/custom-background$suffix.js", array('farbtastic'), '20100321' );
     411        $scripts->add_data( 'custom-background', 'group', 1 );
     412        // See wp_just_in_time_script_localization() for translation data for this object
     413
    409414    }
    410415}
     
    510515
    511516/**
    512  * Load localized script just in time for MCE.
     517 * Load localized data on print rather than initialization.
    513518 *
    514519 * These localizations require information that may not be loaded even by init.
     
    527532        'l10n_print_after' => 'try{convertEntities(autosaveL10n);}catch(e){};'
    528533    ) );
     534
     535    wp_localize_script( 'custom-background', 'customBackgroundL10n', array(
     536        'backgroundcolor' => '#' . get_background_color(),
     537    ) );
    529538}
    530539
Note: See TracChangeset for help on using the changeset viewer.