Make plugin page follow standard enqueueing procedures
-
I am writing an administrator plugin that helps a user write some simple shortcodes. When the user clicks on a new button in the TinyMCE editor a ThickBox window appears and loads a PHP template I created with a heap of prompting fields.
If I want to access new scripts or stylesheets in this window I have to hard code them into the PHP template. I.e.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="https://www.w3.org/1999/xhtml"> <head> <title></title> <script src="./scripts/myscript.js"></script> <style src="./css/mystyles.css"></style> </head>
I would much prefer to use best practice enqueuing methods as opposed to this method.
Is there a way to make this PHP document in my plugins folder do all the normal WordPress processes (e.g. enqueue script and styles) as if it were just another page?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Make plugin page follow standard enqueueing procedures’ is closed to new replies.