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

Make load_export_api() public #59

Merged
merged 1 commit into from Jul 12, 2019

Conversation

drzraf
Copy link

@drzraf drzraf commented Jul 11, 2019

When reusing the export command, a call to load_export_api() is needed to avoid
undefined function _wp_export_build_IN_condition()

Sample code:

  $args = ['with_attachments' => FALSE, 'post_ids' => [1,2,3]];
  Export_Command::load_export_api(); // <--- here
  (new WP_Export_Stdout_Writer(new WP_Export_WXR_Formatter(new WP_Export_Query($args)), null))->export();

to avoid `undefined function _wp_export_build_IN_condition()`

Sample:
```
  $args = ['with_attachments' => $with_attachments, 'post_ids' => [1,2,3]];
  Export_Command::load_export_api(); // <--- here
  (new WP_Export_Stdout_Writer(new WP_Export_WXR_Formatter(new WP_Export_Query($args)), null))->export();
```
@drzraf drzraf requested a review from a team as a code owner July 11, 2019 15:53
@schlessera schlessera added this to the 2.0.3 milestone Jul 12, 2019
@schlessera schlessera merged commit d8e4dd6 into wp-cli:master Jul 12, 2019
@schlessera schlessera changed the title make load_export_api() public Make load_export_api() public Jul 12, 2019
danielbachhuber pushed a commit that referenced this pull request Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants