Skip to content
Advertisement

Tag: plugins

WordPress custom endpoint – rest_invalid_handler

I am completely new with PHP and WordPress, however I start to write my first plugin that should be able to expose a custom endpoint. I managed to register and activate the plugin and the route, but when I am trying to access this endpoint I am getting the following error: If I access the: http://localhost/myWp/wp-json/myCustomPlugin/v2/ it looks like my

Function get_plugins() cannot be execute

I’m trying to code simple php script which will return all plugins of Wordpress. My code: And my output is: I used official example from: https://codex.wordpress.org/Function_Reference/get_plugins I did: change of PHP version from 7.2 to 5.6 set right permission of files install WordPres once again So my wordpress is totally fresh and I still have the same error. Somebody knows

Warning: strpos(): Empty needle in ……wordpress Plugin [closed]

Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 8 years ago. Improve this question I get this error : Warning: strpos(): Empty needle in ……popularity-contest.php on line

Unpacking the update… Could not create directory. WordPress

When I instal nextgen-gallery plugins. This error message appears How can I fix this problem ? Answer This is a permissions issue. Ensure the directory is writable by apache. Plugins are unpacked into the wp-content/plugins directory, so I would first attempt writing to the directory as apache: Set permissions accordingly to correct the issue. You can read about permissions here:

How to use custom exception from cakephp plugin?

I have some custom exception for my application. I placed them to app where it is running well. Now I want to move them to one of my plugin and use exception from their. I have implemented custom exception as mentioned here: http://book.cakephp.org/2.0/en/development/exceptions.html But, I am looking for same solution if I use exception classes from cakephp plugin. Any suggestion…???

How can I call a WordPress shortcode within a template?

There’s a plugin for the Contact us form. To activate the form, all you have to do is to place [CONTACT-US-FORM] in the page… My page is calling a page template. Is it possible to add the [CONTACT-US-FORM] shortcode in the PHP template? I tried it and it did not work. The WordPress page worked, but not the method I

PHP – Uploading multiple files

I’m working on a plugin for wordpress and I want to be able to upload multiple pictures from a form. Right now when I have a form for two pictures and submit it empty, my $_FILES array looks like this: Now the problem is that I want to use wordpress’ upload handler, wp_handle_upload. It expects the $_FILES array as an

Advertisement