Hello, I’m confused with the public $scripts = []; and the enqueue_scripts(). For example, I use wp_register_script to register a script with name apple and I enqueue it like so:
public function enqueue_scripts() {
wp_enqueue_script( 'apple');
}
If I understand correctly, this should already work for both admin and frontend? Why do I still need the public $scripts = []; and specify the script again like so:
$scripts = ['apple'];
public function enqueue_scripts() {
wp_enqueue_script( 'apple');
}