Make WordPress Core


Ignore:
Timestamp:
10/26/2013 04:52:48 PM (11 years ago)
Author:
DrewAPicture
Message:

Inline documentation for hooks in wp-includes/bookmark.php.

Props ShinichiN, kpdesign.
Fixes #25468.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/bookmark.php

    r24875 r25934  
    137137    if ( $cache = wp_cache_get( 'get_bookmarks', 'bookmark' ) ) {
    138138        if ( is_array($cache) && isset( $cache[ $key ] ) )
    139             return apply_filters('get_bookmarks', $cache[ $key ], $r );
     139            $bookmarks = $cache[ $key ];
     140            /**
     141             * Filter the returned list of bookmarks.
     142             *
     143             * The first time the hook is evaluated in this file, it returns the cached
     144             * bookmarks list. The second evaluation returns a cached bookmarks list if the
     145             * link category is passed but does not exist. The third evaluation returns
     146             * the full cached results.
     147             *
     148             * @since 2.1.0
     149             *
     150             * @see get_bookmarks()
     151             *
     152             * @param array $bookmarks List of the cached bookmarks.
     153             * @param array $r         An array of bookmark query arguments.
     154             */
     155            return apply_filters( 'get_bookmarks', $bookmarks, $r );
    140156    }
    141157
     
    182198            $cache[ $key ] = array();
    183199            wp_cache_set( 'get_bookmarks', $cache, 'bookmark' );
     200            /** This filter is documented in wp-includes/bookmark.php */
    184201            return apply_filters( 'get_bookmarks', array(), $r );
    185202        }
     
    264281    wp_cache_set( 'get_bookmarks', $cache, 'bookmark' );
    265282
    266     return apply_filters('get_bookmarks', $results, $r);
     283    /** This filter is documented in wp-includes/bookmark.php */
     284    return apply_filters( 'get_bookmarks', $results, $r );
    267285}
    268286
     
    353371
    354372    if ( 'edit' == $context ) {
    355         $value = apply_filters("edit_$field", $value, $bookmark_id);
     373        /** This filter is documented in wp-includes/post.php */
     374        $value = apply_filters( "edit_$field", $value, $bookmark_id );
    356375
    357376        if ( 'link_notes' == $field ) {
     
    361380        }
    362381    } else if ( 'db' == $context ) {
    363         $value = apply_filters("pre_$field", $value);
     382        /** This filter is documented in wp-includes/post.php */
     383        $value = apply_filters( "pre_$field", $value );
    364384    } else {
    365         // Use display filters by default.
    366         $value = apply_filters($field, $value, $bookmark_id, $context);
     385        /** This filter is documented in wp-includes/post.php */
     386        $value = apply_filters( $field, $value, $bookmark_id, $context );
    367387
    368388        if ( 'attribute' == $context )
Note: See TracChangeset for help on using the changeset viewer.