Skip to content
This repository has been archived by the owner on Mar 26, 2021. It is now read-only.

Set post categories during import. #5

Merged
merged 1 commit into from
Nov 19, 2014

Conversation

JeremyDunn
Copy link
Contributor

Sets the categories for an imported story if the categories exist in Wordpress.

CrookedNumber added a commit that referenced this pull request Nov 19, 2014
Set post categories during import.
@CrookedNumber CrookedNumber merged commit face630 into npr:master Nov 19, 2014
@CrookedNumber
Copy link
Contributor

Seems like a sound idea; basic testing looks good.

@CrookedNumber
Copy link
Contributor

Tiny footnote here: I'm pretty sure that categories in the API are mutually exclusive; in other words, you can place your story in only one category. So, technically, this code is overly thorough.

That being said, I'm more than happy to sacrifice a few ms (esp. since this is on the admin side) in order to future-proof this functionality.

@JeremyDunn
Copy link
Contributor Author

Thanks for the info. I'd be happy to simplify it in a new PR if you'd like.

@CrookedNumber
Copy link
Contributor

Nah, but thank you. If this were rifling through 1000's of XML elements and/or happening on the front-end, this would make me worry. And as I said, I like its exhaustiveness, even if its slightly unnecessary (as of now).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants