Свойство | Type | Description | |
---|---|---|---|
$remove_mb | List of metaboxes to remove. |
Méthode | Description | |
---|---|---|
__construct ( ) | ||
add_custom_column ( array $columns ) : array | Add possible custom columns to tickets list. | |
add_field ( string $name = '', array $args = [] ) : boolean | Add a new custom field to the ticket. | |
check_required_fields ( $go, array $data = [] ) : mixed | Checks required custom fields. | |
custom_column_orderby ( object $query ) : void | Reorder custom columns based on custom values. | |
custom_columns_content ( string $column, integer $post_id ) : void | Manage custom columns content | |
custom_columns_sortable ( array $columns ) : array | Make custom columns sortable | |
custom_taxonomy_filter ( ) : void | Add filters for custom taxonomies | |
custom_taxonomy_filter_convert_id_term ( object $query ) : void | Convert taxonomy term ID into term slug. | |
enqueue_select2_assets ( ) : void | Register and enqueue the select2 assets | |
frontend_submission ( integer $ticket_id ) : void | Trigger the custom fields save function upon front-end submission of a new ticket. | |
get_custom_fields ( ) : array | Return the list of fields | |
have_custom_fields ( boolean $core = false ) : boolean | Check if custom fields are registered. | |
is_field_missing ( array $data = [] ) : boolean | WP_Error | Makes sure no required custom field is missing from the data passed. | |
move_status_first ( array $columns ) : array | Reorder the admin columns. | |
register_taxonomies ( ) : void | Register all custom taxonomies. | |
remove_field ( string $id ) : void | Remove a custom field. | |
remove_taxonomy_metabox ( ) : void | Remove taxonomies metaboxes. | |
save_core_field ( integer $post_id, array $field, mixed $value ) : void | Save the core fields. | |
save_custom_fields ( integer $post_id, array $data = [], boolean $allow_log = true ) : array | Save all custom fields given in $data to the database. | |
status_filter ( ) : void | Add status dropdown in the filters bar. | |
status_filter_by_status ( object $query ) : void | Filter tickets by status. | |
submission_form_fields ( ) : void | Display the custom fields on submission form. |
public add_custom_column ( array $columns ) : array | ||
$columns | array | List of default columns |
Résultat | array | Updated list of columns |
public check_required_fields ( $go, array $data = [] ) : mixed | ||
$data | array | Array of data containing the custom fields to check for required attribute |
Résultat | mixed | True if no error or a WP_Error otherwise |
public custom_column_orderby ( object $query ) : void | ||
$query | object | Main query |
Résultat | void |
public custom_columns_sortable ( array $columns ) : array | ||
$columns | array | Already sortable columns |
Résultat | array | New sortable columns |
public custom_taxonomy_filter ( ) : void | ||
Résultat | void |
public custom_taxonomy_filter_convert_id_term ( object $query ) : void | ||
$query | object | WordPress current main query |
Résultat | void |
public enqueue_select2_assets ( ) : void | ||
Résultat | void |
public frontend_submission ( integer $ticket_id ) : void | ||
$ticket_id | integer | ID of the ticket that's just been added |
Résultat | void |
public get_custom_fields ( ) : array | ||
Résultat | array | List of custom fields |
public have_custom_fields ( boolean $core = false ) : boolean | ||
$core | boolean | True if core fields should be counted as registered custom fields. |
Résultat | boolean | True if custom fields are present, false otherwise |
public is_field_missing ( array $data = [] ) : boolean | WP_Error | ||
$data | array | Array of data to check |
Résultat | boolean | WP_Error | False if no field is missing, WP_Error with the list of missing fields otherwise |
public move_status_first ( array $columns ) : array | ||
$columns | array | List of admin columns |
Résultat | array | Re-ordered list |
public register_taxonomies ( ) : void | ||
Résultat | void |
public remove_field ( string $id ) : void | ||
$id | string | ID of the field to remove |
Résultat | void |
public remove_taxonomy_metabox ( ) : void | ||
Résultat | void |
public save_custom_fields ( integer $post_id, array $data = [], boolean $allow_log = true ) : array | ||
$post_id | integer | ID of the post being saved |
$data | array | Array of data that might contain custom fields values. |
$allow_log | boolean | Whether or not to allow logging actions. If this is set to false and the custom field is set to true, $log has higher priority. I tis used to prevent logging on ticket creation. |
Résultat | array | Array of custom field / value saved to the database |
public status_filter ( ) : void | ||
Résultat | void |
public status_filter_by_status ( object $query ) : void | ||
$query | object | WordPress current main query |
Résultat | void |
public submission_form_fields ( ) : void | ||
Résultat | void |