* Retrieve Bookmark data
*
* @since 2.1.0
- * @uses $wpdb Database Object
*
- * @param mixed $bookmark
+ * @global wpdb $wpdb WordPress database abstraction object.
+ *
+ * @param int|stdClass $bookmark
* @param string $output Optional. Either OBJECT, ARRAY_N, or ARRAY_A constant
* @param string $filter Optional, default is 'raw'.
- * @return array|object Type returned depends on $output value.
+ * @return array|object|null Type returned depends on $output value.
*/
function get_bookmark($bookmark, $output = OBJECT, $filter = 'raw') {
global $wpdb;
* Retrieve single bookmark data item or field.
*
* @since 2.3.0
- * @uses get_bookmark() Gets bookmark object using $bookmark as ID
- * @uses sanitize_bookmark_field() Sanitizes Bookmark field based on $context.
*
* @param string $field The name of the data field to return
* @param int $bookmark The bookmark ID to get field
* @param string $context Optional. The context of how the field will be used.
- * @return string
+ * @return string|WP_Error
*/
function get_bookmark_field( $field, $bookmark, $context = 'display' ) {
$bookmark = (int) $bookmark;
*
* @since 2.1.0
*
- * @global wpdb $wpdb WordPress database access abstraction object.
+ * @global wpdb $wpdb WordPress database abstraction object.
*
* @param string|array $args {
* Optional. String or array of arguments to retrieve bookmarks.
break;
default:
$orderparams = array();
- $keys = array( 'link_id', 'link_name', 'link_url', 'link_visible', 'link_rating', 'link_owner', 'link_updated', 'link_notes' );
+ $keys = array( 'link_id', 'link_name', 'link_url', 'link_visible', 'link_rating', 'link_owner', 'link_updated', 'link_notes', 'link_description' );
foreach ( explode( ',', $orderby ) as $ordparam ) {
$ordparam = trim( $ordparam );
} else {
$value = esc_attr($value);
}
- } else if ( 'db' == $context ) {
+ } elseif ( 'db' == $context ) {
/** This filter is documented in wp-includes/post.php */
$value = apply_filters( "pre_$field", $value );
} else {
/** This filter is documented in wp-includes/post.php */
$value = apply_filters( $field, $value, $bookmark_id, $context );
- if ( 'attribute' == $context )
- $value = esc_attr($value);
- else if ( 'js' == $context )
- $value = esc_js($value);
+ if ( 'attribute' == $context ) {
+ $value = esc_attr( $value );
+ } elseif ( 'js' == $context ) {
+ $value = esc_js( $value );
+ }
}
return $value;
* Deletes bookmark cache
*
* @since 2.7.0
- * @uses wp_cache_delete() Deletes the contents of 'get_bookmarks'
*/
function clean_bookmark_cache( $bookmark_id ) {
wp_cache_delete( $bookmark_id, 'bookmark' );