admin_url('admin-ajax.php'), 'nonce' => wp_create_nonce('wp_to_html_bulk'), 'statusNonce' => wp_create_nonce('wp_to_html_status'), 'strings' => array( 'processing' => __('Processing...', 'wp-to-html'), 'complete' => __('Complete!', 'wp-to-html'), 'error' => __('An error occurred', 'wp-to-html'), 'confirmClear' => __('Are you sure you want to clear all cached HTML files?', 'wp-to-html'), 'statusIdle' => __('No regeneration in progress', 'wp-to-html'), 'statusRunning' => __('Regeneration in progress...', 'wp-to-html'), 'statusPending' => __('Waiting to start...', 'wp-to-html'), 'statusComplete' => __('Regeneration complete', 'wp-to-html'), 'sourceCron' => __('(Scheduled Task)', 'wp-to-html'), 'sourceAdminBar' => __('(Admin Bar)', 'wp-to-html'), 'sourcePluginUpdate' => __('(Plugin Update)', 'wp-to-html'), 'sourceSettingsPage' => __('(Settings Page)', 'wp-to-html'), ), )); } } /** * Render settings page */ public function render_settings_page() { if (!current_user_can('manage_options')) { return; } // Check if cache was just cleared if (isset($_GET['cache_cleared']) && $_GET['cache_cleared'] === '1') { add_settings_error('wp_to_html', 'cache_cleared', __('Cache cleared successfully.', 'wp-to-html'), 'success'); } ?>

__('(Scheduled Task)', 'wp-to-html'), 'admin_bar' => __('(Admin Bar)', 'wp-to-html'), 'plugin_update' => __('(Plugin Update)', 'wp-to-html'), 'settings_page' => __('(Settings Page)', 'wp-to-html'), ); echo isset($sources[$status['source']]) ? $sources[$status['source']] : ''; ?> 0): ?>

get_nginx_rules()); ?>
' . __('Configure the main settings for static HTML generation.', 'wp-to-html') . '

'; } /** * Render enabled field */ public function render_enabled_field() { $settings = WP_To_HTML::get_settings(); ?>

' . __('Configure which pages should be excluded from static HTML generation.', 'wp-to-html') . '

'; } /** * Render shortcodes field */ public function render_shortcodes_field() { $settings = WP_To_HTML::get_settings(); ?>



' . __('Configure automatic regeneration of stale cached pages.', 'wp-to-html') . '

'; } /** * Render cron interval field */ public function render_cron_field() { $settings = WP_To_HTML::get_settings(); $current_interval = isset($settings['cron_interval']) ? $settings['cron_interval'] : 'wp_to_html_hourly'; $intervals = array( 'disabled' => __('Disabled', 'wp-to-html'), 'wp_to_html_hourly' => __('Every Hour', 'wp-to-html'), 'wp_to_html_twicedaily' => __('Twice Daily', 'wp-to-html'), 'daily' => __('Daily', 'wp-to-html'), ); ?>

()

' . __('Configure performance optimizations for static HTML files.', 'wp-to-html') . '

'; } /** * Render bundle CSS field */ public function render_bundle_css_field() { $settings = WP_To_HTML::get_settings(); ?>

get_cache_stats(); ?>
true), 'names'); $excluded = array('attachment', 'product', 'product_variation'); $post_types = array_diff($post_types, $excluded); foreach ($post_types as $post_type) { add_meta_box( 'wp_to_html_exclude', __('WP to HTML', 'wp-to-html'), array($this, 'render_meta_box'), $post_type, 'side', 'default' ); } } /** * Render meta box content */ public function render_meta_box($post) { wp_nonce_field('wp_to_html_meta_box', 'wp_to_html_meta_box_nonce'); $exclude = get_post_meta($post->ID, '_wp_to_html_exclude', true); $generator = WP_To_HTML_Generator::get_instance(); $has_cache = $generator->has_cache($post->ID); $exclusion_reason = $generator->should_exclude($post); ?>



'idle', )); } wp_send_json_success($status); } }