Skip to content

Commit

Permalink
Feature Hints: disable when plugins cannot be installed on sit… (#14108)
Browse files Browse the repository at this point in the history
* Feature Hints: disable when plugins cannot be installed on site.

When one cannot install plugins, we do not have to do anything with feature hints.

* Comment new conditional

See #14108 (comment)
  • Loading branch information
jeherve authored Nov 25, 2019
1 parent 7be097d commit 5f3a9b5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/plugin-search.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

use Automattic\Jetpack\Constants;
use Automattic\Jetpack\Tracking;

/**
Expand All @@ -15,6 +16,8 @@
Jetpack::is_active() &&
/** This filter is documented in _inc/lib/admin-pages/class.jetpack-react-page.php */
apply_filters( 'jetpack_show_promotions', true ) &&
// Disable feature hints when plugins cannot be installed.
! Constants::is_true( 'DISALLOW_FILE_MODS' ) &&
jetpack_is_psh_active()
) {
Jetpack_Plugin_Search::init();
Expand Down

0 comments on commit 5f3a9b5

Please sign in to comment.