array( 'page', 'post' ), 'posts_per_page' => -1, 'post_status' => 'publish', 'orderby' => 'title', 'order' => 'ASC', ) ); // Last scan date for header subtitle. $accessiq_sc_last_posts = get_posts( array( 'post_type' => ACCESSIQ_SCAN_CPT, 'posts_per_page' => 1, 'orderby' => 'date', 'order' => 'DESC', ) ); // phpcs:ignore WordPress.DateTime.CurrentTimeTimestamp.Requested $accessiq_sc_last_date = ! empty( $accessiq_sc_last_posts ) ? human_time_diff( get_post_time( 'U', false, $accessiq_sc_last_posts[0] ), current_time( 'timestamp' ) ) . ' ' . __( 'ago', 'accessiq' ) : null; // History card: last 6 scans (CSS bar chart). $accessiq_sc_hist_posts = get_posts( array( 'post_type' => ACCESSIQ_SCAN_CPT, 'posts_per_page' => 6, 'orderby' => 'date', 'order' => 'DESC', ) ); $accessiq_sc_hist_latest = ! empty( $accessiq_sc_hist_posts ) ? $accessiq_sc_hist_posts[0]->ID : 0; // History tab: last 20 scans table. $accessiq_sc_all_scans = get_posts( array( 'post_type' => ACCESSIQ_SCAN_CPT, 'posts_per_page' => 20, 'orderby' => 'date', 'order' => 'DESC', ) ); $accessiq_sc_default_level = $accessiq_sc_settings->get( 'scan_level', 'AA' ); ?>