Function esc_js() (filter Html embedded JS)
Parameters
$text
(string) (required) The string to be filtered.
Default value: None
Return value
(String) Returns the filtered string.
Example
<input type="text" value="<?php echo esc_attr( $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 header information to tell the browser to prohibit Cache the current page, generally used during Ajax requests to prevent errors.
Usage
nocache_headers();
Attributes
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
The above introduces two tips for using PHP functions when debugging front-end pages in WordPress, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.