get_post( int|WP_Post|null $post = null, string $output = OBJECT, string $filter = 'raw' )
Retrieves post data given a post ID or post object.
Description
See sanitize_post() for optional $filter values. Also, the parameter $post
, must be given as a variable, since it is passed by reference.
Parameters
- $post
-
(Optional) Post ID or post object.
null
,false
,0
and other PHP falsey values return the current global post inside the loop. A numerically valid post ID that points to a non-existent post returnsnull
. Defaults to global $post.Default value: null
- $output
-
(Optional) The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to a WP_Post object, an associative array, or a numeric array, respectively.
Default value: OBJECT
- $filter
-
(Optional) Type of filter to apply. Accepts 'raw', 'edit', 'db', or 'display'. Default 'raw'.
Default value: 'raw'
Return
(WP_Post|array|null) Type corresponding to $output on success or null on failure.<br> When $output is OBJECT, a WP_Post
instance is returned.
Source
File: wp-includes/post.php
function get_post( $post = null, $output = OBJECT, $filter = 'raw' ) {
if ( empty( $post ) && isset( $GLOBALS['post'] ) )
$post = $GLOBALS['post'];
if ( $post instanceof WP_Post ) {
$_post = $post;
} elseif ( is_object( $post ) ) {
if ( empty( $post->filter ) ) {
$_post = sanitize_post( $post, 'raw' );
$_post = new WP_Post( $_post );
} elseif ( 'raw' == $post->filter ) {
$_post = new WP_Post( $post );
} else {
$_post = WP_Post::get_instance( $post->ID );
}
} else {
$_post = WP_Post::get_instance( $post );
}
if ( ! $_post )
return null;
$_post = $_post->filter( $filter );
if ( $output == ARRAY_A )
return $_post->to_array();
elseif ( $output == ARRAY_N )
return array_values( $_post->to_array() );
return $_post;
}
Related
Uses
Uses | Description |
---|---|
wp-includes/class-wp-post.php: WP_Post::__construct() |
Constructor. |
wp-includes/class-wp-post.php: WP_Post::get_instance() |
Retrieve WP_Post instance. |
wp-includes/post.php: sanitize_post() |
Sanitizes every post field. |
Used By
Used By | Description |
---|---|
wp-admin/includes/class-wp-media-list-table.php: WP_Media_List_Table::column_thumbnail() |
Handles the thumbnail column output. |
wp-admin/includes/media.php: bulk_edit_attachments() |
Processes the post data for the bulk editing of attachments. |
wp-admin/includes/ajax-actions.php: wp_ajax_quick_edit_attachment() |
Ajax handler for updating attachment values and attributes. |
wp-admin/includes/ajax-actions.php: wp_ajax_media_create_image_subsizes() |
Ajax handler for creating missing image sub-sizes for just uploaded images. |
wp-includes/post.php: wp_after_insert_post() |
Fires actions after a post, its terms and meta data has been saved. |
wp-includes/post.php: is_post_publicly_viewable() |
Determines whether a post is publicly viewable. |
wp-includes/user.php: wp_get_user_request() |
Returns the user request object for the specified request ID. |
wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php: WP_REST_Attachments_Controller::insert_attachment() |
Inserts the attachment post in the database. Does not update the attachment meta. |
wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php: WP_REST_Attachments_Controller::post_process_item() |
Performs post processing on an attachment. |
wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php: WP_REST_Attachments_Controller::edit_media_item() |
Applies edits to a media item and creates a new attachment record. |
wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php: WP_REST_Autosaves_Controller::create_item() |
Creates, updates or deletes an autosave revision. |
wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php: WP_REST_Autosaves_Controller::create_post_autosave() |
Creates autosave for the specified post. |
wp-includes/rest-api/endpoints/class-wp-rest-menu-items-controller.php: WP_REST_Menu_Items_Controller::delete_item() |
Deletes a single menu item. |
wp-includes/rest-api/endpoints/class-wp-rest-menu-items-controller.php: WP_REST_Menu_Items_Controller::prepare_item_for_database() |
Prepares a single post for create or update. |
wp-includes/rest-api/endpoints/class-wp-rest-menu-items-controller.php: WP_REST_Menu_Items_Controller::create_item() |
Creates a single post. |
wp-includes/rest-api/endpoints/class-wp-rest-menu-items-controller.php: WP_REST_Menu_Items_Controller::update_item() |
Updates a single nav menu item. |
wp-includes/rest-api/search/class-wp-rest-post-search-handler.php: WP_REST_Post_Search_Handler::prepare_item() |
Prepares the search result for a given ID. |
wp-includes/rest-api/search/class-wp-rest-post-search-handler.php: WP_REST_Post_Search_Handler::prepare_item_links() |
Prepares links for the search result of a given ID. |
wp-includes/rest-api.php: rest_get_route_for_post() |
Gets the REST API route for a post. |
wp-includes/revision.php: wp_get_latest_revision_id_and_total_count() |
Returns the latest revision ID and count of revisions for a post. |
wp-includes/revision.php: wp_get_post_revisions_url() |
Returns the url for viewing and potentially restoring revisions of a given post. |
wp-includes/post-template.php: get_post_parent() |
Retrieves the parent post object for the given post. |
wp-includes/comment-template.php: _get_comment_reply_id() |
Gets the comment’s reply to ID from the $_GET[‘replytocom’]. |
wp-includes/class-wp-query.php: WP_Query::generate_postdata() |
Generate post data. |
wp-includes/link-template.php: wp_force_plain_post_permalink() |
Determine whether post should always use a plain permalink structure. |
wp-includes/general-template.php: get_post_datetime() |
Retrieves post published or modified time as a |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::check_password_required() |
Overrides the result of the post password check for REST requested posts. |
wp-includes/author-template.php: get_the_modified_author() |
Retrieves the author who last edited the current post. |
wp-includes/author-template.php: get_the_author_posts() |
Retrieves the number of posts by the author of the current post. |
wp-includes/deprecated.php: wp_get_single_post() |
Retrieve a single post, based on post ID. |
wp-includes/deprecated.php: get_parent_post_rel_link() |
Get parent post relational link. |
wp-includes/deprecated.php: get_the_attachment_link() |
Retrieve HTML content of attachment image with link. |
wp-includes/deprecated.php: get_attachment_icon_src() |
Retrieve icon URL and Path. |
wp-includes/deprecated.php: get_attachment_icon() |
Retrieve HTML content of icon attachment image element. |
wp-includes/deprecated.php: get_attachment_innerHTML() |
Retrieve HTML content of image element. |
wp-includes/deprecated.php: get_postdata() |
Retrieves all post data for a given post. |
wp-includes/deprecated.php: start_wp() |
Sets up the WordPress Loop. |
wp-includes/deprecated.php: user_can_edit_post() |
Whether user can edit a post. |
wp-includes/customize/class-wp-customize-nav-menu-item-setting.php: WP_Customize_Nav_Menu_Item_Setting::value() |
Get the instance data for a given nav_menu_item setting. |
wp-includes/customize/class-wp-customize-nav-menu-item-setting.php: WP_Customize_Nav_Menu_Item_Setting::get_original_title() |
Get original title. |
wp-includes/general-template.php: get_the_modified_time() |
Retrieves the time at which the post was last modified. |
wp-includes/general-template.php: get_post_modified_time() |
Retrieves the time at which the post was last modified. |
wp-includes/general-template.php: the_weekday() |
Displays the weekday on which the post was written. |
wp-includes/general-template.php: the_weekday_date() |
Displays the weekday on which the post was written. |
wp-includes/general-template.php: feed_links_extra() |
Displays the links to the extra feeds such as category feeds. |
wp-includes/general-template.php: the_date_xml() |
Outputs the date in iso8601 format for xml files. |
wp-includes/general-template.php: get_the_date() |
Retrieves the date on which the post was written. |
wp-includes/general-template.php: get_the_modified_date() |
Retrieves the date on which the post was last modified. |
wp-includes/general-template.php: get_the_time() |
Retrieves the time at which the post was written. |
wp-includes/general-template.php: get_post_time() |
Retrieves the time at which the post was written. |
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php: WP_REST_Comments_Controller::get_items_permissions_check() |
Checks if a given request has access to read comments. |
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php: WP_REST_Comments_Controller::get_comment() |
Get the comment, if the ID is valid. |
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php: WP_REST_Comments_Controller::get_item_permissions_check() |
Checks if a given request has access to read the comment. |
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php: WP_REST_Comments_Controller::create_item_permissions_check() |
Checks if a given request has access to create a comment. |
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php: WP_REST_Comments_Controller::update_item() |
Updates a comment. |
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php: WP_REST_Comments_Controller::prepare_links() |
Prepares links for the request. |
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php: WP_REST_Comments_Controller::check_read_permission() |
Checks if the comment can be read. |
wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php: WP_REST_Terms_Controller::get_items_permissions_check() |
Checks if a request has access to read terms in the specified taxonomy. |
wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php: WP_REST_Attachments_Controller::create_item() |
Creates a single attachment. |
wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php: WP_REST_Attachments_Controller::update_item() |
Updates a single attachment. |
wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php: WP_REST_Revisions_Controller::get_parent() |
Get the parent post, if the ID is valid. |
wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php: WP_REST_Revisions_Controller::get_revision() |
Get the revision, if the ID is valid. |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::check_read_permission() |
Checks if a post can be read. |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::get_post() |
Gets the post, if the ID is valid. |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::create_item() |
Creates a single post. |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::update_item() |
Updates a single post. |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::delete_item() |
Deletes a single post. |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::prepare_item_for_database() |
Prepares a single post for create or update. |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::check_template() |
Checks whether the template is valid for the given post. |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::handle_template() |
Sets the template for a post. |
wp-includes/widgets/class-wp-widget-media-audio.php: WP_Widget_Media_Audio::render_media() |
Render the media on the frontend. |
wp-includes/widgets/class-wp-widget-media-video.php: WP_Widget_Media_Video::render_media() |
Render the media on the frontend. |
wp-includes/widgets/class-wp-widget-media-image.php: WP_Widget_Media_Image::render_media() |
Render the media on the frontend. |
wp-includes/widgets/class-wp-widget-media.php: WP_Widget_Media::is_attachment_with_mime_type() |
Determine if the supplied attachment is for a valid attachment post with the specified MIME type. |
wp-includes/widgets/class-wp-widget-media.php: WP_Widget_Media::display_media_state() |
Filters the default media display states for items in the Media list table. |
wp-includes/class-wp-query.php: WP_Query::get_queried_object() |
Retrieves the currently queried object. |
wp-includes/class-wp-query.php: WP_Query::setup_postdata() |
Set up global post data. |
wp-includes/class-wp-query.php: WP_Query::get_posts() |
Retrieves an array of posts based on query variables. |
wp-includes/pluggable.php: wp_notify_postauthor() |
Notifies an author (and/or others) of a comment/trackback/pingback on a post. |
wp-includes/pluggable.php: wp_notify_moderator() |
Notifies the moderator of the site about a new comment that is awaiting approval. |
wp-includes/class-wp-comment.php: WP_Comment::__isset() |
Check whether a non-public property is set. |
wp-includes/class-wp-comment.php: WP_Comment::__get() |
Magic getter. |
wp-includes/nav-menu.php: _wp_delete_customize_changeset_dependent_auto_drafts() |
Deletes auto-draft posts associated with the supplied changeset. |
wp-includes/nav-menu.php: wp_update_nav_menu_item() |
Saves the properties of a menu item or create a new one. |
wp-includes/nav-menu.php: wp_setup_nav_menu_item() |
Decorates a menu item object with the shared navigation menu item properties. |
wp-includes/comment.php: wp_handle_comment_submission() |
Handles the submission of a comment, usually posted to wp-comments-post.php via a comment form. |
wp-includes/comment.php: _close_comments_for_old_post() |
Closes comments on an old post. Hooked to comments_open and pings_open. |
wp-includes/comment.php: wp_update_comment() |
Updates an existing comment in the database. |
wp-includes/comment.php: wp_update_comment_count_now() |
Updates the comment count for the post. |
wp-includes/comment.php: do_trackbacks() |
Performs trackbacks. |
wp-includes/comment.php: pingback() |
Pings back the links found in a post. |
wp-includes/class-wp-customize-control.php: WP_Customize_Control::render_content() |
Render the control’s content. |
wp-includes/class-walker-page.php: Walker_Page::start_el() |
Outputs the beginning of the current element in the tree. |
wp-includes/admin-bar.php: wp_admin_bar_edit_menu() |
Provides an edit link for posts and terms. |
wp-includes/class-wp-embed.php: WP_Embed::maybe_run_ajax_cache() |
If a post/page was saved, then output JavaScript to make an Ajax request that will call WP_Embed::cache_oembed(). |
wp-includes/class-wp-embed.php: WP_Embed::shortcode() |
The do_shortcode() callback function. |
wp-includes/class-wp-embed.php: WP_Embed::cache_oembed() |
Triggers a caching of all oEmbed results. |
wp-includes/embed.php: get_post_embed_html() |
Retrieves the embed code for a specific post. |
wp-includes/embed.php: get_oembed_response_data() |
Retrieves the oEmbed response data for a given post. |
wp-includes/embed.php: get_post_embed_url() |
Retrieves the URL to embed a specific post in an iframe. |
wp-includes/link-template.php: wp_get_shortlink() |
Returns a shortlink for a post, page, attachment, or site. |
wp-includes/link-template.php: the_shortlink() |
Displays the shortlink for a post. |
wp-includes/link-template.php: wp_get_canonical_url() |
Returns the canonical URL for a post. |
wp-includes/link-template.php: get_adjacent_post_link() |
Retrieves the adjacent post link. |
wp-includes/link-template.php: get_adjacent_post() |
Retrieves the adjacent post. |
wp-includes/link-template.php: get_adjacent_post_rel_link() |
Retrieves the adjacent post relational link. |
wp-includes/link-template.php: get_boundary_post() |
Retrieves the boundary post. |
wp-includes/link-template.php: get_edit_post_link() |
Retrieves the edit post link for post. |
wp-includes/link-template.php: edit_post_link() |
Displays the edit post link for post. |
wp-includes/link-template.php: get_delete_post_link() |
Retrieves the delete posts link for post. |
wp-includes/link-template.php: get_preview_post_link() |
Retrieves the URL used for the post preview. |
wp-includes/link-template.php: get_post_comments_feed_link() |
Retrieves the permalink for the post comments feed. |
wp-includes/link-template.php: permalink_anchor() |
Displays the permalink anchor for the current post. |
wp-includes/link-template.php: get_permalink() |
Retrieves the full permalink for the current post or post ID. |
wp-includes/link-template.php: get_post_permalink() |
Retrieves the permalink for a post of a custom post type. |
wp-includes/link-template.php: get_page_link() |
Retrieves the permalink for the current page or page ID. |
wp-includes/link-template.php: _get_page_link() |
Retrieves the page permalink. |
wp-includes/link-template.php: get_attachment_link() |
Retrieves the permalink for an attachment. |
wp-includes/capabilities.php: map_meta_cap() |
Maps a capability to the primitive capabilities required of the given user to satisfy the capability being checked. |
wp-includes/capabilities.php: author_can() |
Returns whether the author of the supplied post has the specified capability. |
wp-includes/ms-blogs.php: _update_blog_date_on_post_delete() |
Handler for updating the current site’s last updated date when a published post is deleted. |
wp-includes/post-formats.php: get_post_format() |
Retrieve the format slug for a post |
wp-includes/post-formats.php: set_post_format() |
Assign a format to a post |
wp-includes/theme.php: wp_get_custom_css_post() |
Fetches the |
wp-includes/theme.php: wp_update_custom_css_post() |
Updates the |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_deletePage() |
Deletes a page. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_editPage() |
Edits a page. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_newComment() |
Creates a new comment. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getCommentCount() |
Retrieves comment counts. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getMediaItem() |
Retrieves a media item by ID. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getRevisions() |
Retrieves revisions for a specific post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_restoreRevision() |
Restores a post revision. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::blogger_getPost() |
Retrieves a post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::blogger_editPost() |
Edits a post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::blogger_deletePost() |
Deletes a post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mw_editPost() |
Edits a post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mw_getPost() |
Retrieves a post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mw_newMediaObject() |
Uploads a file, following your settings. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mt_getPostCategories() |
Retrieves post categories. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mt_setPostCategories() |
Sets categories for a post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mt_getTrackbackPings() |
Retrieves trackbacks sent to a given post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mt_publishPost() |
Sets a post’s publish status to ‘publish’. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::pingback_ping() |
Retrieves a pingback and registers it. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::pingback_extensions_getPingbacks() |
Retrieves an array of URLs that pingbacked the given URL. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::_prepare_post() |
Prepares post data for return in an XML-RPC object. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::_prepare_page() |
Prepares page data for return in an XML-RPC object. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::_insert_post() |
Helper method for wp_newPost() and wp_editPost(), containing shared logic. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_editPost() |
Edits a post for any registered post type. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_deletePost() |
Deletes a post for any registered post type. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getPost() |
Retrieves a post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getPage() |
Retrieves a page. |
wp-includes/post-thumbnail-template.php: get_post_thumbnail_id() |
Retrieves the post thumbnail ID. |
wp-includes/post-thumbnail-template.php: get_the_post_thumbnail() |
Retrieves the post thumbnail. |
wp-includes/category-template.php: get_the_terms() |
Retrieves the terms of the taxonomy that are attached to the post. |
wp-includes/category-template.php: has_term() |
Checks if the current post has any of given terms. |
wp-includes/rewrite.php: url_to_postid() |
Examines a URL and try to determine the post ID it represents. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::_publish_changeset_values() |
Publishes the values of a changeset. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::customize_pane_settings() |
Prints JavaScript settings for parent window. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::get_changeset_post_data() |
Gets the data stored in a changeset post. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::import_theme_starter_content() |
Imports theme starter content into the customized state. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::save() |
Handles customize_save WP Ajax request to save/update a changeset. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::save_changeset_post() |
Saves the post for the loaded changeset. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::trash_changeset_post() |
Trashes or deletes a changeset post. |
wp-includes/post-template.php: get_page_template_slug() |
Gets the specific template filename for a given post. |
wp-includes/post-template.php: wp_post_revision_title() |
Retrieves formatted date timestamp of a revision (linked to that revisions’s page). |
wp-includes/post-template.php: wp_post_revision_title_expanded() |
Retrieves formatted date timestamp of a revision (linked to that revisions’s page). |
wp-includes/post-template.php: wp_list_post_revisions() |
Displays a list of a post’s revisions. |
wp-includes/post-template.php: wp_get_attachment_link() |
Retrieves an attachment page link using an image or icon, if possible. |
wp-includes/post-template.php: prepend_attachment() |
Wraps attachment in paragraph tag before content. |
wp-includes/post-template.php: get_the_password_form() |
Retrieves protected post password form content. |
wp-includes/post-template.php: get_the_excerpt() |
Retrieves the post excerpt. |
wp-includes/post-template.php: has_excerpt() |
Determines whether the post has a custom excerpt. |
wp-includes/post-template.php: get_post_class() |
Retrieves an array of the class names for the post container element. |
wp-includes/post-template.php: get_body_class() |
Retrieves an array of the class names for the body element. |
wp-includes/post-template.php: post_password_required() |
Determines whether the post requires password and whether a correct password has been provided. |
wp-includes/post-template.php: _wp_link_page() |
Helper function for wp_link_pages(). |
wp-includes/post-template.php: get_the_ID() |
Retrieves the ID of the current item in the WordPress Loop. |
wp-includes/post-template.php: the_title_attribute() |
Sanitizes the current title when retrieving or displaying. |
wp-includes/post-template.php: get_the_title() |
Retrieves the post title. |
wp-includes/post-template.php: the_guid() |
Displays the Post Global Unique Identifier (guid). |
wp-includes/post-template.php: get_the_guid() |
Retrieves the Post Global Unique Identifier (guid). |
wp-includes/post-template.php: get_the_content() |
Retrieves the post content. |
wp-includes/canonical.php: redirect_canonical() |
Redirects incoming links to the proper URL based on the site url. |
wp-includes/post.php: wp_add_trashed_suffix_to_post_name_for_post() |
Adds a trashed suffix for a given post. |
wp-includes/post.php: wp_get_post_parent_id() |
Returns the ID of the post’s parent. |
wp-includes/post.php: set_post_thumbnail() |
Sets the post thumbnail (featured image) for the given post. |
wp-includes/post.php: delete_post_thumbnail() |
Removes the thumbnail (featured image) from the given post. |
wp-includes/post.php: clean_post_cache() |
Will clean the post in the cache. |
wp-includes/deprecated.php: wp_get_attachment_thumb_file() |
Retrieves thumbnail for an attachment. |
wp-includes/post.php: wp_get_attachment_caption() |
Retrieves the caption for an attachment. |
wp-includes/post.php: wp_attachment_is() |
Verifies an attachment is of a given type. |
wp-includes/post.php: wp_mime_type_icon() |
Retrieves the icon for a MIME type or attachment. |
wp-includes/post.php: get_page_uri() |
Builds the URI path for a page. |
wp-includes/post.php: is_local_attachment() |
Determines whether an attachment URI is local and really an attachment. |
wp-includes/post.php: wp_delete_attachment() |
Trashes or deletes an attachment. |
wp-includes/post.php: wp_get_attachment_metadata() |
Retrieves attachment metadata for attachment ID. |
wp-includes/post.php: wp_update_attachment_metadata() |
Updates metadata for an attachment. |
wp-includes/post.php: wp_get_attachment_url() |
Retrieves the URL for an attachment. |
wp-includes/deprecated.php: get_page_by_title() |
Retrieves a page given its title. |
wp-includes/post.php: get_pung() |
Retrieves URLs already pinged for a post. |
wp-includes/post.php: get_to_ping() |
Retrieves URLs that need to be pinged. |
wp-includes/post.php: trackback_url_list() |
Does trackbacks for a list of URLs. |
wp-includes/post.php: get_page() |
Retrieves page data given a page ID or page object. |
wp-includes/post.php: get_page_by_path() |
Retrieves a page given its path. |
wp-includes/post.php: add_ping() |
Adds a URL to those already pinged. |
wp-includes/post.php: wp_publish_post() |
Publishes a post by transitioning the post status. |
wp-includes/post.php: check_and_publish_future_post() |
Publishes future post and make sure post ID has future post status. |
wp-includes/post.php: wp_unique_post_slug() |
Computes a unique slug for the post, when given the desired slug and some post details. |
wp-includes/post.php: wp_trash_post() |
Moves a post or page to the Trash |
wp-includes/post.php: wp_untrash_post() |
Restores a post from the Trash. |
wp-includes/post.php: wp_trash_post_comments() |
Moves comments for a post to the Trash. |
wp-includes/post.php: wp_untrash_post_comments() |
Restores comments for a post from the Trash. |
wp-includes/post.php: wp_insert_post() |
Inserts or update a post. |
wp-includes/post.php: wp_update_post() |
Updates a post with new post data. |
wp-includes/post.php: wp_delete_post() |
Trashes or deletes a post or page. |
wp-includes/post.php: _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. |
wp-includes/post.php: get_post_status() |
Retrieves the post status based on the post ID. |
wp-includes/post.php: get_post_type() |
Retrieves the post type of the current post or of a given post. |
wp-includes/post.php: update_attached_file() |
Updates attachment file path based on attachment ID. |
wp-includes/post.php: get_post_ancestors() |
Retrieves the IDs of the ancestors of a post. |
wp-includes/post.php: get_post_field() |
Retrieves data from a post field based on Post ID. |
wp-includes/post.php: get_post_mime_type() |
Retrieves the mime type of an attachment based on the ID. |
wp-includes/class-wp-customize-nav-menus.php: WP_Customize_Nav_Menus::insert_auto_draft_post() |
Adds a new |
wp-includes/class-wp-customize-nav-menus.php: WP_Customize_Nav_Menus::sanitize_nav_menus_created_posts() |
Sanitizes post IDs for posts created for nav menu items to be published. |
wp-includes/class-wp-customize-nav-menus.php: WP_Customize_Nav_Menus::load_available_items_query() |
Performs the post_type and taxonomy queries for loading available menu items. |
wp-includes/ms-functions.php: get_blog_post() |
Gets a blog post from any site on the network. |
wp-includes/formatting.php: wp_trim_excerpt() |
Generates an excerpt from the content, if needed. |
wp-includes/class-wp-editor.php: _WP_Editors::editor_settings() | |
wp-includes/taxonomy.php: get_the_taxonomies() |
Retrieves all taxonomies associated with a post. |
wp-includes/taxonomy.php: get_post_taxonomies() |
Retrieves all taxonomy names for the given post. |
wp-includes/revision.php: wp_get_post_revisions() |
Returns all revisions of specified post. |
wp-includes/revision.php: _wp_preview_terms_filter() |
Filters terms lookup to set the post format. |
wp-includes/revision.php: _wp_preview_post_thumbnail_filter() |
Filters post thumbnail lookup to set the post thumbnail. |
wp-includes/revision.php: _wp_post_revision_fields() |
Determines which fields of posts are to be saved in revisions. |
wp-includes/revision.php: _wp_post_revision_data() |
Returns a post array ready to be inserted into the posts table as a post revision. |
wp-includes/revision.php: wp_save_post_revision() |
Creates a revision for the current version of a post. |
wp-includes/revision.php: wp_get_post_autosave() |
Retrieves the autosaved data of the specified post. |
wp-includes/revision.php: _wp_put_post_revision() |
Inserts post data into the posts table as a post revision. |
wp-includes/revision.php: wp_get_post_revision() |
Gets a post revision. |
wp-includes/comment-template.php: comment_form_title() |
Displays text based on comment reply status. |
wp-includes/comment-template.php: comment_form() |
Outputs a complete commenting form for use within a template. |
wp-includes/comment-template.php: get_comment_reply_link() |
Retrieves HTML content for reply to comment link. |
wp-includes/comment-template.php: get_post_reply_link() |
Retrieves HTML content for reply to post link. |
wp-includes/comment-template.php: get_cancel_comment_reply_link() |
Retrieves HTML content for cancel comment reply link. |
wp-includes/comment-template.php: get_comment_id_fields() |
Retrieves hidden input HTML for replying to comments. |
wp-includes/comment-template.php: comments_open() |
Determines whether the current post is open for comments. |
wp-includes/comment-template.php: pings_open() |
Determines whether the current post is open for pings. |
wp-includes/comment-template.php: wp_comment_form_unfiltered_html_nonce() |
Displays form token for unfiltered comments. |
wp-includes/comment-template.php: get_comments_number() |
Retrieves the amount of comments a post has. |
wp-includes/comment-template.php: get_comment_class() |
Returns the classes for the comment div as an array. |
wp-includes/functions.php: wp_scheduled_delete() |
Permanently deletes comments or posts of any type that have held a status of ‘trash’ for the number of days defined in EMPTY_TRASH_DAYS. |
wp-includes/functions.php: do_enclose() |
Checks content for video and audio links to add as enclosures. |
wp-admin/includes/class-custom-image-header.php: Custom_Image_Header::create_attachment_object() |
Create an attachment ‘object’. |
wp-admin/includes/deprecated.php: get_post_to_edit() |
Gets an existing post and format it for editing. |
wp-admin/includes/class-wp-screen.php: WP_Screen::get() |
Fetches a screen object. |
wp-admin/includes/class-wp-site-icon.php: WP_Site_Icon::create_attachment_object() |
Creates an attachment ‘object’. |
wp-admin/includes/image.php: wp_generate_attachment_metadata() |
Generates attachment meta data and create image sub-sizes for images. |
wp-admin/includes/class-wp-media-list-table.php: WP_Media_List_Table::column_parent() |
Handles the parent column output. |
wp-admin/includes/class-wp-privacy-policy-content.php: WP_Privacy_Policy_Content::notice() |
Add a notice with a link to the guide when editing the privacy policy page. |
wp-admin/includes/class-wp-list-table.php: WP_List_Table::comments_bubble() |
Displays a comment count bubble. |
wp-admin/includes/media.php: attachment_submitbox_metadata() |
Displays non-editable attachment metadata in the publish meta box. |
wp-admin/includes/media.php: media_upload_flash_bypass() |
Displays the multi-file uploader message. |
wp-admin/includes/media.php: image_media_send_to_editor() |
Retrieves the media element HTML to send to the editor. |
wp-admin/includes/media.php: get_attachment_fields_to_edit() |
Retrieves the attachment fields to edit form fields. |
wp-admin/includes/media.php: get_media_item() |
Retrieves HTML form for modifying the image attachment. |
wp-admin/includes/media.php: get_compat_media_markup() | |
wp-admin/includes/media.php: media_buttons() |
Adds the media button to the editor. |
wp-admin/includes/media.php: media_upload_form_handler() |
Handles form submissions for the legacy media uploader. |
wp-admin/includes/media.php: media_handle_upload() |
Saves a file submitted from a POST request and create an attachment post for it. |
wp-admin/includes/media.php: media_handle_sideload() |
Handles a side-loaded file in the same way as an uploaded file is handled by media_handle_upload(). |
wp-admin/includes/class-wp-comments-list-table.php: WP_Comments_List_Table::single_row() | |
wp-admin/includes/class-wp-comments-list-table.php: WP_Comments_List_Table::column_response() | |
wp-admin/includes/template.php: the_post_password() |
Displays the post password. |
wp-admin/includes/template.php: touch_time() |
Prints out HTML form date elements for editing post or comment publish date. |
wp-admin/includes/template.php: parent_dropdown() |
Prints out option HTML elements for the page parents drop-down. |
wp-admin/includes/template.php: wp_popular_terms_checklist() |
Retrieves a list of the most popular terms from the specified taxonomy. |
wp-admin/includes/template.php: meta_form() |
Prints the form in the Custom Fields meta box. |
wp-admin/includes/image-edit.php: wp_save_image() |
Saves image to post, along with enqueued changes in |
wp-admin/includes/image-edit.php: stream_preview_image() |
Streams image in post to browser, along with enqueued changes in |
wp-admin/includes/class-wp-posts-list-table.php: WP_Posts_List_Table::_page_rows() |
Given a top level page ID, display the nested hierarchy of sub-pages together with paging support |
wp-admin/includes/class-wp-posts-list-table.php: WP_Posts_List_Table::column_title() |
Handles the title column output. |
wp-admin/includes/class-wp-posts-list-table.php: WP_Posts_List_Table::single_row() | |
wp-admin/includes/nav-menu.php: _wp_ajax_menu_quick_search() |
Prints the appropriate response to a menu quick search. |
wp-admin/includes/nav-menu.php: wp_nav_menu_item_post_type_meta_box() |
Displays a meta box for a post type menu item. |
wp-admin/includes/ajax-actions.php: wp_ajax_crop_image() |
Ajax handler for cropping an image. |
wp-admin/includes/ajax-actions.php: wp_ajax_save_attachment_order() |
Ajax handler for saving the attachment order. |
wp-admin/includes/ajax-actions.php: wp_ajax_send_attachment_to_editor() |
Ajax handler for sending an attachment to the editor. |
wp-admin/includes/ajax-actions.php: wp_ajax_send_link_to_editor() |
Ajax handler for sending a link to the editor. |
wp-admin/includes/ajax-actions.php: wp_ajax_get_revision_diffs() |
Ajax handler for getting revision diffs. |
wp-admin/includes/ajax-actions.php: wp_ajax_parse_embed() |
Apply [embed] Ajax handlers to a string. |
wp-admin/includes/ajax-actions.php: wp_ajax_parse_media_shortcode() | |
wp-admin/includes/ajax-actions.php: wp_ajax_wp_fullscreen_save_post() |
Ajax handler for saving posts from the fullscreen editor. |
wp-admin/includes/ajax-actions.php: wp_ajax_wp_remove_post_lock() |
Ajax handler for removing a post lock. |
wp-admin/includes/ajax-actions.php: wp_ajax_get_attachment() |
Ajax handler for getting an attachment. |
wp-admin/includes/ajax-actions.php: wp_ajax_save_attachment() |
Ajax handler for updating attachment attributes. |
wp-admin/includes/ajax-actions.php: wp_ajax_save_attachment_compat() |
Ajax handler for saving backward compatible attachment attributes. |
wp-admin/includes/ajax-actions.php: wp_ajax_inline_save() |
Ajax handler for Quick Edit saving a post from a list table. |
wp-admin/includes/ajax-actions.php: wp_ajax_replyto_comment() |
Ajax handler for replying to a comment. |
wp-admin/includes/ajax-actions.php: wp_ajax_add_menu_item() |
Ajax handler for adding a menu item. |
wp-admin/includes/ajax-actions.php: wp_ajax_add_meta() |
Ajax handler for adding meta. |
wp-admin/includes/ajax-actions.php: wp_ajax_delete_post() |
Ajax handler for deleting a post. |
wp-admin/includes/ajax-actions.php: wp_ajax_trash_post() |
Ajax handler for sending a post to the Trash. |
wp-admin/includes/ajax-actions.php: wp_ajax_delete_page() |
Ajax handler to delete a page. |
wp-admin/includes/privacy-tools.php: _wp_privacy_resend_request() |
Resend an existing request and return the result. |
wp-admin/includes/class-walker-nav-menu-edit.php: Walker_Nav_Menu_Edit::start_el() |
Start the element output. |
wp-admin/includes/post.php: get_sample_permalink() |
Returns a sample permalink based on the post name. |
wp-admin/includes/post.php: get_sample_permalink_html() |
Returns the HTML of the sample permalink slug editor. |
wp-admin/includes/post.php: _wp_post_thumbnail_html() |
Returns HTML for the post thumbnail meta box. |
wp-admin/includes/post.php: wp_check_post_lock() |
Determines whether the post is currently being edited by another user. |
wp-admin/includes/post.php: wp_set_post_lock() |
Marks the post as currently being edited by the current user. |
wp-admin/includes/post.php: _admin_notice_post_locked() |
Outputs the HTML for the notice to say that someone else is editing or has taken over editing of this post. |
wp-admin/includes/post.php: wp_create_post_autosave() |
Creates autosave data for the specified post from |
wp-admin/includes/post.php: post_preview() |
Saves a draft or manually autosaves for the purpose of showing a post preview. |
wp-admin/includes/post.php: wp_autosave() |
Saves a post submitted with XHR. |
wp-admin/includes/post.php: _fix_attachment_links() |
Replaces hrefs of attachment anchors with up-to-date permalinks. |
wp-admin/includes/class-file-upload-upgrader.php: File_Upload_Upgrader::__construct() |
Construct the upgrader for a form. |
wp-admin/includes/post.php: edit_post() |
Updates an existing post with values provided in |
wp-admin/includes/post.php: bulk_edit_posts() |
Processes the post data for the bulk editing of posts. |
wp-admin/includes/post.php: get_default_post_to_edit() |
Returns default post information to use when populating the “Write Post” form. |
wp-admin/includes/dashboard.php: wp_dashboard_recent_comments() |
Show Comments section. |
wp-admin/includes/dashboard.php: wp_dashboard_quick_press() |
The Quick Draft widget display and creation of drafts. |
wp-admin/includes/revision.php: wp_get_revision_ui_diff() |
Get the revision UI diff. |
wp-admin/includes/revision.php: wp_prepare_revisions_for_js() |
Prepare revisions for JavaScript. |
Changelog
Version | Description |
---|---|
1.5.1 | Introduced. |