forked from WordPress/gutenberg
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP - add first pass at initial test
- Loading branch information
1 parent
f9908e5
commit 6fe9729
Showing
5 changed files
with
159 additions
and
6 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
packages/e2e-tests/plugins/lightbox-allow-editing-false-enabled-false.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
/** | ||
* Plugin Name: Lightbox Allow Editing False Enabled False | ||
* Plugin URI: https://github.com/WordPress/gutenberg | ||
* Author: Gutenberg Team | ||
* | ||
* @package gutenberg-lightbox-allow-editing-false-enabled-false | ||
*/ | ||
|
||
function filter_theme_json_theme( $theme_json ) { | ||
$new_data = array( | ||
'version' => 2, | ||
'settings' => array( | ||
'blocks' => array( | ||
'core/image' => array( | ||
'lightbox' => array( | ||
'allowEditing' => false, | ||
'enabled' => false, | ||
), | ||
), | ||
), | ||
), | ||
); | ||
// $theme_json = WP_Theme_JSON_Resolver::get_theme_data(); | ||
return $theme_json->update_with( $new_data ); | ||
} | ||
add_filter( 'wp_theme_json_data_theme', 'filter_theme_json_theme' ); |
27 changes: 27 additions & 0 deletions
27
packages/e2e-tests/plugins/lightbox-allow-editing-false-enabled-true.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
/** | ||
* Plugin Name: Lightbox Allow Editing False Enabled True | ||
* Plugin URI: https://github.com/WordPress/gutenberg | ||
* Author: Gutenberg Team | ||
* | ||
* @package gutenberg-lightbox-allow-editing-false-enabled-true | ||
*/ | ||
|
||
function filter_theme_json_theme( $theme_json ) { | ||
$new_data = array( | ||
'version' => 2, | ||
'settings' => array( | ||
'blocks' => array( | ||
'core/image' => array( | ||
'lightbox' => array( | ||
'allowEditing' => false, | ||
'enabled' => true, | ||
), | ||
), | ||
), | ||
), | ||
); | ||
// $theme_json = WP_Theme_JSON_Resolver::get_theme_data(); | ||
return $theme_json->update_with( $new_data ); | ||
} | ||
add_filter( 'wp_theme_json_data_theme', 'filter_theme_json_theme' ); |
27 changes: 27 additions & 0 deletions
27
packages/e2e-tests/plugins/lightbox-allow-editing-true-enabled-false.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
/** | ||
* Plugin Name: Lightbox Allow Editing True Enabled False | ||
* Plugin URI: https://github.com/WordPress/gutenberg | ||
* Author: Gutenberg Team | ||
* | ||
* @package gutenberg-lightbox-allow-editing-true-enabled-false | ||
*/ | ||
|
||
function filter_theme_json_theme( $theme_json ) { | ||
$new_data = array( | ||
'version' => 2, | ||
'settings' => array( | ||
'blocks' => array( | ||
'core/image' => array( | ||
'lightbox' => array( | ||
'allowEditing' => true, | ||
'enabled' => false, | ||
), | ||
), | ||
), | ||
), | ||
); | ||
// $theme_json = WP_Theme_JSON_Resolver::get_theme_data(); | ||
return $theme_json->update_with( $new_data ); | ||
} | ||
add_filter( 'wp_theme_json_data_theme', 'filter_theme_json_theme' ); |
27 changes: 27 additions & 0 deletions
27
packages/e2e-tests/plugins/lightbox-allow-editing-true-enabled-true.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
/** | ||
* Plugin Name: Lightbox Allow Editing True Enabled true | ||
* Plugin URI: https://github.com/WordPress/gutenberg | ||
* Author: Gutenberg Team | ||
* | ||
* @package gutenberg-lightbox-allow-editing-true-enabled-true | ||
*/ | ||
|
||
function filter_theme_json_theme( $theme_json ) { | ||
$new_data = array( | ||
'version' => 2, | ||
'settings' => array( | ||
'blocks' => array( | ||
'core/image' => array( | ||
'lightbox' => array( | ||
'allowEditing' => true, | ||
'enabled' => true, | ||
), | ||
), | ||
), | ||
), | ||
); | ||
// $theme_json = WP_Theme_JSON_Resolver::get_theme_data(); | ||
return $theme_json->update_with( $new_data ); | ||
} | ||
add_filter( 'wp_theme_json_data_theme', 'filter_theme_json_theme' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters