Open
Description
I was looking at the code, asked myself, isn't it better to wrap admin hooks in is_admin() ?
for example in this code :
private function define_admin_hooks() {
$plugin_admin = new Ghorekeshi_Admin( $this->get_plugin_name(), $this->get_version() );
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
}
If wrap inside code in a if (is_admin()) {}
so we don't run administrative hooks when non-admin pages and posts are loaded?
Metadata
Metadata
Assignees
Labels
No labels