Opened 15 years ago
Last modified 7 years ago
#19864 reopened enhancement
Abstract export_wp() for use by CLI scripts
| Reported by: | scottconnerly | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Export | Version: | 3.3.1 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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
@
15 years ago
- Keywords needs-patch removed
- Milestone Awaiting Review
- Resolution → wontfix
- Status new → closed
#2
@
15 years ago
- Milestone → Awaiting Review
- Resolution wontfix
- Status closed → reopened
westi indicated a desire (in IRC) that core should support this. I agree.
#3
@
15 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
@
14 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
There already is a CLI script that can do exports: https://github.com/andreascreten/wp-cli
Type
wp help exportto see how to use it.Implementation details: https://github.com/andreascreten/wp-cli/issues/44