Can i use one wp plugin inside other?

Yup, you certainly can. At bare minimum, just require the plugin’s main file inside your plugin file. You’ll just need to activate YOUR plugin, but you’ll still have function from the included plugin. require_once ‘/otherplugin/main-file.php’; If you want to make it more sophisticated, you could set up a composer.json file in your plugin, which could … Read more

Passing ajax variable to more than one wordpress plugin function

If you want to use a global variable, you have to set it outside any local scope, above your functions. For example: if (isset($_POST[‘whatever’])) { $variable = $_POST[‘whatever’]; } This will store it in the superglobal array. Now, access it using the $_GLOBALS array: function my_action(){ $whatever = $GLOBALS[‘variable’]; } I would however have an … Read more

plugin_dir_url(__FILE__) searches parent theme in ACF extension

I’m a total dummy. Looked through the field file and found this: function input_admin_enqueue_scripts() { // Note: This function can be removed if not used // register acf scripts wp_register_script(‘acf-input-column’, $this->settings[‘dir’] . ‘js/input.js’, array(‘acf-input’), $this->settings[‘version’]); wp_register_style(‘acf-input-column’, $this->settings[‘dir’] . ‘css/input.css’, array(‘acf-input’), $this->settings[‘version’]); // scripts wp_enqueue_script(array( ‘acf-input-column’, )); // styles wp_enqueue_style(array( ‘acf-input-column’, )); } $settings->[‘dir’] was set … Read more