Skip to:
Content

BuddyPress.org

Changeset 10100


Ignore:
Timestamp:
09/12/2015 06:03:18 AM (11 years ago)
Author:
tw2113
Message:

Standardizing our @since tags for the Blogs component.

See #6576

Location:
trunk/src/bp-blogs
Files:
11 edited

Legend:

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

    r9819 r10100  
    11<?php
    2 
    32/**
    43 * BuddyPress Blogs Actions.
     
    1413 * Redirect to a random blog in the multisite network.
    1514 *
    16  * @since BuddyPress (1.0.0)
     15 * @since 1.0.0
    1716 */
    1817function bp_blogs_redirect_to_random_blog() {
  • trunk/src/bp-blogs/bp-blogs-activity.php

    r10011 r10100  
    11<?php
    2 
    32/**
    43 * BuddyPress Blogs Activity.
     
    87 */
    98
    10 // Exit if accessed directly
     9// Exit if accessed directly.
    1110defined( 'ABSPATH' ) || exit;
    1211
     
    1413 * Register activity actions for the blogs component.
    1514 *
    16  * @since BuddyPress (1.0.0)
     15 * @since 1.0.0
    1716 *
    1817 * @return bool|null Returns false if activity component is not active.
     
    5453         * Fires after the registry of the default blog component activity actions.
    5554         *
    56          * @since BuddyPress (1.1.0)
     55         * @since 1.1.0
    5756         */
    5857        do_action( 'bp_blogs_register_activity_actions' );
     
    6362 * Format 'new_blog' activity actions.
    6463 *
    65  * @since BuddyPress (2.0.0)
     64 * @since 2.0.0
    6665 *
    6766 * @param string $action   Static activity action.
     
    9190         * Filters the new blog activity action for the new blog.
    9291         *
    93          * @since BuddyPress (2.0.0)
     92         * @since 2.0.0
    9493         *
    9594         * @param string $action   Constructed activity action.
     
    102101 * Format 'new_blog_post' activity actions.
    103102 *
    104  * @since BuddyPress (2.0.0)
     103 * @since 2.0.0
    105104 *
    106105 * @param string $action   Static activity action.
     
    203202         * Filters the new blog post action for the new blog.
    204203         *
    205          * @since BuddyPress (2.0.0)
     204         * @since 2.0.0
    206205         *
    207206         * @param string $action   Constructed activity action.
     
    214213 * Format 'new_blog_comment' activity actions.
    215214 *
    216  * @since BuddyPress (2.0.0)
     215 * @since 2.0.0
    217216 *
    218217 * @param string $action   Static activity action.
     
    280279         * Filters the new blog comment action for the new blog.
    281280         *
    282          * @since BuddyPress (2.0.0)
     281         * @since 2.0.0
    283282         *
    284283         * @param string $action   Constructed activity action.
     
    293292 * This reduces database overhead during the activity loop.
    294293 *
    295  * @since BuddyPress (2.0.0)
     294 * @since 2.0.0
    296295 *
    297296 * @param array $activities Array of activity items.
     
    325324 * Record blog-related activity to the activity stream.
    326325 *
    327  * @since BuddyPress (1.0.0)
     326 * @since 1.0.0
    328327 *
    329328 * @see bp_activity_add() for description of parameters.
     
    366365                 * Filters the action associated with activity for activity stream.
    367366                 *
    368                  * @since BuddyPress (1.2.0)
     367                 * @since 1.2.0
    369368                 *
    370369                 * @param string $value Action for the activity stream.
     
    378377                 * Filters the content associated with activity for activity stream.
    379378                 *
    380                  * @since BuddyPress (1.2.0)
     379                 * @since 1.2.0
    381380                 *
    382381                 * @param string $value Generated summary from content for the activity stream.
     
    402401 * Delete a blog-related activity stream item.
    403402 *
    404  * @since BuddyPress (1.0.0)
     403 * @since 1.0.0
    405404 *
    406405 * @see bp_activity_delete() for description of parameters.
     
    443442 * multiple {@link switch_to_blog()} calls in the activity stream.
    444443 *
    445  * @since BuddyPress (2.0.0)
     444 * @since 2.0.0
    446445 *
    447446 * @param object $activity The BP_Activity_Activity object
     
    529528 * For blog post -> activity comment, see {@link bp_blogs_record_comment()}.
    530529 *
    531  * @since BuddyPress (2.0.0)
     530 * @since 2.0.0
    532531 *
    533532 * @param int    $comment_id      The activity ID for the posted activity comment.
     
    617616         * Fires after activity comments have been synced and posted as blog comments.
    618617         *
    619          * @since BuddyPress (2.0.0)
     618         * @since 2.0.0
    620619         *
    621620         * @param int    $comment_id      The activity ID for the posted activity comment.
     
    635634 * activity comment children before they are deleted.
    636635 *
    637  * @since BuddyPress (2.0.0)
     636 * @since 2.0.0
    638637 *
    639638 * @param bool $retval
     
    683682 * Updates the blog comment when the associated activity comment is edited.
    684683 *
    685  * @since BuddyPress (2.0.0)
     684 * @since 2.0.0
    686685 *
    687686 * @param BP_Activity_Activity $activity The activity object.
     
    740739 * activity comment IDs from each comment's meta when a post is trashed.
    741740 *
    742  * @since BuddyPress (2.0.0)
     741 * @since 2.0.0
    743742 *
    744743 * @param int   $post_id  The post ID.
     
    771770 * API.
    772771 *
    773  * @since BuddyPress (2.1.0)
     772 * @since 2.1.0
    774773 *
    775774 * @param array $args Arguments passed from bp_parse_args() in bp_has_activities().
     
    843842 * This is to prevent having to requery these items later on.
    844843 *
    845  * @since BuddyPress (2.0.0)
     844 * @since 2.0.0
    846845 *
    847846 * @see bp_blogs_disable_activity_commenting()
     
    895894 * Set up some globals used in the activity comment loop when AJAX is used.
    896895 *
    897  * @since BuddyPress (2.0.0)
     896 * @since 2.0.0
    898897 *
    899898 * @see bp_blogs_setup_activity_loop_globals()
     
    927926 *  - the activity entry is a 'new_blog_comment' type
    928927 *
    929  * @since BuddyPress (2.0.0)
     928 * @since 2.0.0
    930929 *
    931930 * @param bool $retval Is activity commenting enabled for this activity entry?
     
    979978 * via {@link bp_blogs_setup_activity_loop_globals()}.
    980979 *
    981  * @since BuddyPress (2.0.0)
     980 * @since 2.0.0
    982981 *
    983982 * @param bool   $retval  Are replies allowed for this activity reply?
     
    10181017 * activity item is a 'new_blog_post' entry.
    10191018 *
    1020  * @since BuddyPress (2.0.0)
     1019 * @since 2.0.0
    10211020 *
    10221021 * @param string $retval The activity comment permalink.
     
    10461045 * This is only done if the activity comment is associated with a blog comment.
    10471046 *
    1048  * @since BuddyPress (2.0.1)
     1047 * @since 2.0.1
    10491048 *
    10501049 * @param string               $retval   The activity permalink.
     
    10731072 * This is only done if the activity comment is associated with a blog comment.
    10741073 *
    1075  * @since BuddyPress (2.0.1)
     1074 * @since 2.0.1
    10761075 *
    10771076 * @param string               $retval   The activity action.
  • trunk/src/bp-blogs/bp-blogs-cache.php

    r10011 r10100  
    11<?php
    2 
    32/**
    43 * BuddyPress Blogs Caching.
     
    1110 */
    1211
    13 // Exit if accessed directly
     12// Exit if accessed directly.
    1413defined( 'ABSPATH' ) || exit;
    1514
     
    3837 * Clear the blog object cache.
    3938 *
    40  * @since BuddyPress (1.0.0)
     39 * @since 1.0.0
    4140 *
    4241 * @param int $blog_id ID of the current blog.
     
    5251}
    5352
    54 // List actions to clear object caches on
     53// List actions to clear object caches on.
    5554add_action( 'bp_blogs_remove_blog_for_user', 'bp_blogs_clear_blog_object_cache', 10, 2 );
    5655add_action( 'wpmu_new_blog',                 'bp_blogs_clear_blog_object_cache', 10, 2 );
    5756add_action( 'bp_blogs_remove_blog',          'bp_blogs_clear_blog_object_cache' );
    5857
    59 // List actions to clear super cached pages on, if super cache is installed
     58// List actions to clear super cached pages on, if super cache is installed.
    6059add_action( 'bp_blogs_remove_data_for_blog', 'bp_core_clear_cache' );
    6160add_action( 'bp_blogs_remove_comment',       'bp_core_clear_cache' );
  • trunk/src/bp-blogs/bp-blogs-classes.php

    r9819 r10100  
    11<?php
    2 
    32/**
    43 * BuddyPress Blogs Classes.
     
    87 */
    98
    10 // Exit if accessed directly
     9// Exit if accessed directly.
    1110defined( 'ABSPATH' ) || exit;
    1211
  • trunk/src/bp-blogs/bp-blogs-filters.php

    r10011 r10100  
    11<?php
    2 
    32/**
    43 * Filters related to the Blogs component.
    54 *
    65 * @package BuddyPress
    7  * @subpackage Blogs
    8  * @since BuddyPress (1.6.0)
     6 * @subpackage BlogFilters
     7 * @since 1.6.0
    98 */
    109
     
    2524 * Ensure that the 'Create a new site' link at wp-admin/my-sites.php points to the BP blog signup.
    2625 *
    27  * @since BuddyPress (1.6.0)
     26 * @since 1.6.0
    2827 *
    2928 * @uses apply_filters() Filter 'bp_blogs_creation_location' to alter the
     
    3938         * Filters the 'Create a new site' link URL.
    4039         *
    41          * @since BuddyPress (1.6.0)
     40         * @since 1.6.0
    4241         *
    4342         * @param string $value URL for the 'Create a new site' signup page.
     
    5049 * Only select comments by ID instead of all fields when using get_comments().
    5150 *
    52  * @since BuddyPress (2.1.0)
     51 * @since 2.1.0
    5352 *
    5453 * @see bp_blogs_update_post_activity_meta()
     
    6968 * Abstracted from the deprecated `bp_blogs_record_post()`.
    7069 *
    71  * @since BuddyPress (2.2.0)
     70 * @since 2.2.0
    7271 *
    7372 * @param  bool $return  Whether the post should be published.
     
    102101         * Filters whether or not BuddyPress should block sitewide tags activity.
    103102         *
    104          * @since BuddyPress (2.2.0)
     103         * @since 2.2.0
    105104         *
    106105         * @param bool $value Current status of the sitewide tags activity.
     
    113112         * Filters whether or not the current blog is public.
    114113         *
    115          * @since BuddyPress (2.2.0)
     114         * @since 2.2.0
    116115         *
    117116         * @param int $value Value from the blog_public option for the current blog.
  • trunk/src/bp-blogs/bp-blogs-functions.php

    r10034 r10100  
    1313 * Check whether the $bp global lists an activity directory page.
    1414 *
    15  * @since BuddyPress (1.5.0)
     15 * @since 1.5.0
    1616 *
    1717 * @return bool True if set, false if empty.
     
    7272 * Populate the BP blogs table with existing blogs.
    7373 *
    74  * @since BuddyPress (1.0.0)
     74 * @since 1.0.0
    7575 *
    7676 * @global object $wpdb WordPress database object.
     
    150150         * Fires after the BP blogs tables have been populated with existing blogs.
    151151         *
    152          * @since BuddyPress (2.4.0)
     152         * @since 2.4.0
    153153         */
    154154        do_action( 'bp_blogs_recorded_existing_blogs' );
     
    164164 * only to particular users.
    165165 *
    166  * @since BuddyPress (1.7.0)
     166 * @since 1.7.0
    167167 *
    168168 * @uses apply_filters()
     
    196196 * being trackable only to particular users.
    197197 *
    198  * @since BuddyPress (1.7.0)
     198 * @since 1.7.0
    199199 *
    200200 * @uses bp_blogs_is_blog_recordable
     
    226226 * Make BuddyPress aware of a new site so that it can track its activity.
    227227 *
    228  * @since BuddyPress (1.0.0)
     228 * @since 1.0.0
    229229 *
    230230 * @uses BP_Blogs_Blog
     
    297297         * Fires after BuddyPress has been made aware of a new site for activity tracking.
    298298         *
    299          * @since BuddyPress (1.0.0)
     299         * @since 1.0.0
    300300         *
    301301         * @param BP_Blogs_Blog $recorded_blog Current blog being recorded. Passed by reference.
     
    342342 * Update "Close comments for old posts" option in BuddyPress blogmeta table.
    343343 *
    344  * @since BuddyPress (2.0.0)
     344 * @since 2.0.0
    345345 *
    346346 * @global object $wpdb DB Layer.
     
    360360 * Update "Close comments after days old" option in BuddyPress blogmeta table.
    361361 *
    362  * @since BuddyPress (2.0.0)
     362 * @since 2.0.0
    363363 *
    364364 * @global object $wpdb DB Layer.
     
    378378 * When toggling threaded comments, update thread depth in blogmeta table.
    379379 *
    380  * @since BuddyPress (2.0.0)
     380 * @since 2.0.0
    381381 *
    382382 * @global object $wpdb DB Layer.
     
    402402 * When updating comment depth, update thread depth in blogmeta table.
    403403 *
    404  * @since BuddyPress (2.0.0)
     404 * @since 2.0.0
    405405 *
    406406 * @global object $wpdb DB Layer.
     
    427427 * under "Network Admin > Sites".
    428428 *
    429  * @since BuddyPress (2.3.0)
     429 * @since 2.3.0
    430430 *
    431431 * @param int $site_id The site ID.
     
    439439 * Record activity metadata about a published blog post.
    440440 *
    441  * @since BuddyPress (2.2.0)
     441 * @since 2.2.0
    442442 *
    443443 * @param int     $activity_id ID of the activity item.
     
    466466         * Fires after BuddyPress has recorded metadata about a published blog post.
    467467         *
    468          * @since BuddyPress (1.0.0)
     468         * @since 1.0.0
    469469         *
    470470         * @param int     $ID    ID of the blog post being recorded.
     
    479479 * Updates a blog post's activity meta entry during a post edit.
    480480 *
    481  * @since BuddyPress (2.2.0)
     481 * @since 2.2.0
    482482 *
    483483 * @param WP_Post              $post     Post object.
     
    803803 * to extend the functionality of the Blogs component.
    804804 *
    805  * @since BuddyPress (2.1.0)
     805 * @since 2.1.0
    806806 *
    807807 * @return string
     
    836836 * first. See https://buddypress.trac.wordpress.org/ticket/3916.
    837837 *
    838  * @since BuddyPress (1.6.0)
     838 * @since 1.6.0
    839839 * @access private
    840840 */
     
    861861         * tracker and activity stream.
    862862         *
    863          * @since BuddyPress (1.5.0)
     863         * @since 1.5.0
    864864         *
    865865         * @param int $blog_id ID of the blog having its item removed.
     
    880880         * tracker and activity stream.
    881881         *
    882          * @since BuddyPress (1.0.0)
     882         * @since 1.0.0
    883883         *
    884884         * @param int $blog_id ID of the blog who had its item removed.
     
    902902         * Fires before a blog is removed from the tracker for a specific user.
    903903         *
    904          * @since BuddyPress (1.5.0)
     904         * @since 1.5.0
    905905         *
    906906         * @param int $blog_id ID of the blog being removed.
     
    921921         * Fires after a blog has been removed from the tracker for a specific user.
    922922         *
    923          * @since BuddyPress (1.0.0)
     923         * @since 1.0.0
    924924         *
    925925         * @param int $blog_id ID of the blog that was removed.
     
    957957         * Fires before removal of a blog post activity item from the activity stream.
    958958         *
    959          * @since BuddyPress (1.5.0)
     959         * @since 1.5.0
    960960         *
    961961         * @param int $blog_id ID of the blog associated with the post that was removed.
     
    976976         * Fires after removal of a blog post activity item from the activity stream.
    977977         *
    978          * @since BuddyPress (1.0.0)
     978         * @since 1.0.0
    979979         *
    980980         * @param int $blog_id ID of the blog associated with the post that was removed.
     
    10451045         * Fires after a blog comment activity item was removed from activity stream.
    10461046         *
    1047          * @since BuddyPress (1.0.0)
     1047         * @since 1.0.0
    10481048         *
    10491049         * @param int $blogid     Item ID for the blog associated with the removed comment.
     
    10581058 * Removes blog comments that are associated with activity comments.
    10591059 *
    1060  * @since BuddyPress (2.0.0)
     1060 * @since 2.0.0
    10611061 *
    10621062 * @see bp_blogs_remove_comment()
     
    10991099 * When a blog comment status transition occurs, update the relevant activity's status.
    11001100 *
    1101  * @since BuddyPress (1.6.0)
     1101 * @since 1.6.0
    11021102 *
    11031103 * @param string $new_status New comment status.
     
    11971197 * Get the total number of blogs being tracked by BP for a specific user.
    11981198 *
    1199  * @since BuddyPress (1.2.0)
     1199 * @since 1.2.0
    12001200 *
    12011201 * @param int $user_id ID of the user being queried. Default: on a user page,
     
    12341234         * and activity stream.
    12351235         *
    1236          * @since BuddyPress (1.5.0)
     1236         * @since 1.5.0
    12371237         *
    12381238         * @param int $blog_id ID of the blog whose data is being removed.
     
    12541254         * and activity stream.
    12551255         *
    1256          * @since BuddyPress (1.0.0)
     1256         * @since 1.0.0
    12571257         *
    12581258         * @param int $blog_id ID of the blog whose data is being removed.
     
    13711371 * Get metadata for a given blog.
    13721372 *
    1373  * @since BuddyPress (1.2.0)
     1373 * @since 1.2.0
    13741374 *
    13751375 * @global object $wpdb WordPress database access object.
     
    14201420 * Add a piece of blog metadata.
    14211421 *
    1422  * @since BuddyPress (2.0.0)
     1422 * @since 2.0.0
    14231423 *
    14241424 * @param int    $blog_id    ID of the blog.
     
    14521452         * Fires before all blog associations are removed for a given user.
    14531453         *
    1454          * @since BuddyPress (1.5.0)
     1454         * @since 1.5.0
    14551455         *
    14561456         * @param int $user_id ID of the user whose blog associations are being removed.
     
    14641464         * Fires after all blog associations are removed for a given user.
    14651465         *
    1466          * @since BuddyPress (1.0.0)
     1466         * @since 1.0.0
    14671467         *
    14681468         * @param int $user_id ID of the user whose blog associations were removed.
     
    14771477 * Restore all blog associations for a given user.
    14781478 *
    1479  * @since BuddyPress (2.2.0)
     1479 * @since 2.2.0
    14801480 *
    14811481 * @param int $user_id ID whose blog data should be restored.
  • trunk/src/bp-blogs/bp-blogs-loader.php

    r10019 r10100  
    11<?php
    2 
    32/**
    43 * BuddyPress Blogs Loader
     
    98 *
    109 * @package BuddyPress
    11  * @subpackage Blogs Core
     10 * @subpackage BlogsCore
    1211 */
    1312
     
    2019         * Start the blogs component creation process.
    2120         *
    22          * @since BuddyPress (1.5.0)
     21         * @since 1.5.0
    2322         */
    2423        public function __construct() {
     
    3938         * backwards compatibility.
    4039         *
    41          * @since BuddyPress (1.5.0)
     40         * @since 1.5.0
    4241         *
    4342         * @see BP_Component::setup_globals() for description of parameters.
     
    8382                 * In case the config is not multisite, the blog_public option is ignored.
    8483                 *
    85                  * @since BuddyPress (2.3.0)
     84                 * @since 2.3.0
    8685                 *
    8786                 * @oaram int $value Whether or not the blog is public.
     
    9291                         * Filters the post types to track for the Blogs component.
    9392                         *
    94                          * @since BuddyPress (1.5.0)
    95                          * @deprecated BuddyPress (2.3.0)
     93                         * @since 1.5.0
     94                         * @deprecated 2.3.0
    9695                         *
    9796                         * @param array $value Array of post types to track.
     
    199198         * Set up bp-blogs integration with the WordPress admin bar.
    200199         *
    201          * @since BuddyPress (1.5.0)
     200         * @since 1.5.0
    202201         *
    203202         * @see BP_Component::setup_admin_bar() for a description of arguments.
     
    287286         * Setup cache groups
    288287         *
    289          * @since BuddyPress (2.2.0)
     288         * @since 2.2.0
    290289         */
    291290        public function setup_cache_groups() {
     
    302301         * Set up the tracking arguments for the 'post' post type.
    303302         *
    304          * @since BuddyPress (2.2.0)
     303         * @since 2.2.0
    305304         *
    306305         * @see bp_activity_get_post_type_tracking_args() for information on parameters.
     
    316315                 * Filters the post types to track for the Blogs component.
    317316                 *
    318                  * @since BuddyPress (1.5.0)
    319                  * @deprecated BuddyPress (2.3.0)
     317                 * @since 1.5.0
     318                 * @deprecated 2.3.0
    320319                 *
    321320                 * Make sure plugins still using 'bp_blogs_record_post_post_types'
  • trunk/src/bp-blogs/bp-blogs-screens.php

    r10011 r10100  
    11<?php
    2 
    32/**
    43 * BuddyPress Blogs Screens.
     
    2120         * Fires right before the loading of the My Blogs screen template file.
    2221         *
    23          * @since BuddyPress (1.0.0)
     22         * @since 1.0.0
    2423         */
    2524        do_action( 'bp_blogs_screen_my_blogs' );
     
    4241         * Fires right before the loading of the Create A Blog screen template file.
    4342         *
    44          * @since BuddyPress (1.0.0)
     43         * @since 1.0.0
    4544         */
    4645        do_action( 'bp_blogs_screen_create_a_blog' );
     
    6059                 * Fires right before the loading of the top-level Blogs screen template file.
    6160                 *
    62                  * @since BuddyPress (1.0.0)
     61                 * @since 1.0.0
    6362                 */
    6463                do_action( 'bp_blogs_screen_index' );
     
    7776 * group template parts to the_title and the_content areas of a theme.
    7877 *
    79  * @since BuddyPress (1.7.0)
     78 * @since 1.7.0
    8079 */
    8180class BP_Blogs_Theme_Compat {
     
    8483         * Set up theme compatibility for the Blogs component.
    8584         *
    86          * @since BuddyPress (1.7.0)
     85         * @since 1.7.0
    8786         */
    8887        public function __construct() {
     
    9392         * Are we looking at something that needs Blogs theme compatibility?
    9493         *
    95          * @since BuddyPress (1.7.0)
     94         * @since 1.7.0
    9695         */
    9796        public function is_blogs() {
     
    113112                         * before the actions and filters are added.
    114113                         *
    115                          * @since BuddyPress (1.5.0)
     114                         * @since 1.5.0
    116115                         */
    117116                        do_action( 'bp_blogs_screen_index' );
     
    137136         * {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
    138137         *
    139          * @since BuddyPress (1.8.0)
     138         * @since 1.8.0
    140139         *
    141140         * @param string $templates The templates from bp_get_theme_compat_templates().
     
    148147                 * Filters the custom templates used for theme compat with the blog directory page.
    149148                 *
    150                  * @since BuddyPress (1.8.0)
     149                 * @since 1.8.0
    151150                 *
    152151                 * @param array $value Array of template paths to add to template list to look for.
     
    166165         * Update the global $post with directory data.
    167166         *
    168          * @since BuddyPress (1.7.0)
     167         * @since 1.7.0
    169168         */
    170169        public function directory_dummy_post() {
     
    186185         * Filter the_content with the groups index template part.
    187186         *
    188          * @since BuddyPress (1.7.0)
     187         * @since 1.7.0
    189188         */
    190189        public function directory_content() {
     
    200199         * {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
    201200         *
    202          * @since BuddyPress (1.8.0)
     201         * @since 1.8.0
    203202         *
    204203         * @param string $templates The templates from bp_get_theme_compat_templates().
     
    211210                 * Filters the custom templates used for theme compat with the blog create page.
    212211                 *
    213                  * @since BuddyPress (1.8.0)
     212                 * @since 1.8.0
    214213                 *
    215214                 * @param array $value Array of template paths to add to template list to look for.
     
    229228         * Update the global $post with create screen data.
    230229         *
    231          * @since BuddyPress (1.7.0)
     230         * @since 1.7.0
    232231         */
    233232        public function create_dummy_post() {
     
    256255         * Filter the_content with the create screen template part.
    257256         *
    258          * @since BuddyPress (1.7.0)
     257         * @since 1.7.0
    259258         */
    260259        public function create_content() {
  • trunk/src/bp-blogs/bp-blogs-template.php

    r10011 r10100  
    11<?php
    2 
    32/**
    43 * BuddyPress Blogs Template Tags.
     
    87 */
    98
    10 // Exit if accessed directly
     9// Exit if accessed directly.
    1110defined( 'ABSPATH' ) || exit;
    1211
     
    1413 * Output the blogs component slug.
    1514 *
    16  * @since BuddyPress (1.5.0)
     15 * @since 1.5.0
    1716 *
    1817 * @uses bp_get_blogs_slug()
     
    2423         * Return the blogs component slug.
    2524         *
    26          * @since BuddyPress (1.5.0)
     25         * @since 1.5.0
    2726         *
    2827         * @return string The 'blogs' slug.
     
    3332                 * Filters the blogs component slug.
    3433                 *
    35                  * @since BuddyPress (1.5.0)
     34                 * @since 1.5.0
    3635                 *
    3736                 * @param string $slug Slug for the blogs component.
     
    4342 * Output the blogs component root slug.
    4443 *
    45  * @since BuddyPress (1.5.0)
     44 * @since 1.5.0
    4645 *
    4746 * @uses bp_get_blogs_root_slug()
     
    5352         * Return the blogs component root slug.
    5453         *
    55          * @since BuddyPress (1.5.0)
     54         * @since 1.5.0
    5655         *
    5756         * @return string The 'blogs' root slug.
     
    6261                 * Filters the blogs component root slug.
    6362                 *
    64                  * @since BuddyPress (1.5.0)
     63                 * @since 1.5.0
    6564                 *
    6665                 * @param string $root_slug Root slug for the blogs component.
     
    7271 * Output blog directory permalink.
    7372 *
    74  * @since BuddyPress (1.5.0)
     73 * @since 1.5.0
    7574 *
    7675 * @uses bp_get_blogs_directory_permalink()
     
    8281         * Return blog directory permalink.
    8382         *
    84          * @since BuddyPress (1.5.0)
     83         * @since 1.5.0
    8584         *
    8685         * @uses apply_filters()
     
    9695                 * Filters the blog directory permalink.
    9796                 *
    98                  * @since BuddyPress (1.5.0)
     97                 * @since 1.5.0
    9998                 *
    10099                 * @param string $value Permalink URL for the blog directory.
     
    309308                         * Fires right before the rewinding of blogs listing after all are shown.
    310309                         *
    311                          * @since BuddyPress (1.5.0)
     310                         * @since 1.5.0
    312311                         */
    313312                        do_action( 'blog_loop_end' );
     
    340339                         * Fires if on the first blog in the loop.
    341340                         *
    342                          * @since BuddyPress (1.5.0)
     341                         * @since 1.5.0
    343342                         */
    344343                        do_action( 'blog_loop_start' );
     
    426425         * Filters whether or not there are blogs to list.
    427426         *
    428          * @since BuddyPress (1.1.0)
     427         * @since 1.1.0
    429428         *
    430429         * @param bool              $value          Whether or not there are blogs to list.
     
    502501                 * Filters the blogs pagination links.
    503502                 *
    504                  * @since BuddyPress (1.0.0)
     503                 * @since 1.0.0
    505504                 *
    506505                 * @param string $pag_links HTML pagination links.
     
    525524         * admin. Filter 'bp_get_blog_avatar_' . $blog_id to customize.
    526525         *
    527          * @since BuddyPress (2.4.0) Introduced `$title` argument.
     526         * @since 2.4.0 Introduced `$title` argument.
    528527         *
    529528         * @see bp_core_fetch_avatar() For a description of arguments and
     
    595594                 * Filters a blog's avatar.
    596595                 *
    597                  * @since BuddyPress (1.5.0)
     596                 * @since 1.5.0
    598597                 *
    599598                 * @param string $avatar  Formatted HTML <img> element, or raw avatar
     
    624623                 * Filters the blog permalink.
    625624                 *
    626                  * @since BuddyPress (1.0.0)
     625                 * @since 1.0.0
    627626                 *
    628627                 * @param string $permalink Permalink URL for the blog.
     
    648647                 * Filters the name of the current blog in the loop.
    649648                 *
    650                  * @since BuddyPress (1.2.0)
     649                 * @since 1.2.0
    651650                 *
    652651                 * @param string $name Name of the current blog in the loop.
     
    658657 * Output the ID of the current blog in the loop.
    659658 *
    660  * @since BuddyPress (1.7.0)
     659 * @since 1.7.0
    661660 */
    662661function bp_blog_id() {
     
    666665         * Return the ID of the current blog in the loop.
    667666         *
    668          * @since BuddyPress (1.7.0)
     667         * @since 1.7.0
    669668         *
    670669         * @return int ID of the current blog in the loop.
     
    676675                 * Filters the ID of the current blog in the loop.
    677676                 *
    678                  * @since BuddyPress (1.7.0)
     677                 * @since 1.7.0
    679678                 *
    680679                 * @param int $blog_id ID of the current blog in the loop.
     
    691690         * Filters the description of the current blog in the loop.
    692691         *
    693          * @since BuddyPress (1.2.0)
     692         * @since 1.2.0
    694693         *
    695694         * @param string $value Description of the current blog in the loop.
     
    708707                 * Filters the description of the current blog in the loop.
    709708                 *
    710                  * @since BuddyPress (1.0.0)
     709                 * @since 1.0.0
    711710                 *
    712711                 * @param string $value Description of the current blog in the loop.
     
    718717 * Output the row class of the current blog in the loop.
    719718 *
    720  * @since BuddyPress (1.7.0)
     719 * @since 1.7.0
    721720 *
    722721 * @param array $classes Array of custom classes
     
    728727         * Return the row class of the current blog in the loop.
    729728         *
    730          * @since BuddyPress (1.7.0)
     729         * @since 1.7.0
    731730         *
    732731         * @global BP_Blogs_Template $blogs_template
     
    751750                 * Filters the row class of the current blog in the loop.
    752751                 *
    753                  * @since BuddyPress (1.7.0)
     752                 * @since 1.7.0
    754753                 *
    755754                 * @param array $classes Array of classes to be applied to row.
     
    852851                                 * Filters the title text of the latest post for the current blog in loop.
    853852                                 *
    854                                  * @since BuddyPress (1.0.0)
     853                                 * @since 1.0.0
    855854                                 *
    856855                                 * @param string $retval Title of the latest post.
     
    867866                 * Filters the HTML markup result for the latest blog post in loop.
    868867                 *
    869                  * @since BuddyPress (1.2.0)
     868                 * @since 1.2.0
    870869                 *
    871870                 * @param string $retval HTML markup for the latest post.
     
    877876 * Output the title of the latest post on the current blog in the loop.
    878877 *
    879  * @since BuddyPress (1.7.0)
     878 * @since 1.7.0
    880879 *
    881880 * @see bp_get_blog_latest_post_title()
     
    887886         * Return the title of the latest post on the current blog in the loop.
    888887         *
    889          * @since BuddyPress (1.7.0)
     888         * @since 1.7.0
    890889         *
    891890         * @global BP_Blogs_Template
     
    904903                 * Filters the title text of the latest post on the current blog in the loop.
    905904                 *
    906                  * @since BuddyPress (1.7.0)
     905                 * @since 1.7.0
    907906                 *
    908907                 * @param string $retval Title text for the latest post.
     
    914913 * Output the permalink of the latest post on the current blog in the loop.
    915914 *
    916  * @since BuddyPress (1.7.0)
     915 * @since 1.7.0
    917916 *
    918917 * @see bp_get_blog_latest_post_title()
     
    924923         * Return the permalink of the latest post on the current blog in the loop.
    925924         *
    926          * @since BuddyPress (1.7.0)
     925         * @since 1.7.0
    927926         *
    928927         * @global BP_Blogs_Template
     
    941940                 * Filters the permalink of the latest post on the current blog in the loop.
    942941                 *
    943                  * @since BuddyPress (1.7.0)
     942                 * @since 1.7.0
    944943                 *
    945944                 * @param string $retval Permalink URL of the latest post.
     
    951950 * Output the content of the latest post on the current blog in the loop.
    952951 *
    953  * @since BuddyPress (1.7.0)
     952 * @since 1.7.0
    954953 *
    955954 * @uses bp_get_blog_latest_post_content()
     
    961960         * Return the content of the latest post on the current blog in the loop.
    962961         *
    963          * @since BuddyPress (1.7.0)
     962         * @since 1.7.0
    964963         *
    965964         * @global BP_Blogs_Template
     
    978977                 * Filters the content of the latest post on the current blog in the loop.
    979978                 *
    980                  * @since BuddyPress (1.7.0)
     979                 * @since 1.7.0
    981980                 *
    982981                 * @param string $retval Content of the latest post on the current blog in the loop.
     
    988987 * Output the featured image of the latest post on the current blog in the loop.
    989988 *
    990  * @since BuddyPress (1.7.0)
     989 * @since 1.7.0
    991990 *
    992991 * @see bp_get_blog_latest_post_content() For description of parameters.
     
    1000999         * Return the featured image of the latest post on the current blog in the loop.
    10011000         *
    1002          * @since BuddyPress (1.7.0)
     1001         * @since 1.7.0
    10031002         *
    10041003         * @global BP_Blogs_Template
     
    10201019                 * Filters the featured image of the latest post on the current blog in the loop.
    10211020                 *
    1022                  * @since BuddyPress (1.7.0)
     1021                 * @since 1.7.0
    10231022                 *
    10241023                 * @param string $retval The featured image of the latest post on the current blog in the loop.
     
    10301029 * Does the latest blog post have a featured image?
    10311030 *
    1032  * @since BuddyPress (1.7.0)
     1031 * @since 1.7.0
    10331032 *
    10341033 * @param string $thumbnail Image version to return. 'thumbnail', 'medium', 'large',
     
    10441043         * Filters whether or not the latest blog post has a featured image.
    10451044         *
    1046          * @since BuddyPress (1.7.0)
     1045         * @since 1.7.0
    10471046         *
    10481047         * @param bool   $value     Whether or not the latest blog post has a featured image.
     
    10871086                 * Filters the total number of blogs on the site.
    10881087                 *
    1089                  * @since BuddyPress (1.2.0)
     1088                 * @since 1.2.0
    10901089                 *
    10911090                 * @param int $value Total number of blogs on the site.
     
    11151114                 * Filters the total number of blogs for a given user.
    11161115                 *
    1117                  * @since BuddyPress (1.2.0)
     1116                 * @since 1.2.0
    11181117                 *
    11191118                 * @param int $value Total number of blogs for a given user.
     
    11441143         * Filters whether or not blog creation is enabled.
    11451144         *
    1146          * @since BuddyPress (1.0.0)
     1145         * @since 1.0.0
    11471146         *
    11481147         * @param string $active_signup Value of the registration site option creation status.
     
    11771176                 * Filters the default values for Blog name, title, and any current errors.
    11781177                 *
    1179                  * @since BuddyPress (1.0.0)
     1178                 * @since 1.0.0
    11801179                 *
    11811180                 * @param array $value {
     
    12061205                         * Fires after the default hidden fields in blog signup form markup.
    12071206                         *
    1208                          * @since BuddyPress (1.0.0)
     1207                         * @since 1.0.0
    12091208                         */
    12101209                        do_action( 'signup_hidden_fields' ); ?>
     
    12931292         * Fires at the end of all of the default input fields for blog creation form.
    12941293         *
    1295          * @since BuddyPress (1.0.0)
     1294         * @since 1.0.0
    12961295         *
    12971296         * @param WP_Error $errors WP_Error object if any present.
     
    13341333         * Filters the default values for Blog meta.
    13351334         *
    1336          * @since BuddyPress (1.0.0)
     1335         * @since 1.0.0
    13371336         *
    13381337         * @param array $meta {
     
    13911390         * Fires after the default successful blog registration message markup.
    13921391         *
    1393          * @since BuddyPress (1.0.0)
     1392         * @since 1.0.0
    13941393         */
    13951394        do_action('signup_finished');
     
    14121411         * Filters "Create a Site" links for users viewing their own profiles.
    14131412         *
    1414          * @since BuddyPress (1.0.0)
     1413         * @since 1.0.0
    14151414         *
    14161415         * @param string $value HTML link for creating a site.
     
    14421441         * Fires after the markup for the navigation tabs for a user Blogs page.
    14431442         *
    1444          * @since BuddyPress (1.0.0)
     1443         * @since 1.0.0
    14451444         */
    14461445        do_action( 'bp_blogs_blog_tabs' );
     
    14621461         * Filters the output for the blog directory search form.
    14631462         *
    1464          * @since BuddyPress (1.9.0)
     1463         * @since 1.9.0
    14651464         *
    14661465         * @param string $search_form_html HTML markup for blog directory search form.
     
    14721471 * Output the Create a Site button.
    14731472 *
    1474  * @since BuddyPress (2.0.0)
     1473 * @since 2.0.0
    14751474 */
    14761475function bp_blog_create_button() {
     
    14801479         * Get the Create a Site button.
    14811480         *
    1482          * @since BuddyPress (2.0.0)
     1481         * @since 2.0.0
    14831482         *
    14841483         * @return string
     
    15071506                 * Filters the Create a Site button.
    15081507                 *
    1509                  * @since BuddyPress (2.0.0)
     1508                 * @since 2.0.0
    15101509                 *
    15111510                 * @param array $button_args Array of arguments to be used for the Create a Site button.
     
    15171516 * Output the Create a Site nav item.
    15181517 *
    1519  * @since BuddyPress (2.2.0)
     1518 * @since 2.2.0
    15201519 */
    15211520function bp_blog_create_nav_item() {
     
    15261525         * Get the Create a Site nav item.
    15271526         *
    1528          * @since BuddyPress (2.2.0)
     1527         * @since 2.2.0
    15291528         *
    15301529         * @return string
     
    15481547 * if so, transform the title button into a Blogs directory nav item.
    15491548 *
    1550  * @since BuddyPress (2.2.0)
     1549 * @since 2.2.0
    15511550 *
    15521551 * @uses bp_blog_create_nav_item() to output the Create a Site nav item.
     
    16181617                 * Filters the button for visiting a blog in a loop.
    16191618                 *
    1620                  * @since BuddyPress (1.2.10)
     1619                 * @since 1.2.10
    16211620                 *
    16221621                 * @param array $button Array of arguments to be used for the button to visit a blog.
     
    16301629 * Display the number of blogs in user's profile.
    16311630 *
    1632  * @since BuddyPress (2.0.0)
     1631 * @since 2.0.0
    16331632 *
    16341633 * @uses bp_blogs_admin_get_profile_stats() to get the stats.
     
    16441643 * Return the number of blogs in user's profile.
    16451644 *
    1646  * @since BuddyPress (2.0.0)
     1645 * @since 2.0.0
    16471646 *
    16481647 * @param array|string $args before|after|user_id
     
    16801679         * Filters the number of blogs in user's profile.
    16811680         *
    1682          * @since BuddyPress (2.0.0)
     1681         * @since 2.0.0
    16831682         *
    16841683         * @param string $value Output determined for the profile stats.
  • trunk/src/bp-blogs/bp-blogs-widgets.php

    r10011 r10100  
    11<?php
    2 
    32/**
    43 * BuddyPress Blogs Widgets.
     
    6059                 * Filters the Blogs Recent Posts widget title.
    6160                 *
    62                  * @since BuddyPress (2.2.0)
    63                  * @since BuddyPress (2.3.0) Added 'instance' and 'id_base' to arguments passed to filter.
     61                 * @since 2.2.0
     62                 * @since 2.3.0 Added 'instance' and 'id_base' to arguments passed to filter.
    6463                 *
    6564                 * @param string $title    The widget title.
  • trunk/src/bp-blogs/classes/class-bp-blogs-blog.php

    r10011 r10100  
    1616 * network and a specific user on that blog.
    1717 *
    18  * @since BuddyPress (1.0.0)
     18 * @since 1.0.0
    1919 */
    2020class BP_Blogs_Blog {
     
    6565                 * Please use this hook to filter the properties above. Each part will be passed in.
    6666                 *
    67                  * @since BuddyPress (1.0.0)
     67                 * @since 1.0.0
    6868                 *
    6969                 * @param BP_Blogs_Blog $this Current instance of the blog item being saved. Passed by reference.
     
    9797                 * Please use this hook to filter the properties above. Each part will be passed in.
    9898                 *
    99                  * @since BuddyPress (1.0.0)
     99                 * @since 1.0.0
    100100                 *
    101101                 * @param BP_Blogs_Blog $this Current instance of the blog item being saved. Passed by reference.
     
    243243
    244244                bp_blogs_delete_blogmeta( $blog_id );
    245                
     245
    246246                $bp = buddypress();
    247247
Note: See TracChangeset for help on using the changeset viewer.