Allow filtering of the post data just prior to an item import.#118
Merged
Rarst merged 1 commit intoWordPress:masterfrom Oct 21, 2014
Merged
Allow filtering of the post data just prior to an item import.#118Rarst merged 1 commit intoWordPress:masterfrom
Rarst merged 1 commit intoWordPress:masterfrom
Conversation
Member
Author
|
Another option could be to rework and move the existing 'wp_parser_pre_import_item' filter to pass the post data or a falsey value for short-circuiting. Not really a fan of multi-purposing filters that way though. Leveraging that hook directly would force an additional query to check if the post already exists. |
Contributor
|
Why can't this be done with native WP hooks? We had added short circuit there to prevent inserting item altogether. Modifying data (even if after the insert) is hardly problematic. |
Rarst
added a commit
that referenced
this pull request
Oct 21, 2014
Allow filtering of the post data just prior to an item import.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On DevHub, we're exploring the possibility of storing the parsed summary (long description) in meta instead of post_content. This filter would allow us to do that without overwriting what's in an existing item's post_content field -- which we plan to leverage for other purposes.
Cross-reference: https://meta.trac.wordpress.org/ticket/481