Skip to content

Commit 2ac38bf

Browse files
feat: Move api to integration tab
1 parent af6df21 commit 2ac38bf

File tree

9 files changed

+182
-16
lines changed

9 files changed

+182
-16
lines changed

feedzy-rss-feed.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ function feedzy_themeisle_log_event( $name, $msg, $type, $file, $line ) {
253253
'nice_name' => 'Feedzy',
254254
'logo' => FEEDZY_ABSURL . 'img/feedzy.svg',
255255
'primary_color' => '#4268CF',
256-
'pages' => array( 'feedzy_imports', 'edit-feedzy_imports', 'edit-feedzy_categories', 'feedzy_page_feedzy-settings', 'feedzy_page_feedzy-support' ),
256+
'pages' => array( 'feedzy_imports', 'edit-feedzy_imports', 'edit-feedzy_categories', 'feedzy_page_feedzy-settings', 'feedzy_page_feedzy-support', 'feedzy_page_feedzy-integration' ),
257257
'has_upgrade_menu' => ! feedzy_is_pro(),
258258
'upgrade_link' => tsdk_translate_link( tsdk_utmify( FEEDZY_UPSELL_LINK, 'floatWidget' ), 'query' ),
259259
'documentation_link' => tsdk_translate_link( tsdk_utmify( 'https://docs.themeisle.com/collection/1569-feedzy-rss-feeds', 'floatWidget' ), 'query' ),

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

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ public function enqueue_styles_admin() {
162162
$this->add_banner_anchor();
163163
}
164164

165-
if ( 'feedzy_page_feedzy-settings' === $screen->base ) {
166-
if ( ! did_action( 'wp_enqueue_media' ) ) {
165+
if ( 'feedzy_page_feedzy-settings' === $screen->base || 'feedzy_page_feedzy-integration' === $screen->base ) {
166+
if ( ! did_action( 'wp_enqueue_media' ) && 'feedzy_page_feedzy-settings' === $screen->base ) {
167167
wp_enqueue_media();
168168
}
169169
wp_enqueue_script( $this->plugin_name . '_setting', FEEDZY_ABSURL . 'js/feedzy-setting.js', array( 'jquery' ), $this->version, true );
@@ -612,6 +612,17 @@ public function feedzy_menu_pages() {
612612
'feedzy_settings_page',
613613
)
614614
);
615+
add_submenu_page(
616+
'feedzy-admin-menu',
617+
__( 'Integration', 'feedzy-rss-feeds' ),
618+
__( 'Integration', 'feedzy-rss-feeds' ),
619+
'manage_options',
620+
'feedzy-integration',
621+
array(
622+
$this,
623+
'feedzy_integration_page',
624+
)
625+
);
615626
add_submenu_page(
616627
'feedzy-admin-menu',
617628
__( 'Support', 'feedzy-rss-feeds' ),
@@ -656,6 +667,21 @@ public function feedzy_settings_page() {
656667
include FEEDZY_ABSPATH . '/includes/layouts/settings.php';
657668
}
658669

670+
/**
671+
* Method to register the integration page.
672+
*
673+
* @access public
674+
*/
675+
public function feedzy_integration_page() {
676+
if ( isset( $_POST['feedzy-integration-submit'] ) && isset( $_POST['tab'] ) && wp_verify_nonce( filter_input( INPUT_POST, 'nonce', FILTER_UNSAFE_RAW ), filter_input( INPUT_POST, 'tab', FILTER_UNSAFE_RAW ) ) ) {
677+
$this->save_settings();
678+
$this->notice = __( 'Your settings were saved.', 'feedzy-rss-feeds' );
679+
}
680+
681+
$settings = apply_filters( 'feedzy_get_settings', array() );
682+
include FEEDZY_ABSPATH . '/includes/layouts/integration.php';
683+
}
684+
659685
/**
660686
* Method to save the settings.
661687
*

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

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2391,7 +2391,7 @@ public function get_cron_execution( $execution, $offset = 0 ) {
23912391
*/
23922392
public function admin_notices() {
23932393
$screen = get_current_screen();
2394-
$allowed = array( 'edit-feedzy_categories', 'edit-feedzy_imports', 'feedzy-rss_page_feedzy-settings' );
2394+
$allowed = array( 'edit-feedzy_categories', 'edit-feedzy_imports', 'feedzy-rss_page_feedzy-settings', 'feedzy-rss_page_feedzy-integration' );
23952395
// only show in the feedzy screens.
23962396
if ( ! in_array( $screen->id, $allowed, true ) ) {
23972397
return;
@@ -2514,15 +2514,26 @@ private function save_settings() {
25142514
* @access public
25152515
*/
25162516
public function settings_tabs( $tabs ) {
2517-
$tabs['misc'] = __( 'Miscellaneous', 'feedzy-rss-feeds' );
2517+
$tabs['misc'] = __( 'Miscellaneous', 'feedzy-rss-feeds' );
2518+
2519+
return $tabs;
2520+
}
2521+
2522+
/**
2523+
* Add integration tab.
2524+
*
2525+
* @since 3.0.0
2526+
* @access public
2527+
*/
2528+
public function integration_tabs( $tabs ) {
25182529
if ( $this->feedzy_is_business() || $this->feedzy_is_agency() ) {
25192530
$tabs['openai'] = __( 'OpenAI', 'feedzy-rss-feeds' );
25202531
}
25212532
if ( ! feedzy_is_pro() ) {
2522-
$tabs['wordai'] = sprintf( '%s <span class="pro-label">PRO</span>', __( 'WordAi', 'feedzy-rss-feeds' ) );
2533+
$tabs['openai'] = sprintf( '%s <span class="pro-label">PRO</span>', __( 'OpenAI', 'feedzy-rss-feeds' ) );
25232534
$tabs['spinnerchief'] = sprintf( '%s <span class="pro-label">PRO</span>', __( 'SpinnerChief', 'feedzy-rss-feeds' ) );
25242535
$tabs['amazon-product-advertising'] = sprintf( '%s <span class="pro-label">PRO</span>', __( 'Amazon Product Advertising', 'feedzy-rss-feeds' ) );
2525-
$tabs['openai'] = sprintf( '%s <span class="pro-label">PRO</span>', __( 'OpenAI', 'feedzy-rss-feeds' ) );
2536+
$tabs['wordai'] = sprintf( '%s <span class="pro-label">PRO</span>', __( 'WordAi', 'feedzy-rss-feeds' ) );
25262537
}
25272538

25282539
return $tabs;

includes/feedzy-rss-feeds-limited-offers.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public function render_notice() {
177177
$screen = get_current_screen();
178178
if (
179179
( $screen->base === 'edit' && ( $screen->post_type === 'feedzy_imports' || $screen->post_type === 'feedzy_categories' ) ) ||
180-
'feedzy_page_feedzy-settings' === $screen->id
180+
'feedzy_page_feedzy-settings' === $screen->id || 'feedzy_page_feedzy-integration' === $screen->id
181181
) {
182182
return;
183183
}
@@ -285,7 +285,7 @@ public function add_priority( $products ) {
285285
$screen = get_current_screen();
286286
if (
287287
( $screen->base === 'edit' && ( $screen->post_type === 'feedzy_imports' || $screen->post_type === 'feedzy_categories' ) ) ||
288-
'feedzy_page_feedzy-settings' === $screen->id
288+
'feedzy_page_feedzy-settings' === $screen->id || 'feedzy_page_feedzy-integration' === $screen->id
289289
) {
290290
// Small hack to supress rendering of other notices in those pages.
291291
$products['feedzy'] = -2;

includes/feedzy-rss-feeds.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ function () {
238238

239239
self::$instance->loader->add_filter( 'feedzy_items_limit', $plugin_import, 'items_limit', 10, 2 );
240240
self::$instance->loader->add_filter( 'feedzy_settings_tabs', $plugin_import, 'settings_tabs', 10, 1 );
241+
self::$instance->loader->add_filter( 'feedzy_integration_tabs', $plugin_import, 'integration_tabs', 10, 1 );
241242
self::$instance->loader->add_filter( 'redirect_post_location', $plugin_import, 'redirect_post_location', 10, 2 );
242243
self::$instance->loader->add_filter( 'manage_feedzy_imports_posts_columns', $plugin_import, 'feedzy_import_columns' );
243244
self::$instance->loader->add_action( 'admin_notices', $plugin_import, 'admin_notices' );

includes/layouts/header.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@
77
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
88
*/
99

10-
// phpcs:ignore WordPress.Security.NonceVerification
11-
$page_title = isset( $_GET['page'] ) && 'feedzy-support' === $_GET['page'] ? __( 'Support', 'feedzy-rss-feeds' ) : __( 'Settings', 'feedzy-rss-feeds' );
10+
// phpcs:disable WordPress.Security.NonceVerification
11+
$page_title = __( 'Settings', 'feedzy-rss-feeds' );
12+
if ( isset( $_GET['page'] ) && 'feedzy-support' === $_GET['page'] ) {
13+
$page_title = __( 'Support', 'feedzy-rss-feeds' );
14+
} elseif ( isset( $_GET['page'] ) && 'feedzy-integration' === $_GET['page'] ) {
15+
$page_title = __( 'Integration', 'feedzy-rss-feeds' );
16+
}
1217
?>
1318
<div class="feedzy-header">
1419
<div class="feedzy-container">

includes/layouts/integration.php

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
<div id="fz-features" class="feedzy-wrap">
2+
3+
<?php load_template( FEEDZY_ABSPATH . '/includes/layouts/header.php' ); ?>
4+
5+
<?php
6+
$active_tab = isset( $_REQUEST['tab'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['tab'] ) ) : 'openai';// phpcs:ignore WordPress.Security.NonceVerification
7+
$show_button = true;
8+
9+
$help_btn_url = 'https://docs.themeisle.com/category/712-feedzy';
10+
11+
if ( 'wordai' === $active_tab ) {
12+
$help_btn_url = 'https://docs.themeisle.com/article/746-how-to-use-wordai-to-rephrase-rss-content-in-feedzy#wordai';
13+
} elseif ( 'spinnerchief' === $active_tab ) {
14+
$help_btn_url = 'https://docs.themeisle.com/article/746-how-to-use-wordai-to-rephrase-rss-content-in-feedzy#spinner';
15+
}
16+
?>
17+
<?php if ( $this->notice ) { ?>
18+
<div class="fz-snackbar-notice updated"><p><?php echo wp_kses_post( $this->notice ); ?></p></div>
19+
<?php } ?>
20+
21+
<?php if ( $this->error ) { ?>
22+
<div class="fz-snackbar-notice error"><p><?php echo wp_kses_post( $this->error ); ?></p></div>
23+
<?php } ?>
24+
25+
<div id="tsdk_banner" class="feedzy-banner"></div>
26+
27+
<div class="feedzy-container">
28+
<?php if ( ! empty( $offer_data['active'] ) ) { ?>
29+
<div class="feedzy-sale">
30+
<a href="<?php echo esc_url( $offer_data['bannerStoreUrl'] ); ?>">
31+
<img src="<?php echo esc_url( $offer_data['bannerUrl'] ); ?>" alt="<?php echo esc_html( $offer_data['bannerAlt'] ); ?>">
32+
<div class="feedzy-urgency"><?php echo esc_html( $offer_data['urgencyText'] ); ?></div>
33+
</a>
34+
</div>
35+
<?php } ?>
36+
<div class="feedzy-accordion-item">
37+
<div class="feedzy-accordion-item__title">
38+
<div class="feedzy-accordion-item__button">
39+
<div class="feedzy-accordion__step-title h2">
40+
<?php
41+
switch ( $active_tab ) {
42+
case 'spinnerchief':
43+
esc_html_e( 'SpinnerChief', 'feedzy-rss-feeds' );
44+
break;
45+
case 'wordai':
46+
esc_html_e( 'WordAI', 'feedzy-rss-feeds' );
47+
break;
48+
default:
49+
echo esc_html( ucwords( str_replace( array( '-', '_' ), ' ', $active_tab ) ) );
50+
break;
51+
}
52+
?>
53+
</div>
54+
</div>
55+
</div>
56+
<div class="feedzy-accordion-item__content">
57+
<div class="fz-tabs-menu">
58+
<ul>
59+
<?php
60+
$_tabs = apply_filters( 'feedzy_integration_tabs', array() );
61+
if ( $_tabs ) {
62+
foreach ( $_tabs as $_tab => $label ) {
63+
?>
64+
<li>
65+
<a href="<?php echo esc_url( admin_url( 'admin.php?page=feedzy-integration&tab=' . $_tab ) ); ?>"
66+
class="<?php echo $_tab === $active_tab ? esc_attr( 'active' ) : ''; ?>"><?php echo wp_kses_post( $label ); ?></a>
67+
</li>
68+
<?php
69+
}
70+
}
71+
?>
72+
</ul>
73+
</div>
74+
75+
<form method="post" action="">
76+
<?php
77+
$fields = apply_filters( 'feedzy_display_tab_settings', array(), $active_tab );
78+
if ( $fields ) {
79+
80+
foreach ( $fields as $field ) {
81+
echo wp_kses( $field['content'], apply_filters( 'feedzy_wp_kses_allowed_html', array() ) );
82+
if ( isset( $field['ajax'] ) && $field['ajax'] ) {
83+
$show_button = false;
84+
}
85+
}
86+
}
87+
?>
88+
89+
<input type="hidden" name="tab" value="<?php echo esc_attr( $active_tab ); ?>">
90+
91+
<?php
92+
wp_nonce_field( $active_tab, 'nonce' );
93+
if ( $show_button ) {
94+
$disable_button = ! feedzy_is_pro() && in_array( $active_tab, array( 'spinnerchief', 'wordai', 'amazon-product-advertising', 'openai' ), true ) ? ' disabled' : '';
95+
?>
96+
<div class="mb-24">
97+
<button type="submit" class="btn btn-primary<?php echo esc_attr( $disable_button ); ?>" id="feedzy-settings-submit" name="feedzy-settings-submit"><?php esc_html_e( 'Save Settings', 'feedzy-rss-feeds' ); ?></button>
98+
</div>
99+
<?php
100+
}
101+
?>
102+
</form>
103+
104+
</div>
105+
</div>
106+
107+
<div class="cta pt-30">
108+
<a href="<?php echo esc_url( $help_btn_url ); ?>" class="btn btn-ghost" target="_blank"><?php esc_html_e( 'Need help?', 'feedzy-rss-feeds' ); ?></a>
109+
</div>
110+
</div>
111+
</div>

includes/views/openai-view.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,22 @@
1313
<div class="locked-form-block">
1414
<div class="fz-form-group mb-24">
1515
<label class="form-label"><?php esc_html_e( 'The OpenAI account API key:', 'feedzy-rss-feeds' ); ?></label>
16+
<div class="help-text pb-8">
17+
<?php
18+
// phpcs:ignore WordPress.WP.I18n.MissingTranslatorsComment
19+
echo wp_kses_post( sprintf( __( 'Get your OpenAI API key from <a href="%1$s" target="_blank">%2$s</a>', 'feedzy-rss-feeds' ), esc_url( 'https://platform.openai.com/account/api-keys' ), __( 'OpenAI API keys', 'feedzy-rss-feeds' ) ) );
20+
?>
21+
</div>
1622
<input type="password" class="form-control" placeholder="<?php echo esc_attr( __( 'API key', 'feedzy-rss-feeds' ) ); ?>"/>
1723
</div>
1824
<div class="fz-form-group">
1925
<label class="form-label"><?php esc_html_e( 'The OpenAI model:', 'feedzy-rss-feeds' ); ?></label>
26+
<div class="help-text pb-8">
27+
<?php
28+
// phpcs:ignore WordPress.WP.I18n.MissingTranslatorsComment
29+
echo wp_kses_post( sprintf( __( 'OpenAI API models <a href="%1$s" target="_blank">%2$s</a>', 'feedzy-rss-feeds' ), esc_url( 'https://openai.com/api/pricing/' ), __( 'Pricing', 'feedzy-rss-feeds' ) ) );
30+
?>
31+
</div>
2032
<div class="fz-input-group">
2133
<div class="fz-input-group-left">
2234
<input type="text" class="form-control" placeholder="<?php echo esc_attr( __( 'Model', 'feedzy-rss-feeds' ) ); ?>"/>

js/ActionPopup/SortableItem.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ const SortableItem = ({ propRef, loopIndex, item }) => {
168168
return(
169169
<li className="fz-action-control fz-chat-cpt-action" data-counter={counter}>
170170
<div className="fz-action-event">
171-
{feedzyData.isPro && (feedzyData.isBusinessPlan || feedzyData.isAgencyPlan) && !feedzyData.apiLicenseStatus.openaiStatus && (feedzyData.isHighPrivileges ? <span className="error-message">{__( 'Invalid API Key', 'feedzy-rss-feeds' )} <ExternalLink href="admin.php?page=feedzy-settings&tab=openai"><Icon icon={external} size={16} fill="#F00"/></ExternalLink></span> : <span className="error-message">{__( 'Invalid API Key, Please contact the administrator', 'feedzy-rss-feeds' )}</span> )}
171+
{feedzyData.isPro && (feedzyData.isBusinessPlan || feedzyData.isAgencyPlan) && !feedzyData.apiLicenseStatus.openaiStatus && (feedzyData.isHighPrivileges ? <span className="error-message">{__( 'Invalid API Key', 'feedzy-rss-feeds' )} <ExternalLink href="admin.php?page=feedzy-integration&tab=openai"><Icon icon={external} size={16} fill="#F00"/></ExternalLink></span> : <span className="error-message">{__( 'Invalid API Key, Please contact the administrator', 'feedzy-rss-feeds' )}</span> )}
172172
<PanelBody title={ __( 'Paraphrase with ChatGPT', 'feedzy-rss-feeds' ) } icon={ DragHandle } initialOpen={ false }>
173173
<PanelRow>
174174
<UpgradeNotice higherPlanNotice={!feedzyData.isBusinessPlan && !feedzyData.isAgencyPlan} utmCampaign="action-paraphrase-chatgpt"/>
@@ -205,7 +205,7 @@ const SortableItem = ({ propRef, loopIndex, item }) => {
205205
return(
206206
<li className="fz-action-control" data-counter={counter}>
207207
<div className="fz-action-event">
208-
{feedzyData.isPro && (feedzyData.isBusinessPlan || feedzyData.isAgencyPlan) && !feedzyData.apiLicenseStatus.openaiStatus && (feedzyData.isHighPrivileges ? <span className="error-message">{__( 'Invalid API Key', 'feedzy-rss-feeds' )} <ExternalLink href="admin.php?page=feedzy-settings&tab=openai"><Icon icon={external} size={16} fill="#F00"/></ExternalLink></span> : <span className="error-message">{__( 'Invalid API Key, Please contact the administrator', 'feedzy-rss-feeds' )}</span> )}
208+
{feedzyData.isPro && (feedzyData.isBusinessPlan || feedzyData.isAgencyPlan) && !feedzyData.apiLicenseStatus.openaiStatus && (feedzyData.isHighPrivileges ? <span className="error-message">{__( 'Invalid API Key', 'feedzy-rss-feeds' )} <ExternalLink href="admin.php?page=feedzy-integration&tab=openai"><Icon icon={external} size={16} fill="#F00"/></ExternalLink></span> : <span className="error-message">{__( 'Invalid API Key, Please contact the administrator', 'feedzy-rss-feeds' )}</span> )}
209209
<PanelBody title={ __( 'Summarize with ChatGPT', 'feedzy-rss-feeds' ) } icon={ DragHandle } initialOpen={ false } className="fz-hide-icon">
210210
<UpgradeNotice higherPlanNotice={!feedzyData.isBusinessPlan && !feedzyData.isAgencyPlan} utmCampaign="action-summarize-chatgpt"/>
211211
</PanelBody>
@@ -258,7 +258,7 @@ const SortableItem = ({ propRef, loopIndex, item }) => {
258258
return(
259259
<li className="fz-action-control" data-counter={counter}>
260260
<div className="fz-action-event">
261-
{(feedzyData.isPro && feedzyData.isAgencyPlan) && !feedzyData.apiLicenseStatus.spinnerChiefStatus && (feedzyData.isHighPrivileges ? <span className="error-message">{__( 'Invalid API Key', 'feedzy-rss-feeds' )} <ExternalLink href="admin.php?page=feedzy-settings&tab=spinnerchief"><Icon icon={external} size={16} fill="#F00"/></ExternalLink></span> : <span className="error-message">{__( 'Invalid API Key, Please contact the administrator', 'feedzy-rss-feeds' )}</span> )}
261+
{(feedzyData.isPro && feedzyData.isAgencyPlan) && !feedzyData.apiLicenseStatus.spinnerChiefStatus && (feedzyData.isHighPrivileges ? <span className="error-message">{__( 'Invalid API Key', 'feedzy-rss-feeds' )} <ExternalLink href="admin.php?page=feedzy-integration&tab=spinnerchief"><Icon icon={external} size={16} fill="#F00"/></ExternalLink></span> : <span className="error-message">{__( 'Invalid API Key, Please contact the administrator', 'feedzy-rss-feeds' )}</span> )}
262262
<PanelBody title={ __( 'Spin using SpinnerChief', 'feedzy-rss-feeds' ) } icon={ DragHandle } initialOpen={ false } className="fz-hide-icon">
263263
<UpgradeNotice higherPlanNotice={!feedzyData.isAgencyPlan} utmCampaign="action-spinnerchief"/>
264264
</PanelBody>
@@ -278,7 +278,7 @@ const SortableItem = ({ propRef, loopIndex, item }) => {
278278
return(
279279
<li className="fz-action-control" data-counter={counter}>
280280
<div className="fz-action-event">
281-
{(feedzyData.isPro && feedzyData.isAgencyPlan) && !feedzyData.apiLicenseStatus.wordaiStatus && (feedzyData.isHighPrivileges ? <span className="error-message">{__( 'Invalid API Key', 'feedzy-rss-feeds' )} <ExternalLink href="admin.php?page=feedzy-settings&tab=wordai"><Icon icon={external} size={16} fill="#F00"/></ExternalLink></span> : <span className="error-message">{__( 'Invalid API Key, Please contact the administrator', 'feedzy-rss-feeds' )}</span> )}
281+
{(feedzyData.isPro && feedzyData.isAgencyPlan) && !feedzyData.apiLicenseStatus.wordaiStatus && (feedzyData.isHighPrivileges ? <span className="error-message">{__( 'Invalid API Key', 'feedzy-rss-feeds' )} <ExternalLink href="admin.php?page=feedzy-integration&tab=wordai"><Icon icon={external} size={16} fill="#F00"/></ExternalLink></span> : <span className="error-message">{__( 'Invalid API Key, Please contact the administrator', 'feedzy-rss-feeds' )}</span> )}
282282
<PanelBody title={ __( 'Spin using WordAI', 'feedzy-rss-feeds' ) } icon={ DragHandle } initialOpen={ false } className="fz-hide-icon">
283283
<UpgradeNotice higherPlanNotice={!feedzyData.isAgencyPlan} utmCampaign="action-wordai"/>
284284
</PanelBody>
@@ -298,7 +298,7 @@ const SortableItem = ({ propRef, loopIndex, item }) => {
298298
return(
299299
<li className="fz-action-control fz-chat-cpt-action" data-counter={counter}>
300300
<div className="fz-action-event">
301-
{feedzyData.isPro && (feedzyData.isBusinessPlan || feedzyData.isAgencyPlan) && !feedzyData.apiLicenseStatus.openaiStatus && (feedzyData.isHighPrivileges ? <span className="error-message">{__( 'Invalid API Key', 'feedzy-rss-feeds' )} <ExternalLink href="admin.php?page=feedzy-settings&tab=openai"><Icon icon={external} size={16} fill="#F00"/></ExternalLink></span> : <span className="error-message">{__( 'Invalid API Key, Please contact the administrator', 'feedzy-rss-feeds' )}</span> )}
301+
{feedzyData.isPro && (feedzyData.isBusinessPlan || feedzyData.isAgencyPlan) && !feedzyData.apiLicenseStatus.openaiStatus && (feedzyData.isHighPrivileges ? <span className="error-message">{__( 'Invalid API Key', 'feedzy-rss-feeds' )} <ExternalLink href="admin.php?page=feedzy-integration&tab=openai"><Icon icon={external} size={16} fill="#F00"/></ExternalLink></span> : <span className="error-message">{__( 'Invalid API Key, Please contact the administrator', 'feedzy-rss-feeds' )}</span> )}
302302
<PanelBody title={ __( 'Generate Image with ChatGPT', 'feedzy-rss-feeds' ) } icon={ DragHandle } initialOpen={ false }>
303303
<PanelRow>
304304
<UpgradeNotice higherPlanNotice={!feedzyData.isBusinessPlan && !feedzyData.isAgencyPlan} utmCampaign="action-generate-image-chatgpt"/>

0 commit comments

Comments
 (0)