Make WordPress Core


Ignore:
Timestamp:
10/02/2008 01:03:26 AM (17 years ago)
Author:
ryan
Message:

phpdoc for wp-admin/includes from jacobsantos. see #7527

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/post.php

    r9036 r9053  
    11<?php
     2/**
     3 * WordPress Post Administration API.
     4 *
     5 * @package WordPress
     6 * @subpackage Administration
     7 */
    28
    39/**
     
    713 *
    814 * @package WordPress
    9  * @since 2.6
     15 * @since 2.6.0
    1016 *
    1117 * @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.
    1319 * @return object|bool WP_Error on failure, true on success.
    1420 */
     
    111117}
    112118
    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 */
    115127function edit_post( $post_data = null ) {
    116128
     
    178190}
    179191
    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 */
    181202function bulk_edit_posts( $post_data = null ) {
    182203    global $wpdb;
     
    259280}
    260281
    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 */
    262289function get_default_post_to_edit() {
    263290    if ( !empty( $_REQUEST['post_title'] ) )
     
    307334}
    308335
     336/**
     337 * {@internal Missing Short Description}}
     338 *
     339 * @since unknown
     340 *
     341 * @return unknown
     342 */
    309343function get_default_page_to_edit() {
    310344    $page = get_default_post_to_edit();
     
    313347}
    314348
    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 */
    316357function get_post_to_edit( $id ) {
    317358
     
    324365}
    325366
     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 */
    326377function post_exists($title, $content = '', $post_date = '') {
    327378    global $wpdb;
     
    339390}
    340391
    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 */
    342399function wp_write_post() {
    343400    global $user_ID;
     
    406463}
    407464
     465/**
     466 * {@internal Missing Short Description}}
     467 *
     468 * @since unknown
     469 *
     470 * @return unknown
     471 */
    408472function write_post() {
    409473    $result = wp_write_post();
     
    418482//
    419483
     484/**
     485 * {@internal Missing Short Description}}
     486 *
     487 * @since unknown
     488 *
     489 * @param unknown_type $post_ID
     490 * @return unknown
     491 */
    420492function add_meta( $post_ID ) {
    421493    global $wpdb;
     
    452524} // add_meta
    453525
     526/**
     527 * {@internal Missing Short Description}}
     528 *
     529 * @since unknown
     530 *
     531 * @param unknown_type $mid
     532 * @return unknown
     533 */
    454534function delete_meta( $mid ) {
    455535    global $wpdb;
     
    462542}
    463543
    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 */
    465551function get_meta_keys() {
    466552    global $wpdb;
     
    475561}
    476562
     563/**
     564 * {@internal Missing Short Description}}
     565 *
     566 * @since unknown
     567 *
     568 * @param unknown_type $mid
     569 * @return unknown
     570 */
    477571function get_post_meta_by_id( $mid ) {
    478572    global $wpdb;
     
    485579}
    486580
    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 */
    488591function has_meta( $postid ) {
    489592    global $wpdb;
     
    495598}
    496599
     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 */
    497610function update_meta( $meta_id, $meta_key, $meta_value ) {
    498611    global $wpdb;
     
    519632//
    520633
    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 */
    522643function _fix_attachment_links( $post_ID ) {
    523644
     
    560681}
    561682
    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 */
    563693function _relocate_children( $old_ID, $new_ID ) {
    564694    global $wpdb;
     
    568698}
    569699
     700/**
     701 * {@internal Missing Short Description}}
     702 *
     703 * @since unknown
     704 *
     705 * @param unknown_type $type
     706 * @return unknown
     707 */
    570708function get_available_post_statuses($type = 'post') {
    571709    $stati = wp_count_posts($type);
     
    574712}
    575713
     714/**
     715 * {@internal Missing Short Description}}
     716 *
     717 * @since unknown
     718 *
     719 * @param unknown_type $q
     720 * @return unknown
     721 */
    576722function wp_edit_posts_query( $q = false ) {
    577723    global $wpdb;
     
    614760}
    615761
     762/**
     763 * {@internal Missing Short Description}}
     764 *
     765 * @since unknown
     766 *
     767 * @param unknown_type $type
     768 * @return unknown
     769 */
    616770function get_available_post_mime_types($type = 'attachment') {
    617771    global $wpdb;
     
    621775}
    622776
     777/**
     778 * {@internal Missing Short Description}}
     779 *
     780 * @since unknown
     781 *
     782 * @param unknown_type $q
     783 * @return unknown
     784 */
    623785function wp_edit_attachments_query( $q = false ) {
    624786    global $wpdb;
     
    648810}
    649811
     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 */
    650821function postbox_classes( $id, $page ) {
    651822    $current_user = wp_get_current_user();
     
    659830}
    660831
     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 */
    661842function get_sample_permalink($id, $title=null, $name = null) {
    662843    $post = &get_post($id);
     
    702883}
    703884
     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 */
    704895function get_sample_permalink_html($id, $new_title=null, $new_slug=null) {
    705896    $post = &get_post($id);
     
    721912}
    722913
    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 */
    725922function wp_check_post_lock( $post_id ) {
    726923    global $current_user;
     
    739936}
    740937
     938/**
     939 * {@internal Missing Short Description}}
     940 *
     941 * @since unknown
     942 *
     943 * @param unknown_type $post_id
     944 * @return unknown
     945 */
    741946function wp_set_post_lock( $post_id ) {
    742947    global $current_user;
     
    755960
    756961/**
    757  * wp_create_post_autosave() - creates autosave data for the specified post from $_POST data
     962 * Creates autosave data for the specified post from $_POST data.
    758963 *
    759964 * @package WordPress
    760  * @subpackage Post Revisions
    761  * @since 2.6
     965 * @subpackage Post_Revisions
     966 * @since 2.6.0
    762967 *
    763968 * @uses _wp_translate_postdata()
     
    781986
    782987/**
    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.
    784989 *
    785990 * @package WordPress
    786  * @since 2.6
     991 * @since 2.6.0
    787992 */
    788993function wp_teeny_mce( $args = null ) {
Note: See TracChangeset for help on using the changeset viewer.