diff --git a/feedzy-rss-feed.php b/feedzy-rss-feed.php index d873e861..30e19a3c 100644 --- a/feedzy-rss-feed.php +++ b/feedzy-rss-feed.php @@ -161,7 +161,46 @@ function() { 'location' => 'feedzy-admin-menu', 'has_upgrade_menu' => ! feedzy_is_pro(), 'upgrade_text' => esc_html__( 'Upgrade to Pro', 'feedzy-rss-feeds' ), - 'upgrade_link' => tsdk_translate_link( tsdk_utmify( FEEDZY_UPSELL_LINK, 'aboutUsPage' ), 'query' ), + 'upgrade_link' => tsdk_translate_link( tsdk_utmify( FEEDZY_UPSELL_LINK, 'aboutUsPage' ) ), + ); + } + ); + add_filter( + 'feedzy_rss_feeds_welcome_metadata', + function () { + return array( + 'is_enabled' => ! defined( 'FEEDZY_PRO_ABSPATH' ), + 'pro_name' => 'Feedzy PRO', + 'logo' => FEEDZY_ABSURL . 'img/feedzy.svg', + 'cta_link' => tsdk_translate_link( + tsdk_utmify( + add_query_arg( + array( + 'discount' => 'LOYALUSER5824', + 'dvalue' => 55, + ), FEEDZY_UPSELL_LINK + ), 'feedzy-welcome', 'notice' + ) + ), + ); + } + ); + add_filter( + 'feedzy_rss_feeds_welcome_upsell_message', function () { + return sprintf( + /* translators: 1: opening

tag, 2: opening tag, 3: closing tag, 4: product name, 5: pro product name, 6: opening tag with cta link, 7: closing tag, 8: discount percentage */ + __( + '%1$sYou\'ve been using %2$s%4$s%3$s for 7 days now and we appreciate your loyalty! We also want to make sure you\'re getting the most out of our product. That\'s why we\'re offering you a special deal - upgrade to %2$s%5$s%3$s in the next 5 days and receive a discount of %2$sup to %8$s%%%3$s. %6$sUpgrade now%7$s and unlock all the amazing features of %2$s%5$s%3$s!', + 'feedzy-rss-feeds' + ), + '

', + '', + '', + '{product}', + '{pro_product}', + '', + '', + '55' ); } ); diff --git a/includes/admin/feedzy-rss-feeds-admin.php b/includes/admin/feedzy-rss-feeds-admin.php index 7159db3e..aaf62392 100644 --- a/includes/admin/feedzy-rss-feeds-admin.php +++ b/includes/admin/feedzy-rss-feeds-admin.php @@ -247,6 +247,19 @@ public function enqueue_styles_admin() { wp_enqueue_style( $this->plugin_name . '-metabox', FEEDZY_ABSURL . 'css/metabox-settings.css', array( $this->plugin_name . '-settings' ), $this->version ); } + /** + * Add action links on plugin listing screen. + * + * @param array $actions Actions array. + * @param string $plugin_file Plugin file. + * + * @return mixed + */ + public function plugin_actions( $actions, $plugin_file ) { + $actions['settings'] = '' . __( 'Settings', 'feedzy-rss-feeds' ) . ''; + + return $actions; + } /** * Register the JavaScript for the admin area. * @@ -561,7 +574,7 @@ public function feedzy_filter_plugin_row_meta( $links, $file ) { $new_links['doc'] = '' . __( 'Documentation and examples', 'feedzy-rss-feeds' ) . ''; if ( ! feedzy_is_pro() ) { - $new_links['more_features'] = '' . __( 'Upgrade to Pro', 'feedzy-rss-feeds' ) . ''; + $new_links['more_features'] = '' . __( 'Upgrade to Pro', 'feedzy-rss-feeds' ) . ''; } elseif ( false === apply_filters( 'feedzy_is_license_of_type', false, 'agency' ) ) { $new_links['more_features'] = '' . __( 'Upgrade your license', 'feedzy-rss-feeds' ) . ''; } diff --git a/includes/feedzy-rss-feeds.php b/includes/feedzy-rss-feeds.php index d8f176c3..0eda10bc 100644 --- a/includes/feedzy-rss-feeds.php +++ b/includes/feedzy-rss-feeds.php @@ -285,6 +285,8 @@ private function define_admin_hooks() { $this->loader->add_action( 'elementor/frontend/before_enqueue_styles', $plugin_elementor_widget, 'feedzy_elementor_before_enqueue_scripts' ); } + $plugin_slug = FEEDZY_DIRNAME . '/' . basename( FEEDZY_BASEFILE ); + $this->loader->add_filter( "plugin_action_links_$plugin_slug", self::$instance->admin, 'plugin_actions', 10, 2 ); if ( ! defined( 'TI_UNIT_TESTING' ) ) { add_action( 'plugins_loaded',