wp_print_head_scripts

Definition:
function wp_print_head_scripts() {}

Prints the script queue in the HTML head on the front end.
Postpones the scripts that were queued for the footer. wp_print_footer_scripts() is called in the footer to print these scripts.

Defined actions

  • wp_print_scripts
    do_action('wp_print_scripts');

Source code

function wp_print_head_scripts() {

	if ( ! did_action('wp_print_scripts') )

		do_action('wp_print_scripts');



	global $wp_scripts;



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

		return array(); // no need to run if nothing is queued



	return print_head_scripts();

}

3999

wp_print_footer_scripts

Definition:
function wp_print_footer_scripts() {}

Hooks to print the scripts and styles in the footer.

Defined actions

  • wp_print_footer_scripts
    do_action('wp_print_footer_scripts');

Source code

function wp_print_footer_scripts() {

	do_action('wp_print_footer_scripts');

}

3997

wp_pre_kses_less_than_callback

Definition:
function wp_pre_kses_less_than_callback( $matches ) {}

Callback function used by preg_replace.

Parameters

  • array $matches: Populated by matches to preg_replace.

Return values

returns:The text returned after esc_html if needed.

Source code

function wp_pre_kses_less_than_callback( $matches ) {

	if ( false === strpos($matches[0], '>') )

		return esc_html($matches[0]);

	return $matches[0];

}

3995

wp_pre_kses_less_than

Definition:
function wp_pre_kses_less_than( $text ) {}

Convert lone less than signs.
KSES already converts lone greater than signs.

Parameters

  • string $text: Text to be converted.

Return values

returns:Converted text.

Source code

function wp_pre_kses_less_than( $text ) {

	return preg_replace_callback('%<[^>]*?((?=<)|>|$)%', 'wp_pre_kses_less_than_callback', $text);

}

3993

wp_post_revision_title

Definition:
function wp_post_revision_title( $revision, $link = true ) {}

Retrieve formatted date timestamp of a revision (linked to that revisions’s page).

Parameters

  • int|object $revision: Revision ID or revision object.
  • bool $link: Optional, default is true. Link to revisions’s page?

Return values

returns:i18n formatted datetimestamp or localized ‘Current Revision’.

Source code

function wp_post_revision_title( $revision, $link = true ) {

	if ( !$revision = get_post( $revision ) )

		return $revision;



	if ( !in_array( $revision->post_type, array( 'post', 'page', 'revision' ) ) )

		return false;



	/* translators: revision date format, see http://php.net/date */

	$datef = _x( 'j F, Y @ G:i', 'revision date format');

	/* translators: 1: date */

	$autosavef = __( '%1$s [Autosave]' );

	/* translators: 1: date */

	$currentf  = __( '%1$s [Current Revision]' );



	$date = date_i18n( $datef, strtotime( $revision->post_modified ) );

	if ( $link && current_user_can( 'edit_post', $revision->ID ) && $link = get_edit_post_link( $revision->ID ) )

		$date = "<a href='$link'>$date</a>";



	if ( !wp_is_post_revision( $revision ) )

		$date = sprintf( $currentf, $date );

	elseif ( wp_is_post_autosave( $revision ) )

		$date = sprintf( $autosavef, $date );



	return $date;

}

3991