Changeset 53456
- Timestamp:
- 06/02/2022 10:53:45 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r53453 r53456 704 704 705 705 /** 706 * Retrieve attached file path based on attachment ID.706 * Retrieves attached file path based on attachment ID. 707 707 * 708 708 * By default the path will go through the 'get_attached_file' filter, but … … 748 748 749 749 /** 750 * Update attachment file path based on attachment ID.750 * Updates attachment file path based on attachment ID. 751 751 * 752 752 * Used to update the file path of the attachment, which uses post meta name … … 783 783 784 784 /** 785 * Return relative path to an uploaded file.785 * Returns relative path to an uploaded file. 786 786 * 787 787 * The path is relative to the current upload dir. … … 814 814 815 815 /** 816 * Retrieve all children of the post parent ID.816 * Retrieves all children of the post parent ID. 817 817 * 818 818 * Normally, without any enhancements, the children would apply to pages. In the … … 923 923 924 924 /** 925 * Get extended entry info (<!--more-->).925 * Gets extended entry info (<!--more-->). 926 926 * 927 927 * There should not be any space after the second dash and before the word … … 1057 1057 1058 1058 /** 1059 * Retrieve data from a post field based on Post ID.1059 * Retrieves data from a post field based on Post ID. 1060 1060 * 1061 1061 * Examples of the post field will be, 'post_type', 'post_status', 'post_content', … … 1091 1091 1092 1092 /** 1093 * Retrieve the mime type of an attachment based on the ID.1093 * Retrieves the mime type of an attachment based on the ID. 1094 1094 * 1095 1095 * This function can be used with any post type, but it makes more sense with … … 1112 1112 1113 1113 /** 1114 * Retrieve the post status based on the post ID.1114 * Retrieves the post status based on the post ID. 1115 1115 * 1116 1116 * If the post ID is of an attachment, then the parent post status will be given … … 1179 1179 1180 1180 /** 1181 * Retrieve all of the WordPress supported post statuses.1181 * Retrieves all of the WordPress supported post statuses. 1182 1182 * 1183 1183 * Posts have a limited set of valid status values, this provides the … … 1200 1200 1201 1201 /** 1202 * Retrieve all of the WordPress support page statuses.1202 * Retrieves all of the WordPress support page statuses. 1203 1203 * 1204 1204 * Pages have a limited set of valid status values, this provides the … … 1220 1220 1221 1221 /** 1222 * Return statuses for privacy requests.1222 * Returns statuses for privacy requests. 1223 1223 * 1224 1224 * @since 4.9.6 … … 1237 1237 1238 1238 /** 1239 * Register a post status. Do not use before init.1239 * Registers a post status. Do not use before init. 1240 1240 * 1241 1241 * A simple function for creating or modifying a post status based on the … … 1367 1367 1368 1368 /** 1369 * Retrieve a post status object by name.1369 * Retrieves a post status object by name. 1370 1370 * 1371 1371 * @since 3.0.0 … … 1389 1389 1390 1390 /** 1391 * Get a list of post statuses.1391 * Gets a list of post statuses. 1392 1392 * 1393 1393 * @since 3.0.0 … … 1414 1414 1415 1415 /** 1416 * Whether the post type is hierarchical.1416 * Determines whether the post type is hierarchical. 1417 1417 * 1418 1418 * A false return value might also mean that the post type does not exist. … … 1493 1493 1494 1494 /** 1495 * Get a list of all registered post type objects.1495 * Gets a list of all registered post type objects. 1496 1496 * 1497 1497 * @since 2.9.0 … … 1777 1777 1778 1778 /** 1779 * Build an object with all post type capabilities out of a post type object1779 * Builds an object with all post type capabilities out of a post type object 1780 1780 * 1781 1781 * Post type capabilities use the 'capability_type' argument as a base, if the … … 1882 1882 1883 1883 /** 1884 * Store or returna list of post type meta caps for map_meta_cap().1884 * Stores or returns a list of post type meta caps for map_meta_cap(). 1885 1885 * 1886 1886 * @since 3.1.0 … … 2012 2012 2013 2013 /** 2014 * Build an object with custom-something object (post type, taxonomy) labels2014 * Builds an object with custom-something object (post type, taxonomy) labels 2015 2015 * out of a custom-something object 2016 2016 * … … 2060 2060 2061 2061 /** 2062 * Add submenus for post types.2062 * Adds submenus for post types. 2063 2063 * 2064 2064 * @access private … … 2126 2126 2127 2127 /** 2128 * Remove support for a feature from a post type.2128 * Removes support for a feature from a post type. 2129 2129 * 2130 2130 * @since 3.0.0 … … 2142 2142 2143 2143 /** 2144 * Get all the post type features2144 * Gets all the post type features 2145 2145 * 2146 2146 * @since 3.4.0 … … 2162 2162 2163 2163 /** 2164 * Check a post type's support for a given feature.2164 * Checks a post type's support for a given feature. 2165 2165 * 2166 2166 * @since 3.0.0 … … 2201 2201 2202 2202 /** 2203 * Update the post type for the post ID.2203 * Updates the post type for the post ID. 2204 2204 * 2205 2205 * The page or post cache will be cleaned for the post ID. … … 2271 2271 2272 2272 /** 2273 * Determine whether a post status is considered "viewable".2273 * Determines whether a post status is considered "viewable". 2274 2274 * 2275 2275 * For built-in post statuses such as publish and private, the 'public' value will be evaluated. … … 2318 2318 2319 2319 /** 2320 * Determine whether a post is publicly viewable.2320 * Determines whether a post is publicly viewable. 2321 2321 * 2322 2322 * Posts are considered publicly viewable if both the post status and post type … … 2564 2564 2565 2565 /** 2566 * Retrieve post meta fields, based on post ID.2566 * Retrieves post meta fields, based on post ID. 2567 2567 * 2568 2568 * The post meta fields are retrieved from the cache where possible, … … 2586 2586 2587 2587 /** 2588 * Retrieve meta field names for a post.2588 * Retrieves meta field names for a post. 2589 2589 * 2590 2590 * If there are no meta fields, then nothing (null) will be returned. … … 2609 2609 2610 2610 /** 2611 * Retrieve values for a custom post field.2611 * Retrieves values for a custom post field. 2612 2612 * 2613 2613 * The parameters must not be considered optional. All of the post meta fields … … 2882 2882 2883 2883 /** 2884 * Make a post sticky.2884 * Makes a post sticky. 2885 2885 * 2886 2886 * Sticky posts should be displayed at the top of the front page. … … 2919 2919 2920 2920 /** 2921 * Un-stick a post.2921 * Un-sticks a post. 2922 2922 * 2923 2923 * Sticky posts should be displayed at the top of the front page. … … 2963 2963 2964 2964 /** 2965 * Return the cache key for wp_count_posts() based on the passed arguments.2965 * Returns the cache key for wp_count_posts() based on the passed arguments. 2966 2966 * 2967 2967 * @since 3.9.0 … … 2987 2987 2988 2988 /** 2989 * Count number of posts of a post type and if user has permissions to view.2989 * Counts number of posts of a post type and if user has permissions to view. 2990 2990 * 2991 2991 * This function provides an efficient method of finding the amount of post's … … 3052 3052 3053 3053 /** 3054 * Modif yreturned post counts by status for the current post type.3054 * Modifies returned post counts by status for the current post type. 3055 3055 * 3056 3056 * @since 3.7.0 … … 3066 3066 3067 3067 /** 3068 * Count number of attachments for the mime type(s).3068 * Counts number of attachments for the mime type(s). 3069 3069 * 3070 3070 * If you set the optional mime_type parameter, then an array will still be … … 3094 3094 3095 3095 /** 3096 * Modif yreturned attachment counts by mime type.3096 * Modifies returned attachment counts by mime type. 3097 3097 * 3098 3098 * @since 3.7.0 … … 3106 3106 3107 3107 /** 3108 * Get default post mime types.3108 * Gets default post mime types. 3109 3109 * 3110 3110 * @since 2.9.0 … … 3210 3210 3211 3211 /** 3212 * Check a MIME-Type against a list.3212 * Checks a MIME-Type against a list. 3213 3213 * 3214 3214 * If the wildcard_mime_types parameter is a string, it must be comma separated … … 3266 3266 3267 3267 /** 3268 * Convert MIME types into SQL.3268 * Converts MIME types into SQL. 3269 3269 * 3270 3270 * @since 2.5.0 … … 3325 3325 3326 3326 /** 3327 * Trash or deletea post or page.3327 * Trashes or deletes a post or page. 3328 3328 * 3329 3329 * When the post and page is permanently deleted, everything that is tied to … … 3486 3486 3487 3487 /** 3488 * Reset the page_on_front, show_on_front, and page_for_post settings when3488 * Resets the page_on_front, show_on_front, and page_for_post settings when 3489 3489 * a linked page is deleted or trashed. 3490 3490 * … … 3517 3517 3518 3518 /** 3519 * Move a post or page to the Trash3519 * Moves a post or page to the Trash 3520 3520 * 3521 3521 * If Trash is disabled, the post or page is permanently deleted. … … 3757 3757 3758 3758 /** 3759 * Restore comments for a post from the Trash.3759 * Restores comments for a post from the Trash. 3760 3760 * 3761 3761 * @since 2.9.0 … … 3822 3822 3823 3823 /** 3824 * Retrieve the list of categories for a post.3824 * Retrieves the list of categories for a post. 3825 3825 * 3826 3826 * Compatibility layer for themes and plugins. Also an easy layer of abstraction … … 3851 3851 3852 3852 /** 3853 * Retrieve the tags for a post.3853 * Retrieves the tags for a post. 3854 3854 * 3855 3855 * There is only one default for this function, called 'fields' and by default … … 3899 3899 3900 3900 /** 3901 * Retrieve a number of recent posts.3901 * Retrieves a number of recent posts. 3902 3902 * 3903 3903 * @since 1.0.0 … … 3952 3952 3953 3953 /** 3954 * Insert or update a post.3954 * Inserts or update a post. 3955 3955 * 3956 3956 * If the $postarr parameter has 'ID' set to a value, then post will be updated. … … 4692 4692 4693 4693 /** 4694 * Update a post with new post data.4694 * Updates a post with new post data. 4695 4695 * 4696 4696 * The date does not have to be set for drafts. You can set the date and it will … … 4777 4777 4778 4778 /** 4779 * Publish a post by transitioning the post status.4779 * Publishes a post by transitioning the post status. 4780 4780 * 4781 4781 * @since 2.1.0 … … 4854 4854 4855 4855 /** 4856 * Publish future post and make sure post ID has future post status.4856 * Publishes future post and make sure post ID has future post status. 4857 4857 * 4858 4858 * Invoked by cron 'publish_future_post' event. This safeguard prevents cron … … 5113 5113 5114 5114 /** 5115 * Truncate a post slug.5115 * Truncates a post slug. 5116 5116 * 5117 5117 * @since 3.6.0 … … 5138 5138 5139 5139 /** 5140 * Add tags to a post.5140 * Adds tags to a post. 5141 5141 * 5142 5142 * @see wp_set_post_tags() … … 5154 5154 5155 5155 /** 5156 * Set the tags for a post.5156 * Sets the tags for a post. 5157 5157 * 5158 5158 * @since 2.3.0 … … 5172 5172 5173 5173 /** 5174 * Set the terms for a post.5174 * Sets the terms for a post. 5175 5175 * 5176 5176 * @since 2.8.0 … … 5219 5219 5220 5220 /** 5221 * Set categories for a post.5221 * Sets categories for a post. 5222 5222 * 5223 5223 * If no categories are provided, the default category is used. … … 5399 5399 5400 5400 /** 5401 * Add a URL to those already pinged.5401 * Adds a URL to those already pinged. 5402 5402 * 5403 5403 * @since 1.5.0 … … 5445 5445 5446 5446 /** 5447 * Retrieve enclosures already enclosed for a post.5447 * Retrieves enclosures already enclosed for a post. 5448 5448 * 5449 5449 * @since 1.5.0 … … 5481 5481 5482 5482 /** 5483 * Retrieve URLs already pinged for a post.5483 * Retrieves URLs already pinged for a post. 5484 5484 * 5485 5485 * @since 1.5.0 … … 5511 5511 5512 5512 /** 5513 * Retrieve URLs that need to be pinged.5513 * Retrieves URLs that need to be pinged. 5514 5514 * 5515 5515 * @since 1.5.0 … … 5540 5540 5541 5541 /** 5542 * Do trackbacks for a list of URLs.5542 * Does trackbacks for a list of URLs. 5543 5543 * 5544 5544 * @since 1.0.0 … … 5572 5572 5573 5573 /** 5574 * Get a list of page IDs.5574 * Gets a list of page IDs. 5575 5575 * 5576 5576 * @since 2.0.0 … … 5710 5710 5711 5711 /** 5712 * Retrieve a page given its title.5712 * Retrieves a page given its title. 5713 5713 * 5714 5714 * If more than one post uses the same title, the post with the smallest ID will be returned. … … 5769 5769 5770 5770 /** 5771 * Identif ydescendants of a given page ID in a list of page objects.5771 * Identifies descendants of a given page ID in a list of page objects. 5772 5772 * 5773 5773 * Descendants are identified from the `$pages` array passed to the function. No database queries are performed. … … 5809 5809 5810 5810 /** 5811 * Order the pages with children under parents in a flat list.5811 * Orders the pages with children under parents in a flat list. 5812 5812 * 5813 5813 * It uses auxiliary structure to hold parent-children relationships and … … 5838 5838 5839 5839 /** 5840 * Traverse and return all the nested children post names of a root page.5840 * Traverses and return all the nested children post names of a root page. 5841 5841 * 5842 5842 * $children contains parent-children relations … … 5861 5861 5862 5862 /** 5863 * Build the URI path for a page.5863 * Builds the URI path for a page. 5864 5864 * 5865 5865 * Sub pages will be in the "directory" under the parent page post name. … … 5901 5901 5902 5902 /** 5903 * Retrieve an array of pages (or hierarchical post type items).5903 * Retrieves an array of pages (or hierarchical post type items). 5904 5904 * 5905 5905 * @global wpdb $wpdb WordPress database abstraction object. … … 6259 6259 6260 6260 /** 6261 * Insert an attachment.6261 * Inserts an attachment. 6262 6262 * 6263 6263 * If you set the 'ID' in the $args parameter, it will mean that you are … … 6303 6303 6304 6304 /** 6305 * Trash or deletean attachment.6305 * Trashes or deletes an attachment. 6306 6306 * 6307 6307 * When an attachment is permanently deleted, the file will also be removed. … … 6591 6591 6592 6592 /** 6593 * Retrieve the URL for an attachment.6593 * Retrieves the URL for an attachment. 6594 6594 * 6595 6595 * @since 2.1.0 … … 6700 6700 6701 6701 /** 6702 * Retrieve thumbnail for an attachment.6702 * Retrieves thumbnail for an attachment. 6703 6703 * 6704 6704 * @since 2.1.0 … … 6740 6740 6741 6741 /** 6742 * Retrieve URL for an attachment thumbnail.6742 * Retrieves URL for an attachment thumbnail. 6743 6743 * 6744 6744 * @since 2.1.0 … … 6856 6856 6857 6857 /** 6858 * Retrieve the icon for a MIME type or attachment.6858 * Retrieves the icon for a MIME type or attachment. 6859 6859 * 6860 6860 * @since 2.1.0 … … 6994 6994 6995 6995 /** 6996 * Check for changed slugs for published post objects and save the old slug.6996 * Checks for changed slugs for published post objects and save the old slug. 6997 6997 * 6998 6998 * The function is used when a post object of any type is updated, … … 7037 7037 7038 7038 /** 7039 * Check for changed dates for published post objects and save the old date.7039 * Checks for changed dates for published post objects and save the old date. 7040 7040 * 7041 7041 * The function is used when a post object of any type is updated, … … 7083 7083 7084 7084 /** 7085 * Retrieve the private post SQL based on capability.7085 * Retrieves the private post SQL based on capability. 7086 7086 * 7087 7087 * This function provides a standardized way to appropriately select on the … … 7101 7101 7102 7102 /** 7103 * Retrieve the post SQL based on capability, author, and type.7103 * Retrieves the post SQL based on capability, author, and type. 7104 7104 * 7105 7105 * @since 3.0.0 … … 7221 7221 7222 7222 /** 7223 * Get the most recent time that a post on the site was modified.7223 * Gets the most recent time that a post on the site was modified. 7224 7224 * 7225 7225 * The server timezone is the default and is the difference between GMT and … … 7425 7425 7426 7426 /** 7427 * Call major cache updating functions for list of Post objects.7427 * Calls major cache updating functions for list of Post objects. 7428 7428 * 7429 7429 * @since 1.5.0 … … 7665 7665 7666 7666 /** 7667 * Check the given subset of the post hierarchy for hierarchy loops.7667 * Checks the given subset of the post hierarchy for hierarchy loops. 7668 7668 * 7669 7669 * Prevents loops from forming and breaks those that it finds. Attached … … 7757 7757 7758 7758 /** 7759 * Delete auto-drafts for new posts that are > 7 days old.7759 * Deletes auto-drafts for new posts that are > 7 days old. 7760 7760 * 7761 7761 * @since 3.4.0 … … 7813 7813 7814 7814 /** 7815 * Update the custom taxonomies' term counts when a post's status is changed.7815 * Updates the custom taxonomies' term counts when a post's status is changed. 7816 7816 * 7817 7817 * For example, default posts term counts (for custom taxonomies) don't include … … 7959 7959 7960 7960 /** 7961 * Get all available post MIME types for a given post type.7961 * Gets all available post MIME types for a given post type. 7962 7962 * 7963 7963 * @since 2.5.0 … … 8016 8016 8017 8017 /** 8018 * Retrieve the URL to an original attachment image.8018 * Retrieves the URL to an original attachment image. 8019 8019 * 8020 8020 * Similar to `wp_get_attachment_url()` however some images may have been … … 8058 8058 8059 8059 /** 8060 * Filter callback which sets the status of an untrashed post to its previous status.8060 * Filters callback which sets the status of an untrashed post to its previous status. 8061 8061 * 8062 8062 * This can be used as a callback on the `wp_untrash_post_status` filter.
Note: See TracChangeset
for help on using the changeset viewer.