You appear to be a bot. Output may be restricted
Description
Captures scriptsPerforms an early invocation of the code to display footer scripts, saving the latest output in latest_html and accumulating the lot in captured_html. We don't do this if we're in the block editor. Note: We don't use wp_print_footer_scripts() since this can have side effects due to other hooks being attached to 'wp_print_footer_scripts' We therefore directly call the private action hook that WordPress uses.
Usage
dependencies_cache::capture_scripts();
Parameters
Returns
voidTO DO
Confirm this is acceptable.Source
File name: oik/libs/class-dependencies-cache.phpLines:
1 to 13 of 13
function capture_scripts() { if ( $this->is_block_editor() ) { // Don't capture } elseif ( !doing_filter( "replace_editor" ) ) { ob_start(); _wp_footer_scripts(); $html = ob_get_contents(); ob_end_clean(); $this->captured_html .= $html; $this->latest_html = $html; } }View on GitHub View on Trac