Issue Overview
Especially needed because of this bug where $projects is immediately overridden, so using --all doesn't really work:
|
$projects = []; |
|
if ( $all ) { |
|
$projects = $this->get_all_projects(); |
|
} |
|
|
|
$projects = array_map( |
|
function ( $project_id ) { |
|
$project = ( new ProjectLocator( $project_id ) )->get_project(); |
|
if ( ! $project ) { |
|
WP_CLI::log( sprintf( 'Project (ID: %d) does not exist.', $project_id ) ); |
|
return null; |
|
} |
|
if ( ! $project->is_active() ) { |
|
WP_CLI::log( sprintf( 'Project (ID: %d) is inactive.', $project->get_id() ) ); |
|
return null; |
|
} |
|
return $project; |
|
}, |
|
$args |
|
); |
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Versions
- Browser:
- PHP:
- WP-CLI:
- GlotPress:
- WordPress:
Additional context
Issue Overview
Especially needed because of this bug where
$projectsis immediately overridden, so using--alldoesn't really work:traduttore/inc/CLI/LanguagePackCommand.php
Lines 228 to 247 in a9faec1
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Versions
Additional context