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

Changing the homepage top story prominence term name from "Top Story" to anything else breaks expected behavior of largo_home_single_top() #1445

Closed
benlk opened this issue Jun 2, 2017 · 4 comments
Assignees
Labels
priority: normal Must be completed before release of this version of plugin. type: bug
Milestone

Comments

@benlk
Copy link
Collaborator

benlk commented Jun 2, 2017

In largo_home_single_top():

$top_story_term = get_term_by( 'name', __('Top Story', 'largo'), 'prominence' );

This means that if a site renames their top story prominence term to, say, "Homepage Top Story", the value of $top_story_term will be false, and so it falls back to __('Homepage Featured', 'largo').

Can we change these get_term_by() calls to the largo-created, uneditable slug for these terms, instead of using the assumption that the term name has not been edited from the translated version of the Largo-provided default term name?

See https://secure.helpscout.net/conversation/374740864/932/

@benlk benlk added priority: normal Must be completed before release of this version of plugin. type: bug labels Jun 2, 2017
@benlk benlk added this to the 0.6.2 milestone Dec 12, 2018
@benlk
Copy link
Collaborator Author

benlk commented Dec 12, 2018

Check to see if this is still the case.

@benlk benlk modified the milestones: 0.6.2, 0.6.3 Dec 19, 2018
@benlk benlk removed this from the 0.6.4 milestone Apr 26, 2019
@benlk
Copy link
Collaborator Author

benlk commented May 1, 2019

This appears to still be the case.

@benlk
Copy link
Collaborator Author

benlk commented May 2, 2019

The reason this is problematic is because many of Largo's homepages instead use "Homepage Top Story" as the name for that term: https://github.com/INN/largo/blob/72cc8433a1be1de4f22789e1ec89496d54a653d9/homepages/layouts/LegacyThreeColumn.php#L17-L23

@benlk benlk added this to the 0.6.4 milestone May 2, 2019
@joshdarby joshdarby self-assigned this May 14, 2019
@joshdarby
Copy link
Collaborator

@benlk This is ready for review in PR #1709

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: normal Must be completed before release of this version of plugin. type: bug
Projects
None yet
Development

No branches or pull requests

2 participants