Changeset 12483
- Timestamp:
- 12/22/2009 12:25:15 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/post.php
r12375 r12483 214 214 215 215 /** 216 * {@internal Missing Short Description}}216 * Process the post data for the bulk editing of posts. 217 217 * 218 218 * Updates all bulk edited posts/pages, adding (but not removing) tags and 219 219 * categories. Skips pages when they would be their own parent or child. 220 220 * 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. 223 224 * @return array 224 225 */ … … 324 325 * @since unknown 325 326 * 326 * @return unknown327 * @return object stdClass object containing all the default post data as attributes 327 328 */ 328 329 function get_default_post_to_edit() { … … 365 366 366 367 /** 367 * {@internal Missing Short Description}}368 * 369 * @since unknown370 * 371 * @return unknown368 * 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 372 373 */ 373 374 function get_default_page_to_edit() { … … 739 740 $attachment['post_parent'] = $post_ID; 740 741 // 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 ); 743 744 } 744 745 … … 790 791 791 792 /** 792 * {@internal Missing Short Description}}793 * 794 * @since unknown795 * 796 * @param unknown_type $type797 * @return unknown793 * 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 798 799 */ 799 800 function get_available_post_statuses($type = 'post') { … … 804 805 805 806 /** 806 * {@internal Missing Short Description}}807 * 808 * @since unknown809 * 810 * @param unknown_type $q811 * @return unknown807 * 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 812 813 */ 813 814 function wp_edit_posts_query( $q = false ) { 814 815 if ( false === $q ) 815 816 $q = $_GET; 816 $q['m'] 817 $q['m'] = isset($q['m']) ? (int) $q['m'] : 0; 817 818 $q['cat'] = isset($q['cat']) ? (int) $q['cat'] : 0; 818 819 $post_stati = array( // array( adj, noun ) … … 923 924 * {@internal Missing Short Description}} 924 925 * 926 * @uses get_user_option() 925 927 * @since unknown 926 928 * … … 934 936 $current_user = wp_get_current_user(); 935 937 if ( $closed = get_user_option('closedpostboxes_'.$page, 0, false ) ) { 936 if ( !is_array( $closed ) ) return ''; 938 if ( !is_array( $closed ) ) { 939 return ''; 940 } 937 941 return in_array( $id, $closed )? 'closed' : ''; 938 942 } else { … … 953 957 function get_sample_permalink($id, $title = null, $name = null) { 954 958 $post = &get_post($id); 955 if ( !$post->ID) {959 if ( !$post->ID ) { 956 960 return array('', ''); 957 961 } … … 962 966 // Hack: get_permalink would return ugly permalink for 963 967 // 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')) ) { 965 969 $post->post_status = 'publish'; 966 970 $post->post_name = sanitize_title($post->post_name ? $post->post_name : $post->post_title, $post->ID); … … 971 975 // If the user wants to set a new name -- override the current one 972 976 // Note: if empty name is supplied -- use the title instead, see #6072 973 if ( !is_null($name)) {977 if ( !is_null($name) ) { 974 978 $post->post_name = sanitize_title($name ? $name : $title, $post->ID); 975 979 } … … 1173 1177 * @uses _wp_translate_postdata() 1174 1178 * @uses _wp_post_revision_fields() 1179 * 1180 * @return unknown 1175 1181 */ 1176 1182 function wp_create_post_autosave( $post_id ) { … … 1199 1205 * 1200 1206 * @package WordPress 1201 * @since 2.7 1207 * @since 2.7.0 1202 1208 * 1203 1209 * @uses wp_write_post() … … 1260 1266 * 1261 1267 * @package WordPress 1262 * @since 2.7 1268 * @since 2.7.0 1263 1269 * 1264 1270 * 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.