From 20b74dc8adc042e5eacf8784f39961fa301c8149 Mon Sep 17 00:00:00 2001 From: Chris Wiegman Date: Tue, 16 Apr 2024 11:48:49 -0500 Subject: [PATCH 1/3] feat: Set `enable_image_source` to on by default --- plugins/faustwp/includes/settings/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/faustwp/includes/settings/functions.php b/plugins/faustwp/includes/settings/functions.php index f92fde50d..dda231956 100644 --- a/plugins/faustwp/includes/settings/functions.php +++ b/plugins/faustwp/includes/settings/functions.php @@ -159,6 +159,7 @@ function maybe_set_default_settings() { faustwp_update_setting( 'disable_theme', '0' ); faustwp_update_setting( 'enable_rewrites', '1' ); faustwp_update_setting( 'enable_redirects', '1' ); + faustwp_update_setting( 'enable_image_source', '1' ); // Force WP to regenerate rewrite rules without calling flush_rewrite_rules which breaks // things when used inside of `switch_to_blog()`. @@ -191,4 +192,3 @@ function get_icon( $icon ) { return ''; } - From 191ece8545b07118bb3795d937106ce7422a199a Mon Sep 17 00:00:00 2001 From: Chris Wiegman Date: Tue, 16 Apr 2024 11:55:27 -0500 Subject: [PATCH 2/3] Add changeset --- .changeset/red-dots-juggle.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/red-dots-juggle.md diff --git a/.changeset/red-dots-juggle.md b/.changeset/red-dots-juggle.md new file mode 100644 index 000000000..1c4e82be8 --- /dev/null +++ b/.changeset/red-dots-juggle.md @@ -0,0 +1,5 @@ +--- +'@faustwp/wordpress-plugin': minor +--- + +The default settings for `enable_image_source` has been changed to "on" for new installs. From 0d988f23b81602cd601b5a6bb38bd87aab89cb57 Mon Sep 17 00:00:00 2001 From: Chris Wiegman Date: Tue, 16 Apr 2024 12:02:18 -0500 Subject: [PATCH 3/3] Update acceptance test for new default --- plugins/faustwp/tests/acceptance/SettingsCest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/faustwp/tests/acceptance/SettingsCest.php b/plugins/faustwp/tests/acceptance/SettingsCest.php index 4c7ff6be2..024314e68 100644 --- a/plugins/faustwp/tests/acceptance/SettingsCest.php +++ b/plugins/faustwp/tests/acceptance/SettingsCest.php @@ -37,7 +37,7 @@ public function i_can_see_the_default_settings(AcceptanceTester $I) $I->dontSeeCheckboxIsChecked('#disable_theme'); $I->seeCheckboxIsChecked('#enable_rewrites'); $I->seeCheckboxIsChecked('#enable_redirects'); - $I->dontSeeCheckboxIsChecked('#enable_image_source'); + $I->seeCheckboxIsChecked('#enable_image_source'); } /**