wordpress child theme function override the parent theme with check