Skip to content

Allow filtering of the post data just prior to an item import.#118

Merged
Rarst merged 1 commit intoWordPress:masterfrom
DrewAPicture:filter
Oct 21, 2014
Merged

Allow filtering of the post data just prior to an item import.#118
Rarst merged 1 commit intoWordPress:masterfrom
DrewAPicture:filter

Conversation

@DrewAPicture
Copy link
Member

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

@DrewAPicture
Copy link
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.

@Rarst
Copy link
Contributor

Rarst commented Aug 13, 2014

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.
@Rarst Rarst merged commit 52053ab into WordPress:master Oct 21, 2014
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