wp_preload_dialogs

Definition:
function wp_preload_dialogs($init) {}

Parameters

  • $init

Source code

function wp_preload_dialogs($init) {

	$plugins = preg_split('/[ ,-]+/', $init['plugins']);



	if ( in_array( 'wpdialogs', $plugins, true ) ) {

		wp_print_scripts('wpdialogs-popup');

		wp_print_styles('wp-jquery-ui-dialog');

	}



	if ( in_array( 'wplink', $plugins, true ) ) {

		require_once ABSPATH . 'wp-admin/includes/internal-linking.php';

		?><div style="display:none;"><?php wp_link_dialog(); ?></div><?php

		wp_print_scripts('wplink');

		wp_print_styles('wplink');

	}



	// Distraction Free Writing mode

	if ( in_array( 'wpfullscreen', $plugins, true ) ) {

		wp_fullscreen_html();

		wp_print_scripts('wp-fullscreen');

	}



	wp_print_scripts('word-count');

}

15253

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: