Skip to content

Commit 94cdb7e

Browse files
release: fixes
- Fixed various layout issues for the plugin pages.
2 parents 979cdf5 + b42b13b commit 94cdb7e

13 files changed

+907
-331
lines changed

css/settings.css

Lines changed: 40 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.feedzy-wrap > *{
1+
.feedzy-wrap *{
22
box-sizing: border-box;
33
margin: 0;
44
padding: 0;
@@ -400,14 +400,14 @@ fieldset[disabled] .form-control {
400400
position: absolute;
401401
top: 0;
402402
left: 0;
403-
width: calc(100% + 60px);
403+
width: 100%;
404404
height: 100%;
405-
margin: 0 -30px;
405+
margin: 0;
406406
background: rgba(255, 255, 255, 0.6);
407407
-webkit-backdrop-filter: blur(4px);
408408
backdrop-filter: blur(4px);
409409
z-index: 1;
410-
padding: 30px;
410+
padding:0;
411411
opacity: 0;
412412
visibility: hidden;
413413
-webkit-transition: all 0.3s ease-in-out;
@@ -852,7 +852,6 @@ input.fz-switch-toggle[type=checkbox]:checked:before{
852852
}
853853
.btn.btn-block{
854854
display: block;
855-
width: 100%;
856855
text-align: center;
857856
}
858857
.btn.btn-lg{
@@ -1055,7 +1054,7 @@ input.fz-switch-toggle[type=checkbox]:checked:before{
10551054
border-bottom: 1px solid #D9D9D9;
10561055
}
10571056

1058-
.fz-tabs-menu ul li a{
1057+
.fz-tabs-menu ul li a {
10591058
font-weight: 600;
10601059
font-size: 16px;
10611060
line-height: 19px;
@@ -1070,6 +1069,11 @@ input.fz-switch-toggle[type=checkbox]:checked:before{
10701069
-o-transition: all 0.3s ease-in-out;
10711070
transition: all 0.3s ease-in-out;
10721071
}
1072+
1073+
.fz-tabs-menu ul li {
1074+
margin-bottom: 0;
1075+
}
1076+
10731077
.fz-tabs-menu ul li a:after{
10741078
content: "";
10751079
width: 100%;
@@ -1113,7 +1117,7 @@ input.fz-switch-toggle[type=checkbox]:checked:before{
11131117
/* FZ tab style end */
11141118

11151119
.upgrade-alert{
1116-
padding: 10px 10px 10px 10px;
1120+
padding: 10px 0;
11171121
background: #4268CF;
11181122
text-align: center;
11191123
font-size: 14px;
@@ -1247,26 +1251,31 @@ input.fz-switch-toggle[type=checkbox]:checked:before{
12471251
justify-content: flex-end;
12481252
}
12491253

1250-
.support-box-list{
1251-
padding: 30px 0 24px;
1254+
.support-box-list {
1255+
padding: 20px 0 24px;
1256+
display: flex;
1257+
flex-direction: column;
1258+
gap: 1rem;
12521259
}
12531260
.support-box-list > ul{
1254-
display: flex;
1255-
flex-wrap: wrap;
1256-
margin: 0 -15px;
1261+
display: grid;
1262+
grid-template-columns: repeat(1, 1fr);
1263+
gap: 20px;
12571264
}
12581265
.support-box-list > ul > li{
1259-
width: 50%;
1260-
padding: 0 15px 30px;
1266+
width: 100%;
1267+
display: flex;
12611268
}
12621269
.support-box-list .cta{
12631270
text-align: center;
12641271
}
12651272

12661273
.support-box{
12671274
border: 1px solid #D9D9D9;
1268-
padding: 40px 30px 30px;
1269-
height: 100%;
1275+
padding: 30px;
1276+
flex-grow: 1;
1277+
display: flex;
1278+
flex-direction: column;
12701279
}
12711280
.support-box .h3{
12721281
padding-bottom: 16px;
@@ -1276,11 +1285,13 @@ input.fz-switch-toggle[type=checkbox]:checked:before{
12761285
line-height: 24px;
12771286
color: #050505;
12781287
margin-bottom: 24px;
1288+
flex-grow: 1;
12791289
}
12801290

12811291
.quick-link-list{
12821292
display: flex;
12831293
flex-wrap: wrap;
1294+
flex-grow: 10;
12841295
}
12851296
.quick-link-list ul{
12861297
width: 50%;
@@ -1411,9 +1422,11 @@ input.fz-switch-toggle[type=checkbox]:checked:before{
14111422
.fz-pro-features-table-row{
14121423
display: flex;
14131424
flex-wrap: wrap;
1425+
margin: 0;
14141426
}
14151427
.fz-pro-features-table-row .features-info{
14161428
width: calc(100% - 280px);
1429+
margin-bottom: 0;
14171430
}
14181431
.fz-pro-features-table-row .free,
14191432
.fz-pro-features-table-row .pro{
@@ -1423,6 +1436,7 @@ input.fz-switch-toggle[type=checkbox]:checked:before{
14231436
display: flex;
14241437
align-items: center;
14251438
justify-content: center;
1439+
margin-bottom: 0;
14261440
}
14271441
.fz-pro-features-table-row .free .dashicons,
14281442
.fz-pro-features-table-row .pro .dashicons{
@@ -1441,7 +1455,10 @@ input.fz-switch-toggle[type=checkbox]:checked:before{
14411455
font-size: 20px;
14421456
font-weight: 700;
14431457
color: #757575;
1444-
padding-bottom: 16px;
1458+
padding-bottom: 28px;
1459+
}
1460+
.fz-pro-features-table-header .fz-pro-features-table-row li {
1461+
padding: 0 44px;
14451462
}
14461463
.fz-pro-features-table-body{
14471464
border-top: 1px solid #D9D9D9;
@@ -2551,3 +2568,9 @@ li.draggable-item .components-panel__body-toggle.components-button{
25512568
transform:rotate(360deg);
25522569
}
25532570
}
2571+
2572+
@media (min-width: 768px) {
2573+
.support-box-list > ul{
2574+
grid-template-columns: repeat(2, 1fr);
2575+
}
2576+
}

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

Lines changed: 81 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,46 @@ public function get_usage_data( $data ) {
8686
$categories = count( $terms );
8787
}
8888
// imports.
89-
$imports = array();
9089
$license = 'free';
90+
91+
$imports = array(
92+
// how many active imports are created.
93+
'publish' => count(
94+
get_posts(
95+
array(
96+
'post_type' => 'feedzy_imports',
97+
'post_status' => 'publish',
98+
'numberposts' => 99,
99+
'fields' => 'ids',
100+
)
101+
)
102+
),
103+
// how many draft imports are created.
104+
'draft' => count(
105+
get_posts(
106+
array(
107+
'post_type' => 'feedzy_imports',
108+
'post_status' => 'draft',
109+
'numberposts' => 99,
110+
'fields' => 'ids',
111+
)
112+
)
113+
),
114+
// how many posts were imported by the imports.
115+
'imported' => count(
116+
get_posts(
117+
array(
118+
'post_type' => 'post',
119+
'post_status' => array( 'publish', 'private', 'draft', 'trash' ),
120+
'numberposts' => 2999, //phpcs:ignore WordPress.WP.PostsPerPage.posts_per_page_numberposts
121+
'fields' => 'ids',
122+
'meta_key' => 'feedzy', //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key
123+
'meta_value' => 1, //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_value
124+
)
125+
)
126+
),
127+
);
128+
91129
if ( feedzy_is_pro() ) {
92130
$license = 'pro';
93131
if ( apply_filters( 'feedzy_is_license_of_type', false, 'agency' ) ) {
@@ -107,70 +145,57 @@ public function get_usage_data( $data ) {
107145
}
108146
}
109147

110-
$imports = apply_filters(
111-
'feedzy_usage_data',
112-
array(
113-
// how many active imports are created.
114-
'publish' => count(
115-
get_posts(
116-
array(
117-
'post_type' => 'feedzy_imports',
118-
'post_status' => 'publish',
119-
'numberposts' => 99,
120-
'fields' => 'ids',
121-
)
122-
)
123-
),
124-
// how many draft imports are created
125-
'draft' => count(
126-
get_posts(
127-
array(
128-
'post_type' => 'feedzy_imports',
129-
'post_status' => 'draft',
130-
'numberposts' => 99,
131-
'fields' => 'ids',
132-
)
133-
)
134-
),
135-
// how many posts were imported by the imports
136-
'imported' => count(
137-
get_posts(
138-
array(
139-
'post_type' => 'post',
140-
'post_status' => array( 'publish', 'private', 'draft', 'trash' ),
141-
'numberposts' => 2999, //phpcs:ignore WordPress.WP.PostsPerPage.posts_per_page_numberposts
142-
'fields' => 'ids',
143-
'meta_key' => 'feedzy', //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key
144-
'meta_value' => 1, //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_value
145-
)
146-
)
147-
),
148-
// integrations
149-
'integrations' => $integrations,
150-
)
151-
);
148+
$imports['integrations'] = $integrations;
152149
}
153150

154-
$settings = apply_filters( 'feedzy_get_settings', null );
155-
$config = array();
156-
if ( $settings ) {
157-
$proxy = isset( $settings['proxy'] ) && is_array( $settings['proxy'] ) && ! empty( $settings['proxy'] ) ? array_filter( $settings['proxy'] ) : array();
158-
if ( ! empty( $proxy ) ) {
159-
$config[] = 'proxy';
160-
}
161-
}
151+
$imports = wp_parse_args( Feedzy_Rss_Feeds_Usage::get_instance()->get_usage_stats(), $imports );
152+
$imports = apply_filters( 'feedzy_usage_data', $imports );
162153

163154
// how many posts contain the shortcode
164155
global $wpdb;
165156
$shortcodes = $wpdb->get_var( "SELECT count(*) FROM {$wpdb->prefix}posts WHERE post_status IN ('publish', 'private') AND post_content LIKE '%[feedzy-rss %'" ); //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching
157+
166158
$data = array(
167-
'categories' => $categories,
168-
'imports' => $imports,
169-
'shortcodes' => $shortcodes,
170-
'license' => $license,
171-
'config' => $config,
159+
'categories' => $categories,
160+
'imports' => $imports,
161+
'shortcodes' => $shortcodes,
162+
'license' => $license,
172163
);
173164

165+
$settings = apply_filters( 'feedzy_get_settings', null );
166+
167+
if ( ! is_array( $settings ) || empty( $settings ) ) {
168+
return $data;
169+
}
170+
171+
$general_settings = array();
172+
$config = array();
173+
174+
$proxy = isset( $settings['proxy'] ) && is_array( $settings['proxy'] ) && ! empty( $settings['proxy'] ) ? array_filter( $settings['proxy'] ) : array();
175+
if ( ! empty( $proxy ) ) {
176+
$config[] = 'proxy';
177+
}
178+
179+
if ( isset( $settings['header'], $settings['header']['user-agent'] ) && ! empty( $settings['header']['user-agent'] ) ) {
180+
$config[] = 'custom-user-agent';
181+
}
182+
183+
if ( ! empty( $config ) ) {
184+
$data['config'] = $config;
185+
}
186+
187+
if ( is_array( $settings['general'] ) && ! empty( $settings['general'] ) ) {
188+
foreach ( $settings['general'] as $key => $value ) {
189+
if ( ! empty( $value ) ) {
190+
$general_settings[ $key ] = $value;
191+
}
192+
}
193+
194+
if ( ! empty( $general_settings ) ) {
195+
$data['general'] = $general_settings;
196+
}
197+
}
198+
174199
return $data;
175200
}
176201

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

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,12 @@ public function save_feedzy_post_type_meta( $post_id, $post ) {
769769
$feedzy_category_feed = preg_replace( '/\s*,\s*|\R/', ',', $feedzy_category_feed );
770770
$category_meta['feedzy_category_feed'] = $feedzy_category_feed;
771771
}
772+
773+
if ( empty( get_post_meta( $post_id, 'usage_counted', true ) ) ) {
774+
Feedzy_Rss_Feeds_Usage::get_instance()->track_import_creation();
775+
update_post_meta( $post_id, 'usage_counted', 'yes' );
776+
}
777+
772778
if ( $post->post_type === 'revision' ) {
773779
return true;
774780
} else {
@@ -1766,6 +1772,16 @@ private function setup_wizard_subscribe_process() {
17661772
);
17671773
}
17681774
if ( $with_subscribe && is_email( $email ) ) {
1775+
update_option( 'feedzy_rss_feeds_logger_flag', 'yes' );
1776+
1777+
$extra_data = array(
1778+
'segment' => $segment,
1779+
);
1780+
1781+
if ( ! empty( $integrate_with ) ) {
1782+
$extra_data['integration_scope_onboarding'] = $integrate_with;
1783+
}
1784+
17691785
$request_res = wp_remote_post(
17701786
FEEDZY_SUBSCRIBE_API,
17711787
array(
@@ -1780,9 +1796,7 @@ private function setup_wizard_subscribe_process() {
17801796
'slug' => 'feedzy-rss-feeds',
17811797
'site' => home_url(),
17821798
'email' => $email,
1783-
'data' => array(
1784-
'segment' => $segment,
1785-
),
1799+
'data' => $extra_data
17861800
)
17871801
),
17881802
)

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,6 +1387,8 @@ public function run_cron( $max = 100, $job_id = 0 ) {
13871387
* @access private
13881388
*/
13891389
private function run_job( $job, $max ) {
1390+
Feedzy_Rss_Feeds_Usage::get_instance()->track_rss_import();
1391+
13901392
global $themeisle_log_event;
13911393
$source = get_post_meta( $job->ID, 'source', true );
13921394
$inc_key = get_post_meta( $job->ID, 'inc_key', true );
@@ -3352,6 +3354,7 @@ private function wizard_import_feed() {
33523354
'post_status' => 'publish',
33533355
)
33543356
);
3357+
Feedzy_Rss_Feeds_Usage::get_instance()->track_import_creation();
33553358
}
33563359

33573360
if ( ! is_wp_error( $job_id ) ) {

0 commit comments

Comments
 (0)