Skip to content

Commit 02889e7

Browse files
Merge branch 'development' into feat/827
2 parents 8684ee9 + 3781401 commit 02889e7

15 files changed

+847
-156
lines changed

css/settings.css

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,9 @@ fieldset[disabled] .form-control {
427427
.fz-form-wrap .form-block .only-pro-content .only-pro-container .upgrade-alert{
428428
width: 100%;
429429
}
430+
#fz-features .fz-form-wrap .form-block .only-pro-content .only-pro-container{
431+
width: 100%;
432+
}
430433

431434
.form-block-pro-text{
432435
padding-top: 8px;
@@ -1216,6 +1219,30 @@ input.fz-switch-toggle[type=checkbox]:checked:before{
12161219
padding-left: 12px;
12171220
padding-right: 12px;
12181221
}
1222+
.fz-auto-cat {
1223+
width: 100%;
1224+
}
1225+
.fz-auto-cat .fz-select-control {
1226+
min-width: auto;
1227+
}
1228+
.fz-auto-cat tr {
1229+
display: flex;
1230+
gap: 12px;
1231+
padding: 6px 0;
1232+
}
1233+
.fz-auto-cat .fz-auto-cat-col-8{
1234+
width: 66.66%;
1235+
}
1236+
.fz-auto-cat .fz-auto-cat-col-4{
1237+
width: 33.34%;
1238+
display: flex;
1239+
gap: 6px;
1240+
}
1241+
.fz-auto-cat-actions {
1242+
display: flex;
1243+
padding-top: 12px;
1244+
justify-content: flex-end;
1245+
}
12191246

12201247
.support-box-list{
12211248
padding: 30px 0 24px;
@@ -2000,7 +2027,8 @@ li.draggable-item .components-panel__body-toggle.components-button{
20002027
.fz-action-control .fz-hide-icon .components-panel__arrow {
20012028
display: none;
20022029
}
2003-
.tagify__filter-icon{
2030+
.tagify__filter-icon,
2031+
.fz-action-icon {
20042032
width: 19px;
20052033
height: 19px;
20062034
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M14.5 13.8002C13.4 13.8002 12.4 14.5002 12.1 15.6002H4V17.0002H12.1C12.4 18.0002 13.4 18.8002 14.5 18.8002C15.6 18.8002 16.6 18.1002 16.9 17.0002H20V15.5002H16.9C16.6 14.5002 15.6 13.8002 14.5 13.8002ZM11.9 7.0002C11.6 6.0002 10.6 5.2002 9.5 5.2002C8.4 5.2002 7.4 6.0002 7.1 7.0002H4V8.5002H7.1C7.4 9.5002 8.4 10.3002 9.5 10.3002C10.6 10.3002 11.6 9.6002 11.9 8.5002H20V7.0002H11.9Z' fill='%23050505'/%3E%3C/svg%3E");
@@ -2461,6 +2489,25 @@ li.draggable-item .components-panel__body-toggle.components-button{
24612489
.fz-panel-tab .fz-panel-tab__content .components-base-control .components-datetime__timezone {
24622490
display: inline-block;
24632491
}
2492+
2493+
.fz-form-group .custom_fields .fz-form-group {
2494+
position: relative;
2495+
}
2496+
.fz-form-group .custom_fields .fz-form-group .fz-action-icon {
2497+
position: absolute;
2498+
top: 50%;
2499+
right: 2px;
2500+
cursor: pointer;
2501+
transform: translateY(-50%);
2502+
width: 40px;
2503+
height: 40px;
2504+
display: grid;
2505+
place-items: center;
2506+
}
2507+
.fz-form-group .custom_fields .fz-form-group .fz-action-icon.disabled {
2508+
pointer-events: none;
2509+
opacity: 0.5;
2510+
}
24642511
.fz-prompt-button {
24652512
gap: 7px;
24662513
display: flex;

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,5 +597,15 @@ function() {
597597
}
598598
return $dom->saveHTML();
599599
}
600+
601+
/**
602+
* Get custom field value.
603+
*/
604+
private function custom_field() {
605+
if ( ! empty( $this->result ) ) {
606+
return $this->result;
607+
}
608+
return $this->default_value;
609+
}
600610
}
601611
}

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -995,12 +995,26 @@ private function save_settings() {
995995
$settings = apply_filters( 'feedzy_get_settings', array() );
996996
switch ( $post_tab ) {
997997
case 'general':
998+
$auto_categories = isset( $_POST['auto-categories'] ) ? filter_input( INPUT_POST, 'auto-categories', FILTER_UNSAFE_RAW, FILTER_REQUIRE_ARRAY ) : array();
999+
1000+
$auto_categories = array_filter( $auto_categories, function( $item ) {
1001+
return ! empty( $item['keywords'] ) && is_numeric( $item['category'] );
1002+
});
1003+
1004+
$auto_categories = array_map(function( $item ) {
1005+
$item['keywords'] = sanitize_text_field( $item['keywords'] );
1006+
return $item;
1007+
}, $auto_categories );
1008+
1009+
$auto_categories = array_values( $auto_categories );
1010+
9981011
$settings['general']['disable-default-style'] = isset( $_POST['disable-default-style'] ) ? (int) filter_input( INPUT_POST, 'disable-default-style', FILTER_SANITIZE_NUMBER_INT ) : '';
9991012
$settings['general']['feedzy-delete-days'] = isset( $_POST['feedzy-delete-days'] ) ? (int) filter_input( INPUT_POST, 'feedzy-delete-days', FILTER_SANITIZE_NUMBER_INT ) : '';
10001013
$settings['general']['default-thumbnail-id'] = isset( $_POST['default-thumbnail-id'] ) ? (int) filter_input( INPUT_POST, 'default-thumbnail-id', FILTER_SANITIZE_NUMBER_INT ) : 0;
10011014
$settings['general']['fz_cron_execution'] = isset( $_POST['fz_cron_execution'] ) ? sanitize_text_field( wp_unslash( $_POST['fz_cron_execution'] ) ) : '';
10021015
$settings['general']['fz_cron_schedule'] = isset( $_POST['fz_cron_schedule'] ) ? filter_input( INPUT_POST, 'fz_cron_schedule', FILTER_UNSAFE_RAW ) : 'hourly';
10031016
$settings['general']['fz_execution_offset'] = isset( $_POST['fz_execution_offset'] ) ? filter_input( INPUT_POST, 'fz_execution_offset', FILTER_UNSAFE_RAW ) : '';
1017+
$settings['general']['auto-categories'] = $auto_categories;
10041018
$settings['general']['feedzy-telemetry'] = isset( $_POST['feedzy-telemetry'] ) ? (int) filter_input( INPUT_POST, 'feedzy-telemetry', FILTER_SANITIZE_NUMBER_INT ) : '';
10051019
$settings['general']['feedzy-delete-media'] = isset( $_POST['feedzy-delete-media'] ) ? (int) filter_input( INPUT_POST, 'feedzy-delete-media', FILTER_SANITIZE_NUMBER_INT ) : '';
10061020
break;

0 commit comments

Comments
 (0)