admin_head.php
2 months ago
admin_init.php
2 months ago
admin_menu.php
2 months ago
admin_notices.php
2 months ago
init.php
2 months ago
pmxe_after_export.php
2 months ago
pmxe_before_export.php
2 months ago
pmxe_exported_post.php
2 months ago
wp_ajax_dismiss_export_warnings.php
2 months ago
wp_ajax_dismiss_review_modal.php
2 months ago
wp_ajax_dismiss_warnings.php
2 months ago
wp_ajax_generate_zapier_api_key.php
2 months ago
wp_ajax_redirect_after_addon_installed.php
2 months ago
wp_ajax_save_scheduling.php
2 months ago
wp_ajax_scheduling_dialog_content.php
2 months ago
wp_ajax_scheduling_subscribe_dialog_content.php
2 months ago
wp_ajax_send_feedback.php
2 months ago
wp_ajax_wpae_available_rules.php
2 months ago
wp_ajax_wpae_filtering.php
2 months ago
wp_ajax_wpae_filtering_count.php
2 months ago
wp_ajax_wpae_get_scheduling_connection_icon.php
2 months ago
wp_ajax_wpae_preview.php
2 months ago
wp_ajax_wpae_upgrade_notice.php
2 months ago
wp_ajax_wpallexport.php
2 months ago
wp_loaded.php
2 months ago
wpmu_new_blog.php
2 months ago
wp_ajax_scheduling_dialog_content.php
59 lines
| 1 | <?php |
| 2 | |
| 3 | defined( 'ABSPATH' ) || exit; |
| 4 | |
| 5 | |
| 6 | function pmxe_wp_ajax_scheduling_dialog_content() |
| 7 | { |
| 8 | |
| 9 | if (!check_ajax_referer('wp_all_export_secure', 'security', false)) { |
| 10 | exit(json_encode(array('html' => esc_html__('Security check', 'wp-all-export')))); |
| 11 | } |
| 12 | |
| 13 | if (!current_user_can(PMXE_Plugin::$capabilities)) { |
| 14 | exit(json_encode(array('html' => esc_html__('Security check', 'wp-all-export')))); |
| 15 | } |
| 16 | |
| 17 | $export_id = isset( $_POST['id'] ) ? absint( $_POST['id'] ) : 0; |
| 18 | $export = new PMXE_Export_Record(); |
| 19 | $export->getById($export_id); |
| 20 | if (!$export) { |
| 21 | throw new Exception('Export not found'); |
| 22 | } |
| 23 | |
| 24 | $post = $export->options; |
| 25 | |
| 26 | if (!isset($post['scheduling_enable'])) { |
| 27 | $post['scheduling_enable'] = 0; |
| 28 | } |
| 29 | |
| 30 | if (!isset($post['scheduling_timezone'])) { |
| 31 | $post['scheduling_timezone'] = 'UTC'; |
| 32 | } |
| 33 | |
| 34 | if (!isset($post['scheduling_run_on'])) { |
| 35 | $post['scheduling_run_on'] = 'weekly'; |
| 36 | } |
| 37 | |
| 38 | if (!isset($post['scheduling_times'])) { |
| 39 | $post['scheduling_times'] = array(); |
| 40 | } |
| 41 | |
| 42 | if (!isset($post['scheduling_weekly_days'])) { |
| 43 | $post['scheduling_weekly_days'] = ''; |
| 44 | } |
| 45 | |
| 46 | $is_dialog_context = 1; |
| 47 | ?> |
| 48 | <div id="post-preview" class="wpallexport-preview wpallexport-scheduling-dialog"> |
| 49 | <p class="wpallexport-preview-title scheduling-preview-title" style="font-size: 13px !important;"><strong>Scheduling Options for Export ID |
| 50 | #<?php echo intval($export_id); ?></strong></p> |
| 51 | <?php |
| 52 | require_once(PMXE_Plugin::ROOT_DIR . '/src/Scheduling/views/SchedulingUI.php'); |
| 53 | ?> |
| 54 | </div> |
| 55 | <?php |
| 56 | |
| 57 | wp_die(); |
| 58 | } |
| 59 |