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

Update footer INN logos #1633

Merged
merged 10 commits into from
Mar 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ though this project doesn't succeed in adhering to [Semantic Versioning](https:/

This release contains bug fixes for Largo 0.6.

### Feature updates

- Updates INN's logos in the `img/` folder. If your child theme redefines the function `inn_logo()`, please update that function to reference the new SVG image locations in `img/`. [Pull request #1633](https://github.com/INN/largo/pull/1633) for [issue #1621](https://github.com/INN/largo/issues/1631)

### Fixes

- Fixes PHP notices in class `Bootstrap_Walker_Nav_Menu`. [Pull request #1624](https://github.com/INN/largo/pull/1624) and [#1625](https://github.com/INN/largo/pull/1625) for [issue #1623](https://github.com/INN/largo/issues/1623) as part of [issue #1492](https://github.com/INN/largo/issues/1492).
Expand All @@ -24,6 +28,7 @@ This release contains bug fixes for Largo 0.6.
### Upgrade notices

- If you have a custom `partials/nav-global.php` you may want to copy the `if ( ! is_search() ) { ... }` logic from [pull request #1604](https://github.com/INN/largo/pull/1604/) to reduce user confusion about which search form to use.
- If your child theme redefines the function `inn_logo()`, please update that function to reference the new INN logo SVG image locations in `img/`.

## [Largo 0.6.1](https://github.com/INN/largo/compare/v0.6...v0.6.1)

Expand Down
4 changes: 2 additions & 2 deletions img/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ Note:

`less/inc/footer.less` expects that the image output by `inn_logo()` will be 1669px wide and 385px tall.

The default image output by `inn_logo()` is `inn_logo_reversetype.png`, which has white text and is good for dark backgrounds.
The default image output by `inn_logo()` is `inn_light.svg`, which has white text and is good for dark backgrounds.

If you would like to use a light background, add this to your theme's `functions.php`:

```php
function inn_logo() {
?>
<a href="//inn.org/">
<img id="inn-logo" src="<?php echo(get_template_directory_uri() . "/img/inn_logo_blue_fimal.png"); ?>" alt="<?php printf(__("%s is a member of the Institute for Nonprofit News", "largo"), get_bloginfo('name')); ?>" />
<img id="inn-logo" src="<?php echo(get_template_directory_uri() . "/img/inn_dark.svg"); ?>" alt="<?php printf(__("%s is a member of the Institute for Nonprofit News", "largo"), get_bloginfo('name')); ?>" />
</a>
<?php

Expand Down
Binary file added img/inn_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions img/inn_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/inn_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions img/inn_light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/inn_logo_blue_final.png
Binary file not shown.
Binary file removed img/inn_logo_gray.png
Binary file not shown.
Binary file removed img/inn_logo_reversetype.png
Binary file not shown.
4 changes: 2 additions & 2 deletions inc/header-footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ function largo_copyright_message() {
/**
* Output the INN logo, used in the footer
*
* If you want to use a light background with a dark image, simply replace this function in the child theme with one that references get_template_directory_uri() . "/img/inn_logo_blue_fimal.png"
* If you want to use a light background with a dark image, simply replace this function in the child theme with one that references get_template_directory_uri() . "/img/inn_dark.svg"
*
* @since 0.5.2
*/
if ( ! function_exists( 'inn_logo' ) ) {
function inn_logo() {
?>
<a href="//inn.org/" id="inn-logo-container">
<img id="inn-logo" src="<?php echo(get_template_directory_uri() . "/img/inn_logo_gray.png"); ?>" alt="<?php printf(__("%s is a member of the Institute for Nonprofit News", "largo"), get_bloginfo('name')); ?>" />
<img id="inn-logo" src="<?php echo(get_template_directory_uri() . "/img/inn_light.svg"); ?>" alt="<?php printf(__("%s is a member of the Institute for Nonprofit News", "largo"), get_bloginfo('name')); ?>" />
</a>
<?php
}
Expand Down
2 changes: 1 addition & 1 deletion tests/inc/test-header-footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function test_largo_copyright_message() {

function test_inn_logo() {
$this->expectOutputRegex('/[.*]+/'); // This is excessively greedy, it expects any output at all
$this->expectOutputRegex('/inn_logo_gray.png/'); // This is excessively greedy, it expects any output at all
$this->expectOutputRegex('/inn_light.svg/'); // This is excessively greedy, it expects any output at all
inn_logo();
}

Expand Down