Changeset 10100
- Timestamp:
- 09/12/2015 06:03:18 AM (10 years ago)
- Location:
- trunk/src/bp-blogs
- Files:
-
- 11 edited
-
bp-blogs-actions.php (modified) (2 diffs)
-
bp-blogs-activity.php (modified) (29 diffs)
-
bp-blogs-cache.php (modified) (4 diffs)
-
bp-blogs-classes.php (modified) (2 diffs)
-
bp-blogs-filters.php (modified) (7 diffs)
-
bp-blogs-functions.php (modified) (34 diffs)
-
bp-blogs-loader.php (modified) (10 diffs)
-
bp-blogs-screens.php (modified) (16 diffs)
-
bp-blogs-template.php (modified) (64 diffs)
-
bp-blogs-widgets.php (modified) (2 diffs)
-
classes/class-bp-blogs-blog.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-blogs/bp-blogs-actions.php
r9819 r10100 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Blogs Actions. … … 14 13 * Redirect to a random blog in the multisite network. 15 14 * 16 * @since BuddyPress (1.0.0)15 * @since 1.0.0 17 16 */ 18 17 function bp_blogs_redirect_to_random_blog() { -
trunk/src/bp-blogs/bp-blogs-activity.php
r10011 r10100 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Blogs Activity. … … 8 7 */ 9 8 10 // Exit if accessed directly 9 // Exit if accessed directly. 11 10 defined( 'ABSPATH' ) || exit; 12 11 … … 14 13 * Register activity actions for the blogs component. 15 14 * 16 * @since BuddyPress (1.0.0)15 * @since 1.0.0 17 16 * 18 17 * @return bool|null Returns false if activity component is not active. … … 54 53 * Fires after the registry of the default blog component activity actions. 55 54 * 56 * @since BuddyPress (1.1.0)55 * @since 1.1.0 57 56 */ 58 57 do_action( 'bp_blogs_register_activity_actions' ); … … 63 62 * Format 'new_blog' activity actions. 64 63 * 65 * @since BuddyPress (2.0.0)64 * @since 2.0.0 66 65 * 67 66 * @param string $action Static activity action. … … 91 90 * Filters the new blog activity action for the new blog. 92 91 * 93 * @since BuddyPress (2.0.0)92 * @since 2.0.0 94 93 * 95 94 * @param string $action Constructed activity action. … … 102 101 * Format 'new_blog_post' activity actions. 103 102 * 104 * @since BuddyPress (2.0.0)103 * @since 2.0.0 105 104 * 106 105 * @param string $action Static activity action. … … 203 202 * Filters the new blog post action for the new blog. 204 203 * 205 * @since BuddyPress (2.0.0)204 * @since 2.0.0 206 205 * 207 206 * @param string $action Constructed activity action. … … 214 213 * Format 'new_blog_comment' activity actions. 215 214 * 216 * @since BuddyPress (2.0.0)215 * @since 2.0.0 217 216 * 218 217 * @param string $action Static activity action. … … 280 279 * Filters the new blog comment action for the new blog. 281 280 * 282 * @since BuddyPress (2.0.0)281 * @since 2.0.0 283 282 * 284 283 * @param string $action Constructed activity action. … … 293 292 * This reduces database overhead during the activity loop. 294 293 * 295 * @since BuddyPress (2.0.0)294 * @since 2.0.0 296 295 * 297 296 * @param array $activities Array of activity items. … … 325 324 * Record blog-related activity to the activity stream. 326 325 * 327 * @since BuddyPress (1.0.0)326 * @since 1.0.0 328 327 * 329 328 * @see bp_activity_add() for description of parameters. … … 366 365 * Filters the action associated with activity for activity stream. 367 366 * 368 * @since BuddyPress (1.2.0)367 * @since 1.2.0 369 368 * 370 369 * @param string $value Action for the activity stream. … … 378 377 * Filters the content associated with activity for activity stream. 379 378 * 380 * @since BuddyPress (1.2.0)379 * @since 1.2.0 381 380 * 382 381 * @param string $value Generated summary from content for the activity stream. … … 402 401 * Delete a blog-related activity stream item. 403 402 * 404 * @since BuddyPress (1.0.0)403 * @since 1.0.0 405 404 * 406 405 * @see bp_activity_delete() for description of parameters. … … 443 442 * multiple {@link switch_to_blog()} calls in the activity stream. 444 443 * 445 * @since BuddyPress (2.0.0)444 * @since 2.0.0 446 445 * 447 446 * @param object $activity The BP_Activity_Activity object … … 529 528 * For blog post -> activity comment, see {@link bp_blogs_record_comment()}. 530 529 * 531 * @since BuddyPress (2.0.0)530 * @since 2.0.0 532 531 * 533 532 * @param int $comment_id The activity ID for the posted activity comment. … … 617 616 * Fires after activity comments have been synced and posted as blog comments. 618 617 * 619 * @since BuddyPress (2.0.0)618 * @since 2.0.0 620 619 * 621 620 * @param int $comment_id The activity ID for the posted activity comment. … … 635 634 * activity comment children before they are deleted. 636 635 * 637 * @since BuddyPress (2.0.0)636 * @since 2.0.0 638 637 * 639 638 * @param bool $retval … … 683 682 * Updates the blog comment when the associated activity comment is edited. 684 683 * 685 * @since BuddyPress (2.0.0)684 * @since 2.0.0 686 685 * 687 686 * @param BP_Activity_Activity $activity The activity object. … … 740 739 * activity comment IDs from each comment's meta when a post is trashed. 741 740 * 742 * @since BuddyPress (2.0.0)741 * @since 2.0.0 743 742 * 744 743 * @param int $post_id The post ID. … … 771 770 * API. 772 771 * 773 * @since BuddyPress (2.1.0)772 * @since 2.1.0 774 773 * 775 774 * @param array $args Arguments passed from bp_parse_args() in bp_has_activities(). … … 843 842 * This is to prevent having to requery these items later on. 844 843 * 845 * @since BuddyPress (2.0.0)844 * @since 2.0.0 846 845 * 847 846 * @see bp_blogs_disable_activity_commenting() … … 895 894 * Set up some globals used in the activity comment loop when AJAX is used. 896 895 * 897 * @since BuddyPress (2.0.0)896 * @since 2.0.0 898 897 * 899 898 * @see bp_blogs_setup_activity_loop_globals() … … 927 926 * - the activity entry is a 'new_blog_comment' type 928 927 * 929 * @since BuddyPress (2.0.0)928 * @since 2.0.0 930 929 * 931 930 * @param bool $retval Is activity commenting enabled for this activity entry? … … 979 978 * via {@link bp_blogs_setup_activity_loop_globals()}. 980 979 * 981 * @since BuddyPress (2.0.0)980 * @since 2.0.0 982 981 * 983 982 * @param bool $retval Are replies allowed for this activity reply? … … 1018 1017 * activity item is a 'new_blog_post' entry. 1019 1018 * 1020 * @since BuddyPress (2.0.0)1019 * @since 2.0.0 1021 1020 * 1022 1021 * @param string $retval The activity comment permalink. … … 1046 1045 * This is only done if the activity comment is associated with a blog comment. 1047 1046 * 1048 * @since BuddyPress (2.0.1)1047 * @since 2.0.1 1049 1048 * 1050 1049 * @param string $retval The activity permalink. … … 1073 1072 * This is only done if the activity comment is associated with a blog comment. 1074 1073 * 1075 * @since BuddyPress (2.0.1)1074 * @since 2.0.1 1076 1075 * 1077 1076 * @param string $retval The activity action. -
trunk/src/bp-blogs/bp-blogs-cache.php
r10011 r10100 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Blogs Caching. … … 11 10 */ 12 11 13 // Exit if accessed directly 12 // Exit if accessed directly. 14 13 defined( 'ABSPATH' ) || exit; 15 14 … … 38 37 * Clear the blog object cache. 39 38 * 40 * @since BuddyPress (1.0.0)39 * @since 1.0.0 41 40 * 42 41 * @param int $blog_id ID of the current blog. … … 52 51 } 53 52 54 // List actions to clear object caches on 53 // List actions to clear object caches on. 55 54 add_action( 'bp_blogs_remove_blog_for_user', 'bp_blogs_clear_blog_object_cache', 10, 2 ); 56 55 add_action( 'wpmu_new_blog', 'bp_blogs_clear_blog_object_cache', 10, 2 ); 57 56 add_action( 'bp_blogs_remove_blog', 'bp_blogs_clear_blog_object_cache' ); 58 57 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. 60 59 add_action( 'bp_blogs_remove_data_for_blog', 'bp_core_clear_cache' ); 61 60 add_action( 'bp_blogs_remove_comment', 'bp_core_clear_cache' ); -
trunk/src/bp-blogs/bp-blogs-classes.php
r9819 r10100 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Blogs Classes. … … 8 7 */ 9 8 10 // Exit if accessed directly 9 // Exit if accessed directly. 11 10 defined( 'ABSPATH' ) || exit; 12 11 -
trunk/src/bp-blogs/bp-blogs-filters.php
r10011 r10100 1 1 <?php 2 3 2 /** 4 3 * Filters related to the Blogs component. 5 4 * 6 5 * @package BuddyPress 7 * @subpackage Blog s8 * @since BuddyPress (1.6.0)6 * @subpackage BlogFilters 7 * @since 1.6.0 9 8 */ 10 9 … … 25 24 * Ensure that the 'Create a new site' link at wp-admin/my-sites.php points to the BP blog signup. 26 25 * 27 * @since BuddyPress (1.6.0)26 * @since 1.6.0 28 27 * 29 28 * @uses apply_filters() Filter 'bp_blogs_creation_location' to alter the … … 39 38 * Filters the 'Create a new site' link URL. 40 39 * 41 * @since BuddyPress (1.6.0)40 * @since 1.6.0 42 41 * 43 42 * @param string $value URL for the 'Create a new site' signup page. … … 50 49 * Only select comments by ID instead of all fields when using get_comments(). 51 50 * 52 * @since BuddyPress (2.1.0)51 * @since 2.1.0 53 52 * 54 53 * @see bp_blogs_update_post_activity_meta() … … 69 68 * Abstracted from the deprecated `bp_blogs_record_post()`. 70 69 * 71 * @since BuddyPress (2.2.0)70 * @since 2.2.0 72 71 * 73 72 * @param bool $return Whether the post should be published. … … 102 101 * Filters whether or not BuddyPress should block sitewide tags activity. 103 102 * 104 * @since BuddyPress (2.2.0)103 * @since 2.2.0 105 104 * 106 105 * @param bool $value Current status of the sitewide tags activity. … … 113 112 * Filters whether or not the current blog is public. 114 113 * 115 * @since BuddyPress (2.2.0)114 * @since 2.2.0 116 115 * 117 116 * @param int $value Value from the blog_public option for the current blog. -
trunk/src/bp-blogs/bp-blogs-functions.php
r10034 r10100 13 13 * Check whether the $bp global lists an activity directory page. 14 14 * 15 * @since BuddyPress (1.5.0)15 * @since 1.5.0 16 16 * 17 17 * @return bool True if set, false if empty. … … 72 72 * Populate the BP blogs table with existing blogs. 73 73 * 74 * @since BuddyPress (1.0.0)74 * @since 1.0.0 75 75 * 76 76 * @global object $wpdb WordPress database object. … … 150 150 * Fires after the BP blogs tables have been populated with existing blogs. 151 151 * 152 * @since BuddyPress (2.4.0)152 * @since 2.4.0 153 153 */ 154 154 do_action( 'bp_blogs_recorded_existing_blogs' ); … … 164 164 * only to particular users. 165 165 * 166 * @since BuddyPress (1.7.0)166 * @since 1.7.0 167 167 * 168 168 * @uses apply_filters() … … 196 196 * being trackable only to particular users. 197 197 * 198 * @since BuddyPress (1.7.0)198 * @since 1.7.0 199 199 * 200 200 * @uses bp_blogs_is_blog_recordable … … 226 226 * Make BuddyPress aware of a new site so that it can track its activity. 227 227 * 228 * @since BuddyPress (1.0.0)228 * @since 1.0.0 229 229 * 230 230 * @uses BP_Blogs_Blog … … 297 297 * Fires after BuddyPress has been made aware of a new site for activity tracking. 298 298 * 299 * @since BuddyPress (1.0.0)299 * @since 1.0.0 300 300 * 301 301 * @param BP_Blogs_Blog $recorded_blog Current blog being recorded. Passed by reference. … … 342 342 * Update "Close comments for old posts" option in BuddyPress blogmeta table. 343 343 * 344 * @since BuddyPress (2.0.0)344 * @since 2.0.0 345 345 * 346 346 * @global object $wpdb DB Layer. … … 360 360 * Update "Close comments after days old" option in BuddyPress blogmeta table. 361 361 * 362 * @since BuddyPress (2.0.0)362 * @since 2.0.0 363 363 * 364 364 * @global object $wpdb DB Layer. … … 378 378 * When toggling threaded comments, update thread depth in blogmeta table. 379 379 * 380 * @since BuddyPress (2.0.0)380 * @since 2.0.0 381 381 * 382 382 * @global object $wpdb DB Layer. … … 402 402 * When updating comment depth, update thread depth in blogmeta table. 403 403 * 404 * @since BuddyPress (2.0.0)404 * @since 2.0.0 405 405 * 406 406 * @global object $wpdb DB Layer. … … 427 427 * under "Network Admin > Sites". 428 428 * 429 * @since BuddyPress (2.3.0)429 * @since 2.3.0 430 430 * 431 431 * @param int $site_id The site ID. … … 439 439 * Record activity metadata about a published blog post. 440 440 * 441 * @since BuddyPress (2.2.0)441 * @since 2.2.0 442 442 * 443 443 * @param int $activity_id ID of the activity item. … … 466 466 * Fires after BuddyPress has recorded metadata about a published blog post. 467 467 * 468 * @since BuddyPress (1.0.0)468 * @since 1.0.0 469 469 * 470 470 * @param int $ID ID of the blog post being recorded. … … 479 479 * Updates a blog post's activity meta entry during a post edit. 480 480 * 481 * @since BuddyPress (2.2.0)481 * @since 2.2.0 482 482 * 483 483 * @param WP_Post $post Post object. … … 803 803 * to extend the functionality of the Blogs component. 804 804 * 805 * @since BuddyPress (2.1.0)805 * @since 2.1.0 806 806 * 807 807 * @return string … … 836 836 * first. See https://buddypress.trac.wordpress.org/ticket/3916. 837 837 * 838 * @since BuddyPress (1.6.0)838 * @since 1.6.0 839 839 * @access private 840 840 */ … … 861 861 * tracker and activity stream. 862 862 * 863 * @since BuddyPress (1.5.0)863 * @since 1.5.0 864 864 * 865 865 * @param int $blog_id ID of the blog having its item removed. … … 880 880 * tracker and activity stream. 881 881 * 882 * @since BuddyPress (1.0.0)882 * @since 1.0.0 883 883 * 884 884 * @param int $blog_id ID of the blog who had its item removed. … … 902 902 * Fires before a blog is removed from the tracker for a specific user. 903 903 * 904 * @since BuddyPress (1.5.0)904 * @since 1.5.0 905 905 * 906 906 * @param int $blog_id ID of the blog being removed. … … 921 921 * Fires after a blog has been removed from the tracker for a specific user. 922 922 * 923 * @since BuddyPress (1.0.0)923 * @since 1.0.0 924 924 * 925 925 * @param int $blog_id ID of the blog that was removed. … … 957 957 * Fires before removal of a blog post activity item from the activity stream. 958 958 * 959 * @since BuddyPress (1.5.0)959 * @since 1.5.0 960 960 * 961 961 * @param int $blog_id ID of the blog associated with the post that was removed. … … 976 976 * Fires after removal of a blog post activity item from the activity stream. 977 977 * 978 * @since BuddyPress (1.0.0)978 * @since 1.0.0 979 979 * 980 980 * @param int $blog_id ID of the blog associated with the post that was removed. … … 1045 1045 * Fires after a blog comment activity item was removed from activity stream. 1046 1046 * 1047 * @since BuddyPress (1.0.0)1047 * @since 1.0.0 1048 1048 * 1049 1049 * @param int $blogid Item ID for the blog associated with the removed comment. … … 1058 1058 * Removes blog comments that are associated with activity comments. 1059 1059 * 1060 * @since BuddyPress (2.0.0)1060 * @since 2.0.0 1061 1061 * 1062 1062 * @see bp_blogs_remove_comment() … … 1099 1099 * When a blog comment status transition occurs, update the relevant activity's status. 1100 1100 * 1101 * @since BuddyPress (1.6.0)1101 * @since 1.6.0 1102 1102 * 1103 1103 * @param string $new_status New comment status. … … 1197 1197 * Get the total number of blogs being tracked by BP for a specific user. 1198 1198 * 1199 * @since BuddyPress (1.2.0)1199 * @since 1.2.0 1200 1200 * 1201 1201 * @param int $user_id ID of the user being queried. Default: on a user page, … … 1234 1234 * and activity stream. 1235 1235 * 1236 * @since BuddyPress (1.5.0)1236 * @since 1.5.0 1237 1237 * 1238 1238 * @param int $blog_id ID of the blog whose data is being removed. … … 1254 1254 * and activity stream. 1255 1255 * 1256 * @since BuddyPress (1.0.0)1256 * @since 1.0.0 1257 1257 * 1258 1258 * @param int $blog_id ID of the blog whose data is being removed. … … 1371 1371 * Get metadata for a given blog. 1372 1372 * 1373 * @since BuddyPress (1.2.0)1373 * @since 1.2.0 1374 1374 * 1375 1375 * @global object $wpdb WordPress database access object. … … 1420 1420 * Add a piece of blog metadata. 1421 1421 * 1422 * @since BuddyPress (2.0.0)1422 * @since 2.0.0 1423 1423 * 1424 1424 * @param int $blog_id ID of the blog. … … 1452 1452 * Fires before all blog associations are removed for a given user. 1453 1453 * 1454 * @since BuddyPress (1.5.0)1454 * @since 1.5.0 1455 1455 * 1456 1456 * @param int $user_id ID of the user whose blog associations are being removed. … … 1464 1464 * Fires after all blog associations are removed for a given user. 1465 1465 * 1466 * @since BuddyPress (1.0.0)1466 * @since 1.0.0 1467 1467 * 1468 1468 * @param int $user_id ID of the user whose blog associations were removed. … … 1477 1477 * Restore all blog associations for a given user. 1478 1478 * 1479 * @since BuddyPress (2.2.0)1479 * @since 2.2.0 1480 1480 * 1481 1481 * @param int $user_id ID whose blog data should be restored. -
trunk/src/bp-blogs/bp-blogs-loader.php
r10019 r10100 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Blogs Loader … … 9 8 * 10 9 * @package BuddyPress 11 * @subpackage Blogs Core10 * @subpackage BlogsCore 12 11 */ 13 12 … … 20 19 * Start the blogs component creation process. 21 20 * 22 * @since BuddyPress (1.5.0)21 * @since 1.5.0 23 22 */ 24 23 public function __construct() { … … 39 38 * backwards compatibility. 40 39 * 41 * @since BuddyPress (1.5.0)40 * @since 1.5.0 42 41 * 43 42 * @see BP_Component::setup_globals() for description of parameters. … … 83 82 * In case the config is not multisite, the blog_public option is ignored. 84 83 * 85 * @since BuddyPress (2.3.0)84 * @since 2.3.0 86 85 * 87 86 * @oaram int $value Whether or not the blog is public. … … 92 91 * Filters the post types to track for the Blogs component. 93 92 * 94 * @since BuddyPress (1.5.0)95 * @deprecated BuddyPress (2.3.0)93 * @since 1.5.0 94 * @deprecated 2.3.0 96 95 * 97 96 * @param array $value Array of post types to track. … … 199 198 * Set up bp-blogs integration with the WordPress admin bar. 200 199 * 201 * @since BuddyPress (1.5.0)200 * @since 1.5.0 202 201 * 203 202 * @see BP_Component::setup_admin_bar() for a description of arguments. … … 287 286 * Setup cache groups 288 287 * 289 * @since BuddyPress (2.2.0)288 * @since 2.2.0 290 289 */ 291 290 public function setup_cache_groups() { … … 302 301 * Set up the tracking arguments for the 'post' post type. 303 302 * 304 * @since BuddyPress (2.2.0)303 * @since 2.2.0 305 304 * 306 305 * @see bp_activity_get_post_type_tracking_args() for information on parameters. … … 316 315 * Filters the post types to track for the Blogs component. 317 316 * 318 * @since BuddyPress (1.5.0)319 * @deprecated BuddyPress (2.3.0)317 * @since 1.5.0 318 * @deprecated 2.3.0 320 319 * 321 320 * Make sure plugins still using 'bp_blogs_record_post_post_types' -
trunk/src/bp-blogs/bp-blogs-screens.php
r10011 r10100 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Blogs Screens. … … 21 20 * Fires right before the loading of the My Blogs screen template file. 22 21 * 23 * @since BuddyPress (1.0.0)22 * @since 1.0.0 24 23 */ 25 24 do_action( 'bp_blogs_screen_my_blogs' ); … … 42 41 * Fires right before the loading of the Create A Blog screen template file. 43 42 * 44 * @since BuddyPress (1.0.0)43 * @since 1.0.0 45 44 */ 46 45 do_action( 'bp_blogs_screen_create_a_blog' ); … … 60 59 * Fires right before the loading of the top-level Blogs screen template file. 61 60 * 62 * @since BuddyPress (1.0.0)61 * @since 1.0.0 63 62 */ 64 63 do_action( 'bp_blogs_screen_index' ); … … 77 76 * group template parts to the_title and the_content areas of a theme. 78 77 * 79 * @since BuddyPress (1.7.0)78 * @since 1.7.0 80 79 */ 81 80 class BP_Blogs_Theme_Compat { … … 84 83 * Set up theme compatibility for the Blogs component. 85 84 * 86 * @since BuddyPress (1.7.0)85 * @since 1.7.0 87 86 */ 88 87 public function __construct() { … … 93 92 * Are we looking at something that needs Blogs theme compatibility? 94 93 * 95 * @since BuddyPress (1.7.0)94 * @since 1.7.0 96 95 */ 97 96 public function is_blogs() { … … 113 112 * before the actions and filters are added. 114 113 * 115 * @since BuddyPress (1.5.0)114 * @since 1.5.0 116 115 */ 117 116 do_action( 'bp_blogs_screen_index' ); … … 137 136 * {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}. 138 137 * 139 * @since BuddyPress (1.8.0)138 * @since 1.8.0 140 139 * 141 140 * @param string $templates The templates from bp_get_theme_compat_templates(). … … 148 147 * Filters the custom templates used for theme compat with the blog directory page. 149 148 * 150 * @since BuddyPress (1.8.0)149 * @since 1.8.0 151 150 * 152 151 * @param array $value Array of template paths to add to template list to look for. … … 166 165 * Update the global $post with directory data. 167 166 * 168 * @since BuddyPress (1.7.0)167 * @since 1.7.0 169 168 */ 170 169 public function directory_dummy_post() { … … 186 185 * Filter the_content with the groups index template part. 187 186 * 188 * @since BuddyPress (1.7.0)187 * @since 1.7.0 189 188 */ 190 189 public function directory_content() { … … 200 199 * {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}. 201 200 * 202 * @since BuddyPress (1.8.0)201 * @since 1.8.0 203 202 * 204 203 * @param string $templates The templates from bp_get_theme_compat_templates(). … … 211 210 * Filters the custom templates used for theme compat with the blog create page. 212 211 * 213 * @since BuddyPress (1.8.0)212 * @since 1.8.0 214 213 * 215 214 * @param array $value Array of template paths to add to template list to look for. … … 229 228 * Update the global $post with create screen data. 230 229 * 231 * @since BuddyPress (1.7.0)230 * @since 1.7.0 232 231 */ 233 232 public function create_dummy_post() { … … 256 255 * Filter the_content with the create screen template part. 257 256 * 258 * @since BuddyPress (1.7.0)257 * @since 1.7.0 259 258 */ 260 259 public function create_content() { -
trunk/src/bp-blogs/bp-blogs-template.php
r10011 r10100 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Blogs Template Tags. … … 8 7 */ 9 8 10 // Exit if accessed directly 9 // Exit if accessed directly. 11 10 defined( 'ABSPATH' ) || exit; 12 11 … … 14 13 * Output the blogs component slug. 15 14 * 16 * @since BuddyPress (1.5.0)15 * @since 1.5.0 17 16 * 18 17 * @uses bp_get_blogs_slug() … … 24 23 * Return the blogs component slug. 25 24 * 26 * @since BuddyPress (1.5.0)25 * @since 1.5.0 27 26 * 28 27 * @return string The 'blogs' slug. … … 33 32 * Filters the blogs component slug. 34 33 * 35 * @since BuddyPress (1.5.0)34 * @since 1.5.0 36 35 * 37 36 * @param string $slug Slug for the blogs component. … … 43 42 * Output the blogs component root slug. 44 43 * 45 * @since BuddyPress (1.5.0)44 * @since 1.5.0 46 45 * 47 46 * @uses bp_get_blogs_root_slug() … … 53 52 * Return the blogs component root slug. 54 53 * 55 * @since BuddyPress (1.5.0)54 * @since 1.5.0 56 55 * 57 56 * @return string The 'blogs' root slug. … … 62 61 * Filters the blogs component root slug. 63 62 * 64 * @since BuddyPress (1.5.0)63 * @since 1.5.0 65 64 * 66 65 * @param string $root_slug Root slug for the blogs component. … … 72 71 * Output blog directory permalink. 73 72 * 74 * @since BuddyPress (1.5.0)73 * @since 1.5.0 75 74 * 76 75 * @uses bp_get_blogs_directory_permalink() … … 82 81 * Return blog directory permalink. 83 82 * 84 * @since BuddyPress (1.5.0)83 * @since 1.5.0 85 84 * 86 85 * @uses apply_filters() … … 96 95 * Filters the blog directory permalink. 97 96 * 98 * @since BuddyPress (1.5.0)97 * @since 1.5.0 99 98 * 100 99 * @param string $value Permalink URL for the blog directory. … … 309 308 * Fires right before the rewinding of blogs listing after all are shown. 310 309 * 311 * @since BuddyPress (1.5.0)310 * @since 1.5.0 312 311 */ 313 312 do_action( 'blog_loop_end' ); … … 340 339 * Fires if on the first blog in the loop. 341 340 * 342 * @since BuddyPress (1.5.0)341 * @since 1.5.0 343 342 */ 344 343 do_action( 'blog_loop_start' ); … … 426 425 * Filters whether or not there are blogs to list. 427 426 * 428 * @since BuddyPress (1.1.0)427 * @since 1.1.0 429 428 * 430 429 * @param bool $value Whether or not there are blogs to list. … … 502 501 * Filters the blogs pagination links. 503 502 * 504 * @since BuddyPress (1.0.0)503 * @since 1.0.0 505 504 * 506 505 * @param string $pag_links HTML pagination links. … … 525 524 * admin. Filter 'bp_get_blog_avatar_' . $blog_id to customize. 526 525 * 527 * @since BuddyPress (2.4.0)Introduced `$title` argument.526 * @since 2.4.0 Introduced `$title` argument. 528 527 * 529 528 * @see bp_core_fetch_avatar() For a description of arguments and … … 595 594 * Filters a blog's avatar. 596 595 * 597 * @since BuddyPress (1.5.0)596 * @since 1.5.0 598 597 * 599 598 * @param string $avatar Formatted HTML <img> element, or raw avatar … … 624 623 * Filters the blog permalink. 625 624 * 626 * @since BuddyPress (1.0.0)625 * @since 1.0.0 627 626 * 628 627 * @param string $permalink Permalink URL for the blog. … … 648 647 * Filters the name of the current blog in the loop. 649 648 * 650 * @since BuddyPress (1.2.0)649 * @since 1.2.0 651 650 * 652 651 * @param string $name Name of the current blog in the loop. … … 658 657 * Output the ID of the current blog in the loop. 659 658 * 660 * @since BuddyPress (1.7.0)659 * @since 1.7.0 661 660 */ 662 661 function bp_blog_id() { … … 666 665 * Return the ID of the current blog in the loop. 667 666 * 668 * @since BuddyPress (1.7.0)667 * @since 1.7.0 669 668 * 670 669 * @return int ID of the current blog in the loop. … … 676 675 * Filters the ID of the current blog in the loop. 677 676 * 678 * @since BuddyPress (1.7.0)677 * @since 1.7.0 679 678 * 680 679 * @param int $blog_id ID of the current blog in the loop. … … 691 690 * Filters the description of the current blog in the loop. 692 691 * 693 * @since BuddyPress (1.2.0)692 * @since 1.2.0 694 693 * 695 694 * @param string $value Description of the current blog in the loop. … … 708 707 * Filters the description of the current blog in the loop. 709 708 * 710 * @since BuddyPress (1.0.0)709 * @since 1.0.0 711 710 * 712 711 * @param string $value Description of the current blog in the loop. … … 718 717 * Output the row class of the current blog in the loop. 719 718 * 720 * @since BuddyPress (1.7.0)719 * @since 1.7.0 721 720 * 722 721 * @param array $classes Array of custom classes … … 728 727 * Return the row class of the current blog in the loop. 729 728 * 730 * @since BuddyPress (1.7.0)729 * @since 1.7.0 731 730 * 732 731 * @global BP_Blogs_Template $blogs_template … … 751 750 * Filters the row class of the current blog in the loop. 752 751 * 753 * @since BuddyPress (1.7.0)752 * @since 1.7.0 754 753 * 755 754 * @param array $classes Array of classes to be applied to row. … … 852 851 * Filters the title text of the latest post for the current blog in loop. 853 852 * 854 * @since BuddyPress (1.0.0)853 * @since 1.0.0 855 854 * 856 855 * @param string $retval Title of the latest post. … … 867 866 * Filters the HTML markup result for the latest blog post in loop. 868 867 * 869 * @since BuddyPress (1.2.0)868 * @since 1.2.0 870 869 * 871 870 * @param string $retval HTML markup for the latest post. … … 877 876 * Output the title of the latest post on the current blog in the loop. 878 877 * 879 * @since BuddyPress (1.7.0)878 * @since 1.7.0 880 879 * 881 880 * @see bp_get_blog_latest_post_title() … … 887 886 * Return the title of the latest post on the current blog in the loop. 888 887 * 889 * @since BuddyPress (1.7.0)888 * @since 1.7.0 890 889 * 891 890 * @global BP_Blogs_Template … … 904 903 * Filters the title text of the latest post on the current blog in the loop. 905 904 * 906 * @since BuddyPress (1.7.0)905 * @since 1.7.0 907 906 * 908 907 * @param string $retval Title text for the latest post. … … 914 913 * Output the permalink of the latest post on the current blog in the loop. 915 914 * 916 * @since BuddyPress (1.7.0)915 * @since 1.7.0 917 916 * 918 917 * @see bp_get_blog_latest_post_title() … … 924 923 * Return the permalink of the latest post on the current blog in the loop. 925 924 * 926 * @since BuddyPress (1.7.0)925 * @since 1.7.0 927 926 * 928 927 * @global BP_Blogs_Template … … 941 940 * Filters the permalink of the latest post on the current blog in the loop. 942 941 * 943 * @since BuddyPress (1.7.0)942 * @since 1.7.0 944 943 * 945 944 * @param string $retval Permalink URL of the latest post. … … 951 950 * Output the content of the latest post on the current blog in the loop. 952 951 * 953 * @since BuddyPress (1.7.0)952 * @since 1.7.0 954 953 * 955 954 * @uses bp_get_blog_latest_post_content() … … 961 960 * Return the content of the latest post on the current blog in the loop. 962 961 * 963 * @since BuddyPress (1.7.0)962 * @since 1.7.0 964 963 * 965 964 * @global BP_Blogs_Template … … 978 977 * Filters the content of the latest post on the current blog in the loop. 979 978 * 980 * @since BuddyPress (1.7.0)979 * @since 1.7.0 981 980 * 982 981 * @param string $retval Content of the latest post on the current blog in the loop. … … 988 987 * Output the featured image of the latest post on the current blog in the loop. 989 988 * 990 * @since BuddyPress (1.7.0)989 * @since 1.7.0 991 990 * 992 991 * @see bp_get_blog_latest_post_content() For description of parameters. … … 1000 999 * Return the featured image of the latest post on the current blog in the loop. 1001 1000 * 1002 * @since BuddyPress (1.7.0)1001 * @since 1.7.0 1003 1002 * 1004 1003 * @global BP_Blogs_Template … … 1020 1019 * Filters the featured image of the latest post on the current blog in the loop. 1021 1020 * 1022 * @since BuddyPress (1.7.0)1021 * @since 1.7.0 1023 1022 * 1024 1023 * @param string $retval The featured image of the latest post on the current blog in the loop. … … 1030 1029 * Does the latest blog post have a featured image? 1031 1030 * 1032 * @since BuddyPress (1.7.0)1031 * @since 1.7.0 1033 1032 * 1034 1033 * @param string $thumbnail Image version to return. 'thumbnail', 'medium', 'large', … … 1044 1043 * Filters whether or not the latest blog post has a featured image. 1045 1044 * 1046 * @since BuddyPress (1.7.0)1045 * @since 1.7.0 1047 1046 * 1048 1047 * @param bool $value Whether or not the latest blog post has a featured image. … … 1087 1086 * Filters the total number of blogs on the site. 1088 1087 * 1089 * @since BuddyPress (1.2.0)1088 * @since 1.2.0 1090 1089 * 1091 1090 * @param int $value Total number of blogs on the site. … … 1115 1114 * Filters the total number of blogs for a given user. 1116 1115 * 1117 * @since BuddyPress (1.2.0)1116 * @since 1.2.0 1118 1117 * 1119 1118 * @param int $value Total number of blogs for a given user. … … 1144 1143 * Filters whether or not blog creation is enabled. 1145 1144 * 1146 * @since BuddyPress (1.0.0)1145 * @since 1.0.0 1147 1146 * 1148 1147 * @param string $active_signup Value of the registration site option creation status. … … 1177 1176 * Filters the default values for Blog name, title, and any current errors. 1178 1177 * 1179 * @since BuddyPress (1.0.0)1178 * @since 1.0.0 1180 1179 * 1181 1180 * @param array $value { … … 1206 1205 * Fires after the default hidden fields in blog signup form markup. 1207 1206 * 1208 * @since BuddyPress (1.0.0)1207 * @since 1.0.0 1209 1208 */ 1210 1209 do_action( 'signup_hidden_fields' ); ?> … … 1293 1292 * Fires at the end of all of the default input fields for blog creation form. 1294 1293 * 1295 * @since BuddyPress (1.0.0)1294 * @since 1.0.0 1296 1295 * 1297 1296 * @param WP_Error $errors WP_Error object if any present. … … 1334 1333 * Filters the default values for Blog meta. 1335 1334 * 1336 * @since BuddyPress (1.0.0)1335 * @since 1.0.0 1337 1336 * 1338 1337 * @param array $meta { … … 1391 1390 * Fires after the default successful blog registration message markup. 1392 1391 * 1393 * @since BuddyPress (1.0.0)1392 * @since 1.0.0 1394 1393 */ 1395 1394 do_action('signup_finished'); … … 1412 1411 * Filters "Create a Site" links for users viewing their own profiles. 1413 1412 * 1414 * @since BuddyPress (1.0.0)1413 * @since 1.0.0 1415 1414 * 1416 1415 * @param string $value HTML link for creating a site. … … 1442 1441 * Fires after the markup for the navigation tabs for a user Blogs page. 1443 1442 * 1444 * @since BuddyPress (1.0.0)1443 * @since 1.0.0 1445 1444 */ 1446 1445 do_action( 'bp_blogs_blog_tabs' ); … … 1462 1461 * Filters the output for the blog directory search form. 1463 1462 * 1464 * @since BuddyPress (1.9.0)1463 * @since 1.9.0 1465 1464 * 1466 1465 * @param string $search_form_html HTML markup for blog directory search form. … … 1472 1471 * Output the Create a Site button. 1473 1472 * 1474 * @since BuddyPress (2.0.0)1473 * @since 2.0.0 1475 1474 */ 1476 1475 function bp_blog_create_button() { … … 1480 1479 * Get the Create a Site button. 1481 1480 * 1482 * @since BuddyPress (2.0.0)1481 * @since 2.0.0 1483 1482 * 1484 1483 * @return string … … 1507 1506 * Filters the Create a Site button. 1508 1507 * 1509 * @since BuddyPress (2.0.0)1508 * @since 2.0.0 1510 1509 * 1511 1510 * @param array $button_args Array of arguments to be used for the Create a Site button. … … 1517 1516 * Output the Create a Site nav item. 1518 1517 * 1519 * @since BuddyPress (2.2.0)1518 * @since 2.2.0 1520 1519 */ 1521 1520 function bp_blog_create_nav_item() { … … 1526 1525 * Get the Create a Site nav item. 1527 1526 * 1528 * @since BuddyPress (2.2.0)1527 * @since 2.2.0 1529 1528 * 1530 1529 * @return string … … 1548 1547 * if so, transform the title button into a Blogs directory nav item. 1549 1548 * 1550 * @since BuddyPress (2.2.0)1549 * @since 2.2.0 1551 1550 * 1552 1551 * @uses bp_blog_create_nav_item() to output the Create a Site nav item. … … 1618 1617 * Filters the button for visiting a blog in a loop. 1619 1618 * 1620 * @since BuddyPress (1.2.10)1619 * @since 1.2.10 1621 1620 * 1622 1621 * @param array $button Array of arguments to be used for the button to visit a blog. … … 1630 1629 * Display the number of blogs in user's profile. 1631 1630 * 1632 * @since BuddyPress (2.0.0)1631 * @since 2.0.0 1633 1632 * 1634 1633 * @uses bp_blogs_admin_get_profile_stats() to get the stats. … … 1644 1643 * Return the number of blogs in user's profile. 1645 1644 * 1646 * @since BuddyPress (2.0.0)1645 * @since 2.0.0 1647 1646 * 1648 1647 * @param array|string $args before|after|user_id … … 1680 1679 * Filters the number of blogs in user's profile. 1681 1680 * 1682 * @since BuddyPress (2.0.0)1681 * @since 2.0.0 1683 1682 * 1684 1683 * @param string $value Output determined for the profile stats. -
trunk/src/bp-blogs/bp-blogs-widgets.php
r10011 r10100 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Blogs Widgets. … … 60 59 * Filters the Blogs Recent Posts widget title. 61 60 * 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. 64 63 * 65 64 * @param string $title The widget title. -
trunk/src/bp-blogs/classes/class-bp-blogs-blog.php
r10011 r10100 16 16 * network and a specific user on that blog. 17 17 * 18 * @since BuddyPress (1.0.0)18 * @since 1.0.0 19 19 */ 20 20 class BP_Blogs_Blog { … … 65 65 * Please use this hook to filter the properties above. Each part will be passed in. 66 66 * 67 * @since BuddyPress (1.0.0)67 * @since 1.0.0 68 68 * 69 69 * @param BP_Blogs_Blog $this Current instance of the blog item being saved. Passed by reference. … … 97 97 * Please use this hook to filter the properties above. Each part will be passed in. 98 98 * 99 * @since BuddyPress (1.0.0)99 * @since 1.0.0 100 100 * 101 101 * @param BP_Blogs_Blog $this Current instance of the blog item being saved. Passed by reference. … … 243 243 244 244 bp_blogs_delete_blogmeta( $blog_id ); 245 245 246 246 $bp = buddypress(); 247 247
Note: See TracChangeset
for help on using the changeset viewer.