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
Tag: plugins
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
WordPress: Get pll_the_languages inside my plugin
How can i get languages into my custom plugin of wordpress? When i call pll_the_languages() it’s output me error. Maybe i should call some global method? My plugin code: Answer My issue is solved. You should use admin_init action:
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
Is there a way to validade if a field attribute of a product exists in Woocommerce?
I found a youtube tutorial to create a plugin in Wordpress to add an input field for each product, so that the client could upload an image. You can add this field attribute to a product or not. The code has a validation function, to check if the image was uploaded or not. If not, promps you a warning saying
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
How do I call extract_to_pathname function on a user uploaded zip file?
I have an instance of an activity and when I want to view it I want to extract the associated zip file to be extracted and set the index.html file inside to be the starting page inside view.php. I found out that the filepath I passed in the extract function doesn’t exist, but I can access its fields in the
Sorting by post views count doesnt work. Plugin: “Post Views Counter” – WordPress
Im making news blog and I need to display daily posts. How doest daily posts work in my blog? : Im picking all posts for this day and sorting them by views count. There is the problem: I can’t sort by views count with Post Views Counter plugin. It doesnt returning any posts on WP_Query. My tryings: I tried googling
Is it bad practice to customize existing Plugins in WordPress? [closed]
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed last year. Improve this question I currently have a client that wants a lot of custom work at a fairly budget price. That’s why its not possible
Betheme WordPress How to hide or Remove Admin menu Items
I am using currently Betheme Wordpress and I want to remove admin menu Betheme li Items Kindly view the image what i want is also defined in image Answer I have found the solution and its workig 100% 1st step open this file projectName/wp-admin/admin.php then 2nd Step in footer of the page insert this code Enjoy My Solution …