@@ -23,27 +23,27 @@ discard block |
||
23 | 23 | * @param array $defaults Defaults label. |
24 | 24 | * @return array |
25 | 25 | */ |
26 | - public function get_labels( $singular, $plural, $is_female = false, $defaults = [] ) { |
|
27 | - $singular_lower = strtolower( $singular ); |
|
28 | - $plural_lower = strtolower( $plural ); |
|
26 | + public function get_labels($singular, $plural, $is_female = false, $defaults = [ ]) { |
|
27 | + $singular_lower = strtolower($singular); |
|
28 | + $plural_lower = strtolower($plural); |
|
29 | 29 | |
30 | 30 | $labels = [ |
31 | 31 | /* translators: %s label singular lower. */ |
32 | - 'update_item' => sprintf( __( 'Atualizar %s', 'wpsteak' ), $singular_lower ), |
|
32 | + 'update_item' => sprintf(__('Atualizar %s', 'wpsteak'), $singular_lower), |
|
33 | 33 | /* translators: %s label singular lower. */ |
34 | - 'new_item_name' => sprintf( _n( 'Nome da nova %s', 'Nome do novo %s', $is_female, 'wpsteak' ), $singular_lower ), |
|
34 | + 'new_item_name' => sprintf(_n('Nome da nova %s', 'Nome do novo %s', $is_female, 'wpsteak'), $singular_lower), |
|
35 | 35 | /* translators: %s label singular. */ |
36 | - 'parent_item' => sprintf( __( '%s pai', 'wpsteak' ), $singular ), |
|
36 | + 'parent_item' => sprintf(__('%s pai', 'wpsteak'), $singular), |
|
37 | 37 | /* translators: %s label singular. */ |
38 | - 'popular_items' => sprintf( __( '%s populares', 'wpsteak' ), $singular ), |
|
38 | + 'popular_items' => sprintf(__('%s populares', 'wpsteak'), $singular), |
|
39 | 39 | /* translators: %s label plural lower. */ |
40 | - 'separate_items_with_commas' => sprintf( _n( 'Separe as %s com virgulas', 'Separe os %s com virgulas', $is_female, 'wpsteak' ), $plural_lower ), |
|
40 | + 'separate_items_with_commas' => sprintf(_n('Separe as %s com virgulas', 'Separe os %s com virgulas', $is_female, 'wpsteak'), $plural_lower), |
|
41 | 41 | /* translators: %s label singular lower. */ |
42 | - 'add_or_remove_items' => sprintf( __( 'Adicionar ou remover %s', 'wpsteak' ), $singular_lower ), |
|
42 | + 'add_or_remove_items' => sprintf(__('Adicionar ou remover %s', 'wpsteak'), $singular_lower), |
|
43 | 43 | /* translators: %s label plural lower. */ |
44 | - 'choose_from_most_used' => sprintf( _n( 'Escolher entre as %s mais usadas', 'Escolher entre os %s mais usados', $is_female, 'wpsteak' ), $plural_lower ), |
|
44 | + 'choose_from_most_used' => sprintf(_n('Escolher entre as %s mais usadas', 'Escolher entre os %s mais usados', $is_female, 'wpsteak'), $plural_lower), |
|
45 | 45 | /* translators: %s label singular lower. */ |
46 | - 'back_to_items' => sprintf( _n( 'Voltar para as %s', 'Voltar para os %s', $is_female, 'wpsteak' ), $plural_lower ), |
|
46 | + 'back_to_items' => sprintf(_n('Voltar para as %s', 'Voltar para os %s', $is_female, 'wpsteak'), $plural_lower), |
|
47 | 47 | ]; |
48 | 48 | |
49 | 49 | $labels = array_merge( |
@@ -57,6 +57,6 @@ discard block |
||
57 | 57 | ) |
58 | 58 | ); |
59 | 59 | |
60 | - return array_merge( $labels, $defaults ); |
|
60 | + return array_merge($labels, $defaults); |
|
61 | 61 | } |
62 | 62 | } |
@@ -23,36 +23,36 @@ discard block |
||
23 | 23 | * @param array $defaults Defaults label. |
24 | 24 | * @return array |
25 | 25 | */ |
26 | - public function get_labels( $singular, $plural, $is_female = false, $defaults = [] ) { |
|
27 | - $singular_lower = strtolower( $singular ); |
|
28 | - $plural_lower = strtolower( $plural ); |
|
26 | + public function get_labels($singular, $plural, $is_female = false, $defaults = [ ]) { |
|
27 | + $singular_lower = strtolower($singular); |
|
28 | + $plural_lower = strtolower($plural); |
|
29 | 29 | |
30 | 30 | $labels = [ |
31 | - 'add_new' => _n( 'Adicionar nova', 'Adicionar novo', $is_female, 'wpsteak' ), |
|
31 | + 'add_new' => _n('Adicionar nova', 'Adicionar novo', $is_female, 'wpsteak'), |
|
32 | 32 | /* translators: %s label singular female lower; %s label singular male lower; */ |
33 | - 'new_item' => sprintf( _n( 'Nova %s', 'Novo %s', $is_female, 'wpsteak' ), $singular_lower ), |
|
33 | + 'new_item' => sprintf(_n('Nova %s', 'Novo %s', $is_female, 'wpsteak'), $singular_lower), |
|
34 | 34 | /* translators: %s label plural lower. */ |
35 | - 'view_items' => sprintf( __( 'Ver %s', 'wpsteak' ), $plural_lower ), |
|
35 | + 'view_items' => sprintf(__('Ver %s', 'wpsteak'), $plural_lower), |
|
36 | 36 | /* translators: %s label singular lower. */ |
37 | - 'not_found_in_trash' => sprintf( _n( 'Nenhuma %s encontrada na Lixeira.', 'Nenhum %s encontrado na Lixeira.', $is_female, 'wpsteak' ), $singular_lower ), |
|
37 | + 'not_found_in_trash' => sprintf(_n('Nenhuma %s encontrada na Lixeira.', 'Nenhum %s encontrado na Lixeira.', $is_female, 'wpsteak'), $singular_lower), |
|
38 | 38 | /* translators: %s label plural lower. */ |
39 | - 'archives' => sprintf( __( 'Arquivos de %s', 'wpsteak' ), $plural_lower ), |
|
39 | + 'archives' => sprintf(__('Arquivos de %s', 'wpsteak'), $plural_lower), |
|
40 | 40 | /* translators: %s label plural lower. */ |
41 | - 'attributes' => sprintf( __( 'Atributos de %s', 'wpsteak' ), $plural_lower ), |
|
41 | + 'attributes' => sprintf(__('Atributos de %s', 'wpsteak'), $plural_lower), |
|
42 | 42 | /* translators: %s label singular lower. */ |
43 | - 'insert_into_item' => sprintf( _n( 'Inserir na %s', 'Inserir no %s', $is_female, 'wpsteak' ), $singular_lower ), |
|
43 | + 'insert_into_item' => sprintf(_n('Inserir na %s', 'Inserir no %s', $is_female, 'wpsteak'), $singular_lower), |
|
44 | 44 | /* translators: %s label singular lower. */ |
45 | - 'uploaded_to_this_item' => sprintf( _n( 'Carregado para esta %s', 'Carregado para este %s', $is_female, 'wpsteak' ), $singular_lower ), |
|
46 | - 'featured_image' => __( 'Imagem destacada', 'wpsteak' ), |
|
47 | - 'set_featured_image' => __( 'Definir imagem destacada', 'wpsteak' ), |
|
48 | - 'remove_featured_image' => __( 'Remover imagem destacada', 'wpsteak' ), |
|
49 | - 'use_featured_image' => __( 'Usar como imagem destacada', 'wpsteak' ), |
|
45 | + 'uploaded_to_this_item' => sprintf(_n('Carregado para esta %s', 'Carregado para este %s', $is_female, 'wpsteak'), $singular_lower), |
|
46 | + 'featured_image' => __('Imagem destacada', 'wpsteak'), |
|
47 | + 'set_featured_image' => __('Definir imagem destacada', 'wpsteak'), |
|
48 | + 'remove_featured_image' => __('Remover imagem destacada', 'wpsteak'), |
|
49 | + 'use_featured_image' => __('Usar como imagem destacada', 'wpsteak'), |
|
50 | 50 | /* translators: %s label plural lower. */ |
51 | - 'filter_items_list' => sprintf( __( 'Filtrar lista de %s', 'wpsteak' ), $plural_lower ), |
|
51 | + 'filter_items_list' => sprintf(__('Filtrar lista de %s', 'wpsteak'), $plural_lower), |
|
52 | 52 | /* translators: %s label plural lower. */ |
53 | - 'items_list_navigation' => sprintf( __( 'Navegação da lista de %s', 'wpsteak' ), $plural_lower ), |
|
53 | + 'items_list_navigation' => sprintf(__('Navegação da lista de %s', 'wpsteak'), $plural_lower), |
|
54 | 54 | /* translators: %s label plural lower. */ |
55 | - 'items_list' => sprintf( __( 'Lista de %s', 'wpsteak' ), $plural_lower ), |
|
55 | + 'items_list' => sprintf(__('Lista de %s', 'wpsteak'), $plural_lower), |
|
56 | 56 | 'name_admin_bar' => $singular, |
57 | 57 | ]; |
58 | 58 | |
@@ -67,6 +67,6 @@ discard block |
||
67 | 67 | ) |
68 | 68 | ); |
69 | 69 | |
70 | - return array_merge( $labels, $defaults ); |
|
70 | + return array_merge($labels, $defaults); |
|
71 | 71 | } |
72 | 72 | } |
@@ -21,25 +21,25 @@ |
||
21 | 21 | * @param boolean $is_female Is female label. |
22 | 22 | * @return array |
23 | 23 | */ |
24 | - protected static function get_defaults( $singular, $singular_lower, $plural, $plural_lower, $is_female = false ) { |
|
24 | + protected static function get_defaults($singular, $singular_lower, $plural, $plural_lower, $is_female = false) { |
|
25 | 25 | return [ |
26 | 26 | 'name' => $plural, |
27 | 27 | 'singular_name' => $singular, |
28 | 28 | 'menu_name' => $plural, |
29 | 29 | /* translators: %s label plural lower. */ |
30 | - 'all_items' => sprintf( _n( 'Todas %s', 'Todos %s', $is_female, 'wpsteak' ), $plural_lower ), |
|
30 | + 'all_items' => sprintf(_n('Todas %s', 'Todos %s', $is_female, 'wpsteak'), $plural_lower), |
|
31 | 31 | /* translators: %s label singular lower. */ |
32 | - 'edit_item' => sprintf( __( 'Editar %s', 'wpsteak' ), $singular_lower ), |
|
32 | + 'edit_item' => sprintf(__('Editar %s', 'wpsteak'), $singular_lower), |
|
33 | 33 | /* translators: %s label singular lower. */ |
34 | - 'view_item' => sprintf( __( 'Ver %s', 'wpsteak' ), $singular_lower ), |
|
34 | + 'view_item' => sprintf(__('Ver %s', 'wpsteak'), $singular_lower), |
|
35 | 35 | /* translators: %s label singular lower. */ |
36 | - 'add_new_item' => sprintf( _n( 'Adicionar nova %s', 'Adicionar novo %s', $is_female, 'wpsteak' ), $singular_lower ), |
|
36 | + 'add_new_item' => sprintf(_n('Adicionar nova %s', 'Adicionar novo %s', $is_female, 'wpsteak'), $singular_lower), |
|
37 | 37 | /* translators: %s label singular. */ |
38 | - 'parent_item_colon' => sprintf( __( '%s pai:', 'wpsteak' ), $singular ), |
|
38 | + 'parent_item_colon' => sprintf(__('%s pai:', 'wpsteak'), $singular), |
|
39 | 39 | /* translators: %s label plural lower. */ |
40 | - 'search_items' => sprintf( __( 'Buscar %s', 'wpsteak' ), $plural_lower ), |
|
40 | + 'search_items' => sprintf(__('Buscar %s', 'wpsteak'), $plural_lower), |
|
41 | 41 | /* translators: %s label singular lower. */ |
42 | - 'not_found' => sprintf( _n( 'Nenhuma %s encontrada.', 'Nenhum %s encontrado.', $is_female, 'wpsteak' ), $singular_lower ), |
|
42 | + 'not_found' => sprintf(_n('Nenhuma %s encontrada.', 'Nenhum %s encontrado.', $is_female, 'wpsteak'), $singular_lower), |
|
43 | 43 | ]; |
44 | 44 | } |
45 | 45 | } |
@@ -20,13 +20,13 @@ |
||
20 | 20 | * @param array $context Context. |
21 | 21 | * @return void |
22 | 22 | */ |
23 | - public function log( $level, $message, array $context = array() ) { |
|
24 | - if ( ! ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ) { |
|
23 | + public function log($level, $message, array $context = array()) { |
|
24 | + if ( ! (defined('WP_DEBUG') && WP_DEBUG)) { |
|
25 | 25 | return; |
26 | 26 | } |
27 | 27 | |
28 | 28 | /* @phpcs:ignore */ |
29 | - error_log( strtoupper( $level ) . ': ' . $message . ' ' . ( ! empty( $context ) ? print_r( $context, true ) : '' ) ); |
|
29 | + error_log(strtoupper($level) . ': ' . $message . ' ' . ( ! empty($context) ? print_r($context, true) : '')); |
|
30 | 30 | } |
31 | 31 | } |
32 | 32 |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | |
17 | 17 | use Cedaro\WP\Plugin\PluginFactory; |
18 | 18 | |
19 | -if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) { |
|
19 | +if (file_exists(__DIR__ . '/vendor/autoload.php')) { |
|
20 | 20 | require __DIR__ . '/vendor/autoload.php'; |
21 | 21 | } |
22 | 22 | |
@@ -28,8 +28,8 @@ discard block |
||
28 | 28 | function wpsteak() { |
29 | 29 | static $instance; |
30 | 30 | |
31 | - if ( null === $instance ) { |
|
32 | - $instance = PluginFactory::create( 'wpsteak' ); |
|
31 | + if (null === $instance) { |
|
32 | + $instance = PluginFactory::create('wpsteak'); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | return $instance; |
@@ -39,20 +39,20 @@ discard block |
||
39 | 39 | |
40 | 40 | /* register the reflection container as a delegate to enable auto wiring. */ |
41 | 41 | $container->delegate( |
42 | - ( new League\Container\ReflectionContainer() )->cacheResolutions() |
|
42 | + (new League\Container\ReflectionContainer())->cacheResolutions() |
|
43 | 43 | ); |
44 | 44 | |
45 | 45 | $plugin = wpsteak(); |
46 | 46 | |
47 | -$plugin->set_container( $container ); |
|
48 | -$plugin->register_hooks( $container->get( Cedaro\WP\Plugin\Provider\I18n::class ) ); |
|
47 | +$plugin->set_container($container); |
|
48 | +$plugin->register_hooks($container->get(Cedaro\WP\Plugin\Provider\I18n::class)); |
|
49 | 49 | |
50 | -$config = ( require __DIR__ . '/config.php' ); |
|
50 | +$config = (require __DIR__ . '/config.php'); |
|
51 | 51 | |
52 | -foreach ( $config['service_providers'] as $service_provider ) { |
|
53 | - $container->addServiceProvider( $service_provider ); |
|
52 | +foreach ($config[ 'service_providers' ] as $service_provider) { |
|
53 | + $container->addServiceProvider($service_provider); |
|
54 | 54 | } |
55 | 55 | |
56 | -foreach ( $config['hook_providers'] as $hook_provider ) { |
|
57 | - $plugin->register_hooks( $container->get( $hook_provider ) ); |
|
56 | +foreach ($config[ 'hook_providers' ] as $hook_provider) { |
|
57 | + $plugin->register_hooks($container->get($hook_provider)); |
|
58 | 58 | } |
@@ -10,7 +10,7 @@ |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | return [ |
13 | - 'service_providers' => [], |
|
13 | + 'service_providers' => [ ], |
|
14 | 14 | 'hook_providers' => [ |
15 | 15 | App\Providers\Assets::class, |
16 | 16 | ], |