Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/11/2015 11:12:52 PM (11 years ago)
Author:
tw2113
Message:

Initial documentation cleanup for the BP Blogs component.

See #6397.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-blogs/classes/class-bp-blogs-blog.php

    r9819 r10011  
    6767                 * @since BuddyPress (1.0.0)
    6868                 *
    69                  * @param BP_Blogs_Blog Current instance of the blog item being saved. Passed by reference.
     69                 * @param BP_Blogs_Blog $this Current instance of the blog item being saved. Passed by reference.
    7070                 */
    7171                do_action_ref_array( 'bp_blogs_blog_before_save', array( &$this ) );
     
    9999                 * @since BuddyPress (1.0.0)
    100100                 *
    101                  * @param BP_Blogs_Blog Current instance of the blog item being saved. Passed by reference.
     101                 * @param BP_Blogs_Blog $this Current instance of the blog item being saved. Passed by reference.
    102102                 */
    103103                do_action_ref_array( 'bp_blogs_blog_after_save', array( &$this ) );
     
    112112         * Check whether an association between this user and this blog exists.
    113113         *
    114          * @return int The number of associations between the user and blog
    115          *         saved in the blog component tables.
     114         * @return int $value The number of associations between the user and blog
     115         *                    saved in the blog component tables.
    116116         */
    117117        public function exists() {
     
    128128         * Retrieve a set of blog-user associations.
    129129         *
    130          * @param string $type The order in which results should be returned.
    131          *        'active', 'alphabetical', 'newest', or 'random'.
    132          * @param int|bool $limit Optional. The maximum records to return.
    133          *        Default: false.
    134          * @param int|bool $page Optional. The page of records to return.
    135          *        Default: false (unlimited results).
    136          * @param int $user_id Optional. ID of the user whose blogs are being
    137          *        retrieved. Default: 0.
    138          * @param string|bool $search_terms Optional. Search by text stored in
    139          *        blogmeta (such as the blog name). Default: false.
    140          * @param bool $update_meta_cache Whether to pre-fetch metadata for
    141          *        blogs. Default: true.
    142          * @param array $include_blog_ids Array of blog IDs to include.
     130         * @param string      $type              The order in which results should be returned.
     131         *                                       'active', 'alphabetical', 'newest', or 'random'.
     132         * @param int|bool    $limit             Optional. The maximum records to return.
     133         *                                       Default: false.
     134         * @param int|bool    $page              Optional. The page of records to return.
     135         *                                       Default: false (unlimited results).
     136         * @param int         $user_id           Optional. ID of the user whose blogs are being
     137         *                                       retrieved. Default: 0.
     138         * @param string|bool $search_terms      Optional. Search by text stored in
     139         *                                       blogmeta (such as the blog name). Default: false.
     140         * @param bool        $update_meta_cache Whether to pre-fetch metadata for
     141         *                                       blogs. Default: true.
     142         * @param array|bool  $include_blog_ids  Array of blog IDs to include.
     143         *
    143144         * @return array Multidimensional results array, structured as follows:
    144          *           'blogs' - Array of located blog objects
    145          *           'total' - A count of the total blogs matching the filter params
     145         *               'blogs' - Array of located blog objects
     146         *               'total' - A count of the total blogs matching the filter params
    146147         */
    147148        public static function get( $type, $limit = false, $page = false, $user_id = 0, $search_terms = false, $update_meta_cache = true, $include_blog_ids = false ) {
     
    252253         *
    253254         * @param int $blog_id The blog being removed.
    254          * @param int $user_id Optional. The ID of the user from whom the blog
    255          *        is being removed. If absent, defaults to the logged-in user ID.
     255         * @param int $user_id Optional. The ID of the user from whom the blog is
     256         *                     being removed. If absent, defaults to the logged-in user ID.
     257         *
    256258         * @return int|bool Number of rows deleted on success, false on failure.
    257259         */
     
    270272         * Delete all of a user's blog associations in the BP tables.
    271273         *
    272          * @param int $user_id Optional. The ID of the user whose blog
    273          *        associations are being deleted. If absent, defaults to
    274          *        logged-in user ID.
     274         * @param int $user_id Optional. The ID of the user whose blog associations
     275         *                     are being deleted. If absent, defaults to logged-in user ID.
     276         *
    275277         * @return int|bool Number of rows deleted on success, false on failure.
    276278         */
     
    294296         * does a true query of a user's blog capabilities.
    295297         *
    296          * @param int $user_id Optional. ID of the user whose blogs are being
    297          *        queried. Defaults to logged-in user.
    298          * @param bool $show_hidden Optional. Whether to include blogs that are
    299          *        not marked public. Defaults to true when viewing one's own
    300          *        profile.
     298         * @param int  $user_id    Optional. ID of the user whose blogs are being
     299         *                          queried. Defaults to logged-in user.
     300         * @param bool $show_hidden Optional. Whether to include blogs that are not marked
     301         *                          public. Defaults to true when viewing one's own profile.
     302         *
    301303         * @return array Multidimensional results array, structured as follows:
    302          *           'blogs' - Array of located blog objects
    303          *           'total' - A count of the total blogs for the user.
     304         *               'blogs' - Array of located blog objects.
     305         *               'total' - A count of the total blogs for the user.
    304306         */
    305307        public static function get_blogs_for_user( $user_id = 0, $show_hidden = false ) {
     
    337339         *
    338340         * @param int $user_id Optional. ID of the user whose blogs are being
    339          *        queried. Defaults to logged-in user.
     341         *                     queried. Defaults to logged-in user.
     342         *
    340343         * @return int The number of blogs associated with the user.
    341344         */
     
    355358         *
    356359         * @param int $blog_id ID of the blog being queried.
     360         *
    357361         * @return int|null The ID of the first located entry in the BP table
    358          *         on success, otherwise null.
     362         *                  on success, otherwise null.
    359363         */
    360364        public static function is_recorded( $blog_id ) {
     
    374378         *
    375379         * @param int $user_id Optional. ID of the user whose blogs are being
    376          *        queried. Defaults to logged-in user.
     380         *                     queried. Defaults to logged-in user.
     381         *
    377382         * @return int Blog count for the user.
    378383         */
     
    400405         *
    401406         * @param string $filter The search term.
    402          * @param int $limit Optional. The maximum number of items to return.
    403          *        Default: null (no limit).
    404          * @param int $page Optional. The page of results to return. Default:
    405          *        null (no limit).
     407         * @param int    $limit  Optional. The maximum number of items to return.
     408         *                       Default: null (no limit).
     409         * @param int    $page   Optional. The page of results to return. Default:
     410         *                       null (no limit).
     411         *
    406412         * @return array Multidimensional results array, structured as follows:
    407          *           'blogs' - Array of located blog objects
    408          *           'total' - A count of the total blogs matching the query.
     413         *               'blogs' - Array of located blog objects.
     414         *               'total' - A count of the total blogs matching the query.
    409415         */
    410416        public static function search_blogs( $filter, $limit = null, $page = null ) {
     
    438444         *
    439445         * @param int $limit Optional. The maximum number of items to return.
    440          *        Default: null (no limit).
    441          * @param int $page Optional. The page of results to return. Default:
    442          *        null (no limit).
     446         *                   Default: null (no limit).
     447         * @param int $page  Optional. The page of results to return. Default:
     448         *                   null (no limit).
     449         *
    443450         * @return array Multidimensional results array, structured as follows:
    444          *           'blogs' - Array of located blog objects
    445          *           'total' - A count of the total blogs.
     451         *               'blogs' - Array of located blog objects.
     452         *               'total' - A count of the total blogs.
    446453         */
    447454        public static function get_all( $limit = null, $page = null ) {
     
    466473         *
    467474         * @param string $letter. The letter you're looking for.
    468          * @param int $limit Optional. The maximum number of items to return.
    469          *        Default: null (no limit).
    470          * @param int $page Optional. The page of results to return. Default:
    471          *        null (no limit).
     475         * @param int    $limit   Optional. The maximum number of items to return.
     476         *                        Default: null (no limit).
     477         * @param int    $page    Optional. The page of results to return. Default:
     478         *                        null (no limit).
     479         *
    472480         * @return array Multidimensional results array, structured as follows:
    473          *           'blogs' - Array of located blog objects.
    474          *           'total' - A count of the total blogs matching the query.
     481         *               'blogs' - Array of located blog objects.
     482         *               'total' - A count of the total blogs matching the query.
    475483         */
    476484        public static function get_by_letter( $letter, $limit = null, $page = null ) {
     
    505513         *   - The blog description
    506514         *
    507          * @param array $paged_blogs Array of results from the original query.
    508          * @param array $blog_ids Array of IDs returned from the original query.
    509          * @param string|bool $type Not currently used. Default: false.
     515         * @param array       $paged_blogs Array of results from the original query.
     516         * @param array       $blog_ids    Array of IDs returned from the original query.
     517         * @param string|bool $type        Not currently used. Default: false.
     518         *
    510519         * @return array $paged_blogs The located blogs array, with the extras added.
    511520         */
     
    572581         *
    573582         * @param int $blog_id The ID of the blog being checked.
     583         *
    574584         * @return bool True if hidden (public = 0), false otherwise.
    575585         */
     
    589599         * @param int $user_id ID of user.
    590600         * @param int $blog_id ID of blog.
     601         *
    591602         * @return int|bool ID of user-blog link, or false if not found.
    592603         */
Note: See TracChangeset for help on using the changeset viewer.