Opened 13 years ago
Last modified 6 years ago
#19864 reopened enhancement
Abstract export_wp() for use by CLI scripts
Reported by: | scottconnerly | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.3.1 |
Component: | Export | Keywords: | |
Focuses: | Cc: |
Description
Need to be able to execute an export from the PHP CLI for the purpose of running cron / maintenance scripts that write out exports.
This would include writing additional hooks that allow the arguments to be pulled from the cli as well as hooks that allow the output to redirected from the output buffer to a file.
Related ticket: #19863, extra hooks for manipulating content and arguments of an export
Change History (5)
#1
@
13 years ago
- Keywords needs-patch removed
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
#2
@
13 years ago
- Milestone set to Awaiting Review
- Resolution wontfix deleted
- Status changed from closed to reopened
westi indicated a desire (in IRC) that core should support this. I agree.
#3
@
13 years ago
This would include writing additional hooks that allow the arguments to be pulled from the cli
Isn't this covered by #19863 ?
#4
@
13 years ago
This would include writing additional hooks that allow the arguments to be pulled from the cli
I don't understand the assumption behind this. You need some PHP code to load WordPress anyway, so you could parse the CLI arguments directly and then just call export_wp(). No additional hooks needed.
as well as hooks that allow the output to redirected from the output buffer to a file.
I agree that we should decouple the XML generation part from the delivery part.
Also, there are some nested functions in there, which is quite confusing. They should be moved outside or converted into class methods.
There already is a CLI script that can do exports: https://github.com/andreascreten/wp-cli
Type
wp help export
to see how to use it.Implementation details: https://github.com/andreascreten/wp-cli/issues/44