Skip to content

Commit

Permalink
Remove the Image Guide feature-flag (#28244)
Browse files Browse the repository at this point in the history
* Enable the Image Guide without a feature-flag

* changelog

Co-authored-by: Mark George <thingalon@gmail.com>
  • Loading branch information
thingalon and Mark George authored Jan 11, 2023
1 parent ba11d9e commit 4706f20
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function setup() {
}

// phpcs:ignore WordPress.Security.NonceVerification.Recommended
$override = defined( 'JETPACK_BOOST_IMAGE_GUIDE' ) && JETPACK_BOOST_IMAGE_GUIDE && isset( $_GET['jb-debug-ig'] );
$override = isset( $_GET['jb-debug-ig'] );

// Show the UI only when the user is logged in, with sufficient permissions and isn't looking at the dashboard.
if ( true !== $override && ( is_admin() || ! is_user_logged_in() || ! current_user_can( 'manage_options' ) ) ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,9 @@ public function __construct() {
new $critical_css_class(),
new Lazy_Images(),
new Render_Blocking_JS(),
new Image_Guide(),
);

if ( defined( 'JETPACK_BOOST_IMAGE_GUIDE' ) && JETPACK_BOOST_IMAGE_GUIDE ) {
$features[] = new Image_Guide();
}

foreach ( $features as $feature ) {
$slug = $feature->get_slug();
$this->features[ $slug ] = new Optimization( $feature );
Expand Down
4 changes: 4 additions & 0 deletions projects/plugins/boost/changelog/boost-enable-image-guide
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: added

Enable the Image Guide feature without a constant

0 comments on commit 4706f20

Please sign in to comment.