diff --git a/admin/load.php b/admin/load.php index c029fac954..33b4a7bd5e 100644 --- a/admin/load.php +++ b/admin/load.php @@ -167,10 +167,15 @@ function perflab_render_modules_page_field( $module_slug, $module_data, $module_
" class="description">
- +- + +
+ + ++
@@ -317,10 +322,11 @@ function perflab_get_module_data( $module_file ) { $module_dir = $matches[1]; $default_headers = array( - 'name' => 'Module Name', - 'description' => 'Description', - 'experimental' => 'Experimental', - 'notice' => 'Notice', + 'name' => 'Module Name', + 'description' => 'Description', + 'experimental' => 'Experimental', + 'enabled-notice' => 'Enabled Notice', + 'disabled-notice' => 'Disabled Notice', ); $module_data = get_file_data( $module_file, $default_headers, 'perflab_module' ); @@ -347,9 +353,10 @@ function perflab_get_module_data( $module_file ) { // Translate fields using low-level function since they come from PHP comments, including the necessary context for // `_x()`. This must match how these are translated in the generated `/module-i18n.php` file. $translatable_fields = array( - 'name' => 'module name', - 'description' => 'module description', - 'notice' => 'module notice', + 'name' => 'module name', + 'description' => 'module description', + 'enabled-notice' => 'module enabled notice', + 'disabled-notice' => 'module disabled notice', ); foreach ( $translatable_fields as $field => $context ) { // phpcs:ignore WordPress.WP.I18n.LowLevelTranslationFunction,WordPress.WP.I18n.NonSingularStringLiteralContext,WordPress.WP.I18n.NonSingularStringLiteralText diff --git a/modules/database/sqlite/load.php b/modules/database/sqlite/load.php index 01811d8bd1..2dec20c7d0 100644 --- a/modules/database/sqlite/load.php +++ b/modules/database/sqlite/load.php @@ -2,7 +2,8 @@ /** * Module Name: SQLite Integration * Description: Use an SQLite database instead of MySQL. - * Notice: CAUTION: Enabling this module will bring up the WordPress installation screen. You will need to reconfigure your site, and you will lose all your data. If you then disable the module, you will get back to your previous MySQL database, with all your previous data intact. + * Disabled Notice: Enabling this module will bring up the WordPress installation screen. You will need to reconfigure your site, and start with a fresh site. Disabling the module you will get back to your previous MySQL database, with all your previous data intact. + * Enabled Notice: Your site is currently using an SQLite database. You can disable this module to get back to your previous MySQL database, with all your previous data intact. * Experimental: Yes * * @package performance-lab diff --git a/tests/admin/load-tests.php b/tests/admin/load-tests.php index 9d9764d3e2..c547447010 100644 --- a/tests/admin/load-tests.php +++ b/tests/admin/load-tests.php @@ -9,28 +9,32 @@ class Admin_Load_Tests extends WP_UnitTestCase { private static $demo_modules = array( 'js-and-css/demo-module-1' => array( - 'name' => 'Demo Module 1', - 'description' => 'This is the description for demo module 1.', - 'experimental' => false, - 'notice' => '', - 'focus' => 'js-and-css', - 'slug' => 'demo-module-1', + 'javascript/demo-module-1' => array( + 'name' => 'Demo Module 1', + 'description' => 'This is the description for demo module 1.', + 'experimental' => false, + 'enabled-notice' => '', + 'disabled-notice' => '', + 'focus' => 'js-and-css', + 'slug' => 'demo-module-1', ), 'something/demo-module-2' => array( - 'name' => 'Demo Module 2', - 'description' => 'This is the description for demo module 2.', - 'experimental' => true, - 'notice' => '', - 'focus' => 'something', - 'slug' => 'demo-module-2', + 'name' => 'Demo Module 2', + 'description' => 'This is the description for demo module 2.', + 'experimental' => true, + 'enabled-notice' => '', + 'disabled-notice' => '', + 'focus' => 'something', + 'slug' => 'demo-module-2', ), 'images/demo-module-3' => array( - 'name' => 'Demo Module 3', - 'description' => 'This is the description for demo module 3.', - 'experimental' => false, - 'notice' => '', - 'focus' => 'images', - 'slug' => 'demo-module-3', + 'name' => 'Demo Module 3', + 'description' => 'This is the description for demo module 3.', + 'experimental' => false, + 'enabled-notice' => '', + 'disabled-notice' => '', + 'focus' => 'images', + 'slug' => 'demo-module-3', ), );