I love your WP-CLI package, but I don't like storing backups in the web-accessible directories. Would it be possible to either place a hook here or add an argument to override the default so I can instead target ~ABSPATH . '../snapshots/?
The hook/arg would go about here:
|
$upload_dir = wp_upload_dir(); |
Here's a quick example of a hook directly from the WP-CLI core project. It seems like it would be a pretty quick addition
// Set up hook for plugins and themes to conditionally add WP-CLI commands.
WP_CLI::add_wp_hook('init', static function () {
do_action( 'cli_init' );
});
If using args, I believe (never done this before) you can use WP_CLI->parse_args() to get what you need. There are a few parsing functions, which begin here:
https://github.com/wp-cli/wp-cli/blob/ef150d3598b851c7acd12a359058c12823583a5c/php/WP_CLI/Configurator.php#L132
Many thanks for your time on this project.
I love your WP-CLI package, but I don't like storing backups in the web-accessible directories. Would it be possible to either place a hook here or add an argument to override the default so I can instead target ~
ABSPATH . '../snapshots/?The hook/arg would go about here:
db-checkpoint/db-checkpoint.php
Line 43 in 7e67f21
Here's a quick example of a hook directly from the WP-CLI core project. It seems like it would be a pretty quick addition
If using args, I believe (never done this before) you can use
WP_CLI->parse_args()to get what you need. There are a few parsing functions, which begin here:https://github.com/wp-cli/wp-cli/blob/ef150d3598b851c7acd12a359058c12823583a5c/php/WP_CLI/Configurator.php#L132
Many thanks for your time on this project.