wpseek.com
A WordPress-centric search engine for devs and theme authors
wp-includes/post.php › WordPress File
Functions144
› Core Post API
Function | Short description |
---|---|
add_ping | Adds a URL to those already pinged. |
add_post_meta | Adds a meta field to the given post. |
add_post_type_support | Registers support of certain features for a post type. |
check_and_publish_future_post | Publishes future post and make sure post ID has future post status. |
clean_attachment_cache | Will clean the attachment in the cache. |
clean_post_cache | Will clean the post in the cache. |
create_initial_post_types | Creates the initial post types when 'init' action is fired. |
delete_post_meta | Deletes a post meta field for the given post ID. |
delete_post_meta_by_key | Deletes everything from post meta matching the given meta key. |
delete_post_thumbnail | Removes the thumbnail (featured image) from the given post. |
get_all_page_ids | Gets a list of page IDs. |
get_all_post_type_supports | Gets all the post type features |
get_attached_file | Retrieves attached file path based on attachment ID. |
get_available_post_mime_types | Gets all available post MIME types for a given post type. |
get_children | Retrieves all children of the post parent ID. |
get_enclosed | Retrieves enclosures already enclosed for a post. |
get_extended | Gets extended entry info (<!--more-->). |
get_lastpostdate | Retrieves the most recent time that a post on the site was published. |
get_lastpostmodified | Gets the most recent time that a post on the site was modified. |
get_page | Retrieves page data given a page ID or page object. |
get_pages | Retrieves an array of pages (or hierarchical post type items). |
get_page_by_path | Retrieves a page given its path. |
get_page_children | Identifies descendants of a given page ID in a list of page objects. |
get_page_hierarchy | Orders the pages with children under parents in a flat list. |
get_page_statuses | Retrieves all of the WordPress support page statuses. |
get_page_uri | Builds the URI path for a page. |
get_post | Retrieves post data given a post ID or post object. |
get_posts | Retrieves an array of the latest posts, or posts matching the given criteria. |
get_posts_by_author_sql | Retrieves the post SQL based on capability, author, and type. |
get_post_ancestors | Retrieves the IDs of the ancestors of a post. |
get_post_custom | Retrieves post meta fields, based on post ID. |
get_post_custom_keys | Retrieves meta field names for a post. |
get_post_custom_values | Retrieves values for a custom post field. |
get_post_field | Retrieves data from a post field based on Post ID. |
get_post_meta | Retrieves a post meta field for the given post ID. |
get_post_mime_type | Retrieves the mime type of an attachment based on the ID. |
get_post_mime_types | Gets default post mime types. |
get_post_stati | Gets a list of post statuses. |
get_post_status | Retrieves the post status based on the post ID. |
get_post_statuses | Retrieves all of the WordPress supported post statuses. |
get_post_status_object | Retrieves a post status object by name. |
get_post_type | Retrieves the post type of the current post or of a given post. |
get_post_types | Gets a list of all registered post type objects. |
get_post_types_by_support | Retrieves a list of post type names that support a specific feature. |
get_post_type_capabilities | Builds an object with all post type capabilities out of a post type object |
get_post_type_labels | Builds an object with all post type labels out of a post type object. |
get_post_type_object | Retrieves a post type object by name. |
get_private_posts_cap_sql | Retrieves the private post SQL based on capability. |
get_pung | Retrieves URLs already pinged for a post. |
get_to_ping | Retrieves URLs that need to be pinged. |
is_local_attachment | Determines whether an attachment URI is local and really an attachment. |
is_post_publicly_viewable | Determines whether a post is publicly viewable. |
is_post_status_viewable | Determines whether a post status is considered "viewable". |
is_post_type_hierarchical | Determines whether the post type is hierarchical. |
is_post_type_viewable | Determines whether a post type is considered "viewable". |
is_sticky | Determines whether a post is sticky. |
post_type_exists | Determines whether a post type is registered. |
post_type_supports | Checks a post type's support for a given feature. |
register_post_meta | Registers a meta key for posts. |
register_post_status | Registers a post status. Do not use before init. |
register_post_type | Registers a post type. |
remove_post_type_support | Removes support for a feature from a post type. |
sanitize_post | Sanitizes every post field. |
sanitize_post_field | Sanitizes a post field based on context. |
set_post_thumbnail | Sets the post thumbnail (featured image) for the given post. |
set_post_type | Updates the post type for the post ID. |
stick_post | Makes a post sticky. |
trackback_url_list | Does trackbacks for a list of URLs. |
unregister_post_meta | Unregisters a meta key for posts. |
unregister_post_type | Unregisters a post type. |
unstick_post | Un-sticks a post. |
update_attached_file | Updates attachment file path based on attachment ID. |
update_postmeta_cache | Updates metadata cache for a list of post IDs. |
update_post_author_caches | Updates post author user caches for a list of post objects. |
update_post_cache | Updates posts in cache. |
update_post_caches | Updates post, term, and metadata caches for a list of post objects. |
update_post_meta | Updates a post meta field based on the given post ID. |
update_post_parent_caches | Updates parent post caches for a list of post objects. |
use_block_editor_for_post | Returns whether the post can be edited in the block editor. |
use_block_editor_for_post_type | Returns whether a post type is compatible with the block editor. |
wp_add_post_tags | Adds tags to a post. |
wp_add_trashed_suffix_to_post_name_for_post | Adds a trashed suffix for a given post. |
wp_add_trashed_suffix_to_post_name_for_trashed_posts | Adds a suffix if any trashed posts have a given slug. |
wp_after_insert_post | Fires actions after a post, its terms and meta data has been saved. |
wp_attachment_is | Verifies an attachment is of a given type. |
wp_attachment_is_image | Determines whether an attachment is an image. |
wp_cache_set_posts_last_changed | Sets the last changed time for the 'posts' cache group. |
wp_check_for_changed_dates | Checks for changed dates for published post objects and save the old date. |
wp_check_for_changed_slugs | Checks for changed slugs for published post objects and save the old slug. |
wp_check_post_hierarchy_for_loops | Checks the given subset of the post hierarchy for hierarchy loops. |
wp_count_attachments | Counts number of attachments for the mime type(s). |
wp_count_posts | Counts number of posts of a post type and if user has permissions to view. |
wp_create_initial_post_meta | Registers any additional post meta fields. |
wp_delete_attachment | Trashes or deletes an attachment. |
wp_delete_attachment_files | Deletes all files that belong to the given attachment. |
wp_delete_auto_drafts | Deletes auto-drafts for new posts that are > 7 days old. |
wp_delete_post | Trashes or deletes a post or page. |
wp_get_attachment_caption | Retrieves the caption for an attachment. |
wp_get_attachment_metadata | Retrieves attachment metadata for attachment ID. |
wp_get_attachment_thumb_url | Retrieves URL for an attachment thumbnail. |
wp_get_attachment_url | Retrieves the URL for an attachment. |
wp_get_original_image_path | Retrieves the path to an uploaded image file. |
wp_get_original_image_url | Retrieves the URL to an original attachment image. |
wp_get_post_categories | Retrieves the list of categories for a post. |
wp_get_post_parent_id | Returns the ID of the post's parent. |
wp_get_post_tags | Retrieves the tags for a post. |
wp_get_post_terms | Retrieves the terms for a post. |
wp_get_recent_posts | Retrieves a number of recent posts. |
wp_insert_attachment | Inserts an attachment. |
wp_insert_post | Inserts or update a post. |
wp_match_mime_types | Checks a MIME-Type against a list. |
wp_mime_type_icon | Retrieves the icon for a MIME type or attachment. |
wp_post_mime_type_where | Converts MIME types into SQL. |
wp_publish_post | Publishes a post by transitioning the post status. |
wp_queue_posts_for_term_meta_lazyload | Queues posts for lazy-loading of term meta. |
wp_resolve_post_date | Uses wp_checkdate to return a valid Gregorian-calendar value for post_date. |
wp_set_post_categories | Sets categories for a post. |
wp_set_post_tags | Sets the tags for a post. |
wp_set_post_terms | Sets the terms for a post. |
wp_transition_post_status | Fires actions related to the transitioning of a post's status. |
wp_trash_post | Moves a post or page to the Trash |
wp_trash_post_comments | Moves comments for a post to the Trash. |
wp_unique_post_slug | Computes a unique slug for the post, when given the desired slug and some post details. |
wp_untrash_post | Restores a post from the Trash. |
wp_untrash_post_comments | Restores comments for a post from the Trash. |
wp_untrash_post_set_previous_status | Filters callback which sets the status of an untrashed post to its previous status. |
wp_update_attachment_metadata | Updates metadata for an attachment. |
wp_update_post | Updates a post with new post data. |
_add_post_type_submenus | Adds submenus for post types. |
_count_posts_cache_key | Returns the cache key for wp_count_posts() based on the passed arguments. |
_future_post_hook | Hook used to schedule publication for a post marked for the future. |
_get_custom_object_labels | Builds an object with custom-something object (post type, taxonomy) labels out of a custom-something object |
_get_last_post_time | Gets the timestamp of the last time any post was modified or published. |
_page_traverse_name | Traverses and return all the nested children post names of a root page. |
_post_type_meta_capabilities | Stores or returns a list of post type meta caps for map_meta_cap(). |
_prime_post_caches | Adds any posts from the given IDs to the cache that do not already exist in cache. |
_prime_post_parent_id_caches | Prime the cache containing the parent ID of various post objects. |
_publish_post_hook | Hook to schedule pings and enclosures when a post is published. |
_reset_front_page_settings_for_post | Resets the page_on_front, show_on_front, and page_for_post settings when a linked page is deleted or trashed. |
_transition_post_status | Hook for managing future post transitions to published. |
_truncate_post_slug | Truncates a post slug. |
_update_term_count_on_transition_post_status | Updates the custom taxonomies' term counts when a post's status is changed. |
_wp_privacy_statuses | Returns statuses for privacy requests. |
_wp_relative_upload_path | Returns relative path to an uploaded file. |