Skip to content

Commit fe3d789

Browse files
Add upsell section
1 parent 550bfc3 commit fe3d789

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

includes/views/import-metabox-edit.php

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -835,18 +835,20 @@ class="fz-switch-toggle" type="checkbox" value="yes"
835835
</div>
836836
</div>
837837
</div>
838-
<?php if ( feedzy_is_pro() ) : ?>
839-
<div class="form-block form-block-two-column">
838+
<div class="form-block form-block-two-column <?php echo esc_attr( apply_filters( 'feedzy_upsell_class', '' ) ); ?>">
839+
<?php echo wp_kses_post( apply_filters( 'feedzy_upsell_content', '', 'fallback-image', 'import' ) ); ?>
840840
<div class="fz-left">
841-
<h4 class="h4"><?php esc_html_e( 'Schedule Import Job', 'feedzy-rss-feeds' ); ?></h4>
841+
<h4 class="h4"><?php esc_html_e( 'Schedule Import Job', 'feedzy-rss-feeds' ); ?> <?php echo ! feedzy_is_pro() ? ' <span class="pro-label">PRO</span>' : ''; ?></h4>
842842
</div>
843843
<div class="fz-right">
844844
<div class="fz-form-row">
845845
<div class="fz-form-col-6">
846846
<div class="fz-form-group">
847847
<label class="form-label"><?php esc_html_e( 'First cron execution time', 'feedzy-rss-feeds' ); ?></label>
848-
<input type="hidden" name="feedzy_meta_data[fz_execution_offset]" id="fz-execution-offset" value="<?php echo ! empty( $import_schedule['fz_execution_offset'] ) ? esc_attr( $import_schedule['fz_execution_offset'] ) : ''; ?>">
849-
<input type="datetime-local" id="fz-event-execution" name="feedzy_meta_data[fz_cron_execution]" class="form-control" value="<?php echo ! empty( $import_schedule['fz_cron_execution'] ) ? esc_attr( $import_schedule['fz_cron_execution'] ) : ''; ?>">
848+
<?php if ( feedzy_is_pro() ) : ?>
849+
<input type="hidden" name="feedzy_meta_data[fz_execution_offset]" id="fz-execution-offset" value="<?php echo ! empty( $import_schedule['fz_execution_offset'] ) ? esc_attr( $import_schedule['fz_execution_offset'] ) : ''; ?>">
850+
<?php endif; ?>
851+
<input type="datetime-local" id="fz-event-execution" name="feedzy_meta_data[fz_cron_execution]" class="form-control" value="<?php echo ! empty( $import_schedule['fz_cron_execution'] ) ? esc_attr( $import_schedule['fz_cron_execution'] ) : ''; ?>"<?php disabled( true, ! feedzy_is_pro() ); ?>>
850852
<div class="help-text pt-8">
851853
<?php esc_html_e( 'When past date will be provided, event will be executed in the next queue.', 'feedzy-rss-feeds' ); ?>
852854
<a href="<?php echo esc_url( 'https://docs.themeisle.com/article/1820-how-to-set-scheduler-for-import-cron-jobs-in-feedzy' ); ?>" target="_blank"><?php esc_html_e( 'Learn More', 'feedzy-rss-feeds' ); ?></a>
@@ -856,18 +858,16 @@ class="fz-switch-toggle" type="checkbox" value="yes"
856858
<div class="fz-form-col-6">
857859
<div class="fz-form-group">
858860
<label class="form-label"><?php esc_html_e( 'Schedule', 'feedzy-rss-feeds' ); ?></label>
859-
<?php
860-
$save_schedule = ! empty( $import_schedule['fz_cron_schedule'] ) ? $import_schedule['fz_cron_schedule'] : '';
861-
862-
$schedules = wp_get_schedules();
863-
if ( isset( $schedules['hourly'] ) ) {
864-
$hourly = $schedules['hourly'];
865-
unset( $schedules['hourly'] );
866-
$schedules = array_merge( array( 'hourly' => $hourly ), $schedules );
867-
}
868-
?>
869-
<select id="fz-event-schedule" class="form-control fz-select-control" name="feedzy_meta_data[fz_cron_schedule]">
861+
<select id="fz-event-schedule" class="form-control fz-select-control" name="feedzy_meta_data[fz_cron_schedule]"<?php disabled( true, ! feedzy_is_pro() ); ?>>
870862
<?php
863+
$save_schedule = ! empty( $import_schedule['fz_cron_schedule'] ) ? $import_schedule['fz_cron_schedule'] : '';
864+
865+
$schedules = wp_get_schedules();
866+
if ( isset( $schedules['hourly'] ) ) {
867+
$hourly = $schedules['hourly'];
868+
unset( $schedules['hourly'] );
869+
$schedules = array_merge( array( 'hourly' => $hourly ), $schedules );
870+
}
871871
$duplicate_schedule = array();
872872
foreach ( $schedules as $slug => $schedule ) :
873873
if ( empty( $schedule['interval'] ) || in_array( $schedule['interval'], $duplicate_schedule, true ) ) {
@@ -884,7 +884,6 @@ class="fz-switch-toggle" type="checkbox" value="yes"
884884
</div>
885885
</div>
886886
</div>
887-
<?php endif; ?>
888887
<?php if ( function_exists( 'icl_get_languages' ) ) : ?>
889888
<div class="form-block form-block-two-column">
890889
<div class="fz-left">

0 commit comments

Comments
 (0)