Fatal error: Call to undefined function plugin_dir_path()
Could it be that you forgot to comment the Exit if accessed directly part? //Exit if accessed directly if ( ! defined( ‘ABSPATH’ ) ) { exit; }
Could it be that you forgot to comment the Exit if accessed directly part? //Exit if accessed directly if ( ! defined( ‘ABSPATH’ ) ) { exit; }
Getting user names and passwords is a horrible idea I hope no user will actually agree to, but beyond that your idea to do it from JS is going to fail due to CORS, which means you will have to do it in AJAX to your server, and let your server try to login, which … Read more
I had the same problem. Take $this->includes(); out of the init method, and put it into the register_widgets method: public function init() { … // Include plugin files // $this->includes(); // <– remove this } public function register_widgets() { $this->includes(); // <- put it here \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \Elementor_oEmbed_Widget() ); }
If it’s exactly the same code, then no – it shouldn’t cause any performance changes… Why? Because loading a plugin is pretty easy (hence quick) process. It all happens in wp-settings.php and this is the code: // Load active plugins. foreach ( wp_get_active_and_valid_plugins() as $plugin ) { wp_register_plugin_realpath( $plugin ); include_once( $plugin ); } unset( … Read more
Setup WordPress Cron Events Let’s say you want to start the cron at 6PM and keep running the cron after every 15 minutes till 9PM (for 3 hours). Then all cron stops. Note: for the simplicity of implementation, all time entry in the CODE is considered to be GMT/UTC. For this, you need to schedule … Read more
Calling wp_set_wpdb_vars() after replacing $wpdb will probably do the trick. $wpdb = new My_DB(); wp_set_wpdb_vars(); However, the only officially supported way to replace wpdb is to place a db.php in wp-content folder. If you can, I would suggest to do that.
Why WordPress creates two transients: Because the first transient with timeout in the name, is used for storing the expiration you set for your transient (but the stored value is a UNIX timestamp, not simply the value you passed like 3600) so that WordPress knows when to delete your transient. As for the second one, … Read more
It normally takes at most 15 minutes before the Extend page is refreshed, so just give it a little while.
First of all, provide a well-formed default HTML form. Use <label>, <fieldset> and <legend> where appropriate. This markup provides a good structure for CSS styling. Adding in some CSS classes may help too. Provide a filter that allows developers to tweak the default form. To go even further, you can allow developers to completely rewrite … Read more
Although I’m not clear on what exactly you need, maybe I could offer a few pointers. First off, the documentation on the various sites have everything you need, so you should visit the WordPress Codex, and jQuery UI examples. Hooks admin_init : You can deregister/register scripts here. If you intend on using a custom jquery … Read more