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()
공개 메소드
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