wp_exif_date2ts

Definition:
function wp_exif_date2ts($str) {}

Convert the exif date format to a unix timestamp.

Parameters

  • string $str

Source code

function wp_exif_date2ts($str) {

	@list( $date, $time ) = explode( ' ', trim($str) );

	@list( $y, $m, $d ) = explode( ':', $date );



	return strtotime( "{$y}-{$m}-{$d} {$time}" );

3639

wp_enqueue_style

Definition:
function wp_enqueue_style( $handle, $src = false, $deps = array() {}

Enqueue a CSS style file.
Registers the style if src provided (does NOT overwrite) and enqueues.

Parameters

  • string $handle: Name of the stylesheet.
  • string|bool $src: Path to the stylesheet from the root directory of WordPress. Example: ‘/css/mystyle.css’.
  • array $deps: Array of handles (names) of any stylesheet that this stylesheet depends on. (Stylesheets that must be loaded before this stylesheet.) Pass an empty array if there are no dependencies.
  • string|bool $ver: String specifying the stylesheet version number, if it has one. This parameter is used to ensure that the correct version is sent to the client regardless of caching, and so should be included if a version number is available and makes sense for the stylesheet.
  • string $media: The media for which this stylesheet has been defined.

Source code

function wp_enqueue_style( $handle, $src = false, $deps = array(), $ver = false, $media = 'all' ) {

	global $wp_styles;

	if ( ! is_a( $wp_styles, 'WP_Styles' ) ) {

		if ( ! did_action( 'init' ) )

			_doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),

				'<code>wp_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>init</code>' ), '3.3' );

		$wp_styles = new WP_Styles();

	}



	if ( $src ) {

		$_handle = explode('?', $handle);

		$wp_styles->add( $_handle[0], $src, $deps, $ver, $media );

	}

	$wp_styles->enqueue( $handle );

}

3637

wp_enqueue_scripts

Definition:
function wp_enqueue_scripts() {}

Wrapper for do_action(‘wp_enqueue_scripts’)
Allows plugins to queue scripts for the front end using wp_enqueue_script(). Runs first in wp_head() where all is_home(), is_page(), etc. functions are available.

Defined actions

  • wp_enqueue_scripts
    do_action('wp_enqueue_scripts');

Source code

function wp_enqueue_scripts() {

	do_action('wp_enqueue_scripts');

}

3635

wp_enqueue_script

Definition:
function wp_enqueue_script( $handle, $src = false, $deps = array() {}

Enqueues script.
Registers the script if src provided (does NOT overwrite) and enqueues.

Parameters

  • $handle
  • $src
  • $deps
  • $ver
  • $in_footer

Source code

function wp_enqueue_script( $handle, $src = false, $deps = array(), $ver = false, $in_footer = false ) {

	global $wp_scripts;

	if ( ! is_a( $wp_scripts, 'WP_Scripts' ) ) {

		if ( ! did_action( 'init' ) )

			_doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),

				'<code>wp_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>init</code>' ), '3.3' );

		$wp_scripts = new WP_Scripts();

	}



	if ( $src ) {

		$_handle = explode('?', $handle);

		$wp_scripts->add( $_handle[0], $src, $deps, $ver );

		if ( $in_footer )

			$wp_scripts->add_data( $_handle[0], 'group', 1 );

	}

	$wp_scripts->enqueue( $handle );

}

3633

wp_embed_unregister_handler

Definition:
function wp_embed_unregister_handler( $id, $priority = 10 ) {}

Unregister a previously registered embed handler.

Parameters

  • $id
  • $priority

Source code

function wp_embed_unregister_handler( $id, $priority = 10 ) {

	global $wp_embed;

	$wp_embed->unregister_handler( $id, $priority );

}

3631