Skip to content

Commit db828a9

Browse files
authored
Merge pull request #1025 from Codeinwp/add_sdk_features
add SDk features
2 parents 140653e + b258f66 commit db828a9

File tree

3 files changed

+56
-2
lines changed

3 files changed

+56
-2
lines changed

feedzy-rss-feed.php

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,46 @@ function() {
161161
'location' => 'feedzy-admin-menu',
162162
'has_upgrade_menu' => ! feedzy_is_pro(),
163163
'upgrade_text' => esc_html__( 'Upgrade to Pro', 'feedzy-rss-feeds' ),
164-
'upgrade_link' => tsdk_translate_link( tsdk_utmify( FEEDZY_UPSELL_LINK, 'aboutUsPage' ), 'query' ),
164+
'upgrade_link' => tsdk_translate_link( tsdk_utmify( FEEDZY_UPSELL_LINK, 'aboutUsPage' ) ),
165+
);
166+
}
167+
);
168+
add_filter(
169+
'feedzy_rss_feeds_welcome_metadata',
170+
function () {
171+
return array(
172+
'is_enabled' => ! defined( 'FEEDZY_PRO_ABSPATH' ),
173+
'pro_name' => 'Feedzy PRO',
174+
'logo' => FEEDZY_ABSURL . 'img/feedzy.svg',
175+
'cta_link' => tsdk_translate_link(
176+
tsdk_utmify(
177+
add_query_arg(
178+
array(
179+
'discount' => 'LOYALUSER5824',
180+
'dvalue' => 55,
181+
), FEEDZY_UPSELL_LINK
182+
), 'feedzy-welcome', 'notice'
183+
)
184+
),
185+
);
186+
}
187+
);
188+
add_filter(
189+
'feedzy_rss_feeds_welcome_upsell_message', function () {
190+
return sprintf(
191+
/* translators: 1: opening <p> tag, 2: opening <b> tag, 3: closing </b> tag, 4: product name, 5: pro product name, 6: opening <a> tag with cta link, 7: closing </a> tag, 8: discount percentage */
192+
__(
193+
'%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!',
194+
'feedzy-rss-feeds'
195+
),
196+
'<p>',
197+
'<b>',
198+
'</b>',
199+
'{product}',
200+
'{pro_product}',
201+
'<a href="{cta_link}" target="_blank">',
202+
'</a>',
203+
'55'
165204
);
166205
}
167206
);

includes/admin/feedzy-rss-feeds-admin.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,19 @@ public function enqueue_styles_admin() {
247247
wp_enqueue_style( $this->plugin_name . '-metabox', FEEDZY_ABSURL . 'css/metabox-settings.css', array( $this->plugin_name . '-settings' ), $this->version );
248248
}
249249

250+
/**
251+
* Add action links on plugin listing screen.
252+
*
253+
* @param array $actions Actions array.
254+
* @param string $plugin_file Plugin file.
255+
*
256+
* @return mixed
257+
*/
258+
public function plugin_actions( $actions, $plugin_file ) {
259+
$actions['settings'] = '<a href="' . admin_url( 'admin.php?page=feedzy-settings' ) . '">' . __( 'Settings', 'feedzy-rss-feeds' ) . '</a>';
260+
261+
return $actions;
262+
}
250263
/**
251264
* Register the JavaScript for the admin area.
252265
*
@@ -561,7 +574,7 @@ public function feedzy_filter_plugin_row_meta( $links, $file ) {
561574
$new_links['doc'] = '<a href="https://docs.themeisle.com/article/658-feedzy-rss-feeds" target="_blank" title="' . __( 'Documentation and examples', 'feedzy-rss-feeds' ) . '">' . __( 'Documentation and examples', 'feedzy-rss-feeds' ) . '</a>';
562575

563576
if ( ! feedzy_is_pro() ) {
564-
$new_links['more_features'] = '<a href="' . esc_url( tsdk_translate_link( tsdk_utmify( FEEDZY_UPSELL_LINK, 'rowmeta', 'plugins' ), 'query' ) ) . '" target="_blank" title="' . __( 'More Features', 'feedzy-rss-feeds' ) . '">' . __( 'Upgrade to Pro', 'feedzy-rss-feeds' ) . '<i style="width: 17px; height: 17px; margin-left: 4px; color: #ffca54; font-size: 17px; vertical-align: -3px;" class="dashicons dashicons-unlock more-features-icon"></i></a>';
577+
$new_links['more_features'] = '<a style="color: #009E29; font-weight: 700;" onmouseout="this.style.color=\'#009528\';" onmouseover="this.style.color=\'#008a20\';" href="' . esc_url( tsdk_translate_link( tsdk_utmify( FEEDZY_UPSELL_LINK, 'rowmeta', 'plugins' ), 'query' ) ) . '" target="_blank" title="' . __( 'More Features', 'feedzy-rss-feeds' ) . '">' . __( 'Upgrade to Pro', 'feedzy-rss-feeds' ) . '<i style="width: 17px; height: 17px; margin-left: 4px; color: #ffca54; font-size: 17px; vertical-align: -3px;" class="dashicons dashicons-unlock more-features-icon"></i></a>';
565578
} elseif ( false === apply_filters( 'feedzy_is_license_of_type', false, 'agency' ) ) {
566579
$new_links['more_features'] = '<a href="' . esc_url( tsdk_translate_link( tsdk_utmify( FEEDZY_UPSELL_LINK, 'rowmetamore', 'plugins' ), 'query' ) ) . '" target="_blank" title="' . __( 'More Features', 'feedzy-rss-feeds' ) . '">' . __( 'Upgrade your license', 'feedzy-rss-feeds' ) . '<i style="width: 17px; height: 17px; margin-left: 4px; color: #ffca54; font-size: 17px; vertical-align: -3px;" class="dashicons dashicons-unlock more-features-icon"></i></a>';
567580
}

includes/feedzy-rss-feeds.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,8 @@ private function define_admin_hooks() {
285285
$this->loader->add_action( 'elementor/frontend/before_enqueue_styles', $plugin_elementor_widget, 'feedzy_elementor_before_enqueue_scripts' );
286286
}
287287

288+
$plugin_slug = FEEDZY_DIRNAME . '/' . basename( FEEDZY_BASEFILE );
289+
$this->loader->add_filter( "plugin_action_links_$plugin_slug", self::$instance->admin, 'plugin_actions', 10, 2 );
288290
if ( ! defined( 'TI_UNIT_TESTING' ) ) {
289291
add_action(
290292
'plugins_loaded',

0 commit comments

Comments
 (0)