-
Notifications
You must be signed in to change notification settings - Fork 9
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
Conversation
@@ -15,7 +15,7 @@ public function __construct() { | |||
|
|||
public function getLogo() { | |||
if ($this->logo) { | |||
return $this->logo['sizes']['thumbnail']; | |||
return $this->logo['sizes']['large']; |
There was a problem hiding this comment.
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 ); |
There was a problem hiding this comment.
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
No description provided.