PHP 클래스 WPAS_Tickets_List

저자: Julien Liabeuf ([email protected])
파일 보기 프로젝트 열기: awesome-support/awesome-support 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$instance object Instance of this class.

공개 메소드들

메소드 설명
__construct ( )
add_core_custom_columns ( array $columns ) : array Add age custom column.
add_ticket_id_title ( string $title ) : string Add ticket ID to the ticket title in admin list screen
apply_ordering_criteria ( WP_Post[] $posts, WP_Query $query ) : WP_Post[] Called by the 'posts_clauses' filter hook this method modifies WP_Query SQL for ticket post types when:
core_custom_columns_content ( array $column, integer $post_id ) Manage core column content.
filter_staff ( WP_Query $wp_query ) : void Filter tickets by assigned staff
get_instance ( ) : object Return an instance of this class.
get_replies_query ( integer $ticket_id ) : WP_Query Get all ticket replies
hide_closed_tickets ( ) : boolean Hide closed tickets.
remove_excerpt ( string $content ) : string Remove the ticket excerpt.
remove_quick_edit ( array $actions ) : array Remove Quick Edit action
set_ordering_query_var ( WP_Query $query ) : void Called by the 'pre_get_posts' filter hook this method sets the following to true when for the admin ticket list page:
ticket_row_class ( array $classes, array $class, integer $post_id ) : array Filter the list of CSS classes for the current post.

메소드 상세

__construct() 공개 메소드

public __construct ( )

add_core_custom_columns() 공개 메소드

Add this column after the date.
부터: 3.0.0
public add_core_custom_columns ( array $columns ) : array
$columns array List of default columns
리턴 array Updated list of columns

add_ticket_id_title() 공개 메소드

Add ticket ID to the ticket title in admin list screen
부터: 3.3
public add_ticket_id_title ( string $title ) : string
$title string Original title
리턴 string

apply_ordering_criteria() 공개 메소드

$wp_query->get('wpas_order_by_urgency') === true The query var 'wpas_order_by_urgency' will be set in the set_ordering_query_var() function called by the 'pre_get_posts' action hook.
부터: 3.3
public apply_ordering_criteria ( WP_Post[] $posts, WP_Query $query ) : WP_Post[]
$posts WP_Post[]
$query WP_Query
리턴 WP_Post[]

core_custom_columns_content() 공개 메소드

Manage core column content.
부터: 3.0.0
public core_custom_columns_content ( array $column, integer $post_id )
$column array Column currently processed
$post_id integer ID of the post being processed

filter_staff() 공개 메소드

Filter tickets by assigned staff
부터: 3.3
public filter_staff ( WP_Query $wp_query ) : void
$wp_query WP_Query
리턴 void

get_instance() 공개 정적인 메소드

Return an instance of this class.
부터: 3.0.0
public static get_instance ( ) : object
리턴 object A single instance of this class.

get_replies_query() 공개 메소드

Try to get the replies from cache and if not possible, run the query and cache the result.
부터: 3.3
public get_replies_query ( integer $ticket_id ) : WP_Query
$ticket_id integer ID of the ticket we want to get the replies for
리턴 WP_Query

hide_closed_tickets() 공개 메소드

If the plugin is set to hide closed tickets, we modify the "All Tickets" link in the post type menu and append the status filter with the "open" value.
부터: 3.0.0
public hide_closed_tickets ( ) : boolean
리턴 boolean True if the closed tickets were hiddne, false otherwise

remove_excerpt() 공개 메소드

We don't want ot display the ticket excerpt in the tickets list when the excerpt mode is selected.
public remove_excerpt ( string $content ) : string
$content string Ticket excerpt
리턴 string Excerpt if applicable or empty string otherwise

remove_quick_edit() 공개 메소드

Remove Quick Edit action
부터: 3.1.6
public remove_quick_edit ( array $actions ) : array
$actions array An array of row action links.
리턴 array Updated array of row action links

set_ordering_query_var() 공개 메소드

$wp_query->query_var['wpas_order_by_urgency'] Setting this to true will trigger modifications to the query that will be made in the apply_ordering_criteria() function called by the 'posts_clauses' filter hook.
부터: 3.3
public set_ordering_query_var ( WP_Query $query ) : void
$query WP_Query
리턴 void

ticket_row_class() 공개 메소드

Filter the list of CSS classes for the current post.
부터: 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.
리턴 array

프로퍼티 상세

$instance 보호되어 있는 정적으로 프로퍼티

Instance of this class.
부터: 1.0.0
protected static object $instance
리턴 object