A WordPress-centric search engine for devs and theme authors

wp-includes/post.php › WordPress File

Core Post API

Function Short description
add_pingAdd a URL to those already pinged.
add_post_metaAdds a meta field to the given post.
add_post_type_supportRegisters support of certain features for a post type.
check_and_publish_future_postPublish future post and make sure post ID has future post status.
clean_attachment_cacheWill clean the attachment in the cache.
clean_post_cacheWill clean the post in the cache.
create_initial_post_typesCreates the initial post types when 'init' action is fired.
delete_post_metaDeletes a post meta field for the given post ID.
delete_post_meta_by_keyDeletes everything from post meta matching the given meta key.
delete_post_thumbnailRemoves the thumbnail (featured image) from the given post.
get_all_page_idsGet a list of page IDs.
get_all_post_type_supportsGet all the post type features
get_attached_fileRetrieve attached file path based on attachment ID.
get_available_post_mime_typesGet all available post MIME types for a given post type.
get_childrenRetrieve all children of the post parent ID.
get_enclosedRetrieve enclosures already enclosed for a post.
get_extendedGet extended entry info (<!--more-->).
get_lastpostdateRetrieves the most recent time that a post on the site was published.
get_lastpostmodifiedGet the most recent time that a post on the site was modified.
get_pageRetrieves page data given a page ID or page object.
get_pagesRetrieve an array of pages (or hierarchical post type items).
get_page_by_pathRetrieves a page given its path.
get_page_by_titleRetrieve a page given its title.
get_page_childrenIdentify descendants of a given page ID in a list of page objects.
get_page_hierarchyOrder the pages with children under parents in a flat list.
get_page_statusesRetrieve all of the WordPress support page statuses.
get_page_uriBuild the URI path for a page.
get_postRetrieves post data given a post ID or post object.
get_postsRetrieves an array of the latest posts, or posts matching the given criteria.
get_posts_by_author_sqlRetrieve the post SQL based on capability, author, and type.
get_post_ancestorsRetrieves the IDs of the ancestors of a post.
get_post_customRetrieve post meta fields, based on post ID.
get_post_custom_keysRetrieve meta field names for a post.
get_post_custom_valuesRetrieve values for a custom post field.
get_post_fieldRetrieve data from a post field based on Post ID.
get_post_metaRetrieves a post meta field for the given post ID.
get_post_mime_typeRetrieve the mime type of an attachment based on the ID.
get_post_mime_typesGet default post mime types.
get_post_statiGet a list of post statuses.
get_post_statusRetrieve the post status based on the post ID.
get_post_statusesRetrieve all of the WordPress supported post statuses.
get_post_status_objectRetrieve a post status object by name.
get_post_typeRetrieves the post type of the current post or of a given post.
get_post_typesGet a list of all registered post type objects.
get_post_types_by_supportRetrieves a list of post type names that support a specific feature.
get_post_type_capabilitiesBuild an object with all post type capabilities out of a post type object
get_post_type_labelsBuilds an object with all post type labels out of a post type object.
get_post_type_objectRetrieves a post type object by name.
get_private_posts_cap_sqlRetrieve the private post SQL based on capability.
get_pungRetrieve URLs already pinged for a post.
get_to_pingRetrieve URLs that need to be pinged.
is_local_attachmentDetermines whether an attachment URI is local and really an attachment.
is_post_publicly_viewableDetermine whether a post is publicly viewable.
is_post_status_viewableDetermine whether a post status is considered "viewable".
is_post_type_hierarchicalWhether the post type is hierarchical.
is_post_type_viewableDetermines whether a post type is considered "viewable".
is_stickyDetermines whether a post is sticky.
post_type_existsDetermines whether a post type is registered.
post_type_supportsCheck a post type's support for a given feature.
register_post_metaRegisters a meta key for posts.
register_post_statusRegister a post status. Do not use before init.
register_post_typeRegisters a post type.
remove_post_type_supportRemove support for a feature from a post type.
sanitize_postSanitizes every post field.
sanitize_post_fieldSanitizes a post field based on context.
set_post_thumbnailSets the post thumbnail (featured image) for the given post.
set_post_typeUpdate the post type for the post ID.
stick_postMake a post sticky.
trackback_url_listDo trackbacks for a list of URLs.
unregister_post_metaUnregisters a meta key for posts.
unregister_post_typeUnregisters a post type.
unstick_postUn-stick a post.
update_attached_fileUpdate attachment file path based on attachment ID.
update_postmeta_cacheUpdates metadata cache for list of post IDs.
update_post_cacheUpdates posts in cache.
update_post_cachesCall major cache updating functions for list of Post objects.
update_post_metaUpdates a post meta field based on the given post ID.
wp_add_post_tagsAdd tags to a post.
wp_add_trashed_suffix_to_post_name_for_postAdds a trashed suffix for a given post.
wp_add_trashed_suffix_to_post_name_for_trashed_postsAdds a suffix if any trashed posts have a given slug.
wp_after_insert_postFires actions after a post, its terms and meta data has been saved.
wp_attachment_isVerifies an attachment is of a given type.
wp_attachment_is_imageDetermines whether an attachment is an image.
wp_cache_set_posts_last_changedSets the last changed time for the 'posts' cache group.
wp_check_for_changed_datesCheck for changed dates for published post objects and save the old date.
wp_check_for_changed_slugsCheck for changed slugs for published post objects and save the old slug.
wp_check_post_hierarchy_for_loopsCheck the given subset of the post hierarchy for hierarchy loops.
wp_count_attachmentsCount number of attachments for the mime type(s).
wp_count_postsCount number of posts of a post type and if user has permissions to view.
wp_delete_attachmentTrash or delete an attachment.
wp_delete_attachment_filesDeletes all files that belong to the given attachment.
wp_delete_auto_draftsDelete auto-drafts for new posts that are > 7 days old.
wp_delete_postTrash or delete a post or page.
wp_get_attachment_captionRetrieves the caption for an attachment.
wp_get_attachment_metadataRetrieves attachment metadata for attachment ID.
wp_get_attachment_thumb_fileRetrieve thumbnail for an attachment.
wp_get_attachment_thumb_urlRetrieve URL for an attachment thumbnail.
wp_get_attachment_urlRetrieve the URL for an attachment.
wp_get_original_image_pathRetrieves the path to an uploaded image file.
wp_get_original_image_urlRetrieve the URL to an original attachment image.
wp_get_post_categoriesRetrieve the list of categories for a post.
wp_get_post_parent_idReturns the ID of the post's parent.
wp_get_post_tagsRetrieve the tags for a post.
wp_get_post_termsRetrieves the terms for a post.
wp_get_recent_postsRetrieve a number of recent posts.
wp_insert_attachmentInsert an attachment.
wp_insert_postInsert or update a post.
wp_match_mime_typesCheck a MIME-Type against a list.
wp_mime_type_iconRetrieve the icon for a MIME type or attachment.
wp_post_mime_type_whereConvert MIME types into SQL.
wp_publish_postPublish a post by transitioning the post status.
wp_queue_posts_for_term_meta_lazyloadQueues posts for lazy-loading of term meta.
wp_resolve_post_dateUses wp_checkdate to return a valid Gregorian-calendar value for post_date.
wp_set_post_categoriesSet categories for a post.
wp_set_post_tagsSet the tags for a post.
wp_set_post_termsSet the terms for a post.
wp_transition_post_statusFires actions related to the transitioning of a post's status.
wp_trash_postMove a post or page to the Trash
wp_trash_post_commentsMoves comments for a post to the Trash.
wp_unique_post_slugComputes a unique slug for the post, when given the desired slug and some post details.
wp_untrash_postRestores a post from the Trash.
wp_untrash_post_commentsRestore comments for a post from the Trash.
wp_untrash_post_set_previous_statusFilter callback which sets the status of an untrashed post to its previous status.
wp_update_attachment_metadataUpdates metadata for an attachment.
wp_update_postUpdate a post with new post data.
_add_post_type_submenusAdd submenus for post types.
_count_posts_cache_keyReturn the cache key for wp_count_posts() based on the passed arguments.
_filter_query_attachment_filenamesFilters the SQL clauses of an attachment query to include filenames.
_future_post_hookHook used to schedule publication for a post marked for the future.
_get_custom_object_labelsBuild an object with custom-something object (post type, taxonomy) labels out of a custom-something object
_get_last_post_timeGets the timestamp of the last time any post was modified or published.
_page_traverse_nameTraverse and return all the nested children post names of a root page.
_post_type_meta_capabilitiesStore or return a list of post type meta caps for map_meta_cap().
_prime_post_cachesAdds any posts from the given IDs to the cache that do not already exist in cache.
_publish_post_hookHook to schedule pings and enclosures when a post is published.
_reset_front_page_settings_for_postReset the page_on_front, show_on_front, and page_for_post settings when a linked page is deleted or trashed.
_transition_post_statusHook for managing future post transitions to published.
_truncate_post_slugTruncate a post slug.
_update_term_count_on_transition_post_statusUpdate the custom taxonomies' term counts when a post's status is changed.
_wp_privacy_statusesReturn statuses for privacy requests.
_wp_relative_upload_pathReturn relative path to an uploaded file.