Changeset 24177
- Timestamp:
- 05/05/2013 02:46:59 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/revision.php
r24034 r24177 14 14 * an array whose keys are the post fields to be saved for post revisions. 15 15 * 16 * @package WordPress 17 * @subpackage Post_Revisions 18 * @since 2.6.0 19 * @access private 16 * @since 2.6.0 17 * @access private 18 * 20 19 * @uses apply_filters() Calls '_wp_post_revision_fields' on 'title', 'content' and 'excerpt' fields. 21 20 * … … 65 64 * @since 3.6 66 65 * @access private 66 * 67 67 * @return array An array of meta keys that should be revisioned. 68 68 */ … … 86 86 * Adds a copy of the current post as a revision, so latest revision always matches current post 87 87 * 88 * @package WordPress89 * @subpackage Post_Revisions90 88 * @since 2.6.0 91 89 * … … 185 183 * otherwise returns the latest autosave. 186 184 * 187 * @package WordPress 188 * @subpackage Post_Revisions 189 * @since 2.6.0 185 * @since 2.6.0 186 * 190 187 * @uses wp_get_post_revisions() 191 188 * … … 213 210 * Determines if the specified post is a revision. 214 211 * 215 * @package WordPress216 * @subpackage Post_Revisions217 212 * @since 2.6.0 218 213 * … … 230 225 * Determines if the specified post is an autosave. 231 226 * 232 * @package WordPress233 * @subpackage Post_Revisions234 227 * @since 2.6.0 235 228 * … … 250 243 * Inserts post data into the posts table as a post revision. 251 244 * 252 * @package WordPress 253 * @subpackage Post_Revisions 254 * @since 2.6.0 245 * @since 2.6.0 246 * @access private 255 247 * 256 248 * @uses wp_insert_post() … … 304 296 * Gets a post revision. 305 297 * 306 * @package WordPress307 * @subpackage Post_Revisions308 298 * @since 2.6.0 309 299 * 310 300 * @uses get_post() 311 301 * 312 * @param int|object $post Post ID or post object302 * @param int|object $post The post ID or object. 313 303 * @param string $output Optional. OBJECT, ARRAY_A, or ARRAY_N. 314 * @param string $filter Optional sanitation filter. @see sanitize_post() 315 * @return mixed Null if error or post object if success 304 * @param string $filter Optional sanitation filter. @see sanitize_post(). 305 * @return mixed Null if error or post object if success. 316 306 */ 317 307 function wp_get_post_revision(&$post, $output = OBJECT, $filter = 'raw') { … … 340 330 * Can restore a past revision using all fields of the post revision, or only selected fields. 341 331 * 342 * @package WordPress343 * @subpackage Post_Revisions344 332 * @since 2.6.0 345 333 * … … 406 394 * Deletes the row from the posts table corresponding to the specified revision. 407 395 * 408 * @package WordPress409 * @subpackage Post_Revisions410 396 * @since 2.6.0 411 397 * … … 433 419 * Returns all revisions of specified post. 434 420 * 435 * @package WordPress436 * @subpackage Post_Revisions437 421 * @since 2.6.0 438 422 * … … 440 424 * 441 425 * @param int|object $post_id Post ID or post object 442 * @return array empty if no revisions426 * @return array An array of revisions, or an empty array if none. 443 427 */ 444 428 function wp_get_post_revisions( $post_id = 0, $args = null ) { … … 464 448 * @uses wp_revisions_to_keep() 465 449 * 466 * @param object $post 467 * @return bool 450 * @param object $post The post object. 451 * @return bool True if number of revisions to keep isn't zero, false otherwise. 468 452 */ 469 453 function wp_revisions_enabled( $post ) { … … 480 464 * @uses apply_filters() Calls 'wp_revisions_to_keep' hook on the number of revisions. 481 465 * 482 * @param object $post 483 * @return int 466 * @param object $post The post object. 467 * @return int The number of revisions to keep. 484 468 */ 485 469 function wp_revisions_to_keep( $post ) { … … 497 481 } 498 482 483 /** 484 * Sets up the post object for preview based on the post autosave. 485 * 486 * @since 2.7.0 487 * @access private 488 */ 499 489 function _set_preview($post) { 500 490 … … 519 509 } 520 510 511 /** 512 * Filters the latest content for preview from the post autosave. 513 * 514 * @since 2.7.0 515 * @access private 516 */ 521 517 function _show_post_preview() { 522 518 … … 574 570 } 575 571 572 /** 573 * Gets the post revision version. 574 * 575 * @since 3.6.0 576 * @access private 577 */ 576 578 function _wp_get_post_revision_version( $revision ) { 577 579 if ( is_object( $revision ) ) … … 589 591 * Upgrade the revisions author, add the current post as a revision and set the revisions version to 1 590 592 * 591 * @package WordPress592 * @subpackage Post_Revisions593 593 * @since 3.6.0 594 * @access private 594 595 * 595 596 * @uses wp_get_post_revisions() … … 684 685 * 685 686 * @since 3.6.0 687 * 686 688 * @see wp_parse_args() Used to change defaults to user defined settings. 687 689 * @uses Text_Diff
Note: See TracChangeset
for help on using the changeset viewer.