BuddyClients Docs

brief-preview.php

Table of Contents

Functions

buddyc_add_preview_column()  : array<string|int, mixed>
Adds a preview column to the brief type taxonomy.
buddyc_render_preview_button()  : string
Populates the new column with preview buttons.
buddyc_handle_preview_request()  : mixed
Handles the preview request by redirecting to the preview.
buddyc_create_preview_draft()  : int|false
Creates a draft post for preview based on the taxonomy term ID.
buddyc_redirect_to_preview()  : mixed
Redirects to the draft post for preview.
buddyc_delete_brief_preview_drafts()  : mixed
Deletes draft brief preview posts.
buddyc_check_and_run_draft_deletion()  : mixed
Runs draft deletion before the main query is executed on the buddyc_brief archive page.

Functions

buddyc_add_preview_column()

Adds a preview column to the brief type taxonomy.

buddyc_add_preview_column(array<string|int, mixed> $columns) : array<string|int, mixed>
Parameters
$columns : array<string|int, mixed>

The array of columns data.

Tags
since
1.0.3
Return values
array<string|int, mixed>

The modified array of columns data.

buddyc_render_preview_button()

Populates the new column with preview buttons.

buddyc_render_preview_button(string $content, string $column_name, int $term_id) : string
Parameters
$content : string

The content of the column.

$column_name : string

The name of the column.

$term_id : int

The ID of the term.

Tags
since
1.0.3
Return values
string

The modified content of the column.

buddyc_handle_preview_request()

Handles the preview request by redirecting to the preview.

buddyc_handle_preview_request() : mixed
Tags
since
1.0.3

buddyc_create_preview_draft()

Creates a draft post for preview based on the taxonomy term ID.

buddyc_create_preview_draft(int $taxonomy_term_id) : int|false
Parameters
$taxonomy_term_id : int

The taxonomy term ID.

Tags
since
1.0.3
Return values
int|false

The post ID of the draft, or false on failure.

buddyc_redirect_to_preview()

Redirects to the draft post for preview.

buddyc_redirect_to_preview(int $taxonomy_term_id) : mixed
Parameters
$taxonomy_term_id : int

The taxonomy term ID.

Tags
since
1.0.3

buddyc_delete_brief_preview_drafts()

Deletes draft brief preview posts.

buddyc_delete_brief_preview_drafts() : mixed
Tags
since
1.0.3

buddyc_check_and_run_draft_deletion()

Runs draft deletion before the main query is executed on the buddyc_brief archive page.

buddyc_check_and_run_draft_deletion(WP_Query $query) : mixed
Parameters
$query : WP_Query

The WP_Query instance (passed by reference).

Tags
since
1.0.3

        
On this page

Search results