Holds Post data.
fetch_post_by_id()
защищенный Метод
Also returns latest post from blog or archive if applicable.
get_latest_post_id()
публичный Метод
Fetch latest public post ID.
get_post_content()
публичный Метод
inpost_seo_save()
публичный Метод
Some values get sanitized, the rest are pulled from identically named subkeys in the $_POST['autodescription'] array.
public inpost_seo_save ( integer $post_id, object $post ) : mixed |
$post_id |
integer |
Post ID. |
$post |
object |
Post object. |
Результат |
mixed |
Returns post id if permissions incorrect, null if doing autosave, ajax or future post, false if update
or delete failed, and true on success. |
save_custom_fields()
публичный Метод
It verifies the nonce, then checks we're not doing autosave, ajax or a future post request. It then checks the
current user's permissions, before finally* either updating the post meta, or deleting the field if the value was not
truthy.
By passing an array of fields => values from the same metabox (and therefore same nonce) into the $data argument,
repeated checks against the nonce, request and permissions are avoided.
public save_custom_fields ( array $data, string $nonce_action, string $nonce_name, WP_Post | integer $post ) : mixed |
$data |
array |
Key/Value pairs of data to save in '_field_name' => 'value' format. |
$nonce_action |
string |
Nonce action for use with wp_verify_nonce(). |
$nonce_name |
string |
Name of the nonce to check for permissions. |
$post |
WP_Post | integer |
Post object or ID. |
Результат |
mixed |
Return null if permissions incorrect, doing autosave, ajax or future post, false if update or delete
failed, and true on success. |
uses_page_builder()
публичный Метод
Doesn't use plugin detection features as some builders might be incorporated within themes.
Detects the following builders:
- Divi Builder by Elegant Themes
- Visual Composer by WPBakery
- Page Builder by SiteOrigin
- Beaver Builder by Fastline Media