Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed early translations loading error #150

Open
wants to merge 2 commits into
base: development
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test-php.yml
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ jobs:
run: composer run lint
phpunit:
name: Phpunit
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
services:
mysql:
image: mysql:5.7
2 changes: 1 addition & 1 deletion inc/Block_Patterns.php
Original file line number Diff line number Diff line change
@@ -37,7 +37,6 @@ class Block_Patterns {
* Block_Patterns constructor.
*/
public function __construct() {
$this->setup_properties();

add_action( 'init', array( $this, 'run' ) );
}
@@ -48,6 +47,7 @@ public function __construct() {
* @return void
*/
public function run() {
$this->setup_properties();
$this->register_categories();
$this->register_patterns();
}
23 changes: 20 additions & 3 deletions inc/Block_Styles.php
Original file line number Diff line number Diff line change
@@ -26,6 +26,26 @@ class Block_Styles {
* Block Styles constructor.
*/
public function __construct() {

add_action( 'init', array( $this, 'run' ) );
}

/**
* Run the class functionality.
*
* @return void
*/
public function run() {
$this->setup_properties();
$this->add_block_styles();
}

/**
* Setup class properties.
*
* @return void
*/
private function setup_properties() {
$this->styles = array(
'core/categories' => array(
array(
@@ -34,9 +54,6 @@ public function __construct() {
),
),
);

add_action( 'init', array( $this, 'add_block_styles' ) );

}

/**