Make WordPress Core

Opened 8 years ago

Closed 19 months ago

#36877 closed defect (bug) (wontfix)

Custom Logo default sizing inconsistencies

Reported by: ambrosey's profile ambrosey Owned by:
Milestone: Priority: low
Severity: normal Version: 4.5
Component: Customize Keywords: reporter-feedback close
Focuses: Cc:

Description (last modified by ocean90)

Per a discussion on #docs with @parsmizban , it appears that default use of


without extra arguments should pass null values for height and width, and true values for flex width and flex height given wp-includes/theme.php

case 'custom-logo':
                        if ( ! is_array( $args ) ) {
                                $args = array( 0 => array() );
                        $defaults = array(
                                'width'       => null,
                                'height'      => null,
                                'flex-width'  => false,
                                'flex-height' => false,
                                'header-text' => '',
                        $args[0] = wp_parse_args( array_intersect_key( $args[0], $defaults ), $defaults );
                        // Allow full flexibility if no size is specified.
                        if ( is_null( $args[0]['width'] ) && is_null( $args[0]['height'] ) ) {
                                $args[0]['flex-width']  = true;
                                $args[0]['flex-height'] = true;

however, given


         * Suggested width for cropped image.
         * @since 4.3.0
         * @access public
         * @var int
        public $width = 150;
         * Suggested height for cropped image.
         * @since 4.3.0
         * @access public
         * @var int
        public $height = 150;

it is acting as 150px x 150px for the passed height and width. Is this intentional behavior? Should the suggested size actually be coming through for custom logo? Cropping is working as flex width and height, so it's only the "displayed" suggested size that is in question.

To reproduce: new install of WordPress, install TwentySixteen with edited functions.php file to remove array parameter on line 72.

Change History (4)

This ticket was mentioned in Slack in #docs by ambrosey. View the logs.

8 years ago

#2 @ocean90
8 years ago

  • Description modified (diff)
  • Keywords reporter-feedback added
  • Version changed from trunk to 4.5

Hello @ambrosey, welcome to our Trac!

so it's only the "displayed" suggested size that is in question.

Can you explain what you mean by that?

#3 @celloexpressions
3 years ago

  • Keywords close added
  • Milestone set to Awaiting Review
  • Priority changed from normal to low

As long as flex-width and flex-height are correctly enabled, the default sizes will only be used as "suggested" text and potentially initial crop during the cropping step. There could be a relatively minor adjustment here to try to align this behavior with the defaults or we could leave it as-is since the issue is low-impact.

#4 @JeffPaul
19 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

I concur, let's close.

Note: See TracTickets for help on using tickets.