Ticket #35148: post.php.patch
| File post.php.patch, 7.3 KB (added by , 10 years ago) |
|---|
-
wp-includes/post.php
170 170 * Retrieve attached file path based on attachment ID. 171 171 * 172 172 * By default the path will go through the 'get_attached_file' filter, but 173 * passing a true to the $unfiltered argument of get_attached_file()will173 * passing a true to the $unfiltered argument of {@see get_attached_file()} will 174 174 * return the file path unfiltered. 175 175 * 176 176 * The function works by getting the single post meta name, named … … 948 948 * @type array $supports An alias for calling {@see add_post_type_support()} directly. 949 949 * Defaults to array containing 'title' & 'editor'. 950 950 * @type callable $register_meta_box_cb Provide a callback function that sets up the meta boxes for the 951 * edit form. Do remove_meta_box() and add_meta_box()calls in the951 * edit form. Do {@see remove_meta_box()} and {@see add_meta_box()} calls in the 952 952 * callback. Default null. 953 953 * @type array $taxonomies An array of taxonomy identifiers that will be registered for the 954 954 * post type. Taxonomies can be registered later with … … 1215 1215 * 1216 1216 * These four primitive capabilities are checked in core in various locations. 1217 1217 * There are also seven other primitive capabilities which are not referenced 1218 * directly in core, except in map_meta_cap(), which takes the three aforementioned1218 * directly in core, except in {@see map_meta_cap()}, which takes the three aforementioned 1219 1219 * meta capabilities and translates them into one or more primitive capabilities 1220 1220 * that must then be checked against the user or role, depending on the context. 1221 1221 * … … 1229 1229 * - edit_private_posts - Controls whether private objects can be edited. 1230 1230 * - edit_published_posts - Controls whether published objects can be edited. 1231 1231 * 1232 * These additional capabilities are only used in map_meta_cap(). Thus, they are1232 * These additional capabilities are only used in {@see map_meta_cap()}. Thus, they are 1233 1233 * only assigned by default if the post type is registered with the 'map_meta_cap' 1234 1234 * argument set to true (default is false). 1235 1235 * … … 1288 1288 } 1289 1289 1290 1290 /** 1291 * Store or return a list of post type meta caps for map_meta_cap().1291 * Store or return a list of post type meta caps for {@see map_meta_cap()}. 1292 1292 * 1293 1293 * @since 3.1.0 1294 1294 * @access private … … 2081 2081 } 2082 2082 2083 2083 /** 2084 * Return the cache key for wp_count_posts()based on the passed arguments.2084 * Return the cache key for {@see wp_count_posts()} based on the passed arguments. 2085 2085 * 2086 2086 * @since 3.9.0 2087 2087 * … … 2105 2105 * 2106 2106 * This function provides an efficient method of finding the amount of post's 2107 2107 * type a blog has. Another method is to count the amount of items in 2108 * get_posts(), but that method has a lot of overhead with doing so. Therefore,2108 * {@see get_posts()}, but that method has a lot of overhead with doing so. Therefore, 2109 2109 * when developing for 2.5+, use this function instead. 2110 2110 * 2111 2111 * The $perm parameter checks for 'readable' value and if the user can read … … 2383 2383 } 2384 2384 2385 2385 /** 2386 * Fires before a post is deleted, at the start of wp_delete_post().2386 * Fires before a post is deleted, at the start of {@see wp_delete_post()}. 2387 2387 * 2388 2388 * @since 3.2.0 2389 2389 * … … 2410 2410 } 2411 2411 } 2412 2412 2413 // Do raw query. wp_get_post_revisions()is filtered.2413 // Do raw query. {@see wp_get_post_revisions()} is filtered. 2414 2414 $revision_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'revision'", $postid ) ); 2415 2415 // Use wp_delete_post (via wp_delete_post_revision) again. Ensures any meta/misplaced data gets cleaned up. 2416 2416 foreach ( $revision_ids as $revision_id ) … … 2464 2464 wp_clear_scheduled_hook('publish_future_post', array( $postid ) ); 2465 2465 2466 2466 /** 2467 * Fires after a post is deleted, at the conclusion of wp_delete_post().2467 * Fires after a post is deleted, at the conclusion of {@see wp_delete_post()}. 2468 2468 * 2469 2469 * @since 3.2.0 2470 2470 * … … 4057 4057 /** 4058 4058 * Retrieves page data given a page ID or page object. 4059 4059 * 4060 * Use get_post()instead of get_page().4060 * Use {@see get_post()} instead of get_page(). 4061 4061 * 4062 4062 * @since 1.5.1 4063 4063 * @deprecated 3.5.0 Use get_post() … … 4606 4606 * @since 2.1.0 4607 4607 * 4608 4608 * @param array $pages List of pages to retrieve. 4609 * @param array $r Array of get_pages()arguments.4609 * @param array $r Array of {@see get_pages()} arguments. 4610 4610 */ 4611 4611 return apply_filters( 'get_pages', $pages, $r ); 4612 4612 } … … 4718 4718 delete_transient( 'dirsize_cache' ); 4719 4719 4720 4720 /** 4721 * Fires before an attachment is deleted, at the start of wp_delete_attachment().4721 * Fires before an attachment is deleted, at the start of {@see wp_delete_attachment()}. 4722 4722 * 4723 4723 * @since 2.0.0 4724 4724 * … … 5035 5035 * Checks if the attachment is an image. 5036 5036 * 5037 5037 * @since 2.1.0 5038 * @since 4.2.0 Modified into wrapper for wp_attachment_is()and5038 * @since 4.2.0 Modified into wrapper for {@see wp_attachment_is()} and 5039 5039 * allowed WP_Post object to be passed. 5040 5040 * 5041 5041 * @param int|WP_Post $post Optional. Attachment ID. Default 0. … … 5366 5366 */ 5367 5367 function get_lastpostmodified( $timezone = 'server', $post_type = 'any' ) { 5368 5368 /** 5369 * Pre-filter the return value of get_lastpostmodified()before the query is run.5369 * Pre-filter the return value of {@see get_lastpostmodified()} before the query is run. 5370 5370 * 5371 5371 * @since 4.4.0 5372 5372 * … … 5409 5409 * 5410 5410 * @global wpdb $wpdb WordPress database abstraction object. 5411 5411 * 5412 * @param string $timezone The timezone for the timestamp. See get_lastpostdate().5412 * @param string $timezone The timezone for the timestamp. See {@see get_lastpostdate()}. 5413 5413 * for information on accepted values. 5414 5414 * @param string $field Post field to check. Accepts 'date' or 'modified'. 5415 5415 * @param string $post_type Optional. The post type to check. Default 'any'. … … 5483 5483 * object cache associated with the post ID. 5484 5484 * 5485 5485 * This function not run if $_wp_suspend_cache_invalidation is not empty. See 5486 * wp_suspend_cache_invalidation().5486 * {@see wp_suspend_cache_invalidation()}. 5487 5487 * 5488 5488 * @since 2.0.0 5489 5489 * … … 5699 5699 * @access private 5700 5700 * 5701 5701 * @param int $deprecated Not used. Can be set to null. Never implemented. Not marked 5702 * as deprecated with _deprecated_argument()as it conflicts with5703 * wp_transition_post_status()and the default filter for5702 * as deprecated with {@see _deprecated_argument()} as it conflicts with 5703 * {@see wp_transition_post_status()} and the default filter for 5704 5704 * {@see _future_post_hook()}. 5705 5705 * @param WP_Post $post Post object. 5706 5706 */ … … 5722 5722 function _publish_post_hook( $post_id ) { 5723 5723 if ( defined( 'XMLRPC_REQUEST' ) ) { 5724 5724 /** 5725 * Fires when _publish_post_hook()is called during an XML-RPC request.5725 * Fires when {@see _publish_post_hook()} is called during an XML-RPC request. 5726 5726 * 5727 5727 * @since 2.1.0 5728 5728 *