Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't crop header logo to thumbnail size #5

Closed
wants to merge 9 commits into from
Closed

Don't crop header logo to thumbnail size #5

wants to merge 9 commits into from

Conversation

Valid
Copy link
Contributor

@Valid Valid commented Jul 9, 2015

No description provided.

@@ -15,7 +15,7 @@ public function __construct() {

public function getLogo() {
if ($this->logo) {
return $this->logo['sizes']['thumbnail'];
return $this->logo['sizes']['large'];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will WordPress give us an upscaled logo if we ask for the large one? For example, if we upload a 120x80 or something, would it blow it up to something like 1280x800?

We could use $this->logo['url'] to get the original file upload.

Added #6 to introduce custom sizes, such that we can later do $this->logo['sizes']['logo']

@@ -27,5 +27,8 @@
require_once($filepath);
}

// Custom image size for header logo
add_image_size( 'logo', 194, 88 );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're gonna add this in now, we'll want to add this to lib/init.php and have it execute as part of the after_setup_theme hook. With the setup we have here, functions.php is just a loader.

I'll add some documentation to make this setup a bit more clear

@Valid Valid closed this Jul 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants