godaddy-wordpress / primer

Primer is a powerful theme that brings clarity to your content in a fresh design. This is the parent for all themes in the GoDaddy Primer theme family.
https://wordpress.org/themes/primer/
GNU General Public License v2.0
134 stars 36 forks source link

Default 'use_featured_hero_image' value is incorrect #257

Closed EvanHerman closed 6 years ago

EvanHerman commented 6 years ago

Original Report: https://wordpress.org/support/topic/primer-mins-theme-featured-image-override-hero-image

We are setting the default value of use_featured_hero_image to 1 (Checked) in the customizer: https://github.com/godaddy/wp-primer-theme/blob/9c80bf4bfce4044f9af806528e305f7cad048d25/inc/customizer.php#L182-L188

But we're not referencing a default value in our get_theme_mod call: https://github.com/godaddy/wp-primer-theme/blob/21557638554f63dd2d57825e72dd68330497f02d/inc/helpers.php#L264.

This causes some confusion as it appears (based on the customizer) the featured image should replace the hero image but it does not until the customizer settings are saved.

Default value of get_theme_mod should be 1 to match the customizer default value. eg:

get_theme_mod( 'use_featured_hero_image', 1 );