WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Custom Header Image in WP 3.4.1 (2 posts)

  1. foralien
    Member
    Posted 2 years ago #

    When registering custom header image with 'flex-height' => false I expected that custom image uploaded trough theme customizer would be cropped if it exceededs 'height' parameter of add_theme_support for custom header. But crop dialogue did not appear. Is it intented behavior?

    This is my custom image registration code

    $args = array(
    'default-image'  => 'my_url_here',
    'random-default' => false,
    'width'   => 980,
    'height'  => 300,
    'flex-height' => false,
    'flex-width'  => true,
    'uploads'     => true
    );
    add_theme_support('custom-header', $args);

    With this code I'd like to prevent usage of very tall images in header when they are uploaded by user through theme customiser. Did I get it wrong and 'flex-height' => false does not forse images to be cropped? Could anybody please explain the logic behind these settings?

    Thanks a lot in advance for any advice,
    Anna

  2. foralien
    Member
    Posted 2 years ago #

    I've got it finally - crop dialogue appeares only on Header page under Appearance menu, but if an image is uploaded inside the theme customizer dialogue - it will not be cropped. I'm afraid there is a lack of consistency in such approach, but there it is.

Topic Closed

This topic has been closed to new replies.

About this Topic