Advertisements

wp_embed_defaults

Definition:
function wp_embed_defaults() {}

Create default array of embed parameters.

Return values

returns:Default embed parameters.

Defined filters

  • embed_defaults
    apply_filters( 'embed_defaults', array(

    'width' => $width,

    'height' => $height,

    )

Source code

function wp_embed_defaults() {

	if ( !empty($GLOBALS['content_width']) )

		$theme_width = (int) $GLOBALS['content_width'];



	$width = get_option('embed_size_w');



	if ( empty($width) && !empty($theme_width) )

		$width = $theme_width;



	if ( empty($width) )

		$width = 500;



	$height = get_option('embed_size_h');



	if ( empty($height) )

		$height = 700;



	return apply_filters( 'embed_defaults', array(

		'width'  => $width,

		'height' => $height,

	) );

}

3625

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: