Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add SDk features #1025

Merged
merged 2 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 40 additions & 1 deletion feedzy-rss-feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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 */
__(
'%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'
),
'<p>',
'<b>',
'</b>',
'{product}',
'{pro_product}',
'<a href="{cta_link}" target="_blank">',
'</a>',
'55'
);
}
);
Expand Down
15 changes: 14 additions & 1 deletion includes/admin/feedzy-rss-feeds-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'] = '<a href="' . admin_url( 'admin.php?page=feedzy-settings' ) . '">' . __( 'Settings', 'feedzy-rss-feeds' ) . '</a>';

return $actions;
}
/**
* Register the JavaScript for the admin area.
*
Expand Down Expand Up @@ -561,7 +574,7 @@ public function feedzy_filter_plugin_row_meta( $links, $file ) {
$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>';

if ( ! feedzy_is_pro() ) {
$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>';
$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>';
} elseif ( false === apply_filters( 'feedzy_is_license_of_type', false, 'agency' ) ) {
$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>';
}
Expand Down
2 changes: 2 additions & 0 deletions includes/feedzy-rss-feeds.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Loading