Admin_Columns
ATA Metabox class to add custom columns to the ata_snippets post type listing in admin.
Namespace: WebberZone\Snippetz\Snippets
Since: 1.7.0
Source: includes/snippets/class-admin-columns.php line 25
Methods
__construct()
Constructor class.
Line: 37
public function __construct( );
manage_post_columns()
Add columns to the custom post type ata_snippets.
Line: 53
public function manage_post_columns( $columns );
| Type | Name | Description |
|---|---|---|
array | $columns | An associative array of column headings. |
set_sortable_columns()
Make custom column sortable.
Line: 84
public function set_sortable_columns( $columns ): array;
| Type | Name | Description |
|---|---|---|
array | $columns | The existing sortable columns. |
Returns: array — The modified sortable columns.
manage_posts_custom_column()
Add custom column content.
Line: 95
public function manage_posts_custom_column( $column_name, $post_id );
| Type | Name | Description |
|---|---|---|
string | $column_name | Column name. |
int | $post_id | Post ID. |
pre_get_posts()
Order by or filtery by type meta value.
Line: 188
public function pre_get_posts( $query );
| Type | Name | Description |
|---|---|---|
\WP_Query | $query | The current query object. |
admin_scripts()
Enqueue admin scripts.
Line: 213
public function admin_scripts( );
ajax_toggle_snippet()
Toggle snippet status via AJAX.
Line: 249
public function ajax_toggle_snippet( );