Skip to content

Instantly share code, notes, and snippets.

@rheinardkorf
Created April 18, 2016 00:55
Show Gist options
  • Save rheinardkorf/1c6246bc78135245b432dfba6b939c25 to your computer and use it in GitHub Desktop.
Save rheinardkorf/1c6246bc78135245b432dfba6b939c25 to your computer and use it in GitHub Desktop.
Example of loading WP Editor scripts outside of normal context. No need for dummy editor hackery.
<?php
// Hook in the editor's `enqueue_scripts` function
add_action( 'some_footer_action', array( '_WP_Editors', 'enqueue_scripts' ) );
// Some function that's going to render in the page footer
function some_footer_render_function() {
do_action( 'some_footer_action' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment