Make WordPress Core

Changeset 12483


Ignore:
Timestamp:
12/22/2009 12:25:15 PM (14 years ago)
Author:
westi
Message:

Updated phpDoc for wp-admin/includes/post.php . Fixes #11198 based on a patch from Simek.

File:
1 edited

Legend:

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

    r12375 r12483  
    214214
    215215/**
    216  * {@internal Missing Short Description}}
     216 * Process the post data for the bulk editing of posts.
    217217 *
    218218 * Updates all bulk edited posts/pages, adding (but not removing) tags and
    219219 * categories. Skips pages when they would be their own parent or child.
    220220 *
    221  * @since unknown
    222  *
     221 * @since 2.7.0
     222 *
     223 * @param array $post_data Optional, the array of post data to process if not provided will use $_POST superglobal.
    223224 * @return array
    224225 */
     
    324325 * @since unknown
    325326 *
    326  * @return unknown
     327 * @return object stdClass object containing all the default post data as attributes
    327328 */
    328329function get_default_post_to_edit() {
     
    365366
    366367/**
    367  * {@internal Missing Short Description}}
    368  *
    369  * @since unknown
    370  *
    371  * @return unknown
     368 * Get the default page information to use.
     369 *
     370 * @since 2.5.0
     371 *
     372 * @return object stdClass object containing all the default post data as attributes
    372373 */
    373374function get_default_page_to_edit() {
     
    739740            $attachment['post_parent'] = $post_ID;
    740741            // Escape data pulled from DB.
    741             $attachment = add_magic_quotes( $attachment);
    742             wp_update_post( $attachment);
     742            $attachment = add_magic_quotes( $attachment );
     743            wp_update_post( $attachment );
    743744        }
    744745
     
    790791
    791792/**
    792  * {@internal Missing Short Description}}
    793  *
    794  * @since unknown
    795  *
    796  * @param unknown_type $type
    797  * @return unknown
     793 * Get all the possible statuses for a post_type
     794 *
     795 * @since 2.5.0
     796 *
     797 * @param string $type The post_type you want the statuses for
     798 * @return array As array of all the statuses for the supplied post type
    798799 */
    799800function get_available_post_statuses($type = 'post') {
     
    804805
    805806/**
    806  * {@internal Missing Short Description}}
    807  *
    808  * @since unknown
    809  *
    810  * @param unknown_type $q
    811  * @return unknown
     807 * Run the wp query to fetch the posts for listing on the edit posts page
     808 *
     809 * @since 2.5.0
     810 *
     811 * @param array|bool $q Array of query variables to use to build the query or false to use $_GET superglobal.
     812 * @return array
    812813 */
    813814function wp_edit_posts_query( $q = false ) {
    814815    if ( false === $q )
    815816        $q = $_GET;
    816     $q['m']   = isset($q['m']) ? (int) $q['m'] : 0;
     817    $q['m'] = isset($q['m']) ? (int) $q['m'] : 0;
    817818    $q['cat'] = isset($q['cat']) ? (int) $q['cat'] : 0;
    818819    $post_stati  = array(   //  array( adj, noun )
     
    923924 * {@internal Missing Short Description}}
    924925 *
     926 * @uses get_user_option()
    925927 * @since unknown
    926928 *
     
    934936    $current_user = wp_get_current_user();
    935937    if ( $closed = get_user_option('closedpostboxes_'.$page, 0, false ) ) {
    936         if ( !is_array( $closed ) ) return '';
     938        if ( !is_array( $closed ) ) {
     939            return '';
     940        }
    937941        return in_array( $id, $closed )? 'closed' : '';
    938942    } else {
     
    953957function get_sample_permalink($id, $title = null, $name = null) {
    954958    $post = &get_post($id);
    955     if (!$post->ID) {
     959    if ( !$post->ID ) {
    956960        return array('', '');
    957961    }
     
    962966    // Hack: get_permalink would return ugly permalink for
    963967    // drafts, so we will fake, that our post is published
    964     if (in_array($post->post_status, array('draft', 'pending'))) {
     968    if ( in_array($post->post_status, array('draft', 'pending')) ) {
    965969        $post->post_status = 'publish';
    966970        $post->post_name = sanitize_title($post->post_name ? $post->post_name : $post->post_title, $post->ID);
     
    971975    // If the user wants to set a new name -- override the current one
    972976    // Note: if empty name is supplied -- use the title instead, see #6072
    973     if (!is_null($name)) {
     977    if ( !is_null($name) ) {
    974978        $post->post_name = sanitize_title($name ? $name : $title, $post->ID);
    975979    }
     
    11731177 * @uses _wp_translate_postdata()
    11741178 * @uses _wp_post_revision_fields()
     1179 *
     1180 * @return unknown
    11751181 */
    11761182function wp_create_post_autosave( $post_id ) {
     
    11991205 *
    12001206 * @package WordPress
    1201  * @since 2.7
     1207 * @since 2.7.0
    12021208 *
    12031209 * @uses wp_write_post()
     
    12601266 *
    12611267 * @package WordPress
    1262  * @since 2.7
     1268 * @since 2.7.0
    12631269 *
    12641270 * TinyMCE is loaded separately from other Javascript by using wp-tinymce.php. It outputs concatenated
Note: See TracChangeset for help on using the changeset viewer.