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/bp-blogs-template.php

    r9960 r10011  
    8888     * @uses bp_get_root_domain()
    8989     * @uses bp_get_blogs_root_slug()
     90     *
    9091     * @return string The URL of the Blogs directory.
    9192     */
     
    153154     *
    154155     * @access public
    155      * @var public
     156     * @var int
    156157     */
    157158    public $pag_page = 1;
     
    161162     *
    162163     * @access public
    163      * @var public
     164     * @var int
    164165     */
    165166    public $pag_num = 20;
     
    186187     * @see BP_Blogs_Blog::get() for a description of parameters.
    187188     *
    188      * @param string $type See {@link BP_Blogs_Blog::get()}.
    189      * @param string $page See {@link BP_Blogs_Blog::get()}.
    190      * @param string $per_page See {@link BP_Blogs_Blog::get()}.
    191      * @param string $max See {@link BP_Blogs_Blog::get()}.
    192      * @param string $user_id See {@link BP_Blogs_Blog::get()}.
    193      * @param string $search_terms See {@link BP_Blogs_Blog::get()}.
    194      * @param string $page_arg The string used as a query parameter in
    195      *        pagination links. Default: 'bpage'.
    196      * @param bool $update_meta_cache Whether to pre-fetch metadata for
    197      *        queried blogs.
    198      * @param array $include_blog_ids Array of blog IDs to include.
     189     * @param string     $type              See {@link BP_Blogs_Blog::get()}.
     190     * @param string     $page              See {@link BP_Blogs_Blog::get()}.
     191     * @param string     $per_page          See {@link BP_Blogs_Blog::get()}.
     192     * @param string     $max              See {@link BP_Blogs_Blog::get()}.
     193     * @param string     $user_id          See {@link BP_Blogs_Blog::get()}.
     194     * @param string     $search_terms      See {@link BP_Blogs_Blog::get()}.
     195     * @param string     $page_arg          The string used as a query parameter in
     196     *                                      pagination links. Default: 'bpage'.
     197     * @param bool       $update_meta_cache Whether to pre-fetch metadata for
     198     *                                      queried blogs.
     199     * @param array|bool $include_blog_ids Array of blog IDs to include.
    199200     */
    200201    public function __construct( $type, $page, $per_page, $max, $user_id, $search_terms, $page_arg = 'bpage', $update_meta_cache = true, $include_blog_ids = false ) {
     
    364365 * @global object $blogs_template {@link BP_Blogs_Template}
    365366 *
    366  * @param array $args {
     367 * @param array|string $args {
    367368 *     Arguments for limiting the contents of the blogs loop. Most arguments
    368369 *     are in the same format as {@link BP_Blogs_Blog::get()}. However, because
     
    374375 *     string (eg, 'user_id=4&per_page=3').
    375376 *
    376  *     @type int $page Which page of results to fetch. Using page=1 without
    377  *           per_page will result in no pagination. Default: 1.
    378  *     @type int|bool $per_page Number of results per page. Default: 20.
    379  *     @type string $page_arg The string used as a query parameter in
    380  *           pagination links. Default: 'bpage'.
    381  *     @type int|bool $max Maximum number of results to return.
    382  *           Default: false (unlimited).
    383  *     @type string $type The order in which results should be fetched.
    384  *       'active', 'alphabetical', 'newest', or 'random'.
    385  *     @type array $include_blog_ids Array of blog IDs to limit results to.
    386  *     @type string $sort 'ASC' or 'DESC'. Default: 'DESC'.
    387  *     @type string $search_terms Limit results by a search term. Default: the
    388  *           value of $_REQUEST['s'], if present.
    389  *     @type int $user_id The ID of the user whose blogs should be retrieved.
    390  *           When viewing a user profile page, 'user_id' defaults to the ID of
    391  *           the displayed user. Otherwise the default is false.
     377 *     @type int      $page            Which page of results to fetch. Using page=1 without
     378 *                                      per_page will result in no pagination. Default: 1.
     379 *     @type int|bool $per_page         Number of results per page. Default: 20.
     380 *     @type string   $page_arg        The string used as a query parameter in
     381 *                                      pagination links. Default: 'bpage'.
     382 *     @type int|bool $max              Maximum number of results to return.
     383 *                                      Default: false (unlimited).
     384 *     @type string   $type            The order in which results should be fetched.
     385 *                                      'active', 'alphabetical', 'newest', or 'random'.
     386 *     @type array    $include_blog_ids Array of blog IDs to limit results to.
     387 *     @type string   $sort            'ASC' or 'DESC'. Default: 'DESC'.
     388 *     @type string   $search_terms    Limit results by a search term. Default: the
     389 *                                      value of $_REQUEST['s'], if present.
     390 *     @type int      $user_id          The ID of the user whose blogs should be retrieved.
     391 *                                      When viewing a user profile page, 'user_id' defaults to the
     392 *                                      ID of the displayed user. Otherwise the default is false.
    392393 * }
    393394 * @return bool Returns true when blogs are found, otherwise false.
     
    513514 * @see bp_get_blog_avatar() for description of arguments.
    514515 *
    515  * @param array $args See {@link bp_get_blog_avatar()}.
     516 * @param array|string $args See {@link bp_get_blog_avatar()}.
    516517 */
    517518function bp_blog_avatar( $args = '' ) {
     
    529530     *      return values.
    530531     *
    531      * @param array $args  {
     532     * @param array|string $args  {
    532533     *     Arguments are listed here with an explanation of their defaults.
    533534     *     For more information about the arguments, see
     
    774775     * @param array $args {
    775776     *     Array of optional arguments.
    776      *     @type bool $active_format If true, formatted "Active 5 minutes
    777      *           ago". If false, formatted "5 minutes ago". Default: true.
     777     *     @type bool $active_format If true, formatted "Active 5 minutes ago".
     778     *                               If false, formatted "5 minutes ago".
     779     *                               Default: true.
    778780     * }
    779781     * @return string Last active date.
     
    829831     * @param array $args {
    830832     *     Array of optional arguments.
    831      *     @type bool $latest_format If true, formatted "Latest post:
    832      *           [link to post]". If false, formatted "[link to post]".
    833      *           Default: true.
     833     *     @type bool $latest_format If true, formatted "Latest post: [link to post]".
     834     *                               If false, formatted "[link to post]".
     835     *                               Default: true.
    834836     * }
    835837     * @return string $retval String of the form 'Latest Post: [link to post]'.
     
    10031005     *
    10041006     * @param string $size Image version to return. 'thumbnail', 'medium',
    1005      *        'large', or 'post-thumbnail'. Default: 'thumbnail'.
     1007     *                     'large', or 'post-thumbnail'. Default: 'thumbnail'.
     1008     *
    10061009     * @return string URL of the image.
    10071010     */
     
    10291032 * @since BuddyPress (1.7.0)
    10301033 *
    1031  * @param string $size Image version to return. 'thumbnail', 'medium', 'large',
    1032  *        or 'post-thumbnail'. Default: 'thumbnail'.
     1034 * @param string $thumbnail Image version to return. 'thumbnail', 'medium', 'large',
     1035 *                          or 'post-thumbnail'. Default: 'thumbnail'.
     1036 *
    10331037 * @return bool True if the latest blog post from the current blog has a
    1034  *         featured image of the given size.
     1038 *              featured image of the given size.
    10351039 */
    10361040function bp_blog_latest_post_has_featured_image( $thumbnail = 'thumbnail' ) {
     
    11031107     *
    11041108     * @param int $user_id ID of the user.
     1109     *
    11051110     * @return int Total number of blogs for the user.
    11061111     */
     
    11541159 * Output the wrapper markup for the blog signup form.
    11551160 *
    1156  * @param string $blogname Optional. The default blog name (path or domain).
    1157  * @param string $blog_title Optional. The default blog title.
    1158  * @param string|WP_Error Optional. The WP_Error object returned by a previous
    1159  *        submission attempt.
     1161 * @param string          $blogname  Optional. The default blog name (path or domain).
     1162 * @param string          $blog_title Optional. The default blog title.
     1163 * @param string|WP_Error $errors     Optional. The WP_Error object returned by a previous
     1164 *                                    submission attempt.
    11601165 */
    11611166function bp_show_blog_signup_form($blogname = '', $blog_title = '', $errors = '') {
     
    12191224 * Output the input fields for the blog creation form.
    12201225 *
    1221  * @param string $blogname Optional. The default blog name (path or domain).
    1222  * @param string $blog_title Optional. The default blog title.
    1223  * @param string|WP_Error Optional. The WP_Error object returned by a previous
    1224  *        submission attempt.
     1226 * @param string          $blogname  Optional. The default blog name (path or domain).
     1227 * @param string          $blog_title Optional. The default blog title.
     1228 * @param string|WP_Error $errors     Optional. The WP_Error object returned by a previous
     1229 *                                    submission attempt.
    12251230 */
    12261231function bp_blogs_signup_blog( $blogname = '', $blog_title = '', $errors = '' ) {
     
    13321337     *
    13331338     * @param array $meta {
    1334      *      string   $value   Default blog language ID.
    1335      *      string   $public Default public status.
     1339     *      string $value  Default blog language ID.
     1340     *      string $public Default public status.
    13361341     * }
    13371342     */
     
    13651370 * Display a message after successful blog registration.
    13661371 *
    1367  * @param string $domain The new blog's domain.
    1368  * @param string $path The new blog's path.
    1369  * @param string $blog_title The new blog's title.
    1370  * @param string $user_name The user name of the user who created the blog. Unused.
    1371  * @param string $user_email The email of the user who created the blog. Unused.
    1372  * @param string|array $meta Meta values associated with the new blog. Unused.
     1372 * @param string       $domain    The new blog's domain.
     1373 * @param string       $path      The new blog's path.
     1374 * @param string       $blog_title The new blog's title.
     1375 * @param string       $user_name The user name of the user who created the blog. Unused.
     1376 * @param string       $user_email The email of the user who created the blog. Unused.
     1377 * @param string|array $meta       Meta values associated with the new blog. Unused.
    13731378 */
    13741379function bp_blogs_confirm_blog_signup( $domain, $path, $blog_title, $user_name, $user_email = '', $meta = '' ) {
     
    15451550 * @since BuddyPress (2.2.0)
    15461551 *
    1547  * @uses   bp_blog_create_nav_item() to output the Create a Site nav item
     1552 * @uses bp_blog_create_nav_item() to output the Create a Site nav item.
     1553 *
    15481554 * @return string HTML Output
    15491555 */
     
    15681574 * @see bp_get_blogs_visit_blog_button() for description of arguments.
    15691575 *
    1570  * @param array $args See {@link bp_get_blogs_visit_blog_button()}.
     1576 * @param array|string $args See {@link bp_get_blogs_visit_blog_button()}.
    15711577 */
    15721578function bp_blogs_visit_blog_button( $args = '' ) {
     
    15791585     *      value.
    15801586     *
    1581      * @param array $args {
     1587     * @param array|string $args {
    15821588     *     Arguments are listed below, with their default values. For a
    15831589     *     complete description of arguments, see {@link BP_Button}.
    1584      *     @type string $id Default: 'visit_blog'.
    1585      *     @type string $component Default: 'blogs'.
    1586      *     @type bool $must_be_logged_in Default: false.
    1587      *     @type bool $block_self Default: false.
    1588      *     @type string $wrapper_class Default: 'blog-button visit'.
    1589      *     @type string $link_href Permalink of the current blog in the loop.
    1590      *     @type string $link_class Default: 'blog-button visit'.
    1591      *     @type string $link_text Default: 'Visit Site'.
    1592      *     @type string $link_title Default: 'Visit Site'.
     1590     *     @type string $id                Default: 'visit_blog'.
     1591     *     @type string $component         Default: 'blogs'.
     1592     *     @type bool   $must_be_logged_in Default: false.
     1593     *     @type bool   $block_self        Default: false.
     1594     *     @type string $wrapper_class     Default: 'blog-button visit'.
     1595     *     @type string $link_href         Permalink of the current blog in the loop.
     1596     *     @type string $link_class        Default: 'blog-button visit'.
     1597     *     @type string $link_text         Default: 'Visit Site'.
     1598     *     @type string $link_title        Default: 'Visit Site'.
    15931599     * }
    15941600     * @return string The HTML for the Visit button.
     
    16261632 * @since BuddyPress (2.0.0)
    16271633 *
    1628  * @param array $args before|after|user_id
    1629  * @uses bp_blogs_admin_get_profile_stats() to get the stats
     1634 * @uses bp_blogs_admin_get_profile_stats() to get the stats.
     1635 *
     1636 * @param array|string $args before|after|user_id
    16301637 */
    16311638function bp_blogs_profile_stats( $args = '' ) {
     
    16391646 * @since BuddyPress (2.0.0)
    16401647 *
    1641  * @param array $args before|after|user_id
     1648 * @param array|string $args before|after|user_id
     1649 *
    16421650 * @return string HTML for stats output.
    16431651 */
Note: See TracChangeset for help on using the changeset viewer.