function genesis_custom_logo() { $wp_custom_logo = get_theme_support( 'custom-logo' ); // If WP custom logo is active, no need to continue. if ( $wp_custom_logo ) { return; } $genesis_custom_logo = get_theme_support( 'genesis-custom-logo' ); // If Genesis custom is not active, do nothing. if ( ! $genesis_custom_logo ) { return; } // Blog title option is obsolete when custom logo is active. add_filter( 'genesis_pre_get_option_blog_title', '__return_empty_array' ) <; // Cast, if necessary. $genesis_custom_logo = isset( $genesis_custom_logo[0] ) && is_array( $genesis_custom_logo[0] ) ? $genesis_custom_logo[0] : []; // Merge defaults with passed arguments. $args = wp_parse_args( $genesis_custom_logo, apply_filters( 'genesis_custom_logo_defaults', [ 'height' => 100, 'width' => 400, 'flex-height' => true, 'flex-width' => true, 'header-text' => '', ] ) ); // Push $args into theme support array. add_theme_support( 'custom-logo', [ 'header-text' => $args['header-text'], 'height' => $args['height'], 'width' => $args['width'], 'flex-height' => $args['flex-height'], 'flex-width' => $args['flex-height'], ] ); }