WPAS_Tickets_List::ticket_row_class PHP Method

ticket_row_class() public method

Filter the list of CSS classes for the current post.
Since: 3.3
public ticket_row_class ( array $classes, array $class, integer $post_id ) : array
$classes array An array of post classes.
$class array An array of additional classes added to the post.
$post_id integer The post ID.
return array
    public function ticket_row_class($classes, $class, $post_id)
    {
        global $pagenow;
        if ('edit.php' !== $pagenow || !isset($_GET['post_type']) || isset($_GET['post_type']) && 'ticket' !== $_GET['post_type']) {
            return $classes;
        }
        if (!is_admin()) {
            return $classes;
        }
        if ('ticket' !== get_post_type($post_id)) {
            return $classes;
        }
        $replies = $this->get_replies_query($post_id);
        if (true === wpas_is_reply_needed($post_id, $replies)) {
            $classes[] = 'wpas-awaiting-support-reply';
        }
        return $classes;
    }