Created
April 18, 2016 00:55
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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