Changeset 35169 for trunk/src/wp-admin/includes/bookmark.php
- Timestamp:
- 10/14/2015 11:24:46 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/bookmark.php
r33887 r35169 19 19 20 20 /** 21 * Update or inserta 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. 21 * Updates or inserts 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. Default 0. 26 26 * @return int|WP_Error Value 0 or WP_Error on failure. The link ID on success. 27 27 */ … … 52 52 53 53 /** 54 * Retrieve the default link for editing.55 * 56 * @since 2.0.0 57 * 58 * @return stdClass Default link 54 * Retrieves the default link for editing. 55 * 56 * @since 2.0.0 57 * 58 * @return stdClass Default link object. 59 59 */ 60 60 function get_default_link_to_edit() { … … 76 76 77 77 /** 78 * Delete link specified fromdatabase.79 * 80 * @since 2.0.0 81 * 82 * @global wpdb $wpdb 78 * Deletes a specified link from the database. 79 * 80 * @since 2.0.0 81 * 82 * @global wpdb $wpdb WordPress database abstraction object. 83 83 * 84 84 * @param int $link_id ID of the link to delete 85 * @return true 85 * @return true Always true. 86 86 */ 87 87 function wp_delete_link( $link_id ) { … … 99 99 100 100 $wpdb->delete( $wpdb->links, array( 'link_id' => $link_id ) ); 101 101 102 /** 102 103 * Fires after a link has been deleted. … … 127 128 128 129 /** 129 * Retrieve link data based onID.130 * 131 * @since 2.0.0 132 * 133 * @param int $link_id ID of link to retrieve 134 * @return object Link for editing130 * Retrieves link data based on its ID. 131 * 132 * @since 2.0.0 133 * 134 * @param int $link_id ID of link to retrieve. 135 * @return object Link object for editing. 135 136 */ 136 137 function get_link_to_edit( $link_id ) { … … 139 140 140 141 /** 141 * This function inserts/updates links into/in the database.142 * 143 * @since 2.0.0 144 * 145 * @global wpdb $wpdb 142 * Inserts/updates links into/in the database. 143 * 144 * @since 2.0.0 145 * 146 * @global wpdb $wpdb WordPress database abstraction object. 146 147 * 147 148 * @param array $linkdata Elements that make up the link to insert. 148 * @param bool $wp_error Optional. If true return WP_Error object on failure.149 * @param bool $wp_error Optional. Whether to return a WP_Error object on failure. Default false. 149 150 * @return int|WP_Error Value 0 or WP_Error on failure. The link ID on success. 150 151 */ … … 189 190 $link_category = ( ! empty( $r['link_category'] ) ) ? $r['link_category'] : array(); 190 191 191 // Make sure we set a valid category 192 // Make sure we set a valid category. 192 193 if ( ! is_array( $link_category ) || 0 == count( $link_category ) ) { 193 194 $link_category = array( get_option( 'default_link_category' ) ); … … 244 245 * @since 2.1.0 245 246 * 246 * @param int $link_id ID of link to update247 * @param array $link_categories Array of categories to247 * @param int $link_id ID of the link to update. 248 * @param array $link_categories Array of link categories to add the link to. 248 249 */ 249 250 function wp_set_link_cats( $link_id = 0, $link_categories = array() ) { … … 261 262 262 263 /** 263 * Update a link in the database.264 * Updates a link in the database. 264 265 * 265 266 * @since 2.0.0 … … 291 292 292 293 /** 294 * Outputs the 'disabled' message for the WordPress Link Manager. 295 * 293 296 * @since 3.5.0 294 297 * @access private
Note: See TracChangeset
for help on using the changeset viewer.