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

Get category type #492

Merged
merged 2 commits into from
Apr 17, 2017
Merged

Get category type #492

merged 2 commits into from
Apr 17, 2017

Conversation

JanPetterMG
Copy link
Contributor

SimplePie_Category->get_type() will return either category for <category>, or subject for <dc:subject>.

See also #422

Bonus feature, SimplePie_Category->get_label($strict=false) now accepts bool. true to return label only, or default false for fallback to get_term() in cases where the label doesn't exist.

Once merged, we'll have to bump to v1.5

@mblaney
Copy link
Member

mblaney commented Nov 26, 2016

Hi @JanPetterMG this looks good, thanks. Just one closing bracket on the following line, and no need to split the if statement into multiple lines... so if you can change get_label to:
if ($this->label === null && $strict === false)

I would be happy to merge :-)

@JanPetterMG
Copy link
Contributor Author

JanPetterMG commented Nov 26, 2016

Fixed.
It's less readable, not in this case, but in more complex if else statements it can be an huge advantage.

Is it possible to release an 1.4.3 with important fixes before merging this? That will give me/us a little more time to focusing on other minor changes...

Update: Merge and release v1.5 whenever you want...

@mblaney mblaney merged commit 90973c6 into simplepie:master Apr 17, 2017
@JanPetterMG JanPetterMG deleted the category_subject branch April 17, 2017 12:22
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