Changeset 15564
- Timestamp:
- 09/05/2010 02:45:39 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-ajax.php
r15528 r15564 10 10 * Executing AJAX process. 11 11 * 12 * @since unknown12 * @since 2.1.0 13 13 */ 14 14 define('DOING_AJAX', true); -
trunk/wp-admin/custom-background.php
r15231 r15564 312 312 313 313 /** 314 * Handle a Image upload for the background image.314 * Handle an Image upload for the background image. 315 315 * 316 316 * @since 3.0.0 -
trunk/wp-admin/includes/bookmark.php
r15315 r15564 8 8 9 9 /** 10 * {@internal Missing Short Description}}11 * 12 * @since unknown13 * 14 * @return unknown10 * Add a link to using values provided in $_POST. 11 * 12 * @since 2.0.0 13 * 14 * @return int|WP_Error Value 0 or WP_Error on failure. The link ID on success. 15 15 */ 16 16 function add_link() { … … 19 19 20 20 /** 21 * {@internal Missing Short Description}}22 * 23 * @since unknown24 * 25 * @param unknown_type $link_id26 * @return unknown27 */ 28 function edit_link( $link_id = '') {29 if ( !current_user_can( 'manage_links' ))30 wp_die( __( 'Cheatin’ uh?' ) );21 * Update or insert a link using values provided in $_POST. 22 * 23 * @since 2.0.0 24 * 25 * @param int $link_id Optional. ID of the link to edit. 26 * @return int|WP_Error Value 0 or WP_Error on failure. The link ID on success. 27 */ 28 function edit_link( $link_id = 0 ) { 29 if ( !current_user_can( 'manage_links' ) ) 30 wp_die( __( 'Cheatin’ uh?' ) ); 31 31 32 32 $_POST['link_url'] = esc_html( $_POST['link_url'] ); … … 40 40 if ( !empty( $link_id ) ) { 41 41 $_POST['link_id'] = $link_id; 42 return wp_update_link( $_POST );42 return wp_update_link( $_POST ); 43 43 } else { 44 return wp_insert_link( $_POST );45 } 46 } 47 48 /** 49 * {@internal Missing Short Description}}50 * 51 * @since unknown52 * 53 * @return unknown44 return wp_insert_link( $_POST ); 45 } 46 } 47 48 /** 49 * Retrieve the default link for editing. 50 * 51 * @since 2.0.0 52 * 53 * @return object Default link 54 54 */ 55 55 function get_default_link_to_edit() { 56 56 if ( isset( $_GET['linkurl'] ) ) 57 $link->link_url = esc_url( $_GET['linkurl'] );57 $link->link_url = esc_url( $_GET['linkurl'] ); 58 58 else 59 59 $link->link_url = ''; 60 60 61 61 if ( isset( $_GET['name'] ) ) 62 $link->link_name = esc_attr( $_GET['name'] );62 $link->link_name = esc_attr( $_GET['name'] ); 63 63 else 64 64 $link->link_name = ''; … … 70 70 71 71 /** 72 * {@internal Missing Short Description}}73 * 74 * @since unknown75 * 76 * @param unknown_type $link_id77 * @return unknown72 * Delete link specified from database 73 * 74 * @since 2.0.0 75 * 76 * @param int $link_id ID of the link to delete 77 * @return bool True 78 78 */ 79 79 function wp_delete_link( $link_id ) { … … 94 94 95 95 /** 96 * {@internal Missing Short Description}}97 * 98 * @since unknown99 * 100 * @param unknown_type $link_id101 * @return unknown96 * Retrieves the link categories associated with the link specified. 97 * 98 * @since 2.1.0 99 * 100 * @param int $link_id Link ID to look up 101 * @return array The requested link's categories 102 102 */ 103 103 function wp_get_link_cats( $link_id = 0 ) { … … 109 109 110 110 /** 111 * {@internal Missing Short Description}}112 * 113 * @since unknown114 * 115 * @param unknown_type $link_id116 * @return unknown111 * Retrieve link data based on ID. 112 * 113 * @since 2.0.0 114 * 115 * @param int $link_id ID of link to retrieve 116 * @return object Link for editing 117 117 */ 118 118 function get_link_to_edit( $link_id ) { … … 121 121 122 122 /** 123 * {@internal Missing Short Description}} 124 * 125 * @since unknown 126 * 127 * @param unknown_type $linkdata 128 * @return unknown 123 * This function inserts/updates links into/in the database. 124 * 125 * @since 2.0.0 126 * 127 * @param array $linkdata Elements that make up the link to insert. 128 * @param bool $wp_error Optional. If true return WP_Error object on failure. 129 * @return int|WP_Error Value 0 or WP_Error on failure. The link ID on success. 129 130 */ 130 131 function wp_insert_link( $linkdata, $wp_error = false ) { … … 182 183 183 184 // Make sure we set a valid category 184 if ( ! isset( $link_category ) || 0 == count( $link_category ) || !is_array( $link_category ) ) {185 if ( ! isset( $link_category ) || 0 == count( $link_category ) || !is_array( $link_category ) ) { 185 186 $link_category = array( get_option( 'default_link_category' ) ); 186 187 } … … 216 217 217 218 /** 218 * {@internal Missing Short Description}}219 * 220 * @since unknown221 * 222 * @param unknown_type $link_id223 * @param unknown_type $link_categories219 * Update link with the specified link categories. 220 * 221 * @since 2.1.0 222 * 223 * @param int $link_id ID of link to update 224 * @param array $link_categories Array of categories to 224 225 */ 225 226 function wp_set_link_cats( $link_id = 0, $link_categories = array() ) { … … 234 235 235 236 clean_bookmark_cache( $link_id ); 236 } // wp_set_link_cats()237 238 /** 239 * {@internal Missing Short Description}}240 * 241 * @since unknown242 * 243 * @param unknown_type $linkdata244 * @return unknown237 } 238 239 /** 240 * Update a link in the database. 241 * 242 * @since 2.0.0 243 * 244 * @param array $linkdata Link data to update. 245 * @return int|WP_Error Value 0 or WP_Error on failure. The updated link ID on success. 245 246 */ 246 247 function wp_update_link( $linkdata ) { -
trunk/wp-admin/includes/comment.php
r15512 r15564 10 10 * {@internal Missing Short Description}} 11 11 * 12 * @since unknown12 * @since 2.0.0 13 13 * @uses $wpdb 14 14 * 15 * @param string $comment_author 16 * @param string $comment_date 15 * @param string $comment_author Author of the comment 16 * @param string $comment_date Date of the comment 17 17 * @return mixed Comment ID on success. 18 18 */ … … 28 28 29 29 /** 30 * {@internal Missing Short Description}}30 * Update a comment with values provided in $_POST. 31 31 * 32 * @since unknown32 * @since 2.0.0 33 33 */ 34 34 function edit_comment() { 35 36 35 $comment_post_ID = (int) $_POST['comment_post_ID']; 37 36 38 37 if (!current_user_can( 'edit_post', $comment_post_ID )) 39 wp_die( __('You are not allowed to edit comments on this post, so you cannot edit this comment.' ) );38 wp_die( __('You are not allowed to edit comments on this post, so you cannot edit this comment.' ) ); 40 39 41 40 $_POST['comment_author'] = $_POST['newcomment_author']; … … 53 52 } 54 53 55 if ( !empty ( $_POST['edit_date'] ) ) {54 if ( !empty ( $_POST['edit_date'] ) ) { 56 55 $aa = $_POST['aa']; 57 56 $mm = $_POST['mm']; … … 67 66 } 68 67 69 wp_update_comment( $_POST );68 wp_update_comment( $_POST ); 70 69 } 71 70 … … 73 72 * {@internal Missing Short Description}} 74 73 * 75 * @since unknown74 * @since 2.0.0 76 75 * 77 * @param unknown_type $id78 * @return unknown76 * @param int $id ID of comment to retrieve 77 * @return bool|object Comment if found. False on failure. 79 78 */ 80 79 function get_comment_to_edit( $id ) { … … 99 98 * Get the number of pending comments on a post or posts 100 99 * 101 * @since unknown100 * @since 2.3.0 102 101 * @uses $wpdb 103 102 * -
trunk/wp-admin/includes/dashboard.php
r15487 r15564 10 10 * Registers dashboard widgets. 11 11 * 12 * handles POST data, sets up filters.13 * 14 * @since unknown12 * Handles POST data, sets up filters. 13 * 14 * @since 2.5.0 15 15 */ 16 16 function wp_dashboard_setup() { … … 151 151 * Displays the dashboard. 152 152 * 153 * @since unknown153 * @since 2.5.0 154 154 */ 155 155 function wp_dashboard() { … … 518 518 * Display recent comments dashboard widget content. 519 519 * 520 * @since unknown520 * @since 2.5.0 521 521 */ 522 522 function wp_dashboard_recent_comments() { … … 704 704 * Display incoming links dashboard widget content. 705 705 * 706 * @since unknown706 * @since 2.5.0 707 707 */ 708 708 function wp_dashboard_incoming_links_output() { … … 796 796 * {@internal Missing Short Description}} 797 797 * 798 * @since unknown799 * 800 * @param int$widget_id798 * @since 2.5.0 799 * 800 * @param string $widget_id 801 801 */ 802 802 function wp_dashboard_rss_output( $widget_id ) { … … 818 818 * Display secondary dashboard RSS widget feed. 819 819 * 820 * @since unknown820 * @since 2.5.0 821 821 * 822 822 * @return unknown … … 853 853 * Display plugins most popular, newest plugins, and recently updated widget text. 854 854 * 855 * @since unknown855 * @since 2.5.0 856 856 */ 857 857 function wp_dashboard_plugins_output() { … … 939 939 * which is later replaced by AJAX call (see top of /wp-admin/index.php) 940 940 * 941 * @since unknown942 * 943 * @param int$widget_id941 * @since 2.5.0 942 * 943 * @param string $widget_id 944 944 * @param callback $callback 945 945 * @param array $check_urls RSS feeds … … 982 982 * Calls widget control callback. 983 983 * 984 * @since unknown984 * @since 2.5.0 985 985 * 986 986 * @param int $widget_control_id Registered Widget ID. … … 1000 1000 * from RSS-type widgets. 1001 1001 * 1002 * @since unknown1003 * 1004 * @param string widget_id1005 * @param array form_inputs1002 * @since 2.5.0 1003 * 1004 * @param string $widget_id 1005 * @param array $form_inputs 1006 1006 */ 1007 1007 function wp_dashboard_rss_control( $widget_id, $form_inputs = array() ) { -
trunk/wp-includes/general-template.php
r15460 r15564 382 382 * The possible values for the 'show' parameter are listed below. 383 383 * <ol> 384 * <li><strong>url< strong> - Blog URI to homepage.</li>384 * <li><strong>url</strong> - Blog URI to homepage.</li> 385 385 * <li><strong>wpurl</strong> - Blog URI path to WordPress.</li> 386 386 * <li><strong>description</strong> - Secondary title</li> … … 1319 1319 * Will only output the date if the current post's date is different from the 1320 1320 * previous one output. 1321 1321 * 1322 1322 * i.e. Only one date listing will show per day worth of posts shown in the loop, even if the 1323 1323 * function is called several times for each post. -
trunk/wp-includes/post.php
r15563 r15564 2126 2126 * 2127 2127 * @since 1.0.0 2128 * @link http://core.trac.wordpress.org/ticket/9084 Bug report on 'wp_insert_post_data' filter.2129 2128 * @uses $wpdb 2130 2129 * @uses $wp_rewrite 2131 2130 * @uses $user_ID 2132 *2133 2131 * @uses do_action() Calls 'pre_post_update' on post ID if this is an update. 2134 2132 * @uses do_action() Calls 'edit_post' action on post ID and post data if this is an update. 2135 * @uses do_action() Calls 'save_post' and 'wp_insert_post' on post id and post data just before 2136 * returning. 2137 * 2138 * @uses apply_filters() Calls 'wp_insert_post_data' passing $data, $postarr prior to database 2139 * update or insert. 2133 * @uses do_action() Calls 'save_post' and 'wp_insert_post' on post id and post data just before returning. 2134 * @uses apply_filters() Calls 'wp_insert_post_data' passing $data, $postarr prior to database update or insert. 2140 2135 * @uses wp_transition_post_status() 2141 2136 * 2142 * @param array $postarr Optional. Overrides defaults.2137 * @param array $postarr Elements that make up post to insert. 2143 2138 * @param bool $wp_error Optional. Allow return of WP_Error on failure. 2144 2139 * @return int|WP_Error The value 0 or WP_Error on failure. The post ID on success. 2145 2140 */ 2146 function wp_insert_post($postarr = array(), $wp_error = false) {2141 function wp_insert_post($postarr, $wp_error = false) { 2147 2142 global $wpdb, $wp_rewrite, $user_ID; 2148 2143 -
trunk/wp-includes/wp-db.php
r15537 r15564 49 49 * @subpackage Database 50 50 * @since 0.71 51 * @final52 51 */ 53 52 class wpdb {
Note: See TracChangeset
for help on using the changeset viewer.