Skip to content
Advertisement

Tag: plugins

WordPress ‘Function is not defined onclick’

I am currently working on a custom Wordpress plugin. I have to use this specific folder structure: plugins/ myplugin/ pdf.php plugins/ myplugin/ inlude/main.js pdf.php looks like this: but whenever i click on the button i get the error: Uncaught ReferenceError: make_PDF is not defined even when i have a function called make_PDF in my main.js file. anyone knows how to

Plugin Javascript with Source URL’s For Images Using Wrong Directory

This is tough and would really, really love some help. I have a plugin that has a JavaScript file with an array of sources (URL’s) that points to a “texture” directory in the plugin for images, but keep getting 404 errors, because instead of searching images in /website/wp-content/plugins/die/textures it looks for website/textures, or website/post-name/textures and never the plugin. These work

Moodle custom fields API for course page

Unfortunately I can’t quite follow how the custom field API works. What I actually want are additional fields for the custom course format such as address, directions and other (hybrid courses). And no, I don’t want to use the web interface for this. As I understand it, two files are needed, myFormatPlugin/classes/customfields/course_handler.php and myFormatPlugin/customfield.php Do I need to register the

How can I make a page accessible to only admins in moodle?

I have a link on the settings.php page of my activity module that goes to a clear.php page that truncates a table in the database. As it stands even guests can still run this function by going to the clear.php themselves by typing in the address bar. Is there a way to check if a USER is an admin or

Advertisement