Unverified Commit 5f40b48a authored by Peter J. Herrel's avatar Peter J. Herrel Committed by GitHub
Browse files

Merge pull request #116 from diggy/wp-cli-1-5-0

WP-CLI 1.5.0
parents a95705d6 90df0516
......@@ -17,7 +17,6 @@ branches:
cache:
directories:
- vendor
- $HOME/.composer/cache
env:
......
......@@ -13,8 +13,8 @@ if ( defined( 'WP_CLI' ) && WP_CLI ) {
WP_CLI::error( sprintf( 'This WP-CLI package requires PHP version %s or higher.', '5.5' ) );
}
if ( version_compare( WP_CLI_VERSION, '1.4.0', '<' ) ) {
WP_CLI::error( sprintf( 'This WP-CLI package requires WP-CLI version %s or higher. Please visit %s', '1.4.0', 'https://wp-cli.org/#updating' ) );
if ( version_compare( WP_CLI_VERSION, '1.5.0', '<' ) ) {
WP_CLI::error( sprintf( 'This WP-CLI package requires WP-CLI version %s or higher. Please visit %s', '1.5.0', 'https://wp-cli.org/#updating' ) );
}
# api, cli
......
......@@ -18,10 +18,10 @@
"files": ["command.php"]
},
"require": {
"wp-cli/wp-cli": "~1.4.0"
"wp-cli/wp-cli": "~1.5.0"
},
"require-dev": {
"behat/behat": "~2.5"
"behat/behat": "2.5.*"
},
"extra": {
"commands": [
......
This diff is collapsed.
......@@ -36,20 +36,20 @@ class Api {
if ( ! in_array( $func, $this->functions ) )
return \WP_CLI::error( "$func is not a Polylang API function." );
$this->debug_backtrace = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS, 3 );
\WP_CLI::debug(
sprintf(
"Calling %s::__call('%s') from %s::%s with %d args: %s",
$this->debug_backtrace[1]['class'],
$this->debug_backtrace[1]['function'],
$this->debug_backtrace[2]['class'],
$this->debug_backtrace[2]['function'],
count( $args ),
json_encode( $args )
),
__NAMESPACE__
);
// $this->debug_backtrace = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS, 3 );
//
// \WP_CLI::debug(
// sprintf(
// "Calling %s::__call('%s') from %s::%s with %d args: %s",
// $this->debug_backtrace[1]['class'],
// $this->debug_backtrace[1]['function'],
// $this->debug_backtrace[2]['class'],
// $this->debug_backtrace[2]['function'],
// count( $args ),
// json_encode( $args )
// ),
// __NAMESPACE__
// );
// \WP_CLI::debug( ( new \Exception() )->getTraceAsString() );
......
......@@ -259,7 +259,7 @@ class TermCommand extends BaseCommand {
# sync taxonomies and post meta, if applicable
$sync = new \PLL_Admin_Sync( $this->pll );
$sync->pll_save_term( $term_id, $taxonomy, $this->api->get_term_translations( $term_id ) );
$sync->sync_term_parent( $term_id, $taxonomy, $this->api->get_term_translations( $term_id ) );
# success message
$msg = $exists
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment