esc_html__('Add-ons', 'mailchimp-for-wp'), 'text' => esc_html__('Add-ons', 'mailchimp-for-wp'), 'slug' => 'extensions', 'callback' => [ $this, 'show_extensions_page' ], 'position' => 100, ]; return $items; } /** * Add text row to "Form > Appearance" tab. */ public function after_form_appearance_settings_rows() { echo ''; echo ''; echo '

'; echo wp_kses( sprintf( /* translators: %s is a URL to the premium features page. */ __('Want to customize the style of your form? Try our Styles Builder & edit the look of your forms with just a few clicks.', 'mailchimp-for-wp'), esc_url('https://www.mc4wp.com/premium-features/#utm_source=wp-plugin&utm_medium=mailchimp-for-wp&utm_campaign=form-settings-link') ), [ 'a' => [ 'href' => [] ] ] ); echo '

'; echo ''; echo ''; } /** * Add text row to "Form > Settings" tab. */ public function after_form_settings_rows() { echo ''; echo ''; echo '

'; if (wp_rand(1, 2) === 1) { // translators: %s is a URL to the premium features page. echo wp_kses( sprintf( /* translators: %s is a URL to the premium features page. */ __('Be notified whenever someone subscribes? Mailchimp for WordPress Premium allows you to set up email notifications for your forms.', 'mailchimp-for-wp'), esc_url('https://www.mc4wp.com/premium-features/#utm_source=wp-plugin&utm_medium=mailchimp-for-wp&utm_campaign=footer-link') ), [ 'a' => [ 'href' => [] ] ] ); } else { // translators: %s is a URL to the premium features page. echo wp_kses( sprintf( /* translators: %s is a URL to the premium features page. */ __('Increased conversions? Mailchimp for WordPress Premium submits forms without reloading the entire page, resulting in a much better experience for your visitors.', 'mailchimp-for-wp'), esc_url('https://www.mc4wp.com/premium-features/#utm_source=wp-plugin&utm_medium=mailchimp-for-wp&utm_campaign=form-settings-link') ), [ 'a' => [ 'href' => [] ] ] ); } echo '

'; echo ''; echo ''; } /** * @param array $links * * @return array */ public function plugin_meta_links($links) { $links[] = '' . esc_html__('Upgrade to Premium', 'mailchimp-for-wp') . ''; return $links; } /** * Add several texts to admin footer. */ public function admin_footer() { if (isset($_GET['view']) && $_GET['view'] === 'edit-form') { // WPML & Polylang specific message if (defined('ICL_LANGUAGE_CODE')) { // translators: %s is a URL to the premium features page. echo '

' . wp_kses( sprintf( /* translators: %s is a URL to the premium features page. */ __('Do you want translated forms for all of your languages? Try Mailchimp for WordPress Premium, which does just that plus more.', 'mailchimp-for-wp'), esc_url('https://www.mc4wp.com/premium-features/#utm_source=wp-plugin&utm_medium=mailchimp-for-wp&utm_campaign=footer-link') ), [ 'a' => [ 'href' => [] ] ] ) . '

'; return; } // General "edit form" message // translators: %s is a URL to the premium features page. echo '

' . wp_kses( sprintf( /* translators: %s is a URL to the premium features page. */ __('Do you want to create more than one form? Our Premium add-on does just that! Have a look at all Premium benefits.', 'mailchimp-for-wp'), esc_url('https://www.mc4wp.com/premium-features/#utm_source=wp-plugin&utm_medium=mailchimp-for-wp&utm_campaign=footer-link') ), [ 'a' => [ 'href' => [] ] ] ) . '

'; return; } // General message // translators: %s is a URL to the premium features page. echo '

' . wp_kses( sprintf( /* translators: %s is a URL to the premium features page. */ __('Are you enjoying this plugin? The Premium add-on unlocks several powerful features. Find out about all benefits now.', 'mailchimp-for-wp'), esc_url('https://www.mc4wp.com/premium-features/#utm_source=wp-plugin&utm_medium=mailchimp-for-wp&utm_campaign=footer-link') ), [ 'a' => [ 'href' => [] ] ] ) . '

'; } /** * Add email opt-in form to sidebar */ public function admin_sidebar() { echo ''; echo '
'; echo '
'; echo '

Mailchimp for WordPress Premium

'; echo '

'; echo 'You are currently using the free version of Mailchimp for WordPress. '; echo '

'; echo '

'; echo 'There is a Premium version of this plugin that adds several powerful features. Like multiple and improved sign-up forms, an easier way to visually enhance those forms, advanced e-commerce integration and keeping track of all sign-up attempts in your local WordPress database.'; echo '

'; echo '

You can have all those benefits for a small yearly fee. Take a look at Mailchimp for WordPress Premium here.

'; echo '
'; echo '
'; } /** * Show notice about E-Commerce integration in Premium. */ public function ecommerce() { // detect whether WooCommerce is installed & activated. if (! class_exists('WooCommerce')) { return; } echo '
'; echo '

Advanced WooCommerce integration for Mailchimp

'; echo '

'; echo esc_html__('Do you want to track all WooCommerce orders in Mailchimp so you can send emails based on the purchase activity of your subscribers?', 'mailchimp-for-wp'); echo '

'; echo '

'; // translators: 1: URL to the premium upgrade page, 2: URL to the e-commerce features documentation. echo wp_kses( sprintf( /* translators: 1: URL to the premium upgrade page, 2: URL to the e-commerce features documentation. */ __('Upgrade to Mailchimp for WordPress Premium or read more about Mailchimp\'s E-Commerce features.', 'mailchimp-for-wp'), esc_url('https://www.mc4wp.com/premium-features/#utm_source=wp-plugin&utm_medium=mailchimp-for-wp&utm_campaign=other-settings-link'), esc_url('https://www.mc4wp.com/kb/what-is-ecommerce/#utm_source=wp-plugin&utm_medium=mailchimp-for-wp&utm_campaign=other-settings-link') ), [ 'a' => [ 'href' => [] ] ] ); echo '

'; echo '
'; } public function show_extensions_page() { require MC4WP_PLUGIN_DIR . '/includes/views/extensions.php'; } }