Function esc_js() (filtering Html embedded JS)
Parameters
$text
(String) (Required) The string to filter.
Default value: None
Return value
(String) Returns the filtered string.
Example
<input type="text" value="<?php echo esc_attr( $instance['input_text'] ); ?>" id="subbox" onfocus="if ( this.value == '<?php echo esc_js( $instance['input_text'] ); ?>') { this.value = ''; }" onblur="if ( this.value == '' ) { this.value = '<?php echo esc_js( $instance['input_text'] ); ?>'; }" name="email" />
More
This function is located at: wp-includes/formatting.php
nocache_headers() (disable browser caching)
nocache_headers() is used to send a header information to tell the browser to disable caching of the current page. It is generally used during Ajax requests to prevent errors.
Usage
nocache_headers();
Properties
This function has no attributes.
Return value
This function has no return value.
Example
function Bing_add_ajax(){ nocache_headers(); echo true; die; } add_action( 'template_redirect', 'Bing_add_ajax' );
Others
This function is located at: wp-includes/functions.php