Ticket #14783: since-tags.diff
| File since-tags.diff, 9.8 KB (added by duck_, 3 years ago) |
|---|
-
wp-admin/includes/bookmark.php
7 7 */ 8 8 9 9 /** 10 * {@internal Missing Short Description}}10 * Add a link to using values provided in $_POST. 11 11 * 12 * @since unknown12 * @since 2.0.0 13 13 * 14 * @return unknown14 * @return int|WP_Error Value 0 or WP_Error on failure. The link ID on success. 15 15 */ 16 16 function add_link() { 17 17 return edit_link(); 18 18 } 19 19 20 20 /** 21 * {@internal Missing Short Description}}21 * Update or insert a link using values provided in $_POST. 22 22 * 23 * @since unknown23 * @since 2.0.0 24 24 * 25 * @param unknown_type $link_id26 * @return unknown25 * @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 27 */ 28 function edit_link( $link_id = '') {29 if ( !current_user_can( 'manage_links' ))30 wp_die( __( 'Cheatin’ uh?' ) );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'] ); 33 33 $_POST['link_url'] = esc_url($_POST['link_url']); … … 39 39 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 );44 return wp_insert_link( $_POST ); 45 45 } 46 46 } 47 47 48 48 /** 49 * {@internal Missing Short Description}}49 * Retrieve the default link for editing. 50 50 * 51 * @since unknown51 * @since 2.0.0 52 52 * 53 * @return unknown53 * @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 = ''; 65 65 … … 69 69 } 70 70 71 71 /** 72 * {@internal Missing Short Description}}72 * Delete link specified from database 73 73 * 74 * @since unknown74 * @since 2.0.0 75 75 * 76 * @param unknown_type $link_id77 * @return unknown76 * @param int $link_id ID of the link to delete 77 * @return bool True 78 78 */ 79 79 function wp_delete_link( $link_id ) { 80 80 global $wpdb; … … 93 93 } 94 94 95 95 /** 96 * {@internal Missing Short Description}}96 * Retrieves the link categories associated with the link specified. 97 97 * 98 * @since unknown98 * @since 2.1.0 99 99 * 100 * @param unknown_type $link_id101 * @return unknown100 * @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 ) { 104 104 … … 108 108 } 109 109 110 110 /** 111 * {@internal Missing Short Description}}111 * Retrieve link data based on ID. 112 112 * 113 * @since unknown113 * @since 2.0.0 114 114 * 115 * @param unknown_type $link_id116 * @return unknown115 * @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 ) { 119 119 return get_bookmark( $link_id, OBJECT, 'edit' ); 120 120 } 121 121 122 122 /** 123 * {@internal Missing Short Description}}123 * This function inserts/updates links into/in the database. 124 124 * 125 * @since unknown125 * @since 2.0.0 126 126 * 127 * @param unknown_type $linkdata 128 * @return unknown 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 ) { 131 132 global $wpdb; … … 181 182 $link_rel = ''; 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 } 187 188 … … 215 216 } 216 217 217 218 /** 218 * {@internal Missing Short Description}}219 * Update link with the specified link categories. 219 220 * 220 * @since unknown221 * @since 2.1.0 221 222 * 222 * @param unknown_type $link_id223 * @param unknown_type $link_categories223 * @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() ) { 226 227 // If $link_categories isn't already an array, make it one: … … 233 234 wp_set_object_terms( $link_id, $link_categories, 'link_category' ); 234 235 235 236 clean_bookmark_cache( $link_id ); 236 } // wp_set_link_cats()237 } 237 238 238 239 /** 239 * {@internal Missing Short Description}}240 * Update a link in the database. 240 241 * 241 * @since unknown242 * @since 2.0.0 242 243 * 243 * @param unknown_type $linkdata244 * @return unknown244 * @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 ) { 247 248 $link_id = (int) $linkdata['link_id']; -
wp-admin/includes/comment.php
9 9 /** 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 */ 19 19 function comment_exists($comment_author, $comment_date) { … … 27 27 } 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']; 42 41 $_POST['comment_author_email'] = $_POST['newcomment_author_email']; … … 52 51 } 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']; 58 57 $jj = $_POST['jj']; … … 66 65 $_POST['comment_date'] = "$aa-$mm-$jj $hh:$mn:$ss"; 67 66 } 68 67 69 wp_update_comment( $_POST );68 wp_update_comment( $_POST ); 70 69 } 71 70 72 71 /** 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 ) { 81 80 if ( !$comment = get_comment($id) ) … … 98 97 /** 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 * 104 103 * @param int|array $post_id Either a single Post ID or an array of Post IDs -
wp-admin/includes/dashboard.php
9 9 /** 10 10 * Registers dashboard widgets. 11 11 * 12 * handles POST data, sets up filters.12 * Handles POST data, sets up filters. 13 13 * 14 * @since unknown14 * @since 2.5.0 15 15 */ 16 16 function wp_dashboard_setup() { 17 17 global $wp_registered_widgets, $wp_registered_widget_controls, $wp_dashboard_control_callbacks; … … 150 150 /** 151 151 * Displays the dashboard. 152 152 * 153 * @since unknown153 * @since 2.5.0 154 154 */ 155 155 function wp_dashboard() { 156 156 global $screen_layout_columns; … … 517 517 /** 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() { 523 523 global $wpdb; … … 703 703 /** 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() { 709 709 $widgets = get_option( 'dashboard_widget_options' ); … … 795 795 /** 796 796 * {@internal Missing Short Description}} 797 797 * 798 * @since unknown798 * @since 2.5.0 799 799 * 800 * @param int$widget_id800 * @param string $widget_id 801 801 */ 802 802 function wp_dashboard_rss_output( $widget_id ) { 803 803 $widgets = get_option( 'dashboard_widget_options' ); … … 817 817 /** 818 818 * Display secondary dashboard RSS widget feed. 819 819 * 820 * @since unknown820 * @since 2.5.0 821 821 * 822 822 * @return unknown 823 823 */ … … 852 852 /** 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() { 858 858 $popular = fetch_feed( 'http://wordpress.org/extend/plugins/rss/browse/popular/' ); … … 938 938 * echoes out output for this widget. If not cache, echo a "Loading..." stub 939 939 * which is later replaced by AJAX call (see top of /wp-admin/index.php) 940 940 * 941 * @since unknown941 * @since 2.5.0 942 942 * 943 * @param int$widget_id943 * @param string $widget_id 944 944 * @param callback $callback 945 945 * @param array $check_urls RSS feeds 946 946 * @return bool False on failure. True on success. … … 981 981 /** 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. 987 987 */ … … 999 999 * Sets up $args to be used as input to wp_widget_rss_form(). Handles POST data 1000 1000 * from RSS-type widgets. 1001 1001 * 1002 * @since unknown1002 * @since 2.5.0 1003 1003 * 1004 * @param string widget_id1005 * @param array form_inputs1004 * @param string $widget_id 1005 * @param array $form_inputs 1006 1006 */ 1007 1007 function wp_dashboard_rss_control( $widget_id, $form_inputs = array() ) { 1008 1008 if ( !$widget_options = get_option( 'dashboard_widget_options' ) )
