diff options
Diffstat (limited to 'plugins/jetpack/modules/stats')
-rw-r--r-- | plugins/jetpack/modules/stats/class-jetpack-stats-upgrade-nudges.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/plugins/jetpack/modules/stats/class-jetpack-stats-upgrade-nudges.php b/plugins/jetpack/modules/stats/class-jetpack-stats-upgrade-nudges.php index 6557f972..a403929f 100644 --- a/plugins/jetpack/modules/stats/class-jetpack-stats-upgrade-nudges.php +++ b/plugins/jetpack/modules/stats/class-jetpack-stats-upgrade-nudges.php @@ -7,11 +7,10 @@ use Automattic\Jetpack\Connection\Manager; use Automattic\Jetpack\Jetpack_CRM_Data; +use Automattic\Jetpack\Plugins_Installer; use Automattic\Jetpack\Redirect; use Automattic\Jetpack\Tracking; -jetpack_require_lib( 'plugins' ); - /** * Class that adds a new section to the Stats Report page */ @@ -65,7 +64,7 @@ class Jetpack_Stats_Upgrade_Nudges { * @return boolean */ private static function is_plugin_installed( $plugin_file ) { - $plugins = Jetpack_Plugins::get_plugins(); + $plugins = Plugins_Installer::get_plugins(); return isset( $plugins[ $plugin_file ] ); } @@ -76,7 +75,7 @@ class Jetpack_Stats_Upgrade_Nudges { * @return boolean */ private static function is_plugin_active( $plugin_file ) { - $plugins = Jetpack_Plugins::get_plugins(); + $plugins = Plugins_Installer::get_plugins(); return isset( $plugins[ $plugin_file ] ) && isset( $plugins[ $plugin_file ]['active'] ) && $plugins[ $plugin_file ]['active']; } @@ -364,7 +363,7 @@ class Jetpack_Stats_Upgrade_Nudges { $additional_classes = $subitem ? 'jp-stats-report-upgrade-subitem' : ''; $button_class = $subitem ? 'is-secondary' : 'is-primary'; $icon_url = plugins_url( '', JETPACK__PLUGIN_FILE ) . '/images/products/' . $icon; - $button_label = is_null( $button_label ) ? __( 'Upgrade', 'jetpack' ) : $button_label; + $button_label = $button_label === null ? __( 'Upgrade', 'jetpack' ) : $button_label; $view_event = "stats_nudges_view_$tracks_id"; $click_event = "stats_nudges_click_$tracks_id"; $learn_more_event = "stats_nudges_learn_more_$tracks_id"; @@ -529,7 +528,7 @@ class Jetpack_Stats_Upgrade_Nudges { } if ( $print ) { $learn_link = self::get_upgrade_link( 'stats-nudges-crm-learn' ); - $text = __( 'Sell more and get more leads with the Jetpack CRM plugin built specifically for WordPress.', 'jetpack' ); + $text = __( 'Sell more and get more leads with the free Jetpack CRM plugin built specifically for WordPress.', 'jetpack' ); self::print_item( __( 'CRM', 'jetpack' ), $text, 'product-jetpack-crm.svg', $link, 'crm', $learn_link, false, $label ); } return true; |