Docs: Fix third-person singular verbs for summaries in wp-admin/includes/bookmarks.php.

Also adds some missing parameter, return, and global descriptions, and one missing summary.

See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@35169 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Drew Jaynes 2015-10-14 23:24:46 +00:00
parent c163beb1db
commit 68a3c0cc73

View File

@ -18,11 +18,11 @@ function add_link() {
} }
/** /**
* Update or insert a link using values provided in $_POST. * Updates or inserts a link using values provided in $_POST.
* *
* @since 2.0.0 * @since 2.0.0
* *
* @param int $link_id Optional. ID of the link to edit. * @param int $link_id Optional. ID of the link to edit. Default 0.
* @return int|WP_Error Value 0 or WP_Error on failure. The link ID on success. * @return int|WP_Error Value 0 or WP_Error on failure. The link ID on success.
*/ */
function edit_link( $link_id = 0 ) { function edit_link( $link_id = 0 ) {
@ -51,11 +51,11 @@ function edit_link( $link_id = 0 ) {
} }
/** /**
* Retrieve the default link for editing. * Retrieves the default link for editing.
* *
* @since 2.0.0 * @since 2.0.0
* *
* @return stdClass Default link * @return stdClass Default link object.
*/ */
function get_default_link_to_edit() { function get_default_link_to_edit() {
$link = new stdClass; $link = new stdClass;
@ -75,14 +75,14 @@ function get_default_link_to_edit() {
} }
/** /**
* Delete link specified from database. * Deletes a specified link from the database.
* *
* @since 2.0.0 * @since 2.0.0
* *
* @global wpdb $wpdb * @global wpdb $wpdb WordPress database abstraction object.
* *
* @param int $link_id ID of the link to delete * @param int $link_id ID of the link to delete
* @return true * @return true Always true.
*/ */
function wp_delete_link( $link_id ) { function wp_delete_link( $link_id ) {
global $wpdb; global $wpdb;
@ -98,6 +98,7 @@ function wp_delete_link( $link_id ) {
wp_delete_object_term_relationships( $link_id, 'link_category' ); wp_delete_object_term_relationships( $link_id, 'link_category' );
$wpdb->delete( $wpdb->links, array( 'link_id' => $link_id ) ); $wpdb->delete( $wpdb->links, array( 'link_id' => $link_id ) );
/** /**
* Fires after a link has been deleted. * Fires after a link has been deleted.
* *
@ -126,26 +127,26 @@ function wp_get_link_cats( $link_id = 0 ) {
} }
/** /**
* Retrieve link data based on ID. * Retrieves link data based on its ID.
* *
* @since 2.0.0 * @since 2.0.0
* *
* @param int $link_id ID of link to retrieve * @param int $link_id ID of link to retrieve.
* @return object Link for editing * @return object Link object for editing.
*/ */
function get_link_to_edit( $link_id ) { function get_link_to_edit( $link_id ) {
return get_bookmark( $link_id, OBJECT, 'edit' ); return get_bookmark( $link_id, OBJECT, 'edit' );
} }
/** /**
* This function inserts/updates links into/in the database. * Inserts/updates links into/in the database.
* *
* @since 2.0.0 * @since 2.0.0
* *
* @global wpdb $wpdb * @global wpdb $wpdb WordPress database abstraction object.
* *
* @param array $linkdata Elements that make up the link to insert. * @param array $linkdata Elements that make up the link to insert.
* @param bool $wp_error Optional. If true return WP_Error object on failure. * @param bool $wp_error Optional. Whether to return a WP_Error object on failure. Default false.
* @return int|WP_Error Value 0 or WP_Error on failure. The link ID on success. * @return int|WP_Error Value 0 or WP_Error on failure. The link ID on success.
*/ */
function wp_insert_link( $linkdata, $wp_error = false ) { function wp_insert_link( $linkdata, $wp_error = false ) {
@ -188,7 +189,7 @@ function wp_insert_link( $linkdata, $wp_error = false ) {
$link_rel = ( ! empty( $r['link_rel'] ) ) ? $r['link_rel'] : ''; $link_rel = ( ! empty( $r['link_rel'] ) ) ? $r['link_rel'] : '';
$link_category = ( ! empty( $r['link_category'] ) ) ? $r['link_category'] : array(); $link_category = ( ! empty( $r['link_category'] ) ) ? $r['link_category'] : array();
// Make sure we set a valid category // Make sure we set a valid category.
if ( ! is_array( $link_category ) || 0 == count( $link_category ) ) { if ( ! is_array( $link_category ) || 0 == count( $link_category ) ) {
$link_category = array( get_option( 'default_link_category' ) ); $link_category = array( get_option( 'default_link_category' ) );
} }
@ -243,8 +244,8 @@ function wp_insert_link( $linkdata, $wp_error = false ) {
* *
* @since 2.1.0 * @since 2.1.0
* *
* @param int $link_id ID of link to update * @param int $link_id ID of the link to update.
* @param array $link_categories Array of categories to * @param array $link_categories Array of link categories to add the link to.
*/ */
function wp_set_link_cats( $link_id = 0, $link_categories = array() ) { function wp_set_link_cats( $link_id = 0, $link_categories = array() ) {
// If $link_categories isn't already an array, make it one: // If $link_categories isn't already an array, make it one:
@ -260,7 +261,7 @@ function wp_set_link_cats( $link_id = 0, $link_categories = array() ) {
} }
/** /**
* Update a link in the database. * Updates a link in the database.
* *
* @since 2.0.0 * @since 2.0.0
* *
@ -290,6 +291,8 @@ function wp_update_link( $linkdata ) {
} }
/** /**
* Outputs the 'disabled' message for the WordPress Link Manager.
*
* @since 3.5.0 * @since 3.5.0
* @access private * @access private
* *