wp_just_in_time_script_localization

Load localized data on print rather than initialization.

Description

wp_just_in_time_script_localization(); 

These localizations require information that may not be loaded even by init.


Usage

  1. if ( !function_exists( 'wp_just_in_time_script_localization' ) ) { 
  2. require_once ABSPATH . WPINC . '/script-loader.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wp_just_in_time_script_localization(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/script-loader.php  
  1. function wp_just_in_time_script_localization() { 
  2.  
  3. wp_localize_script( 'autosave', 'autosaveL10n', array( 
  4. 'autosaveInterval' => AUTOSAVE_INTERVAL,  
  5. 'blog_id' => get_current_blog_id(),  
  6. ) );