0 ) { $agentorie_total_messages = isset( $agentorie_stats['total_messages'] ) ? $agentorie_stats['total_messages'] : 0; $agentorie_avg_messages_per_conv = round( $agentorie_total_messages / $agentorie_stats['total_conversations'], 1 ); $agentorie_human_requests = isset( $agentorie_stats['human_requests'] ) ? $agentorie_stats['human_requests'] : 0; $agentorie_resolved = $agentorie_stats['total_conversations'] - $agentorie_human_requests; $agentorie_resolution_rate = round( ( $agentorie_resolved / $agentorie_stats['total_conversations'] ) * 100 ); if ( method_exists( 'Agentorie_Database', 'get_advanced_stats' ) ) { $agentorie_advanced_stats = Agentorie_Database::get_advanced_stats(); $agentorie_peak_hour = isset( $agentorie_advanced_stats['peak_hour'] ) ? $agentorie_advanced_stats['peak_hour'] . 'h' : '-'; $agentorie_this_month_convs = isset( $agentorie_advanced_stats['this_month'] ) ? $agentorie_advanced_stats['this_month'] : 0; $agentorie_last_month_convs = isset( $agentorie_advanced_stats['last_month'] ) ? $agentorie_advanced_stats['last_month'] : 0; if ( $agentorie_last_month_convs > 0 ) { $agentorie_growth_percent = round( ( ( $agentorie_this_month_convs - $agentorie_last_month_convs ) / $agentorie_last_month_convs ) * 100 ); } } } // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only display parameters $agentorie_deleted = isset( $_GET['deleted'] ) ? absint( wp_unslash( $_GET['deleted'] ) ) : 0; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only display parameters $agentorie_error = isset( $_GET['error'] ) ? sanitize_key( wp_unslash( $_GET['error'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only display parameters $agentorie_exported = isset( $_GET['exported'] ) ? absint( wp_unslash( $_GET['exported'] ) ) : 0; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only display parameters $agentorie_anonymized = isset( $_GET['anonymized'] ) ? absint( wp_unslash( $_GET['anonymized'] ) ) : 0; // Filter parameters. // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only filter parameters $agentorie_filter_date = isset( $_GET['filter_date'] ) ? sanitize_key( wp_unslash( $_GET['filter_date'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only filter parameters $agentorie_filter_flag = isset( $_GET['filter_flag'] ) ? sanitize_key( wp_unslash( $_GET['filter_flag'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only filter parameters $agentorie_filter_messages = isset( $_GET['filter_messages'] ) ? sanitize_key( wp_unslash( $_GET['filter_messages'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only filter parameters $agentorie_filter_search = isset( $_GET['s'] ) ? sanitize_text_field( wp_unslash( $_GET['s'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only filter parameters $agentorie_orderby = isset( $_GET['orderby'] ) ? sanitize_key( wp_unslash( $_GET['orderby'] ) ) : 'created_at'; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only filter parameters $agentorie_order = isset( $_GET['order'] ) ? strtoupper( sanitize_key( wp_unslash( $_GET['order'] ) ) ) : 'DESC'; $agentorie_order = in_array( $agentorie_order, array( 'ASC', 'DESC' ), true ) ? $agentorie_order : 'DESC'; $agentorie_allowed_orderby = array( 'created_at', 'msg_count', 'session_id', 'visitor_id' ); $agentorie_orderby = in_array( $agentorie_orderby, $agentorie_allowed_orderby, true ) ? $agentorie_orderby : 'created_at'; ?>

0 ) : ?>

0 ) : ?>

0 ) : ?>

... — —
1 ) : ?>
add_query_arg( 'paged', '%#%' ), 'format' => '', 'current' => $agentorie_page, 'total' => $agentorie_total_pages, 'prev_text' => '«', 'next_text' => '»', ); echo wp_kses_post( paginate_links( $agentorie_pagination_args ) ); ?>

%
%