navigation_status(); $ajxl_enabled = ( 'on' === $admin->value( 'enable_plugin', 'off' ) ); $ajxl_paused = $settings->is_paused(); $ajxl_safe = $admin->flag( 'safe_mode' ); $ajxl_admins = ( 'admins' === $admin->value( 'visibility', 'everyone' ) ); $ajxl_exclusions = $admin->exclusion_summary(); $ajxl_diag = $admin->last_diagnostics(); $ajxl_logging = $admin->flag( 'error_logging' ); $ajxl_errors = $ajxl_logging ? $admin->log_entries( 5 ) : array(); // Status cards show what visitors get: the effective settings (safe mode overrides applied). $ajxl_effective = $settings->effective(); $ajxl_mode = isset( $ajxl_effective['navigation_mode'] ) ? (string) $ajxl_effective['navigation_mode'] : 'auto'; $ajxl_header = isset( $ajxl_effective['header_mode'] ) ? (string) $ajxl_effective['header_mode'] : 'preserve'; $ajxl_prefetch = ! empty( $ajxl_effective['prefetch_enabled'] ); $ajxl_cache = ! empty( $ajxl_effective['cache_enabled'] ); $ajxl_out = (string) $admin->value( 'transition_out', 'fade' ); $ajxl_in = (string) $admin->value( 'transition_in', 'fade' ); $ajxl_loader = (string) $admin->value( 'loader_type', 'bar' ); $ajxl_mloader = (string) $admin->value( 'mobile_loader_type', 'inherit' ); $ajxl_triggers = $admin->value( 'prefetch_triggers', array() ); $ajxl_triggers = is_array( $ajxl_triggers ) ? $ajxl_triggers : array(); $ajxl_selectors = $admin->count_lines( $admin->value( 'content_selectors', '' ) ); $ajxl_analytics = (string) $admin->value( 'analytics_mode', 'none' ); ?>

action_button( 'toggle_enable', $ajxl_enabled ? __( 'Turn off', 'ajax-loading' ) : __( 'Turn on', 'ajax-loading' ), array( 'class' => $ajxl_enabled ? 'button' : 'button button-primary', 'icon' => $ajxl_enabled ? 'dashicons-controls-pause' : 'dashicons-controls-play', ) ); if ( $ajxl_enabled ) { $admin->action_button( 'toggle_visibility', $ajxl_admins ? __( 'Enable for everyone', 'ajax-loading' ) : __( 'Test mode (administrators only)', 'ajax-loading' ), array( 'icon' => $ajxl_admins ? 'dashicons-groups' : 'dashicons-admin-users' ) ); } ?>

action_button( 'clear_cache', __( 'Clear navigation cache', 'ajax-loading' ), array( 'icon' => 'dashicons-trash' ) ); ?> action_button( 'toggle_safe_mode', $ajxl_safe ? __( 'Turn off safe mode', 'ajax-loading' ) : __( 'Turn on safe mode', 'ajax-loading' ), array( 'icon' => 'dashicons-shield-alt' ) ); if ( $ajxl_paused ) { $admin->action_button( 'resume', __( 'Resume now', 'ajax-loading' ), array( 'class' => 'button button-primary', 'icon' => 'dashicons-controls-play', ) ); } elseif ( $ajxl_enabled ) { $admin->action_button( 'pause', __( 'Pause for 1 hour', 'ajax-loading' ), array( 'name' => 'duration', 'value' => (string) HOUR_IN_SECONDS, 'icon' => 'dashicons-clock', ) ); $admin->action_button( 'pause', __( 'Pause for 24 hours', 'ajax-loading' ), array( 'name' => 'duration', 'value' => (string) DAY_IN_SECONDS, 'icon' => 'dashicons-clock', ) ); } ?>

choice_label( 'transition_out', $ajxl_out ) . ' → ' . $admin->choice_label( 'transition_in', $ajxl_in ) ); } ?>

value( 'transition_duration', 250 ) ), $admin->choice_label( 'transition_easing' ) ) ); ?>

choice_label( 'loader_type', $ajxl_loader ) ); ?>

choice_label( 'mobile_loader_type', $ajxl_mloader ) ) ); } else { /* translators: %s: delay in milliseconds. */ echo esc_html( sprintf( __( 'Appears after %s ms', 'ajax-loading' ), number_format_i18n( (int) $admin->value( 'loader_delay', 150 ) ) ) ); } ?>

0 && 'body' !== $ajxl_mode ) { echo esc_html( sprintf( /* translators: %s: number of selectors. */ _n( '%s configured selector', '%s configured selectors', $ajxl_selectors, 'ajax-loading' ), number_format_i18n( $ajxl_selectors ) ) ); } elseif ( 'custom' === $ajxl_mode ) { esc_html_e( 'No selectors configured yet', 'ajax-loading' ); } elseif ( 'body' === (string) $admin->value( 'navigation_mode', 'auto' ) && 'body' !== $ajxl_mode ) { esc_html_e( '"Whole page body" is not used while safe mode is on', 'ajax-loading' ); } else { echo esc_html( 'preserve' === $ajxl_header ? __( 'Header and menus stay in place', 'ajax-loading' ) : __( 'Header is replaced too', 'ajax-loading' ) ); } ?>

flag( 'prefetch_enabled' ) ) { echo WPAJXL_Admin::pill( 'neutral', __( 'Off (safe mode)', 'ajax-loading' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- pill() escapes. } else { echo WPAJXL_Admin::pill( 'neutral', __( 'Off', 'ajax-loading' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- pill() escapes. } ?>

flag( 'cache_enabled' ) ) { echo WPAJXL_Admin::pill( 'neutral', __( 'Off (safe mode)', 'ajax-loading' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- pill() escapes. } else { echo WPAJXL_Admin::pill( 'neutral', __( 'Off', 'ajax-loading' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- pill() escapes. } ?>

value( 'cache_max_pages', 10 ) ), number_format_i18n( (int) $admin->value( 'cache_ttl', 300 ) ) ) ); } else { esc_html_e( 'Back and forward fetch pages again', 'ajax-loading' ); } ?>

0 ) { /* translators: %s: number of problems. */ echo WPAJXL_Admin::pill( 'error', sprintf( _n( '%s problem', '%s problems', $ajxl_diag['counts']['error'], 'ajax-loading' ), number_format_i18n( $ajxl_diag['counts']['error'] ) ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- pill() escapes. } elseif ( $ajxl_diag['counts']['warning'] > 0 ) { /* translators: %s: number of warnings. */ echo WPAJXL_Admin::pill( 'warning', sprintf( _n( '%s warning', '%s warnings', $ajxl_diag['counts']['warning'], 'ajax-loading' ), number_format_i18n( $ajxl_diag['counts']['warning'] ) ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- pill() escapes. } else { echo WPAJXL_Admin::pill( 'ok', __( 'All checks passed', 'ajax-loading' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- pill() escapes. } ?>

flag( 'respect_reduced_motion' ) ) { esc_html_e( 'Visitors who ask their device to reduce motion see page changes without animations.', 'ajax-loading' ); } else { esc_html_e( '"Respect reduced motion" is off: visitors who ask their device to reduce motion still see page animations. Turning it back on is recommended.', 'ajax-loading' ); } ?>