Skip to:
Content

BuddyPress.org

Changeset 7555


Ignore:
Timestamp:
11/10/2013 02:04:14 AM (12 years ago)
Author:
boonebgorges
Message:

Improve inline docs in bp-blogs

Location:
trunk/bp-blogs
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-blogs/bp-blogs-actions.php

    r7407 r7555  
    1414 * Redirect to a random blog in the multisite network.
    1515 *
    16  * @since BuddyPress (1.0)
     16 * @since BuddyPress (1.0.0)
    1717 */
    1818function bp_blogs_redirect_to_random_blog() {
  • trunk/bp-blogs/bp-blogs-activity.php

    r7407 r7555  
    1414 * Register activity actions for the blogs component.
    1515 *
    16  * @since BuddyPress (1.0)
     16 * @since BuddyPress (1.0.0)
    1717 *
    1818 * @global object $bp The BuddyPress global settings object.
     
    4242 * Record blog-related activity to the activity stream.
    4343 *
    44  * @since BuddyPress (1.0)
     44 * @since BuddyPress (1.0.0)
    4545 *
    4646 * @see bp_activity_add() for description of parameters.
     
    4949 * @param array $args {
    5050 *     See {@link bp_activity_add()} for complete description of arguments.
    51  *     The arguments listed here have different default values from bp_activity_add().
     51 *     The arguments listed here have different default values from
     52 *     bp_activity_add().
    5253 *     @type string $component Default: 'blogs'.
    5354 * }
     
    102103 * Delete a blog-related activity stream item.
    103104 *
    104  * @since BuddyPress (1.0)
     105 * @since BuddyPress (1.0.0)
    105106 *
    106107 * @see bp_activity_delete() for description of parameters.
     
    109110 * @param array $args {
    110111 *     See {@link bp_activity_delete()} for complete description of arguments.
    111  *     The arguments listed here have different default values from bp_activity_add().
     112 *     The arguments listed here have different default values from
     113 *     bp_activity_add().
    112114 *     @type string $component Default: 'blogs'.
    113115 * }
  • trunk/bp-blogs/bp-blogs-buddybar.php

    r7407 r7555  
    1414 * Add a Sites menu to the BuddyBar.
    1515 *
    16  * @since BuddyPress (1.0)
     16 * @since BuddyPress (1.0.0)
    1717 *
    1818 * @global object $bp The BuddyPress global settings object.
     19 *
    1920 * @return bool|null Returns false on failure. Otherwise echoes the menu item.
    2021 */
    21 
    2222function bp_adminbar_blogs_menu() {
    2323    global $bp;
  • trunk/bp-blogs/bp-blogs-cache.php

    r7407 r7555  
    1717 * Clear the blog object cache.
    1818 *
    19  * @since BuddyPress (1.0)
     19 * @since BuddyPress (1.0.0)
    2020 *
    2121 * @param int $blog_id ID of the current blog.
     
    3030 * Clear cache when a new blog is created.
    3131 *
    32  * @since BuddyPress (1.0)
     32 * @since BuddyPress (1.0.0)
    3333 *
    34  * @param BP_Blogs_Blog $recorded_blog_obj The recorded blog, passed by 'bp_blogs_new_blog'.
     34 * @param BP_Blogs_Blog $recorded_blog_obj The recorded blog, passed by
     35 *        'bp_blogs_new_blog'.
    3536 */
    3637function bp_blogs_format_clear_blog_cache( $recorded_blog_obj ) {
  • trunk/bp-blogs/bp-blogs-classes.php

    r7407 r7555  
    1717 * network and a specific user on that blog.
    1818 *
    19  * @since BuddyPress (1.0)
     19 * @since BuddyPress (1.0.0)
    2020 */
    2121class BP_Blogs_Blog {
     
    215215     * Get all of a user's blogs, as tracked by BuddyPress.
    216216     *
    217      * Note that this is different from the WordPress function {@link get_blogs_of_user()};
    218      * the current method returns only those blogs that have been recorded
    219      * by BuddyPress, while the WP function does a true query of a user's
    220      * blog capabilities.
     217     * Note that this is different from the WordPress function
     218     * {@link get_blogs_of_user()}; the current method returns only those
     219     * blogs that have been recorded by BuddyPress, while the WP function
     220     * does a true query of a user's blog capabilities.
    221221     *
    222222     * @param int $user_id Optional. ID of the user whose blogs are being
  • trunk/bp-blogs/bp-blogs-filters.php

    r7409 r7555  
    66 * @package BuddyPress
    77 * @subpackage Blogs
    8  * @since BuddyPress (1.6)
     8 * @since BuddyPress (1.6.0)
    99 */
    1010
     
    2323
    2424/**
    25  * Ensure that the 'Create a new site' link at wp-admin/my-sites.php points to the BP blog signup
     25 * Ensure that the 'Create a new site' link at wp-admin/my-sites.php points to the BP blog signup.
    2626 *
    27  * @since BuddyPress (1.6)
     27 * @since BuddyPress (1.6.0)
    2828 *
    2929 * @uses apply_filters() Filter 'bp_blogs_creation_location' to alter the
  • trunk/bp-blogs/bp-blogs-functions.php

    r7447 r7555  
    1313 * Check whether the $bp global lists an activity directory page.
    1414 *
    15  * @since BuddyPress (1.5)
     15 * @since BuddyPress (1.5.0)
    1616 *
    1717 * @global BuddyPress $bp The one true BuddyPress instance.
     
    100100 * only to particular users.
    101101 *
    102  * @since BuddyPress (1.7)
     102 * @since BuddyPress (1.7.0)
    103103 *
    104104 * @uses apply_filters()
     
    131131 * being trackable only to particular users.
    132132 *
    133  * @since BuddyPress (1.7)
     133 * @since BuddyPress (1.7.0)
    134134 *
    135135 * @uses bp_blogs_is_blog_recordable
     
    160160 * Make BuddyPress aware of a new site so that it can track its activity.
    161161 *
    162  * @since BuddyPress (1.0)
     162 * @since BuddyPress (1.0.0)
    163163 *
    164164 * @uses BP_Blogs_Blog
     
    220220 * @global object $wpdb DB Layer.
    221221 *
    222  * @param string $oldvalue Value before save. Passed by do_action() but unused here.
     222 * @param string $oldvalue Value before save. Passed by do_action() but
     223 *        unused here.
    223224 * @param string $newvalue Value to change meta to.
    224225 */
     
    235236 * @global object $wpdb DB Layer.
    236237 *
    237  * @param string $oldvalue Value before save. Passed by do_action() but unused here.
     238 * @param string $oldvalue Value before save. Passed by do_action() but
     239 *        unused here.
    238240 * @param string $newvalue Value to change meta to.
    239241 */
     
    606608 * When a blog comment status transition occurs, update the relevant activity's status.
    607609 *
    608  * @since BuddyPress (1.6)
     610 * @since BuddyPress (1.6.0)
    609611 *
    610612 * @global object $bp BuddyPress global settings.
     
    833835 * Get metadata for a given blog.
    834836 *
    835  * @since BuddyPress (1.2)
     837 * @since BuddyPress (1.2.0)
    836838 *
    837839 * @global object $wpdb WordPress database access object.
  • trunk/bp-blogs/bp-blogs-loader.php

    r7454 r7555  
    1616
    1717    /**
    18      * Start the blogs component creation process
    19      *
    20      * @since BuddyPress (1.5)
     18     * Start the blogs component creation process.
     19     *
     20     * @since BuddyPress (1.5.0)
    2121     */
    2222    function __construct() {
     
    3232
    3333    /**
    34      * Setup globals
     34     * Set up global settings for the blogs component.
    3535     *
    3636     * The BP_BLOGS_SLUG constant is deprecated, and only used here for
    3737     * backwards compatibility.
    3838     *
    39      * @since BuddyPress (1.5)
     39     * @since BuddyPress (1.5.0)
     40     *
     41     * @see BP_Component::setup_globals() for description of parameters.
     42     *
     43     * @param array $args See {@link BP_Component::setup_globals()}.
    4044     */
    4145    public function setup_globals( $args = array() ) {
     
    6872
    6973    /**
    70      * Include files
     74     * Include bp-blogs files.
     75     *
     76     * @see BP_Component::includes() for description of parameters.
     77     *
     78     * @param array $includes See {@link BP_Component::includes()}.
    7179     */
    7280    public function includes( $includes = array() ) {
     
    92100
    93101    /**
    94      * Setup BuddyBar navigation
     102     * Set up component navigation for bp-blogs.
     103     *
     104     * @see BP_Component::setup_nav() for a description of arguments.
     105     *
     106     * @param array $main_nav Optional. See BP_Component::setup_nav() for
     107     *        description.
     108     * @param array $sub_nav Optional. See BP_Component::setup_nav() for
     109     *        description.
    95110     */
    96111    public function setup_nav( $main_nav = array(), $sub_nav = array() ) {
     
    140155
    141156    /**
    142      * Set up the Toolbar
    143      *
    144      * @global BuddyPress $bp The one true BuddyPress instance
     157     * Set up bp-blogs integration with the WordPress admin bar.
     158     *
     159     * @since BuddyPress (1.5.0)
     160     *
     161     * @see BP_Component::setup_admin_bar() for a description of arguments.
     162     *
     163     * @param array $wp_admin_nav See BP_Component::setup_admin_bar()
     164     *        for description.
    145165     */
    146166    public function setup_admin_bar( $wp_admin_nav = array() ) {
     
    191211
    192212    /**
    193      * Sets up the title for pages and <title>
     213     * Set up the title for pages and <title>
    194214     */
    195215    function setup_title() {
     
    219239}
    220240
     241/**
     242 * Set up the bp-blogs component.
     243 */
    221244function bp_setup_blogs() {
    222245    buddypress()->blogs = new BP_Blogs_Component();
  • trunk/bp-blogs/bp-blogs-screens.php

    r7386 r7555  
    1111if ( !defined( 'ABSPATH' ) ) exit;
    1212
     13/**
     14 * Load the "My Blogs" screen.
     15 */
    1316function bp_blogs_screen_my_blogs() {
    1417    if ( !is_multisite() )
     
    2023}
    2124
     25/**
     26 * Load the "Create a Blog" screen.
     27 */
    2228function bp_blogs_screen_create_a_blog() {
    2329
     
    3440add_action( 'bp_screens', 'bp_blogs_screen_create_a_blog', 3 );
    3541
     42/**
     43 * Load the top-level Blogs directory.
     44 */
    3645function bp_blogs_screen_index() {
    3746    if ( is_multisite() && bp_is_blogs_component() && !bp_current_action() ) {
     
    4857
    4958/**
    50  * The main theme compat class for BuddyPress Activity
     59 * The main theme compat class for BuddyPress Blogs
    5160 *
    5261 * This class sets up the necessary theme compatability actions to safely output
    5362 * group template parts to the_title and the_content areas of a theme.
    5463 *
    55  * @since BuddyPress (1.7)
     64 * @since BuddyPress (1.7.0)
    5665 */
    5766class BP_Blogs_Theme_Compat {
    5867
    5968    /**
    60      * Setup the groups component theme compatibility
    61      *
    62      * @since BuddyPress (1.7)
     69     * Set up theme compatibility for the Blogs component.
     70     *
     71     * @since BuddyPress (1.7.0)
    6372     */
    6473    public function __construct() {
     
    6776
    6877    /**
    69      * Are we looking at something that needs group theme compatability?
    70      *
    71      * @since BuddyPress (1.7)
     78     * Are we looking at something that needs Blogs theme compatability?
     79     *
     80     * @since BuddyPress (1.7.0)
    7281     */
    7382    public function is_blogs() {
     
    104113     * Add template hierarchy to theme compat for the blog directory page.
    105114     *
    106      * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
    107      *
    108      * @since BuddyPress (1.8)
    109      *
    110      * @param string $templates The templates from bp_get_theme_compat_templates()
     115     * This is to mirror how WordPress has
     116     * {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
     117     *
     118     * @since BuddyPress (1.8.0)
     119     *
     120     * @param string $templates The templates from
     121     *        bp_get_theme_compat_templates().
    111122     * @return array $templates Array of custom templates to look for.
    112123     */
     
    125136
    126137    /**
    127      * Update the global $post with directory data
    128      *
    129      * @since BuddyPress (1.7)
     138     * Update the global $post with directory data.
     139     *
     140     * @since BuddyPress (1.7.0)
    130141     */
    131142    public function directory_dummy_post() {
     
    152163
    153164    /**
    154      * Filter the_content with the groups index template part
    155      *
    156      * @since BuddyPress (1.7)
     165     * Filter the_content with the groups index template part.
     166     *
     167     * @since BuddyPress (1.7.0)
    157168     */
    158169    public function directory_content() {
     
    165176     * Add custom template hierarchy to theme compat for the blog create page.
    166177     *
    167      * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
    168      *
    169      * @since BuddyPress (1.8)
    170      *
    171      * @param string $templates The templates from bp_get_theme_compat_templates()
     178     * This is to mirror how WordPress has
     179     * {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
     180     *
     181     * @since BuddyPress (1.8.0)
     182     *
     183     * @param string $templates The templates from
     184     *        bp_get_theme_compat_templates().
    172185     * @return array $templates Array of custom templates to look for.
    173186     */
     
    186199
    187200    /**
    188      * Update the global $post with create screen data
    189      *
    190      * @since BuddyPress (1.7)
     201     * Update the global $post with create screen data.
     202     *
     203     * @since BuddyPress (1.7.0)
    191204     */
    192205    public function create_dummy_post() {
     
    213226
    214227    /**
    215      * Filter the_content with the create screen template part
    216      *
    217      * @since BuddyPress (1.7)
     228     * Filter the_content with the create screen template part.
     229     *
     230     * @since BuddyPress (1.7.0)
    218231     */
    219232    public function create_content() {
  • trunk/bp-blogs/bp-blogs-template.php

    r7513 r7555  
    1414 * Output the blogs component slug.
    1515 *
    16  * @since BuddyPress (1.5)
     16 * @since BuddyPress (1.5.0)
    1717 *
    1818 * @uses bp_get_blogs_slug()
     
    2424     * Return the blogs component slug.
    2525     *
    26      * @since BuddyPress (1.5)
     26     * @since BuddyPress (1.5.0)
    2727     *
    2828     * @return string The 'blogs' slug.
     
    3535 * Output the blogs component root slug.
    3636 *
    37  * @since BuddyPress (1.5)
     37 * @since BuddyPress (1.5.0)
    3838 *
    3939 * @uses bp_get_blogs_root_slug()
     
    4545     * Return the blogs component root slug.
    4646     *
    47      * @since BuddyPress (1.5)
     47     * @since BuddyPress (1.5.0)
    4848     *
    4949     * @return string The 'blogs' root slug.
     
    5656 * Output blog directory permalink.
    5757 *
    58  * @since BuddyPress (1.5)
     58 * @since BuddyPress (1.5.0)
    5959 *
    6060 * @uses bp_get_blogs_directory_permalink()
     
    6666     * Return blog directory permalink.
    6767     *
    68      * @since BuddyPress (1.5)
     68     * @since BuddyPress (1.5.0)
    6969     *
    7070     * @uses apply_filters()
     
    8484 */
    8585class BP_Blogs_Template {
     86
    8687    /**
    8788     * The loop iterator.
     
    299300
    300301/**
    301  * Initialize the activity loop.
     302 * Initialize the blogs loop.
    302303 *
    303304 * Based on the $args passed, bp_has_blogs() populates the $blogs_template
     
    545546 * Output the ID of the current blog in the loop.
    546547 *
    547  * @since BuddyPress (1.7)
     548 * @since BuddyPress (1.7.0)
    548549 */
    549550function bp_blog_id() {
     
    553554     * Return the ID of the current blog in the loop.
    554555     *
    555      * @since BuddyPress (1.7)
     556     * @since BuddyPress (1.7.0)
    556557     *
    557558     * @return int ID of the current blog in the loop.
     
    583584 * Output the row class of the current blog in the loop.
    584585 *
    585  * @since BuddyPress (1.7)
     586 * @since BuddyPress (1.7.0)
    586587 */
    587588function bp_blog_class() {
     
    591592     * Return the row class of the current blog in the loop.
    592593     *
    593      * @since BuddyPress (1.7)
     594     * @since BuddyPress (1.7.0)
    594595     *
    595596     * @global BP_Blogs_Template $blogs_template
     
    658659 * Output the title of the latest post on the current blog in the loop.
    659660 *
    660  * @since BuddyPress (1.7)
     661 * @since BuddyPress (1.7.0)
    661662 *
    662663 * @see bp_get_blog_latest_post_title()
     
    668669     * Return the title of the latest post on the current blog in the loop.
    669670     *
    670      * @since BuddyPress (1.7)
     671     * @since BuddyPress (1.7.0)
    671672     *
    672673     * @global BP_Blogs_Template
     
    688689 * Output the permalink of the latest post on the current blog in the loop.
    689690 *
    690  * @since BuddyPress (1.7)
     691 * @since BuddyPress (1.7.0)
    691692 *
    692693 * @see bp_get_blog_latest_post_title()
     
    698699     * Return the permalink of the latest post on the current blog in the loop.
    699700     *
    700      * @since BuddyPress (1.7)
     701     * @since BuddyPress (1.7.0)
    701702     *
    702703     * @global BP_Blogs_Template
     
    718719 * Output the content of the latest post on the current blog in the loop.
    719720 *
    720  * @since BuddyPress (1.7)
     721 * @since BuddyPress (1.7.0)
    721722 *
    722723 * @uses bp_get_blog_latest_post_content()
     
    728729     * Return the content of the latest post on the current blog in the loop.
    729730     *
    730      * @since BuddyPress (1.7)
     731     * @since BuddyPress (1.7.0)
    731732     *
    732733     * @global BP_Blogs_Template
     
    748749 * Output the featured image of the latest post on the current blog in the loop.
    749750 *
    750  * @since BuddyPress (1.7)
     751 * @since BuddyPress (1.7.0)
    751752 *
    752753 * @see bp_get_blog_latest_post_content() For description of parameters.
     
    760761     * Return the featured image of the latest post on the current blog in the loop.
    761762     *
    762      * @since BuddyPress (1.7)
     763     * @since BuddyPress (1.7.0)
    763764     *
    764765     * @global BP_Blogs_Template
     
    782783 * Does the latest blog post have a featured image?
    783784 *
    784  * @since BuddyPress (1.7)
     785 * @since BuddyPress (1.7.0)
    785786 *
    786787 * @param string $size Image version to return. 'thumbnail', 'medium', 'large',
     
    994995 * Output the base URL for subdomain installations of WordPress Multisite.
    995996 *
    996  * @since BuddyPress (1.6)
     997 * @since BuddyPress (1.6.0)
    997998 */
    998999function bp_blogs_subdomain_base() {
     
    10021003     * Return the base URL for subdomain installations of WordPress Multisite.
    10031004     *
    1004      * @since BuddyPress (1.6)
     1005     * @since BuddyPress (1.6.0)
    10051006     *
    10061007     * @return string The base URL - eg, 'example.com' for site_url() example.com or www.example.com.
  • trunk/bp-blogs/bp-blogs-widgets.php

    r7210 r7555  
    1111if ( !defined( 'ABSPATH' ) ) exit;
    1212
    13 // @todo not use create_function()
     13/**
     14 * Register the widgets for the Blogs component.
     15 */
    1416function bp_blogs_register_widgets() {
    1517    global $wpdb;
     
    2527class BP_Blogs_Recent_Posts_Widget extends WP_Widget {
    2628
     29    /**
     30     * Constructor method.
     31     */
    2732    function __construct() {
    2833        $widget_ops = array(
     
    3338    }
    3439
     40    /**
     41     * Display the networkwide posts widget.
     42     *
     43     * @see WP_Widget::widget() for description of parameters.
     44     *
     45     * @param array $args Widget arguments.
     46     * @param array $instance Widget settings, as saved by the user.
     47     */
    3548    function widget( $args, $instance ) {
    3649
     
    8497    }
    8598
     99    /**
     100     * Update the networkwide posts widget options.
     101     *
     102     * @param array $new_instance The new instance options.
     103     * @param array $old_instance The old instance options.
     104     * @return array $instance The parsed options to be saved.
     105     */
    86106    function update( $new_instance, $old_instance ) {
    87107        $instance = $old_instance;
     
    93113    }
    94114
     115    /**
     116     * Output the networkwide posts widget options form.
     117     *
     118     * @param $instance Settings for this widget.
     119     */
    95120    function form( $instance ) {
    96121        $instance = wp_parse_args( (array) $instance, array(
Note: See TracChangeset for help on using the changeset viewer.