Skip to content

Commit

Permalink
Merge pull request #155 from t-hamano/wp6.2
Browse files Browse the repository at this point in the history
WP6.2
  • Loading branch information
t-hamano authored Mar 15, 2023
2 parents 097ee1c + f318453 commit 517be5d
Show file tree
Hide file tree
Showing 42 changed files with 3,042 additions and 1,756 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/run-test-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
'8.0'
]
wp-versions: [
'WordPress#5.9.4',
'WordPress#5.9.5',
'WordPress#6.0.3',
'WordPress#6.1',
'WordPress#6.1.1',
'WordPress'
]
name: PHP ${{ matrix.php-versions }} / ${{ matrix.wp-versions }} Test
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
'8.0'
]
wp-versions: [
'WordPress#5.9.4',
'WordPress#5.9.5',
'WordPress#6.0.3',
'WordPress#6.1',
'WordPress#6.1.1',
'WordPress'
]
name: PHP ${{ matrix.php-versions }} / ${{ matrix.wp-versions }} Test
Expand Down
3 changes: 2 additions & 1 deletion .wp-env.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"plugins": [ "." ],
"config": {
"WP_DEBUG": true
"WP_DEBUG": true,
"SCRIPT_DEBUG": true
}
}
4 changes: 2 additions & 2 deletions classes/class-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public function update_options( $request ) {
return rest_ensure_response(
array(
'status' => 'success',
'message' => __( 'Setting saved.', 'flexible-table-block' ),
'message' => __( 'Global setting saved.', 'flexible-table-block' ),
'block_css' => Helper::minify_css( Helper::get_block_css( '.editor-styles-wrapper ' ) ),
)
);
Expand All @@ -149,7 +149,7 @@ public function delete_options() {
array(
'options' => Settings::get_options(),
'status' => 'success',
'message' => __( 'Settings have been restored.', 'flexible-table-block' ),
'message' => __( 'Global setting restored.', 'flexible-table-block' ),
'block_css' => Helper::minify_css( Helper::get_block_css( '.editor-styles-wrapper ' ) ),
)
);
Expand Down
16 changes: 8 additions & 8 deletions classes/class-helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ public static function get_block_css( $prefix = '' ) {
// CSS selectors.
$styles = array(
"{$selector} > table" => '',
"{$selector}.is-style-stripes tr:nth-child(odd) th" => '',
"{$selector}.is-style-stripes tr:nth-child(odd) td" => '',
"{$selector}.is-style-stripes tr:nth-child(even) th" => '',
"{$selector}.is-style-stripes tr:nth-child(even) td" => '',
"{$selector}.is-style-stripes tbody tr:nth-child(odd) th" => '',
"{$selector}.is-style-stripes tbody tr:nth-child(odd) td" => '',
"{$selector}.is-style-stripes tbody tr:nth-child(even) th" => '',
"{$selector}.is-style-stripes tbody tr:nth-child(even) td" => '',
"{$selector} > table tr th, {$selector} > table tr td" => '',
"{$selector} > table tr th" => '',
"{$selector} > table tr td" => '',
Expand All @@ -49,12 +49,12 @@ public static function get_block_css( $prefix = '' ) {
$styles[ "{$selector} > table" ] .= "border-collapse:{$value};";
break;
case 'row_odd_color':
$styles[ "{$selector}.is-style-stripes tr:nth-child(odd) th" ] .= "background-color:{$value};";
$styles[ "{$selector}.is-style-stripes tr:nth-child(odd) td" ] .= "background-color:{$value};";
$styles[ "{$selector}.is-style-stripes tbody tr:nth-child(odd) th" ] .= "background-color:{$value};";
$styles[ "{$selector}.is-style-stripes tbody tr:nth-child(odd) td" ] .= "background-color:{$value};";
break;
case 'row_even_color':
$styles[ "{$selector}.is-style-stripes tr:nth-child(even) th" ] .= "background-color:{$value};";
$styles[ "{$selector}.is-style-stripes tr:nth-child(even) td" ] .= "background-color:{$value};";
$styles[ "{$selector}.is-style-stripes tbody tr:nth-child(even) th" ] .= "background-color:{$value};";
$styles[ "{$selector}.is-style-stripes tbody tr:nth-child(even) td" ] .= "background-color:{$value};";
break;
case 'cell_text_align':
$styles[ "{$selector} > table tr th, {$selector} > table tr td" ] .= "text-align:{$value};";
Expand Down
2 changes: 1 addition & 1 deletion classes/class-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Settings {
'type' => 'boolean',
'default' => false,
),
// Set the screen width (breakpoint) as the basis for switching between PC and mobile devices.
// Set the screen width (breakpoint) as the basis for switching between desktop and mobile devices.
'breakpoint' => array(
'type' => 'number',
'default' => 768,
Expand Down
2 changes: 1 addition & 1 deletion flexible-table-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Description: Easily create flexible configuration tables.
* Requires at least: 5.9
* Requires PHP: 7.3
* Version: 2.8.0
* Version: 2.9.0
* Author: Aki Hamano
* Author URI: https://github.com/t-hamano
* License: GPL2 or later
Expand Down
Loading

0 comments on commit 517be5d

Please sign in to comment.