Skip to content

Commit 422a861

Browse files
refactor: transform the Support page into the Dashboard (#1122)
Refactors the dashboard/support page functionality by extracting the license from the settings page into a dedicated tab. Compatibility: Newer versions will use the new License tab, while the old versions will use the old location (if an old Feedzy Lite or Pro version is present, the old location will be used)
1 parent 8c21367 commit 422a861

File tree

9 files changed

+261
-117
lines changed

9 files changed

+261
-117
lines changed

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

Lines changed: 153 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,34 @@ public function enqueue_styles() {
128128
}
129129
wp_register_style( $this->plugin_name, FEEDZY_ABSURL . 'css/feedzy-rss-feeds.css', array(), $this->version, 'all' );
130130
}
131+
132+
/**
133+
* Helper function to enqueue the license script with localization
134+
*
135+
* @access public
136+
* @return void
137+
*/
138+
private function enqueue_license_script() {
139+
wp_enqueue_script(
140+
$this->plugin_name . '_license',
141+
FEEDZY_ABSURL . 'js/feedzy-license.js',
142+
array( 'jquery' ),
143+
$this->version,
144+
true
145+
);
146+
147+
wp_localize_script(
148+
$this->plugin_name . '_license',
149+
'feedzyLicense',
150+
array(
151+
'l10n' => array(
152+
'licenseKey' => __( 'License Key', 'feedzy-rss-feeds' ),
153+
'checkBtn' => __( 'Check License', 'feedzy-rss-feeds' ),
154+
'errorMsg' => __( 'An error occurred while checking the license. Please try again.', 'feedzy-rss-feeds' ),
155+
),
156+
)
157+
);
158+
}
131159

132160
/**
133161
* Register the stylesheets for the admin area.
@@ -206,6 +234,8 @@ public function enqueue_styles_admin() {
206234
),
207235
)
208236
);
237+
238+
$this->enqueue_license_script();
209239
}
210240

211241
$upsell_screens = array( 'feedzy-rss_page_feedzy-settings', 'feedzy-rss_page_feedzy-admin-menu-pro-upsell' );
@@ -278,8 +308,15 @@ public function enqueue_styles_admin() {
278308
}
279309

280310
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
281-
if ( 'feedzy_page_feedzy-support' === $screen->base && ( ( isset( $_GET['tab'] ) && 'improve' === $_GET['tab'] ) || ( 'edit' !== $screen->base && 'feedzy_imports' === $screen->post_type ) ) ) {
282-
311+
$tab = isset( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : '';
312+
313+
if ( 'feedzy_page_feedzy-support' === $screen->base &&
314+
(
315+
( 'improve' === $tab )
316+
|| ( 'edit' !== $screen->base && 'feedzy_imports' === $screen->post_type )
317+
|| ( 'license' === $tab )
318+
)
319+
) {
283320
$asset_file = include FEEDZY_ABSPATH . '/build/feedback/index.asset.php';
284321
wp_enqueue_script( $this->plugin_name . '_feedback', FEEDZY_ABSURL . 'build/feedback/index.js', array_merge( $asset_file['dependencies'], array( 'wp-editor', 'wp-api', 'lodash' ) ), $asset_file['version'], true );
285322
wp_enqueue_style( 'wp-block-editor' );
@@ -293,6 +330,8 @@ public function enqueue_styles_admin() {
293330
)
294331
);
295332

333+
$this->enqueue_license_script();
334+
296335
wp_set_script_translations( $this->plugin_name . '_feedback', 'feedzy-rss-feeds' );
297336
}
298337

@@ -923,6 +962,7 @@ public function feedzy_filter_plugin_row_meta( $links, $file ) {
923962
*
924963
* @since 3.0.12
925964
* @access public
965+
* @return void
926966
*/
927967
public function feedzy_menu_pages() {
928968
$capability = feedzy_current_user_can();
@@ -932,6 +972,17 @@ public function feedzy_menu_pages() {
932972
$svg_base64_icon = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNzdweCIgaGVpZ2h0PSI3N3B4IiB2aWV3Qm94PSIwIDAgNzcgNzciIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjYgKDY3NDkxKSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaC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RoPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+';
933973
add_menu_page( __( 'Feedzy', 'feedzy-rss-feeds' ), __( 'Feedzy', 'feedzy-rss-feeds' ), apply_filters( 'feedzy_admin_menu_capability', 'publish_posts' ), 'feedzy-admin-menu', '', $svg_base64_icon, 98.7666 );
934974

975+
add_submenu_page(
976+
'feedzy-admin-menu',
977+
__( 'Dashboard', 'feedzy-rss-feeds' ),
978+
__( 'Dashboard', 'feedzy-rss-feeds' ),
979+
'manage_options',
980+
'feedzy-support',
981+
array(
982+
$this,
983+
'render_support',
984+
)
985+
);
935986
add_submenu_page(
936987
'feedzy-admin-menu',
937988
__( 'Settings', 'feedzy-rss-feeds' ),
@@ -954,17 +1005,6 @@ public function feedzy_menu_pages() {
9541005
'feedzy_integration_page',
9551006
)
9561007
);
957-
add_submenu_page(
958-
'feedzy-admin-menu',
959-
__( 'Support', 'feedzy-rss-feeds' ),
960-
__( 'Support', 'feedzy-rss-feeds' ) . '<span class="dashicons dashicons-editor-help more-features-icon" style="width: 17px; height: 17px; margin-left: 4px; color: #ffca54; font-size: 17px; vertical-align: -3px;"></span>',
961-
'manage_options',
962-
'feedzy-support',
963-
array(
964-
$this,
965-
'render_support',
966-
)
967-
);
9681008

9691009
if ( ! feedzy_is_pro() && get_option( 'feedzy_fresh_install', false ) ) {
9701010
$hook = add_submenu_page(
@@ -981,37 +1021,55 @@ public function feedzy_menu_pages() {
9811021
add_action( "load-$hook", array( $this, 'feedzy_load_setup_wizard_page' ) );
9821022
add_action( 'adminmenu', array( $this, 'feedzy_hide_wizard_menu' ) );
9831023
}
984-
if ( ! defined( 'REVIVE_NETWORK_VERSION' ) ) {
985-
$rss_to_social = __( 'RSS to Social', 'feedzy-rss-feeds' ) . '<span id="feedzy-rn-menu" class="dashicons dashicons-external" style="font-size:initial;"></span>';
986-
add_action(
987-
'admin_footer',
988-
function () {
989-
?>
990-
<script type="text/javascript">
991-
jQuery(document).ready(function ($) {
992-
$('#feedzy-rn-menu').parent().attr('target', '_blank');
993-
});
994-
</script>
995-
<?php
996-
}
997-
);
1024+
}
9981025

999-
global $submenu;
1000-
if ( isset( $submenu['feedzy-admin-menu'] ) ) {
1026+
/**
1027+
* Handle the RSS to Social menu item.
1028+
*
1029+
* @access public
1030+
* @return void
1031+
*/
1032+
public function rss_to_social_menu() {
1033+
$capability = feedzy_current_user_can();
1034+
if ( ! $capability ) {
1035+
return;
1036+
}
10011037

1002-
array_splice(
1003-
$submenu['feedzy-admin-menu'],
1004-
4,
1005-
0,
1006-
array(
1007-
array(
1008-
$rss_to_social,
1009-
'manage_options',
1010-
tsdk_utmify( 'https://revive.social/plugins/revive-network', 'feedzy-menu' ),
1011-
),
1012-
)
1013-
);
1038+
if ( defined( 'REVIVE_NETWORK_VERSION' ) && ! feedzy_is_pro() ) {
1039+
return;
1040+
}
1041+
1042+
$rss_to_social = __( 'RSS to Social', 'feedzy-rss-feeds' ) . '<span id="feedzy-rn-menu" class="dashicons dashicons-external" style="font-size:initial;"></span>';
1043+
add_action(
1044+
'admin_footer',
1045+
function () {
1046+
?>
1047+
<script type="text/javascript">
1048+
jQuery(document).ready(function ($) {
1049+
$('#feedzy-rn-menu').parent().attr('target', '_blank');
1050+
});
1051+
</script>
1052+
<?php
1053+
}
1054+
);
1055+
1056+
global $submenu;
1057+
if ( isset( $submenu['feedzy-admin-menu'] ) ) {
1058+
if ( isset( $submenu['feedzy-admin-menu'][0] ) ) {
1059+
unset( $submenu['feedzy-admin-menu'][0] );
10141060
}
1061+
array_splice(
1062+
$submenu['feedzy-admin-menu'],
1063+
5,
1064+
0,
1065+
array(
1066+
array(
1067+
$rss_to_social,
1068+
'manage_options',
1069+
tsdk_utmify( 'https://revive.social/plugins/revive-network', 'feedzy-menu' ),
1070+
),
1071+
)
1072+
);
10151073
}
10161074
}
10171075

@@ -1605,7 +1663,20 @@ public function feedzy_dismiss_wizard( $redirect_to_dashboard = true ) {
16051663
update_option( 'feedzy_fresh_install', $status );
16061664
delete_option( 'feedzy_wizard_data' );
16071665
if ( false !== $redirect_to_dashboard ) {
1608-
wp_safe_redirect( remove_query_arg( array( 'action', 'status' ) ) );
1666+
1667+
$cleaned_url = remove_query_arg( array( 'page', 'action', 'status' ) );
1668+
$parsed_url = wp_parse_url( $cleaned_url );
1669+
1670+
// Default to dashboard if no page is set.
1671+
if (
1672+
isset( $parsed_url['path'] ) &&
1673+
strpos( $parsed_url['path'], '/wp-admin/admin.php' ) !== false &&
1674+
empty( $parsed_url['query'] )
1675+
) {
1676+
$cleaned_url = add_query_arg( 'page', 'feedzy-support', $cleaned_url );
1677+
}
1678+
1679+
wp_safe_redirect( $cleaned_url );
16091680
exit;
16101681
}
16111682
return true;
@@ -1809,7 +1880,12 @@ private function setup_wizard_subscribe_process() {
18091880
$segment = 1;
18101881
$response = array(
18111882
'status' => 1,
1812-
'redirect_to' => add_query_arg( 'post_type', 'feedzy_imports', admin_url( 'edit.php' ) ),
1883+
'redirect_to' => add_query_arg(
1884+
array(
1885+
'page' => 'feedzy-support',
1886+
),
1887+
admin_url( 'admin.php' )
1888+
),
18131889
'message' => __( 'Redirecting to Feedzy dashboard', 'feedzy-rss-feeds' ),
18141890
);
18151891

@@ -1834,30 +1910,48 @@ private function setup_wizard_subscribe_process() {
18341910
} else {
18351911
$response = array(
18361912
'status' => 1,
1837-
'redirect_to' => add_query_arg( 'post_type', 'feedzy_imports', admin_url( 'edit.php' ) ),
1913+
'redirect_to' => add_query_arg(
1914+
array(
1915+
'page' => 'feedzy-support',
1916+
),
1917+
admin_url( 'admin.php' )
1918+
),
18381919
'message' => __( 'Redirecting to Feedzy dashboard', 'feedzy-rss-feeds' ),
18391920
);
18401921
}
18411922
} elseif ( 'page_builder' === $integrate_with ) {
1842-
$post_edit_link = get_edit_post_link( $page_id, 'db' );
1843-
// Get elementor edit page link.
1844-
if ( defined( 'ELEMENTOR_PATH' ) && class_exists( 'Elementor\Widget_Base' ) ) {
1845-
$segment = 3;
1846-
$post_edit_link = add_query_arg(
1847-
array(
1848-
'post' => $page_id,
1849-
'action' => 'elementor',
1923+
if ( empty( $page_id ) ) {
1924+
$response = array(
1925+
'status' => 1,
1926+
'redirect_to' => add_query_arg(
1927+
array(
1928+
'page' => 'feedzy-support',
1929+
),
1930+
admin_url( 'admin.php' )
18501931
),
1851-
admin_url( 'post.php' )
1932+
'message' => __( 'Redirecting to Feedzy dashboard', 'feedzy-rss-feeds' ),
18521933
);
18531934
} else {
1854-
$segment = 4;
1935+
$post_edit_link = get_edit_post_link( $page_id, 'db' );
1936+
// Get elementor edit page link.
1937+
if ( defined( 'ELEMENTOR_PATH' ) && class_exists( 'Elementor\Widget_Base' ) ) {
1938+
$segment = 3;
1939+
$post_edit_link = add_query_arg(
1940+
array(
1941+
'post' => $page_id,
1942+
'action' => 'elementor',
1943+
),
1944+
admin_url( 'post.php' )
1945+
);
1946+
} else {
1947+
$segment = 4;
1948+
}
1949+
$response = array(
1950+
'status' => 1,
1951+
'redirect_to' => $post_edit_link,
1952+
'message' => __( 'Redirecting to draft page', 'feedzy-rss-feeds' ),
1953+
);
18551954
}
1856-
$response = array(
1857-
'status' => 1,
1858-
'redirect_to' => $post_edit_link,
1859-
'message' => __( 'Redirecting to draft page', 'feedzy-rss-feeds' ),
1860-
);
18611955
}
18621956
if ( $with_subscribe && is_email( $email ) ) {
18631957
update_option( 'feedzy_rss_feeds_logger_flag', 'yes' );

includes/feedzy-rss-feeds.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ private function define_admin_hooks() {
176176
self::$instance->loader->add_action( 'feedzy_post_http_teardown', self::$instance->admin, 'post_http_teardown', 10, 1 );
177177
self::$instance->loader->add_action( 'admin_init', self::$instance->admin, 'admin_init', 10, 1 );
178178
self::$instance->loader->add_action( 'manage_feedzy_categories_posts_custom_column', self::$instance->admin, 'manage_feedzy_category_columns', 10, 2 );
179-
self::$instance->loader->add_action( 'admin_menu', self::$instance->admin, 'feedzy_menu_pages' );
179+
self::$instance->loader->add_action( 'admin_menu', self::$instance->admin, 'feedzy_menu_pages', 8 );
180+
self::$instance->loader->add_action( 'admin_menu', self::$instance->admin, 'rss_to_social_menu', 20 );
180181
self::$instance->loader->add_action( 'wp_ajax_get_tinymce_form', self::$instance->admin, 'get_tinymce_form' );
181182
self::$instance->loader->add_action( 'wp_enqueue_scripts', self::$instance->admin, 'enqueue_styles' );
182183
self::$instance->loader->add_action( 'admin_enqueue_scripts', self::$instance->admin, 'enqueue_styles_admin', 99 );

includes/layouts/feedzy-license.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div class="fz-form-wrap">
2+
<?php do_action( 'feedzy_dashboard_license_content' ); ?>
3+
</div>

includes/layouts/feedzy-support.php

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,30 @@ class="<?php echo 'docs' === $active_tab ? 'active' : ''; ?>"><?php esc_html_e(
2727
class="<?php echo 'feedzy-pro' === $active_tab ? 'active' : ''; ?>"><?php esc_html_e( 'Free vs Pro', 'feedzy-rss-feeds' ); ?></a>
2828
</li>
2929
<?php endif; ?>
30+
<?php if ( defined( 'FEEDZY_PRO_VERSION' ) && has_action( 'feedzy_dashboard_license_content' ) ) : ?>
31+
<li>
32+
<a href="<?php echo esc_url( admin_url( 'admin.php?page=feedzy-support&tab=license' ) ); ?>"
33+
class="<?php echo 'license' === $active_tab ? 'active' : ''; ?>"><?php esc_html_e( 'License', 'feedzy-rss-feeds' ); ?></a>
34+
</li>
35+
<?php endif; ?>
3036
<li>
3137
<a href="<?php echo esc_url( admin_url( 'admin.php?page=feedzy-support&tab=improve' ) ); ?>"
3238
class="<?php echo 'improve' === $active_tab ? 'active' : ''; ?>"><?php esc_html_e( 'Help us improve!', 'feedzy-rss-feeds' ); ?></a>
3339
</li>
40+
<li>
41+
<a href="<?php echo esc_url( admin_url( 'admin.php?page=feedzy-settings' ) ); ?>"
42+
class="<?php echo 'settings' === $active_tab ? 'active' : ''; ?>">
43+
<?php esc_html_e( 'Settings', 'feedzy-rss-feeds' ); ?>
44+
<span class="dashicons dashicons-external"></span>
45+
</a>
46+
</li>
47+
<li>
48+
<a href="<?php echo esc_url( admin_url( 'admin.php?page=feedzy-integration' ) ); ?>"
49+
class="<?php echo 'integration' === $active_tab ? 'active' : ''; ?>">
50+
<?php esc_html_e( 'Integration', 'feedzy-rss-feeds' ); ?>
51+
<span class="dashicons dashicons-external"></span>
52+
</a>
53+
</li>
3454
<?php $support_tab_heading = apply_filters( 'feedzy_support_tab_heading', '', $active_tab ); ?>
3555
<?php if ( ! empty( $support_tab_heading ) ) : ?>
3656
<li>
@@ -54,6 +74,9 @@ class="<?php echo 'improve' === $active_tab ? 'active' : ''; ?>"><?php esc_html_
5474
case 'improve':
5575
load_template( FEEDZY_ABSPATH . '/includes/layouts/feedzy-improve.php' );
5676
break;
77+
case 'license':
78+
load_template( FEEDZY_ABSPATH . '/includes/layouts/feedzy-license.php' );
79+
break;
5780
default:
5881
$template = apply_filters( 'feedzy_support_tab_content', '', $active_tab );
5982
if ( ! empty( $template ) ) {
@@ -98,4 +121,4 @@ class="<?php echo 'improve' === $active_tab ? 'active' : ''; ?>"><?php esc_html_
98121
</div>
99122
<?php endif; ?>
100123
</div>
101-
</div>
124+
</div>

includes/layouts/header.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// phpcs:disable WordPress.Security.NonceVerification
1111
$page_title = __( 'Settings', 'feedzy-rss-feeds' );
1212
if ( isset( $_GET['page'] ) && 'feedzy-support' === $_GET['page'] ) {
13-
$page_title = __( 'Support', 'feedzy-rss-feeds' );
13+
$page_title = __( 'Dashboard', 'feedzy-rss-feeds' );
1414
} elseif ( isset( $_GET['page'] ) && 'feedzy-integration' === $_GET['page'] ) {
1515
$page_title = __( 'Integration', 'feedzy-rss-feeds' );
1616
}

includes/layouts/setup-wizard.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
* @package Feedzy_Rss_Feeds
66
*/
77

8-
$dashboard_url = add_query_arg(
8+
// Note: It will be redirect to dashboard by `feedzy_dismiss_wizard` action.
9+
$skip_onboarding_url_callback = add_query_arg(
910
array(
10-
'post_type' => 'feedzy_imports',
11-
'action' => 'feedzy_dismiss_wizard',
12-
'status' => 0,
11+
'action' => 'feedzy_dismiss_wizard',
12+
'status' => 0,
1313
),
14-
admin_url( 'edit.php' )
14+
admin_url( 'admin.php' )
1515
);
1616
// phpcs:ignore WordPress.Security.NonceVerification
1717
$integrate_with = ! empty( $_GET['integrate-with'] ) ? sanitize_text_field( wp_unslash( $_GET['integrate-with'] ) ) : '';
@@ -34,7 +34,7 @@
3434
</div>
3535
</div>
3636
<div class="back-btn">
37-
<a href="<?php echo esc_url( $dashboard_url ); ?>" class="btn-link"><span class="dashicons dashicons-arrow-left-alt"></span> <?php esc_html_e( 'Go to dashboard', 'feedzy-rss-feeds' ); ?></a>
37+
<a href="<?php echo esc_url( $skip_onboarding_url_callback ); ?>" class="btn-link"><span class="dashicons dashicons-arrow-left-alt"></span> <?php esc_html_e( 'Go to dashboard', 'feedzy-rss-feeds' ); ?></a>
3838
</div>
3939
</div>
4040
</div>

0 commit comments

Comments
 (0)