Changeset 9053 for trunk/wp-admin/includes/post.php
- Timestamp:
- 10/02/2008 01:03:26 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/post.php
r9036 r9053 1 1 <?php 2 /** 3 * WordPress Post Administration API. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 2 8 3 9 /** … … 7 13 * 8 14 * @package WordPress 9 * @since 2.6 15 * @since 2.6.0 10 16 * 11 17 * @param bool $update Are we updating a pre-existing post? 12 * @param post_data array Array of post data. Defaults to the contents of $_POST 18 * @param post_data array Array of post data. Defaults to the contents of $_POST. 13 19 * @return object|bool WP_Error on failure, true on success. 14 20 */ … … 111 117 } 112 118 113 114 // Update an existing post with values provided in $_POST. 119 /** 120 * Update an existing post with values provided in $_POST. 121 * 122 * @since unknown 123 * 124 * @param array $post_data Optional. 125 * @return int Post ID. 126 */ 115 127 function edit_post( $post_data = null ) { 116 128 … … 178 190 } 179 191 180 // updates all bulk edited posts/pages, adding (but not removing) tags and categories. Skips pages when they would be their own parent or child. 192 /** 193 * {@internal Missing Short Description}} 194 * 195 * Updates all bulk edited posts/pages, adding (but not removing) tags and 196 * categories. Skips pages when they would be their own parent or child. 197 * 198 * @since unknown 199 * 200 * @return array 201 */ 181 202 function bulk_edit_posts( $post_data = null ) { 182 203 global $wpdb; … … 259 280 } 260 281 261 // Default post information to use when populating the "Write Post" form. 282 /** 283 * Default post information to use when populating the "Write Post" form. 284 * 285 * @since unknown 286 * 287 * @return unknown 288 */ 262 289 function get_default_post_to_edit() { 263 290 if ( !empty( $_REQUEST['post_title'] ) ) … … 307 334 } 308 335 336 /** 337 * {@internal Missing Short Description}} 338 * 339 * @since unknown 340 * 341 * @return unknown 342 */ 309 343 function get_default_page_to_edit() { 310 344 $page = get_default_post_to_edit(); … … 313 347 } 314 348 315 // Get an existing post and format it for editing. 349 /** 350 * Get an existing post and format it for editing. 351 * 352 * @since unknown 353 * 354 * @param unknown_type $id 355 * @return unknown 356 */ 316 357 function get_post_to_edit( $id ) { 317 358 … … 324 365 } 325 366 367 /** 368 * {@internal Missing Short Description}} 369 * 370 * @since unknown 371 * 372 * @param unknown_type $title 373 * @param unknown_type $content 374 * @param unknown_type $post_date 375 * @return unknown 376 */ 326 377 function post_exists($title, $content = '', $post_date = '') { 327 378 global $wpdb; … … 339 390 } 340 391 341 // Creates a new post from the "Write Post" form using $_POST information. 392 /** 393 * Creates a new post from the "Write Post" form using $_POST information. 394 * 395 * @since unknown 396 * 397 * @return unknown 398 */ 342 399 function wp_write_post() { 343 400 global $user_ID; … … 406 463 } 407 464 465 /** 466 * {@internal Missing Short Description}} 467 * 468 * @since unknown 469 * 470 * @return unknown 471 */ 408 472 function write_post() { 409 473 $result = wp_write_post(); … … 418 482 // 419 483 484 /** 485 * {@internal Missing Short Description}} 486 * 487 * @since unknown 488 * 489 * @param unknown_type $post_ID 490 * @return unknown 491 */ 420 492 function add_meta( $post_ID ) { 421 493 global $wpdb; … … 452 524 } // add_meta 453 525 526 /** 527 * {@internal Missing Short Description}} 528 * 529 * @since unknown 530 * 531 * @param unknown_type $mid 532 * @return unknown 533 */ 454 534 function delete_meta( $mid ) { 455 535 global $wpdb; … … 462 542 } 463 543 464 // Get a list of previously defined keys 544 /** 545 * Get a list of previously defined keys. 546 * 547 * @since unknown 548 * 549 * @return unknown 550 */ 465 551 function get_meta_keys() { 466 552 global $wpdb; … … 475 561 } 476 562 563 /** 564 * {@internal Missing Short Description}} 565 * 566 * @since unknown 567 * 568 * @param unknown_type $mid 569 * @return unknown 570 */ 477 571 function get_post_meta_by_id( $mid ) { 478 572 global $wpdb; … … 485 579 } 486 580 487 // Some postmeta stuff 581 /** 582 * {@internal Missing Short Description}} 583 * 584 * Some postmeta stuff. 585 * 586 * @since unknown 587 * 588 * @param unknown_type $postid 589 * @return unknown 590 */ 488 591 function has_meta( $postid ) { 489 592 global $wpdb; … … 495 598 } 496 599 600 /** 601 * {@internal Missing Short Description}} 602 * 603 * @since unknown 604 * 605 * @param unknown_type $meta_id 606 * @param unknown_type $meta_key 607 * @param unknown_type $meta_value 608 * @return unknown 609 */ 497 610 function update_meta( $meta_id, $meta_key, $meta_value ) { 498 611 global $wpdb; … … 519 632 // 520 633 521 // Replace hrefs of attachment anchors with up-to-date permalinks. 634 /** 635 * Replace hrefs of attachment anchors with up-to-date permalinks. 636 * 637 * @since unknown 638 * @access private 639 * 640 * @param unknown_type $post_ID 641 * @return unknown 642 */ 522 643 function _fix_attachment_links( $post_ID ) { 523 644 … … 560 681 } 561 682 562 // Move child posts to a new parent 683 /** 684 * Move child posts to a new parent. 685 * 686 * @since unknown 687 * @access private 688 * 689 * @param unknown_type $old_ID 690 * @param unknown_type $new_ID 691 * @return unknown 692 */ 563 693 function _relocate_children( $old_ID, $new_ID ) { 564 694 global $wpdb; … … 568 698 } 569 699 700 /** 701 * {@internal Missing Short Description}} 702 * 703 * @since unknown 704 * 705 * @param unknown_type $type 706 * @return unknown 707 */ 570 708 function get_available_post_statuses($type = 'post') { 571 709 $stati = wp_count_posts($type); … … 574 712 } 575 713 714 /** 715 * {@internal Missing Short Description}} 716 * 717 * @since unknown 718 * 719 * @param unknown_type $q 720 * @return unknown 721 */ 576 722 function wp_edit_posts_query( $q = false ) { 577 723 global $wpdb; … … 614 760 } 615 761 762 /** 763 * {@internal Missing Short Description}} 764 * 765 * @since unknown 766 * 767 * @param unknown_type $type 768 * @return unknown 769 */ 616 770 function get_available_post_mime_types($type = 'attachment') { 617 771 global $wpdb; … … 621 775 } 622 776 777 /** 778 * {@internal Missing Short Description}} 779 * 780 * @since unknown 781 * 782 * @param unknown_type $q 783 * @return unknown 784 */ 623 785 function wp_edit_attachments_query( $q = false ) { 624 786 global $wpdb; … … 648 810 } 649 811 812 /** 813 * {@internal Missing Short Description}} 814 * 815 * @since unknown 816 * 817 * @param unknown_type $id 818 * @param unknown_type $page 819 * @return unknown 820 */ 650 821 function postbox_classes( $id, $page ) { 651 822 $current_user = wp_get_current_user(); … … 659 830 } 660 831 832 /** 833 * {@internal Missing Short Description}} 834 * 835 * @since unknown 836 * 837 * @param unknown_type $id 838 * @param unknown_type $title 839 * @param unknown_type $name 840 * @return unknown 841 */ 661 842 function get_sample_permalink($id, $title=null, $name = null) { 662 843 $post = &get_post($id); … … 702 883 } 703 884 885 /** 886 * {@internal Missing Short Description}} 887 * 888 * @since unknown 889 * 890 * @param unknown_type $id 891 * @param unknown_type $new_title 892 * @param unknown_type $new_slug 893 * @return unknown 894 */ 704 895 function get_sample_permalink_html($id, $new_title=null, $new_slug=null) { 705 896 $post = &get_post($id); … … 721 912 } 722 913 723 // false: not locked or locked by current user 724 // int: user ID of user with lock 914 /** 915 * {@internal Missing Short Description}} 916 * 917 * @since unknown 918 * 919 * @param unknown_type $post_id 920 * @return bool|int False: not locked or locked by current user. Int: user ID of user with lock. 921 */ 725 922 function wp_check_post_lock( $post_id ) { 726 923 global $current_user; … … 739 936 } 740 937 938 /** 939 * {@internal Missing Short Description}} 940 * 941 * @since unknown 942 * 943 * @param unknown_type $post_id 944 * @return unknown 945 */ 741 946 function wp_set_post_lock( $post_id ) { 742 947 global $current_user; … … 755 960 756 961 /** 757 * wp_create_post_autosave() - creates autosave data for the specified post from $_POST data962 * Creates autosave data for the specified post from $_POST data. 758 963 * 759 964 * @package WordPress 760 * @subpackage Post 761 * @since 2.6 965 * @subpackage Post_Revisions 966 * @since 2.6.0 762 967 * 763 968 * @uses _wp_translate_postdata() … … 781 986 782 987 /** 783 * wp_teeny_mce() - adds a trimmed down version of the tinyMCE editor used on the Write -> Post screen.988 * Adds a trimmed down version of the tinyMCE editor used on the Write -> Post screen. 784 989 * 785 990 * @package WordPress 786 * @since 2.6 991 * @since 2.6.0 787 992 */ 788 993 function wp_teeny_mce( $args = null ) {
Note: See TracChangeset
for help on using the changeset viewer.