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

Admin Notice is only localized when displaying the “Plugins” Backend Page

Note: Revised because that ‘__FILE__’ as in dirname(plugin_basename(‘__FILE__’)), was just a typo in the post/question. But one thing you did not include in your post, is about how are you loading the Bootstrapping class, and where is the file located? Is it in a subfolder like includes, i.e. your-plugin/ includes/ class-bootstraping.php languages/ your-plugin.pot your-plugin.php (main … Read more

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