include attachments and add filter#1
Conversation
|
My apologies - I wasn't watching the repo so didn't get a notification about this PR. Will look into it this week - sorry for the delay. |
|
@steve1medix If you're still keen for this PR to be merged could you please refresh it against the latest code in the master branch. If you're not going to work on it anymore then let me know and I'll close this PR then work on adding your updates myself. |
|
The latest code utilizes WP_Query and query args and the loop to build the XML items. I'm thinking this as it is won't be easy to work into that as $post_ids variable is now only used for authors output at the top. I think we could rework the WP_Query loop to use array_slice on the $post_ids to get 20 out at a time and run $query_args = array(
'post_type' => 'any',
'post_status' => 'any',
'post__in' => array_slice( $post_ids, 0, $posts_per_page )
);and the $query_args[ 'post__in' ] = array_slice( $post_ids, ( $page - 1 ) * $posts_per_page, $posts_per_page );I'll move forward with that and will let @steve1medix re-introduce his work via a PR against https://github.com/hlashbrooke/Export-Plus/blob/master/includes/class-export-plus.php to add post IDs to the $post_ids array via a new filter I will add in my PR: $post_ids = apply_filters( 'export_wp_post_ids', $post_ids, $query_args, $args ); |
|
Code updated here: #4 So this PR only needs to hook into export_wp_post_ids and run it's thing. I would do it, but I'd rather @steve1medix get the GitHub contributor credit directly. |
Include attachments in the export file and add a filter for others to change the list of post_ids