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_pingAdds 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_postPublishes 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_idsGets a list of page IDs.
get_all_post_type_supportsGets all the post type features
get_attached_fileRetrieves attached file path based on attachment ID.
get_available_post_mime_typesGets all available post MIME types for a given post type.
get_childrenRetrieves all children of the post parent ID.
get_enclosedRetrieves enclosures already enclosed for a post.
get_extendedGets extended entry info (<!--more-->).
get_lastpostdateRetrieves the most recent time that a post on the site was published.
get_lastpostmodifiedGets the most recent time that a post on the site was modified.
get_pageRetrieves page data given a page ID or page object.
get_pagesRetrieves an array of pages (or hierarchical post type items).
get_page_by_pathRetrieves a page given its path.
get_page_childrenIdentifies descendants of a given page ID in a list of page objects.
get_page_hierarchyOrders the pages with children under parents in a flat list.
get_page_statusesRetrieves all of the WordPress support page statuses.
get_page_uriBuilds 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_sqlRetrieves the post SQL based on capability, author, and type.
get_post_ancestorsRetrieves the IDs of the ancestors of a post.
get_post_customRetrieves post meta fields, based on post ID.
get_post_custom_keysRetrieves meta field names for a post.
get_post_custom_valuesRetrieves values for a custom post field.
get_post_fieldRetrieves data from a post field based on Post ID.
get_post_metaRetrieves a post meta field for the given post ID.
get_post_mime_typeRetrieves the mime type of an attachment based on the ID.
get_post_mime_typesGets default post mime types.
get_post_statiGets a list of post statuses.
get_post_statusRetrieves the post status based on the post ID.
get_post_statusesRetrieves all of the WordPress supported post statuses.
get_post_status_objectRetrieves a post status object by name.
get_post_typeRetrieves the post type of the current post or of a given post.
get_post_typesGets 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_capabilitiesBuilds 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_sqlRetrieves the private post SQL based on capability.
get_pungRetrieves URLs already pinged for a post.
get_to_pingRetrieves URLs that need to be pinged.
is_local_attachmentDetermines whether an attachment URI is local and really an attachment.
is_post_publicly_viewableDetermines whether a post is publicly viewable.
is_post_status_viewableDetermines whether a post status is considered "viewable".
is_post_type_hierarchicalDetermines whether 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_supportsChecks a post type's support for a given feature.
register_post_metaRegisters a meta key for posts.
register_post_statusRegisters a post status. Do not use before init.
register_post_typeRegisters a post type.
remove_post_type_supportRemoves 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_typeUpdates the post type for the post ID.
stick_postMakes a post sticky.
trackback_url_listDoes trackbacks for a list of URLs.
unregister_post_metaUnregisters a meta key for posts.
unregister_post_typeUnregisters a post type.
unstick_postUn-sticks a post.
update_attached_fileUpdates attachment file path based on attachment ID.
update_postmeta_cacheUpdates metadata cache for a list of post IDs.
update_post_author_cachesUpdates post author user caches for a list of post objects.
update_post_cacheUpdates posts in cache.
update_post_cachesUpdates post, term, and metadata caches for a list of post objects.
update_post_metaUpdates a post meta field based on the given post ID.
update_post_parent_cachesUpdates parent post caches for a list of post objects.
use_block_editor_for_postReturns whether the post can be edited in the block editor.
use_block_editor_for_post_typeReturns whether a post type is compatible with the block editor.
wp_add_post_tagsAdds 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_datesChecks for changed dates for published post objects and save the old date.
wp_check_for_changed_slugsChecks for changed slugs for published post objects and save the old slug.
wp_check_post_hierarchy_for_loopsChecks the given subset of the post hierarchy for hierarchy loops.
wp_count_attachmentsCounts number of attachments for the mime type(s).
wp_count_postsCounts number of posts of a post type and if user has permissions to view.
wp_create_initial_post_metaRegisters any additional post meta fields.
wp_delete_attachmentTrashes or deletes an attachment.
wp_delete_attachment_filesDeletes all files that belong to the given attachment.
wp_delete_auto_draftsDeletes auto-drafts for new posts that are > 7 days old.
wp_delete_postTrashes or deletes 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_urlRetrieves URL for an attachment thumbnail.
wp_get_attachment_urlRetrieves the URL for an attachment.
wp_get_original_image_pathRetrieves the path to an uploaded image file.
wp_get_original_image_urlRetrieves the URL to an original attachment image.
wp_get_post_categoriesRetrieves the list of categories for a post.
wp_get_post_parent_idReturns the ID of the post's parent.
wp_get_post_tagsRetrieves the tags for a post.
wp_get_post_termsRetrieves the terms for a post.
wp_get_recent_postsRetrieves a number of recent posts.
wp_insert_attachmentInserts an attachment.
wp_insert_postInserts or update a post.
wp_match_mime_typesChecks a MIME-Type against a list.
wp_mime_type_iconRetrieves the icon for a MIME type or attachment.
wp_post_mime_type_whereConverts MIME types into SQL.
wp_publish_postPublishes 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_categoriesSets categories for a post.
wp_set_post_tagsSets the tags for a post.
wp_set_post_termsSets the terms for a post.
wp_transition_post_statusFires actions related to the transitioning of a post's status.
wp_trash_postMoves 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_commentsRestores comments for a post from the Trash.
wp_untrash_post_set_previous_statusFilters callback which sets the status of an untrashed post to its previous status.
wp_update_attachment_metadataUpdates metadata for an attachment.
wp_update_postUpdates a post with new post data.
_add_post_type_submenusAdds submenus for post types.
_count_posts_cache_keyReturns the cache key for wp_count_posts() based on the passed arguments.
_future_post_hookHook used to schedule publication for a post marked for the future.
_get_custom_object_labelsBuilds 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_nameTraverses and return all the nested children post names of a root page.
_post_type_meta_capabilitiesStores or returns 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.
_prime_post_parent_id_cachesPrime the cache containing the parent ID of various post objects.
_publish_post_hookHook to schedule pings and enclosures when a post is published.
_reset_front_page_settings_for_postResets 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_slugTruncates a post slug.
_update_term_count_on_transition_post_statusUpdates the custom taxonomies' term counts when a post's status is changed.
_wp_privacy_statusesReturns statuses for privacy requests.
_wp_relative_upload_pathReturns relative path to an uploaded file.