Skip to content

Commit

Permalink
feat: Set enable_image_source to on by default (#1879)
Browse files Browse the repository at this point in the history
* feat: Set `enable_image_source` to on by default

* Add changeset

* Update acceptance test for new default
  • Loading branch information
ChrisWiegman committed Apr 17, 2024
1 parent bced682 commit a478997
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/red-dots-juggle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@faustwp/wordpress-plugin': minor
---

The default settings for `enable_image_source` has been changed to "on" for new installs.
2 changes: 1 addition & 1 deletion plugins/faustwp/includes/settings/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()`.
Expand Down Expand Up @@ -191,4 +192,3 @@ function get_icon( $icon ) {

return '';
}

2 changes: 1 addition & 1 deletion plugins/faustwp/tests/acceptance/SettingsCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

/**
Expand Down

0 comments on commit a478997

Please sign in to comment.