* * @copyright (c) 2018, Incsub (http://incsub.com) */ if ( ! class_exists( 'WpSmushRecommender' ) ) { class WpSmushRecommender { /** * WpSmushRecommender constructor. */ public function __construct() { // Hook UI at the end of Settings UI. add_action( 'smush_admin_ui_bottom', array( $this, 'ui' ), 12 ); } /** * Do not display Directory smush for Subsites * * @return bool True/False, whether to display the Directory smush or not. */ public function should_continue() { global $wp_smush; // Do not show directory smush, if not main site in a network. if ( $wp_smush->validate_install() ) { return false; } return true; } /** * Output the required UI for Plugin recommendations. * * @return void */ public function ui() { if ( $this->should_continue() ) { ?>
recommendation_box( $hb_title, $hb_content, $hb_url, $hb_class, 1 ); // Defender. $df_title = esc_html__( 'Defender Security, Monitoring, and Hack Protection', 'wp-smushit' ); $df_content = esc_html__( 'Security Tweaks & Recommendations, File & Malware Scanning, Login & 404 Lockout Protection, Two-Factor Authentication & more.', 'wp-smushit' ); $df_class = 'defender'; $df_url = esc_url( 'https://wordpress.org/plugins/defender-security/' ); echo $this->recommendation_box( $df_title, $df_content, $df_url, $df_class, 2 ); // SmartCrawl. $sc_title = esc_html__( 'SmartCrawl Search Engine Optimization', 'wp-smushit' ); $sc_content = esc_html__( 'Customize Titles & Meta Data, OpenGraph, Twitter & Pinterest Support, Auto-Keyword Linking, SEO & Readability Analysis, Sitemaps, URL Crawler & more.', 'wp-smushit' ); $sc_class = 'smartcrawl'; $sc_url = esc_url( 'https://wordpress.org/plugins/smartcrawl-seo' ); echo $this->recommendation_box( $sc_title, $sc_content, $sc_url, $sc_class, 3 ); $site_url = esc_url( 'https://premium.wpmudev.org/projects/' ); $site_url = add_query_arg( array( 'utm_source' => 'smush', 'utm_medium' => 'plugin', 'utm_campaign' => 'smush_footer_upsell_notice', ), $site_url ); ?>

<?php esc_html_e( 'Try pro features for free!', 'wp-smushit' ); ?>