mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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. Built from https://develop.svn.wordpress.org/trunk@35169 git-svn-id: http://core.svn.wordpress.org/trunk@35135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c78ee60edd
commit
43c10f7d35
@ -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
|
||||
*
|
||||
* @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.
|
||||
*/
|
||||
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
|
||||
*
|
||||
* @return stdClass Default link
|
||||
* @return stdClass Default link object.
|
||||
*/
|
||||
function get_default_link_to_edit() {
|
||||
$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
|
||||
*
|
||||
* @global wpdb $wpdb
|
||||
* @global wpdb $wpdb WordPress database abstraction object.
|
||||
*
|
||||
* @param int $link_id ID of the link to delete
|
||||
* @return true
|
||||
* @return true Always true.
|
||||
*/
|
||||
function wp_delete_link( $link_id ) {
|
||||
global $wpdb;
|
||||
@ -98,6 +98,7 @@ function wp_delete_link( $link_id ) {
|
||||
wp_delete_object_term_relationships( $link_id, 'link_category' );
|
||||
|
||||
$wpdb->delete( $wpdb->links, array( 'link_id' => $link_id ) );
|
||||
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
* @param int $link_id ID of link to retrieve
|
||||
* @return object Link for editing
|
||||
* @param int $link_id ID of link to retrieve.
|
||||
* @return object Link object for editing.
|
||||
*/
|
||||
function get_link_to_edit( $link_id ) {
|
||||
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
|
||||
*
|
||||
* @global wpdb $wpdb
|
||||
* @global wpdb $wpdb WordPress database abstraction object.
|
||||
*
|
||||
* @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.
|
||||
*/
|
||||
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_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 ) ) {
|
||||
$link_category = array( get_option( 'default_link_category' ) );
|
||||
}
|
||||
@ -243,8 +244,8 @@ function wp_insert_link( $linkdata, $wp_error = false ) {
|
||||
*
|
||||
* @since 2.1.0
|
||||
*
|
||||
* @param int $link_id ID of link to update
|
||||
* @param array $link_categories Array of categories to
|
||||
* @param int $link_id ID of the link to update.
|
||||
* @param array $link_categories Array of link categories to add the link to.
|
||||
*/
|
||||
function wp_set_link_cats( $link_id = 0, $link_categories = array() ) {
|
||||
// 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
|
||||
*
|
||||
@ -290,6 +291,8 @@ function wp_update_link( $linkdata ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs the 'disabled' message for the WordPress Link Manager.
|
||||
*
|
||||
* @since 3.5.0
|
||||
* @access private
|
||||
*
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-alpha-35168';
|
||||
$wp_version = '4.4-alpha-35169';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user