I’m doubtful there is such a plugin because it creates a significant security risk to execute unknown JS and PHP files. Since HTML can contain JS, even they contain risk. The source folder for such files needs to be securely locked down so only fully authorized users could possibly place a file there. None the less it’s probably worth a bit of searching just in case I’m wrong.
What you want could accomplished through a custom shortcode which fetches the desired file and returns appropriate content for output. JS files can be wrapped in <style> tags. PHP files can be output buffered and include‘d within the shortcode handler.
Thread Starter
mlapl1
(@mlapl1)
@bcworkz – Thank you so much and sorry for my late reply.
I agree entirely about the security – that’s why I mentioned authorized access only.
Thank you for the suggestion of a custom shortcode. Although I do code in PHP and JS, I am hardly an expert and know nothing about the internal workings of WP.
My problem is that I want to run some lessons written with authoring systems such as Lectora or Articulate. I need to upload them and protect them from unauthorized access. LMS plugins currently available either do not allow uploads in a simple way and offer very poor security (especially if you can guess the URL of the file you want). So basically a student would click on a link in WP and would be taken to a fike that would run a lesson. Issues of record-keeping etc would be dealt with by the lesson code, not WP. While there are dedicated LMS systems, there are good reasons for using WP too, especially for appearance and monetization. It may be possible to write a new LMS structure meeting the requirements but WP offers many facilities that are constantly revised and updated, making it a better choice.
Anyway, thanks so much for your help – I will try and followup somehow or just give up and look at other options.
Andrew