Make register_scripts_styles function conditional