wp_iframe

Definition:
function wp_iframe($content_func /* ... */) {}

Wrap iframe content (produced by $content_func) in a doctype, html head/body etc any additional function args will be passed to content_func.

Parameters

  • unknown_type $content_func

Defined actions

  • admin_xml_ns
    do_action('admin_xml_ns');
  • admin_enqueue_scripts
    do_action('admin_enqueue_scripts', 'media-upload-popup');
  • admin_print_styles-media-upload-popup
    do_action('admin_print_styles-media-upload-popup');
  • admin_print_styles
    do_action('admin_print_styles');
  • admin_print_scripts-media-upload-popup
    do_action('admin_print_scripts-media-upload-popup');
  • admin_print_scripts
    do_action('admin_print_scripts');
  • admin_head-media-upload-popup
    do_action('admin_head-media-upload-popup');
  • admin_head
    do_action('admin_head');
  • admin_head_{$content_func}
    do_action( "admin_head_{$content_func}" );

Source code

function wp_iframe($content_func /* ... */) {

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>

<head>

<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />

<title><?php bloginfo('name') ?> &rsaquo; <?php _e('Uploads'); ?> — <?php _e('WordPress'); ?></title>

<?php

wp_enqueue_style( 'global' );

wp_enqueue_style( 'wp-admin' );

wp_enqueue_style( 'colors' );

// Check callback name for 'media'

if ( ( is_array( $content_func ) && ! empty( $content_func[1] ) && 0 === strpos( (string) $content_func[1], 'media' ) )

	|| ( ! is_array( $content_func ) && 0 === strpos( $content_func, 'media' ) ) )

	wp_enqueue_style( 'media' );

wp_enqueue_style( 'ie' );

?>

<script type="text/javascript">

//<![CDATA[

addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};

var userSettings = {'url':'<?php echo SITECOOKIEPATH; ?>','uid':'<?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user->ID; ?>','time':'<?php echo time(); ?>'};

var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>', pagenow = 'media-upload-popup', adminpage = 'media-upload-popup',

isRtl = <?php echo (int) is_rtl(); ?>;

//]]>

</script>

<?php

do_action('admin_enqueue_scripts', 'media-upload-popup');

do_action('admin_print_styles-media-upload-popup');

do_action('admin_print_styles');

do_action('admin_print_scripts-media-upload-popup');

do_action('admin_print_scripts');

do_action('admin_head-media-upload-popup');

do_action('admin_head');



if ( is_string($content_func) )

	do_action( "admin_head_{$content_func}" );

3769

wp_html_excerpt

Definition:
function wp_html_excerpt( $str, $count ) {}

Safely extracts not more than the first $count characters from html string.
UTF-8, tags and entities safe prefix extraction. Entities inside will *NOT* be counted as one character. For example &amp; will be counted as 4, &lt; as 3, etc.

Parameters

  • integer $str: String to get the excerpt from.
  • integer $count: Maximum number of characters to take.

Return values

returns:The excerpt.

Source code

function wp_html_excerpt( $str, $count ) {

	$str = wp_strip_all_tags( $str, true );

	$str = mb_substr( $str, 0, $count );

	// remove part of an entity at the end

	$str = preg_replace( '/&[^;\s]{0,6}$/', '', $str );

	return $str;

}

3767

wp_htmledit_pre

Definition:
function wp_htmledit_pre($output) {}

Formats text for the HTML editor.
Unless $output is empty it will pass through htmlspecialchars before the ‘htmledit_pre’ filter is applied.

Parameters

  • string $output: The text to be formatted.

Return values

returns:Formatted text after filter applied.

Defined filters

  • htmledit_pre
    apply_filters('htmledit_pre', $output)

Source code

function wp_htmledit_pre($output) {

	if ( !empty($output) )

		$output = htmlspecialchars($output, ENT_NOQUOTES); // convert only < > &



	return apply_filters('htmledit_pre', $output);

}

3765

wp_head

Fire the wp_head action

Defined actions

  • wp_head
    do_action('wp_head');

Source code

function wp_head() {

	do_action('wp_head');

}

3763

wp_hash_password

Definition:
function wp_hash_password($password) {}

Create a hash (encrypt) of a plain text password.
For integration with other applications, this function can be overwritten to instead use the other package password checking algorithm.

Parameters

  • string $password: Plain text user password to hash

Return values

returns:The hash string of the password

Source code

function wp_hash_password($password) {

	global $wp_hasher;



	if ( empty($wp_hasher) ) {

		require_once( ABSPATH . 'wp-includes/class-phpass.php');

		// By default, use the portable hash from phpass

		$wp_hasher = new PasswordHash(8, TRUE);

	}



	return $wp_hasher->HashPassword($password);

}

3761