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

Do better detection of no related topics in Largo's category template #1289

Merged
merged 4 commits into from
Sep 7, 2016

Conversation

benlk
Copy link
Collaborator

@benlk benlk commented Sep 7, 2016

Changes

  • largo_get_related_topics_for_category() now outputs empty string if there are no related topics
  • partials/archive-category-related.php is changed to match
  • spaces converted to tabs in largo_get_related_topics_for_category().

Why

Changes in largo_get_related_topics_for_category for #1288:

  • outputs empty string instead of an empty <ul></ul> because if we wanted to keep detecting the HTML elements in the partial, partials/archive-category-related.php would have to match the output of that function to the output of apply_filters( 'largo_related_topics_title_ul', __( 'Related Topics:' , 'largo' ) );, wrapped in a ul li strong.
  • added some notes to stubbed test for this function.

Spaces to tabs to align this with the WordPress PHP code standards.

@benlk benlk added the type: bug label Sep 7, 2016
@benlk benlk added this to the hotfix milestone Sep 7, 2016
@rclations
Copy link

looks great to me

@rclations rclations assigned benlk and unassigned rclations Sep 7, 2016
@benlk
Copy link
Collaborator Author

benlk commented Sep 7, 2016

No umbrella site duplicates this partial, so it's ready to go.

@benlk benlk merged commit 09367b1 into master Sep 7, 2016
@aschweigert aschweigert deleted the 1288-related-topics-empty branch September 21, 2016 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants