Total Lines | 39 |
Code Lines | 25 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
10 | \WP_CLI::add_hook( 'after_add_command:i18n make-pot', function () { |
||
11 | class MakePotCommand extends \WP_CLI\I18n\MakePotCommand { |
||
1 ignored issue
–
show
|
|||
12 | public function __construct() { |
||
13 | parent::__construct(); |
||
14 | |||
15 | // https://github.com/wp-cli/i18n-command/blob/v2.0.1/src/MakePotCommand.php#L36-L44 |
||
16 | $this->exclude = array_diff( |
||
1 ignored issue
–
show
|
|||
17 | $this->exclude, |
||
18 | array( |
||
19 | 'vendor', |
||
20 | ) |
||
21 | ); |
||
22 | |||
23 | $this->exclude = array_merge( |
||
24 | $this->exclude, |
||
25 | array( |
||
26 | 'build', |
||
27 | 'deploy', |
||
28 | 'documentation', |
||
29 | 'etc', |
||
30 | 'repositories', |
||
31 | 'wordpress', |
||
32 | 'wp-content', |
||
33 | ) |
||
34 | ); |
||
35 | |||
36 | $this->include = array( |
||
1 ignored issue
–
show
|
|||
37 | 'admin', |
||
38 | 'includes', |
||
39 | 'templates', |
||
40 | 'vendor', |
||
41 | 'views', |
||
42 | '*.php', |
||
43 | ); |
||
44 | } |
||
45 | } |
||
46 | |||
47 | // https://github.com/wp-cli/i18n-command/blob/v2.0.1/i18n-command.php |
||
48 | \WP_CLI::add_command( 'pronamic i18n make-pot', '\Pronamic\WordPress\Pay\MakePotCommand' ); |
||
49 | // wp pronamic i18n make-pot . languages/pronamic_ideal.pot --slug="pronamic-ideal" |
||
51 |