Error in using ‘admin_enqueue_scripts’ action through a class

There are several problems here: Problem 1: plugin_dir_url In a comment you mentioned using this code to load the file the class is in: define(“Plugin_root”, plugin_dir_url(FILE)); include_once(Plugin_root . ‘public/index1.php’); This results in this value being used in include_once: include_once( ‘http://example.com/wp-content/plugin/public/index1.php` ); Which is why you’re getting PHP fatal errors when you try to use the … Read more

Use inline callable for hooks and filters

When developing a WordPress Plugin that uses custom do_action and apply_filters it’s always better to use a callback function. They don’t explicitly say that you aren’t allowed to use anonymous functions but whenever you can, and when it’s appropriate, use a callback. From the plugin development docs about actions Create a callback function First, create … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)