WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 2 years ago

#19864 reopened enhancement

Abstract export_wp() for use by CLI scripts

Reported by: scottconnerly Owned by:
Milestone: Awaiting Review 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 (4)

comment:1 scribu2 years ago

  • Keywords needs-patch removed
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed
Version 0, edited 2 years ago by scribu (next)

comment:2 nacin2 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.

comment:3 scribu2 years ago

This would include writing additional hooks that allow the arguments to be pulled from the cli

Isn't this covered by #19863 ?

Last edited 2 years ago by scribu (previous) (diff)

comment:4 scribu2 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.

Note: See TracTickets for help on using tickets.