$args ) { if ( is_array( $args ) ) { add_theme_support( $feature, $args ); } else { add_theme_support( $args ); } } } add_action( 'genesis_setup', 'child_theme_add_image_sizes' ); /** * Add new image sizes. * * @since 1.0.0 * * @return void */ function child_theme_add_image_sizes() { $config = child_theme_get_config( 'image-sizes' ); foreach ( $config as $name => $args ) { $crop = array_key_exists( 'crop', $args ) ? $args['crop'] : false; add_image_size( $name, $args['width'], $args['height'], $crop ); } } add_action( 'genesis_setup', 'child_theme_add_post_type_supports' ); /** * Add post type supports. * * @since 1.0.0 * * @return void */ function child_theme_add_post_type_supports() { $config = child_theme_get_config( 'post-type-supports' ); foreach ( $config as $post_type => $support ) { add_post_type_support( $post_type, $support ); } } add_action( 'genesis_setup', 'child_theme_add_default_headers' ); /** * Add default header image. * * @since 1.0.0 * * @return void */ function child_theme_add_default_headers() { $config = child_theme_get_config( 'default-headers' ); register_default_headers( $config ); }