Changeset 10011
- Timestamp:
- 07/11/2015 11:12:52 PM (9 years ago)
- Location:
- trunk/src/bp-blogs
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-blogs/bp-blogs-activity.php
r9958 r10011 65 65 * @since BuddyPress (2.0.0) 66 66 * 67 * @param string $action Static activity action. 68 * @param obj $activity Activity data object. 67 * @param string $action Static activity action. 68 * @param object $activity Activity data object. 69 * 70 * @return string 69 71 */ 70 72 function bp_blogs_format_activity_action_new_blog( $action, $activity ) { … … 92 94 * 93 95 * @param string $action Constructed activity action. 94 * @param obj 96 * @param object $activity Activity data object. 95 97 */ 96 98 return apply_filters( 'bp_blogs_format_activity_action_new_blog', $action, $activity ); … … 102 104 * @since BuddyPress (2.0.0) 103 105 * 104 * @param string $action Static activity action. 105 * @param obj $activity Activity data object. 106 * @param string $action Static activity action. 107 * @param object $activity Activity data object. 108 * 109 * @return string Constructed activity action. 106 110 */ 107 111 function bp_blogs_format_activity_action_new_blog_post( $action, $activity ) { … … 202 206 * 203 207 * @param string $action Constructed activity action. 204 * @param obj 208 * @param object $activity Activity data object. 205 209 */ 206 210 return apply_filters( 'bp_blogs_format_activity_action_new_blog_post', $action, $activity ); … … 212 216 * @since BuddyPress (2.0.0) 213 217 * 214 * @param string $action Static activity action. 215 * @param obj $activity Activity data object. 218 * @param string $action Static activity action. 219 * @param object $activity Activity data object. 220 * 221 * @return string Constructed activity action. 216 222 */ 217 223 function bp_blogs_format_activity_action_new_blog_comment( $action, $activity ) { … … 277 283 * 278 284 * @param string $action Constructed activity action. 279 * @param obj 285 * @param object $activity Activity data object. 280 286 */ 281 287 return apply_filters( 'bp_blogs_format_activity_action_new_blog_comment', $action, $activity ); … … 290 296 * 291 297 * @param array $activities Array of activity items. 298 * 292 299 * @return array 293 300 */ … … 322 329 * @see bp_activity_add() for description of parameters. 323 330 * 324 * @param array $args {331 * @param array|string $args { 325 332 * See {@link bp_activity_add()} for complete description of arguments. 326 333 * The arguments listed here have different default values from … … 399 406 * @see bp_activity_delete() for description of parameters. 400 407 * 401 * @param array $args {408 * @param array|string $args { 402 409 * See {@link bp_activity_delete()} for complete description of arguments. 403 410 * The arguments listed here have different default values from … … 439 446 * 440 447 * @param object $activity The BP_Activity_Activity object 448 * 441 449 * @return bool 442 450 */ … … 523 531 * @since BuddyPress (2.0.0) 524 532 * 525 * @param int $comment_idThe activity ID for the posted activity comment.526 * @param array $paramsParameters for the activity comment.527 * @param object Parameters of the parent activity item (in this case, the blog post).533 * @param int $comment_id The activity ID for the posted activity comment. 534 * @param array $params Parameters for the activity comment. 535 * @param object $parent_activity Parameters of the parent activity item (in this case, the blog post). 528 536 */ 529 537 function bp_blogs_sync_add_from_activity_comment( $comment_id, $params, $parent_activity ) { … … 630 638 * 631 639 * @param bool $retval 632 * @param int $parent_activity_id The parent activity ID for the activity comment. 633 * @param int $activity_id The activity ID for the pending deleted activity comment. 640 * @param int $parent_activity_id The parent activity ID for the activity comment. 641 * @param int $activity_id The activity ID for the pending deleted activity comment. 642 * 643 * @return bool 634 644 */ 635 645 function bp_blogs_sync_delete_from_activity_comment( $retval, $parent_activity_id, $activity_id ) { … … 732 742 * @since BuddyPress (2.0.0) 733 743 * 734 * @param int $post_id The post ID744 * @param int $post_id The post ID. 735 745 * @param array $comments Array of comment statuses. The key is comment ID, the 736 * value is the $comment->comment_approved value.746 * value is the $comment->comment_approved value. 737 747 */ 738 748 function bp_blogs_remove_activity_meta_for_trashed_comments( $post_id = 0, $comments = array() ) { … … 764 774 * 765 775 * @param array $args Arguments passed from bp_parse_args() in bp_has_activities(). 776 * 766 777 * @return array $args 767 778 */ … … 837 848 * @see bp_blogs_setup_comment_loop_globals_on_ajax() 838 849 * 839 * @param object $activity The BP_Activity_Activity object 850 * @param object $activity The BP_Activity_Activity object. 840 851 */ 841 852 function bp_blogs_setup_activity_loop_globals( $activity ) { … … 919 930 * 920 931 * @param bool $retval Is activity commenting enabled for this activity entry? 932 * 921 933 * @return bool 922 934 */ … … 969 981 * @since BuddyPress (2.0.0) 970 982 * 971 * @param bool $retval Are replies allowed for this activity reply? 972 * @param object $comment The activity comment object 983 * @param bool $retval Are replies allowed for this activity reply? 984 * @param object $comment The activity comment object. 985 * 973 986 * @return bool 974 987 */ … … 1007 1020 * @since BuddyPress (2.0.0) 1008 1021 * 1009 * @param string $retval The activity comment permalink 1022 * @param string $retval The activity comment permalink. 1023 * 1010 1024 * @return string 1011 1025 */ … … 1034 1048 * @since BuddyPress (2.0.1) 1035 1049 * 1036 * @param string $retval The activity permalink1050 * @param string $retval The activity permalink. 1037 1051 * @param BP_Activity_Activity $activity 1052 * 1038 1053 * @return string 1039 1054 */ … … 1060 1075 * @since BuddyPress (2.0.1) 1061 1076 * 1062 * @param string $retval The activity action1077 * @param string $retval The activity action. 1063 1078 * @param BP_Activity_Activity $activity 1079 * 1064 1080 * @return string 1065 1081 */ -
trunk/src/bp-blogs/bp-blogs-cache.php
r9819 r10011 21 21 * using querying blogmeta inline. 22 22 * 23 * @param int|str |array$blog_ids Accepts a single blog ID, or a comma-24 * separated list or array of blog IDs.23 * @param int|string|array|bool $blog_ids Accepts a single blog ID, or a comma- 24 * separated list or array of blog IDs. 25 25 */ 26 26 function bp_blogs_update_meta_cache( $blog_ids = false ) { -
trunk/src/bp-blogs/bp-blogs-filters.php
r9819 r10011 31 31 * 32 32 * @param string $url The original URL (points to wp-signup.php by default). 33 * 33 34 * @return string The new URL. 34 35 */ … … 53 54 * @see bp_blogs_update_post_activity_meta() 54 55 * 55 * @param array Current SQL clauses in array format 56 * @param array $retval Current SQL clauses in array format. 57 * 56 58 * @return array 57 59 */ … … 73 75 * @param int $post_id ID of the post. 74 76 * @param int $user_id ID of the post author. 77 * 75 78 * @return bool True to authorize the post to be published, otherwise false. 76 79 */ -
trunk/src/bp-blogs/bp-blogs-functions.php
r9979 r10011 24 24 25 25 /** 26 * Retrieve a set of blogs 26 * Retrieve a set of blogs. 27 27 * 28 28 * @see BP_Blogs_Blog::get() for a description of arguments and return value. 29 29 * 30 * @param array $args {30 * @param array|string $args { 31 31 * Arguments are listed here with their default values. For more 32 32 * information about the arguments, see {@link BP_Blogs_Blog::get()}. 33 * @type string $typeDefault: 'active'.34 * @type int|bool $user_idDefault: false.35 * @type array $include_blog_idsDefault: false.36 * @type string|bool $search_terms Default: false.37 * @type int $per_pageDefault: 20.38 * @type int $pageDefault: 1.39 * @type bool $update_meta_cache Whether to pre-fetch blogmeta. Default: true.33 * @type string $type Default: 'active'. 34 * @type int|bool $user_id Default: false. 35 * @type array $include_blog_ids Default: false. 36 * @type string|bool $search_terms Default: false. 37 * @type int $per_page Default: 20. 38 * @type int $page Default: 1. 39 * @type bool $update_meta_cache Whether to pre-fetch blogmeta. Default: true. 40 40 * } 41 41 * @return array See {@link BP_Blogs_Blog::get()}. … … 74 74 * @since BuddyPress (1.0.0) 75 75 * 76 * @global object $wpdb WordPress database object 76 * @global object $wpdb WordPress database object. 77 77 * @uses get_users() 78 78 * @uses bp_blogs_record_blog() 79 * 80 * @return bool 79 81 */ 80 82 function bp_blogs_record_existing_blogs() { … … 168 170 * @param int $blog_id ID of the blog being checked. 169 171 * @param int $user_id Optional. ID of the user for whom access is being checked. 172 * 170 173 * @return bool True if blog is recordable, otherwise false. 171 174 */ … … 200 203 * @param int $blog_id ID of the blog being checked. 201 204 * @param int $user_id Optional. ID of the user for whom access is being checked. 205 * 202 206 * @return bool True if blog is trackable, otherwise false. 203 207 */ … … 226 230 * @uses BP_Blogs_Blog 227 231 * 228 * @param int $blog_idID of the blog being recorded.229 * @param int $user_idID of the user for whom the blog is being recorded.232 * @param int $blog_id ID of the blog being recorded. 233 * @param int $user_id ID of the user for whom the blog is being recorded. 230 234 * @param bool $no_activity Optional. Whether to skip recording an activity 231 * item about this blog creation. Default: false. 235 * item about this blog creation. Default: false. 236 * 232 237 * @return bool|null Returns false on failure. 233 238 */ … … 308 313 * 309 314 * @param string $oldvalue Value before save. Passed by do_action() but 310 * unused here.315 * unused here. 311 316 * @param string $newvalue Value to change meta to. 312 317 */ … … 319 324 320 325 /** 321 * Update blog description in BuddyPress blogmeta table 326 * Update blog description in BuddyPress blogmeta table. 322 327 * 323 328 * @global object $wpdb DB Layer. 324 329 * 325 330 * @param string $oldvalue Value before save. Passed by do_action() but 326 * unused here.331 * unused here. 327 332 * @param string $newvalue Value to change meta to. 328 333 */ … … 342 347 * 343 348 * @param string $oldvalue Value before save. Passed by do_action() but 344 * unused here.349 * unused here. 345 350 * @param string $newvalue Value to change meta to. 346 351 */ … … 360 365 * 361 366 * @param string $oldvalue Value before save. Passed by do_action() but 362 * unused here.367 * unused here. 363 368 * @param string $newvalue Value to change meta to. 364 369 */ … … 378 383 * 379 384 * @param string $oldvalue Value before save. Passed by do_action() but 380 * unused here.385 * unused here. 381 386 * @param string $newvalue Value to change meta to. 382 387 */ … … 402 407 * 403 408 * @param string $oldvalue Value before save. Passed by do_action() but 404 * unused here.409 * unused here. 405 410 * @param string $newvalue Value to change meta to. 406 411 */ … … 424 429 * @since BuddyPress (2.3.0) 425 430 * 426 * @param int $site_id The site ID 431 * @param int $site_id The site ID. 427 432 */ 428 433 function bp_blogs_delete_url_blogmeta( $site_id = 0 ) { … … 436 441 * @since BuddyPress (2.2.0) 437 442 * 438 * @param int $activity_id ID of the activity item. 439 * @param WP_Post $post Post object. 443 * @param int $activity_id ID of the activity item. 444 * @param WP_Post $post Post object. 445 * @param array $args Array of arguments. 440 446 */ 441 447 function bp_blogs_publish_post_activity_meta( $activity_id, $post, $args ) { … … 556 562 * Only posts the item if blog is public and post is not password-protected. 557 563 * 558 * @param int $comment_idID of the comment being recorded.564 * @param int $comment_id ID of the comment being recorded. 559 565 * @param bool|string $is_approved Optional. The $is_approved value passed to 560 * the 'comment_post' action. Default: true. 566 * the 'comment_post' action. Default: true. 567 * 561 568 * @return bool|object Returns false on failure, the comment object on success. 562 569 */ … … 737 744 * modify this behavior. 738 745 * 739 * @param int $user_id The ID of the user 740 * @param string|bool $role User's WordPress role for this blog ID 741 * @param int $blog_id Blog ID user is being added to 746 * @param int $user_id The ID of the user. 747 * @param string|bool $role User's WordPress role for this blog ID. 748 * @param int $blog_id Blog ID user is being added to. 742 749 * 743 750 * @return bool|null False on failure. … … 822 829 823 830 /** 824 * Rehook WP's maybe_add_existing_user_to_blog with a later priority 831 * Rehook WP's maybe_add_existing_user_to_blog with a later priority. 825 832 * 826 833 * WordPress catches add-user-to-blog requests at init:10. In some cases, this … … 929 936 * @param int $blog_id Optional. Defaults to current blog ID. 930 937 * @param int $user_id Optional. Defaults to the logged-in user ID. This param 931 * is currently unused in the function (but is passed to hooks). 938 * is currently unused in the function (but is passed to hooks). 939 * 940 * @return bool 932 941 */ 933 942 function bp_blogs_remove_post( $post_id, $blog_id = 0, $user_id = 0 ) { … … 1054 1063 * 1055 1064 * @param array $activity_ids The activity IDs to check association with blog 1056 * comments.1057 * @param bool $force_delete Whether to force delete the comments. If false,1058 * comments are trashed instead.1065 * comments. 1066 * @param bool $force_delete Whether to force delete the comments. If false, 1067 * comments are trashed instead. 1059 1068 */ 1060 1069 function bp_blogs_remove_associated_blog_comments( $activity_ids = array(), $force_delete = true ) { … … 1093 1102 * @param string $new_status New comment status. 1094 1103 * @param string $old_status Previous comment status. 1095 * @param object $comment Comment data.1104 * @param object $comment Comment data. 1096 1105 */ 1097 1106 function bp_blogs_transition_activity_status( $new_status, $old_status, $comment ) { … … 1190 1199 * 1191 1200 * @param int $user_id ID of the user being queried. Default: on a user page, 1192 * the displayed user. Otherwise, the logged-in user. 1201 * the displayed user. Otherwise, the logged-in user. 1202 * 1193 1203 * @return int $count Total blog count for the user. 1194 1204 */ … … 1257 1267 * and return values. 1258 1268 * 1259 * @param int $user_idSee {@BP_Blogs_Blog::get_blogs_for_user()}.1269 * @param int $user_id See {@BP_Blogs_Blog::get_blogs_for_user()}. 1260 1270 * @param bool $show_hidden See {@BP_Blogs_Blog::get_blogs_for_user()}. 1271 * 1261 1272 * @return array See {@BP_Blogs_Blog::get_blogs_for_user()}. 1262 1273 */ … … 1271 1282 * 1272 1283 * @param int $limit See {@BP_Blogs_Blog::get_all()}. 1273 * @param int $page See {@BP_Blogs_Blog::get_all()}. 1284 * @param int $page See {@BP_Blogs_Blog::get_all()}. 1285 * 1274 1286 * @return array See {@BP_Blogs_Blog::get_all()}. 1275 1287 */ … … 1284 1296 * 1285 1297 * @param int $limit See {@BP_Blogs_Blog::get()}. 1286 * @param int $page See {@BP_Blogs_Blog::get()}. 1298 * @param int $page See {@BP_Blogs_Blog::get()}. 1299 * 1287 1300 * @return array See {@BP_Blogs_Blog::get()}. 1288 1301 */ … … 1297 1310 * 1298 1311 * @param int $blog_id See {@BP_Blogs_Blog::is_hidden()}. 1312 * 1299 1313 * @return bool See {@BP_Blogs_Blog::is_hidden()}. 1300 1314 */ … … 1317 1331 * @global object $wpdb WordPress database access object. 1318 1332 * 1319 * @param int $blog_id ID of the blog whose metadata is being deleted. 1320 * @param string $meta_key Optional. The key of the metadata being deleted. If 1321 * omitted, all BP metadata associated with the blog will be deleted. 1322 * @param string $meta_value Optional. If present, the metadata will only be 1323 * deleted if the meta_value matches this parameter. 1324 * @param bool $delete_all Optional. If true, delete matching metadata entries 1325 * for all objects, ignoring the specified blog_id. Otherwise, only 1326 * delete matching metadata entries for the specified blog. 1327 * Default: false. 1333 * @param int $blog_id ID of the blog whose metadata is being deleted. 1334 * @param string|bool $meta_key Optional. The key of the metadata being deleted. If 1335 * omitted, all BP metadata associated with the blog will 1336 * be deleted. 1337 * @param string|bool $meta_value Optional. If present, the metadata will only be 1338 * deleted if the meta_value matches this parameter. 1339 * @param bool $delete_all Optional. If true, delete matching metadata entries for 1340 * all objects, ignoring the specified blog_id. Otherwise, only 1341 * delete matching metadata entries for the specified blog. 1342 * Default: false. 1343 * 1328 1344 * @return bool True on success, false on failure. 1329 1345 */ … … 1358 1374 * @global object $wpdb WordPress database access object. 1359 1375 * 1360 * @param int $blog_idID of the blog whose metadata is being requested.1376 * @param int $blog_id ID of the blog whose metadata is being requested. 1361 1377 * @param string $meta_key Optional. If present, only the metadata matching 1362 * that meta key will be returned. Otherwise, all metadata for the 1363 * blog will be fetched. 1364 * @param bool $single Optional. If true, return only the first value of the 1365 * specified meta_key. This parameter has no effect if meta_key is not 1366 * specified. Default: true. 1378 * that meta key will be returned. Otherwise, all 1379 * metadata for the blog will be fetched. 1380 * @param bool $single Optional. If true, return only the first value of the 1381 * specified meta_key. This parameter has no effect if 1382 * meta_key is not specified. Default: true. 1383 * 1367 1384 * @return mixed The meta value(s) being requested. 1368 1385 */ … … 1380 1397 * @global object $wpdb WordPress database access object. 1381 1398 * 1382 * @param int $blog_id ID of the blog whose metadata is being updated. 1383 * @param string $meta_key Key of the metadata being updated. 1384 * @param mixed $meta_value Value to be set. 1385 * @param mixed $prev_value Optional. If specified, only update existing 1386 * metadata entries with the specified value. Otherwise, update all 1387 * entries. 1399 * @param int $blog_id ID of the blog whose metadata is being updated. 1400 * @param string $meta_key Key of the metadata being updated. 1401 * @param mixed $meta_value Value to be set. 1402 * @param mixed $prev_value Optional. If specified, only update existing 1403 * metadata entries with the specified value. 1404 * Otherwise, update all entries. 1405 * 1388 1406 * @return bool|int Returns false on failure. On successful update of existing 1389 * metadata, returns true. On successful creation of new metadata,1390 * returns the integer ID of the new metadata row.1407 * metadata, returns true. On successful creation of new metadata, 1408 * returns the integer ID of the new metadata row. 1391 1409 */ 1392 1410 function bp_blogs_update_blogmeta( $blog_id, $meta_key, $meta_value, $prev_value = '' ) { … … 1403 1421 * @since BuddyPress (2.0.0) 1404 1422 * 1405 * @param int $blog_id ID of the blog. 1406 * @param string $meta_key Metadata key. 1407 * @param mixed $meta_value Metadata value. 1408 * @param bool $unique Optional. Whether to enforce a single metadata value 1409 * for the given key. If true, and the object already has a value for 1410 * the key, no change will be made. Default: false. 1423 * @param int $blog_id ID of the blog. 1424 * @param string $meta_key Metadata key. 1425 * @param mixed $meta_value Metadata value. 1426 * @param bool $unique Optional. Whether to enforce a single metadata value 1427 * for the given key. If true, and the object already has a value for 1428 * the key, no change will be made. Default: false. 1429 * 1411 1430 * @return int|bool The meta ID on successful update, false on failure. 1412 1431 */ … … 1422 1441 * 1423 1442 * @param int $user_id ID whose blog data should be removed. 1443 * 1424 1444 * @return bool|null Returns false on failure. 1425 1445 */ … … 1454 1474 1455 1475 /** 1456 * Restore all blog associations for a given user 1476 * Restore all blog associations for a given user. 1457 1477 * 1458 1478 * @since BuddyPress (2.2.0) -
trunk/src/bp-blogs/bp-blogs-loader.php
r9936 r10011 139 139 * 140 140 * @param array $main_nav Optional. See BP_Component::setup_nav() for 141 * description.142 * @param array $sub_nav Optional. See BP_Component::setup_nav() for143 * description.141 * description. 142 * @param array $sub_nav Optional. See BP_Component::setup_nav() for 143 * description. 144 144 */ 145 145 public function setup_nav( $main_nav = array(), $sub_nav = array() ) { … … 200 200 * 201 201 * @param array $wp_admin_nav See BP_Component::setup_admin_bar() 202 * for description. 202 * for description. 203 * 204 * @return bool 203 205 */ 204 206 public function setup_admin_bar( $wp_admin_nav = array() ) { … … 299 301 * 300 302 * @see bp_activity_get_post_type_tracking_args() for information on parameters. 303 * 304 * @param object|null $params 305 * @param string|int $post_type 306 * 307 * @return object 301 308 */ 302 309 public function post_tracking_args( $params = null, $post_type = 0 ) { -
trunk/src/bp-blogs/bp-blogs-screens.php
r9819 r10011 2 2 3 3 /** 4 * BuddyPress Blogs Screens 4 * BuddyPress Blogs Screens. 5 5 * 6 6 * @package BuddyPress … … 72 72 73 73 /** 74 * The main theme compat class for BuddyPress Blogs 74 * The main theme compat class for BuddyPress Blogs. 75 75 * 76 76 * This class sets up the necessary theme compatibility actions to safely output … … 139 139 * @since BuddyPress (1.8.0) 140 140 * 141 * @param string $templates The templates from 142 * bp_get_theme_compat_templates().141 * @param string $templates The templates from bp_get_theme_compat_templates(). 142 * 143 143 * @return array $templates Array of custom templates to look for. 144 144 */ … … 202 202 * @since BuddyPress (1.8.0) 203 203 * 204 * @param string $templates The templates from 205 * bp_get_theme_compat_templates().204 * @param string $templates The templates from bp_get_theme_compat_templates(). 205 * 206 206 * @return array $templates Array of custom templates to look for. 207 207 */ -
trunk/src/bp-blogs/bp-blogs-template.php
r9960 r10011 88 88 * @uses bp_get_root_domain() 89 89 * @uses bp_get_blogs_root_slug() 90 * 90 91 * @return string The URL of the Blogs directory. 91 92 */ … … 153 154 * 154 155 * @access public 155 * @var public156 * @var int 156 157 */ 157 158 public $pag_page = 1; … … 161 162 * 162 163 * @access public 163 * @var public164 * @var int 164 165 */ 165 166 public $pag_num = 20; … … 186 187 * @see BP_Blogs_Blog::get() for a description of parameters. 187 188 * 188 * @param string $typeSee {@link BP_Blogs_Blog::get()}.189 * @param string $pageSee {@link BP_Blogs_Blog::get()}.190 * @param string $per_pageSee {@link BP_Blogs_Blog::get()}.191 * @param string $maxSee {@link BP_Blogs_Blog::get()}.192 * @param string $user_idSee {@link BP_Blogs_Blog::get()}.193 * @param string $search_termsSee {@link BP_Blogs_Blog::get()}.194 * @param string $page_argThe string used as a query parameter in195 * pagination links. Default: 'bpage'.196 * @param bool $update_meta_cache Whether to pre-fetch metadata for197 * queried blogs.198 * @param array $include_blog_idsArray of blog IDs to include.189 * @param string $type See {@link BP_Blogs_Blog::get()}. 190 * @param string $page See {@link BP_Blogs_Blog::get()}. 191 * @param string $per_page See {@link BP_Blogs_Blog::get()}. 192 * @param string $max See {@link BP_Blogs_Blog::get()}. 193 * @param string $user_id See {@link BP_Blogs_Blog::get()}. 194 * @param string $search_terms See {@link BP_Blogs_Blog::get()}. 195 * @param string $page_arg The string used as a query parameter in 196 * pagination links. Default: 'bpage'. 197 * @param bool $update_meta_cache Whether to pre-fetch metadata for 198 * queried blogs. 199 * @param array|bool $include_blog_ids Array of blog IDs to include. 199 200 */ 200 201 public function __construct( $type, $page, $per_page, $max, $user_id, $search_terms, $page_arg = 'bpage', $update_meta_cache = true, $include_blog_ids = false ) { … … 364 365 * @global object $blogs_template {@link BP_Blogs_Template} 365 366 * 366 * @param array $args {367 * @param array|string $args { 367 368 * Arguments for limiting the contents of the blogs loop. Most arguments 368 369 * are in the same format as {@link BP_Blogs_Blog::get()}. However, because … … 374 375 * string (eg, 'user_id=4&per_page=3'). 375 376 * 376 * @type int $pageWhich page of results to fetch. Using page=1 without377 * per_page will result in no pagination. Default: 1.378 * @type int|bool $per_page Number of results per page. Default: 20.379 * @type string $page_argThe string used as a query parameter in380 * pagination links. Default: 'bpage'.381 * @type int|bool $max Maximum number of results to return.382 * Default: false (unlimited).383 * @type string $typeThe order in which results should be fetched.384 * 385 * @type array $include_blog_ids Array of blog IDs to limit results to.386 * @type string $sort'ASC' or 'DESC'. Default: 'DESC'.387 * @type string $search_termsLimit results by a search term. Default: the388 * value of $_REQUEST['s'], if present.389 * @type int $user_idThe ID of the user whose blogs should be retrieved.390 * When viewing a user profile page, 'user_id' defaults to the ID of391 * the displayed user. Otherwise the default is false.377 * @type int $page Which page of results to fetch. Using page=1 without 378 * per_page will result in no pagination. Default: 1. 379 * @type int|bool $per_page Number of results per page. Default: 20. 380 * @type string $page_arg The string used as a query parameter in 381 * pagination links. Default: 'bpage'. 382 * @type int|bool $max Maximum number of results to return. 383 * Default: false (unlimited). 384 * @type string $type The order in which results should be fetched. 385 * 'active', 'alphabetical', 'newest', or 'random'. 386 * @type array $include_blog_ids Array of blog IDs to limit results to. 387 * @type string $sort 'ASC' or 'DESC'. Default: 'DESC'. 388 * @type string $search_terms Limit results by a search term. Default: the 389 * value of $_REQUEST['s'], if present. 390 * @type int $user_id The ID of the user whose blogs should be retrieved. 391 * When viewing a user profile page, 'user_id' defaults to the 392 * ID of the displayed user. Otherwise the default is false. 392 393 * } 393 394 * @return bool Returns true when blogs are found, otherwise false. … … 513 514 * @see bp_get_blog_avatar() for description of arguments. 514 515 * 515 * @param array $args See {@link bp_get_blog_avatar()}.516 * @param array|string $args See {@link bp_get_blog_avatar()}. 516 517 */ 517 518 function bp_blog_avatar( $args = '' ) { … … 529 530 * return values. 530 531 * 531 * @param array $args {532 * @param array|string $args { 532 533 * Arguments are listed here with an explanation of their defaults. 533 534 * For more information about the arguments, see … … 774 775 * @param array $args { 775 776 * Array of optional arguments. 776 * @type bool $active_format If true, formatted "Active 5 minutes 777 * ago". If false, formatted "5 minutes ago". Default: true. 777 * @type bool $active_format If true, formatted "Active 5 minutes ago". 778 * If false, formatted "5 minutes ago". 779 * Default: true. 778 780 * } 779 781 * @return string Last active date. … … 829 831 * @param array $args { 830 832 * Array of optional arguments. 831 * @type bool $latest_format If true, formatted "Latest post: 832 * [link to post]".If false, formatted "[link to post]".833 * Default: true.833 * @type bool $latest_format If true, formatted "Latest post: [link to post]". 834 * If false, formatted "[link to post]". 835 * Default: true. 834 836 * } 835 837 * @return string $retval String of the form 'Latest Post: [link to post]'. … … 1003 1005 * 1004 1006 * @param string $size Image version to return. 'thumbnail', 'medium', 1005 * 'large', or 'post-thumbnail'. Default: 'thumbnail'. 1007 * 'large', or 'post-thumbnail'. Default: 'thumbnail'. 1008 * 1006 1009 * @return string URL of the image. 1007 1010 */ … … 1029 1032 * @since BuddyPress (1.7.0) 1030 1033 * 1031 * @param string $size Image version to return. 'thumbnail', 'medium', 'large', 1032 * or 'post-thumbnail'. Default: 'thumbnail'. 1034 * @param string $thumbnail Image version to return. 'thumbnail', 'medium', 'large', 1035 * or 'post-thumbnail'. Default: 'thumbnail'. 1036 * 1033 1037 * @return bool True if the latest blog post from the current blog has a 1034 * featured image of the given size.1038 * featured image of the given size. 1035 1039 */ 1036 1040 function bp_blog_latest_post_has_featured_image( $thumbnail = 'thumbnail' ) { … … 1103 1107 * 1104 1108 * @param int $user_id ID of the user. 1109 * 1105 1110 * @return int Total number of blogs for the user. 1106 1111 */ … … 1154 1159 * Output the wrapper markup for the blog signup form. 1155 1160 * 1156 * @param string $blognameOptional. The default blog name (path or domain).1157 * @param string $blog_title Optional. The default blog title.1158 * @param string|WP_Error Optional. The WP_Error object returned by a previous1159 * submission attempt.1161 * @param string $blogname Optional. The default blog name (path or domain). 1162 * @param string $blog_title Optional. The default blog title. 1163 * @param string|WP_Error $errors Optional. The WP_Error object returned by a previous 1164 * submission attempt. 1160 1165 */ 1161 1166 function bp_show_blog_signup_form($blogname = '', $blog_title = '', $errors = '') { … … 1219 1224 * Output the input fields for the blog creation form. 1220 1225 * 1221 * @param string $blognameOptional. The default blog name (path or domain).1222 * @param string $blog_title Optional. The default blog title.1223 * @param string|WP_Error Optional. The WP_Error object returned by a previous1224 * submission attempt.1226 * @param string $blogname Optional. The default blog name (path or domain). 1227 * @param string $blog_title Optional. The default blog title. 1228 * @param string|WP_Error $errors Optional. The WP_Error object returned by a previous 1229 * submission attempt. 1225 1230 */ 1226 1231 function bp_blogs_signup_blog( $blogname = '', $blog_title = '', $errors = '' ) { … … 1332 1337 * 1333 1338 * @param array $meta { 1334 * string $valueDefault blog language ID.1335 * string $publicDefault public status.1339 * string $value Default blog language ID. 1340 * string $public Default public status. 1336 1341 * } 1337 1342 */ … … 1365 1370 * Display a message after successful blog registration. 1366 1371 * 1367 * @param string $domainThe new blog's domain.1368 * @param string $pathThe new blog's path.1369 * @param string $blog_title The new blog's title.1370 * @param string $user_nameThe user name of the user who created the blog. Unused.1371 * @param string $user_email The email of the user who created the blog. Unused.1372 * @param string|array $meta Meta values associated with the new blog. Unused.1372 * @param string $domain The new blog's domain. 1373 * @param string $path The new blog's path. 1374 * @param string $blog_title The new blog's title. 1375 * @param string $user_name The user name of the user who created the blog. Unused. 1376 * @param string $user_email The email of the user who created the blog. Unused. 1377 * @param string|array $meta Meta values associated with the new blog. Unused. 1373 1378 */ 1374 1379 function bp_blogs_confirm_blog_signup( $domain, $path, $blog_title, $user_name, $user_email = '', $meta = '' ) { … … 1545 1550 * @since BuddyPress (2.2.0) 1546 1551 * 1547 * @uses bp_blog_create_nav_item() to output the Create a Site nav item 1552 * @uses bp_blog_create_nav_item() to output the Create a Site nav item. 1553 * 1548 1554 * @return string HTML Output 1549 1555 */ … … 1568 1574 * @see bp_get_blogs_visit_blog_button() for description of arguments. 1569 1575 * 1570 * @param array $args See {@link bp_get_blogs_visit_blog_button()}.1576 * @param array|string $args See {@link bp_get_blogs_visit_blog_button()}. 1571 1577 */ 1572 1578 function bp_blogs_visit_blog_button( $args = '' ) { … … 1579 1585 * value. 1580 1586 * 1581 * @param array $args {1587 * @param array|string $args { 1582 1588 * Arguments are listed below, with their default values. For a 1583 1589 * complete description of arguments, see {@link BP_Button}. 1584 * @type string $id Default: 'visit_blog'.1585 * @type string $component Default: 'blogs'.1586 * @type bool $must_be_logged_in Default: false.1587 * @type bool $block_selfDefault: false.1588 * @type string $wrapper_class Default: 'blog-button visit'.1589 * @type string $link_href Permalink of the current blog in the loop.1590 * @type string $link_class Default: 'blog-button visit'.1591 * @type string $link_text Default: 'Visit Site'.1592 * @type string $link_title Default: 'Visit Site'.1590 * @type string $id Default: 'visit_blog'. 1591 * @type string $component Default: 'blogs'. 1592 * @type bool $must_be_logged_in Default: false. 1593 * @type bool $block_self Default: false. 1594 * @type string $wrapper_class Default: 'blog-button visit'. 1595 * @type string $link_href Permalink of the current blog in the loop. 1596 * @type string $link_class Default: 'blog-button visit'. 1597 * @type string $link_text Default: 'Visit Site'. 1598 * @type string $link_title Default: 'Visit Site'. 1593 1599 * } 1594 1600 * @return string The HTML for the Visit button. … … 1626 1632 * @since BuddyPress (2.0.0) 1627 1633 * 1628 * @param array $args before|after|user_id 1629 * @uses bp_blogs_admin_get_profile_stats() to get the stats 1634 * @uses bp_blogs_admin_get_profile_stats() to get the stats. 1635 * 1636 * @param array|string $args before|after|user_id 1630 1637 */ 1631 1638 function bp_blogs_profile_stats( $args = '' ) { … … 1639 1646 * @since BuddyPress (2.0.0) 1640 1647 * 1641 * @param array $args before|after|user_id 1648 * @param array|string $args before|after|user_id 1649 * 1642 1650 * @return string HTML for stats output. 1643 1651 */ -
trunk/src/bp-blogs/bp-blogs-widgets.php
r9819 r10011 2 2 3 3 /** 4 * BuddyPress Blogs Widgets 4 * BuddyPress Blogs Widgets. 5 5 * 6 6 * @package BuddyPress … … 24 24 25 25 /** 26 * The Recent Networkwide Posts widget 26 * The Recent Networkwide Posts widget. 27 27 */ 28 28 class BP_Blogs_Recent_Posts_Widget extends WP_Widget { … … 44 44 * @see WP_Widget::widget() for description of parameters. 45 45 * 46 * @param array $args Widget arguments.46 * @param array $args Widget arguments. 47 47 * @param array $instance Widget settings, as saved by the user. 48 48 */ … … 127 127 * @param array $new_instance The new instance options. 128 128 * @param array $old_instance The old instance options. 129 * 129 130 * @return array $instance The parsed options to be saved. 130 131 */ … … 141 142 * Output the networkwide posts widget options form. 142 143 * 143 * @param $instance Settings for this widget. 144 * @param array $instance Settings for this widget. 145 * 146 * @return string 144 147 */ 145 148 public function form( $instance ) { -
trunk/src/bp-blogs/classes/class-bp-blogs-blog.php
r9819 r10011 67 67 * @since BuddyPress (1.0.0) 68 68 * 69 * @param BP_Blogs_Blog Current instance of the blog item being saved. Passed by reference.69 * @param BP_Blogs_Blog $this Current instance of the blog item being saved. Passed by reference. 70 70 */ 71 71 do_action_ref_array( 'bp_blogs_blog_before_save', array( &$this ) ); … … 99 99 * @since BuddyPress (1.0.0) 100 100 * 101 * @param BP_Blogs_Blog Current instance of the blog item being saved. Passed by reference.101 * @param BP_Blogs_Blog $this Current instance of the blog item being saved. Passed by reference. 102 102 */ 103 103 do_action_ref_array( 'bp_blogs_blog_after_save', array( &$this ) ); … … 112 112 * Check whether an association between this user and this blog exists. 113 113 * 114 * @return int The number of associations between the user and blog115 * saved in the blog component tables.114 * @return int $value The number of associations between the user and blog 115 * saved in the blog component tables. 116 116 */ 117 117 public function exists() { … … 128 128 * Retrieve a set of blog-user associations. 129 129 * 130 * @param string $type The order in which results should be returned. 131 * 'active', 'alphabetical', 'newest', or 'random'. 132 * @param int|bool $limit Optional. The maximum records to return. 133 * Default: false. 134 * @param int|bool $page Optional. The page of records to return. 135 * Default: false (unlimited results). 136 * @param int $user_id Optional. ID of the user whose blogs are being 137 * retrieved. Default: 0. 138 * @param string|bool $search_terms Optional. Search by text stored in 139 * blogmeta (such as the blog name). Default: false. 140 * @param bool $update_meta_cache Whether to pre-fetch metadata for 141 * blogs. Default: true. 142 * @param array $include_blog_ids Array of blog IDs to include. 130 * @param string $type The order in which results should be returned. 131 * 'active', 'alphabetical', 'newest', or 'random'. 132 * @param int|bool $limit Optional. The maximum records to return. 133 * Default: false. 134 * @param int|bool $page Optional. The page of records to return. 135 * Default: false (unlimited results). 136 * @param int $user_id Optional. ID of the user whose blogs are being 137 * retrieved. Default: 0. 138 * @param string|bool $search_terms Optional. Search by text stored in 139 * blogmeta (such as the blog name). Default: false. 140 * @param bool $update_meta_cache Whether to pre-fetch metadata for 141 * blogs. Default: true. 142 * @param array|bool $include_blog_ids Array of blog IDs to include. 143 * 143 144 * @return array Multidimensional results array, structured as follows: 144 * 'blogs' - Array of located blog objects145 * 'total' - A count of the total blogs matching the filter params145 * 'blogs' - Array of located blog objects 146 * 'total' - A count of the total blogs matching the filter params 146 147 */ 147 148 public static function get( $type, $limit = false, $page = false, $user_id = 0, $search_terms = false, $update_meta_cache = true, $include_blog_ids = false ) { … … 252 253 * 253 254 * @param int $blog_id The blog being removed. 254 * @param int $user_id Optional. The ID of the user from whom the blog 255 * is being removed. If absent, defaults to the logged-in user ID. 255 * @param int $user_id Optional. The ID of the user from whom the blog is 256 * being removed. If absent, defaults to the logged-in user ID. 257 * 256 258 * @return int|bool Number of rows deleted on success, false on failure. 257 259 */ … … 270 272 * Delete all of a user's blog associations in the BP tables. 271 273 * 272 * @param int $user_id Optional. The ID of the user whose blog 273 * associations are being deleted. If absent, defaults to274 * logged-in user ID.274 * @param int $user_id Optional. The ID of the user whose blog associations 275 * are being deleted. If absent, defaults to logged-in user ID. 276 * 275 277 * @return int|bool Number of rows deleted on success, false on failure. 276 278 */ … … 294 296 * does a true query of a user's blog capabilities. 295 297 * 296 * @param int $user_idOptional. ID of the user whose blogs are being297 * queried. Defaults to logged-in user.298 * @param bool $show_hidden Optional. Whether to include blogs that are 299 * not marked public. Defaults to true when viewing one's own300 * profile.298 * @param int $user_id Optional. ID of the user whose blogs are being 299 * queried. Defaults to logged-in user. 300 * @param bool $show_hidden Optional. Whether to include blogs that are not marked 301 * public. Defaults to true when viewing one's own profile. 302 * 301 303 * @return array Multidimensional results array, structured as follows: 302 * 'blogs' - Array of located blog objects303 * 'total' - A count of the total blogs for the user.304 * 'blogs' - Array of located blog objects. 305 * 'total' - A count of the total blogs for the user. 304 306 */ 305 307 public static function get_blogs_for_user( $user_id = 0, $show_hidden = false ) { … … 337 339 * 338 340 * @param int $user_id Optional. ID of the user whose blogs are being 339 * queried. Defaults to logged-in user. 341 * queried. Defaults to logged-in user. 342 * 340 343 * @return int The number of blogs associated with the user. 341 344 */ … … 355 358 * 356 359 * @param int $blog_id ID of the blog being queried. 360 * 357 361 * @return int|null The ID of the first located entry in the BP table 358 * on success, otherwise null.362 * on success, otherwise null. 359 363 */ 360 364 public static function is_recorded( $blog_id ) { … … 374 378 * 375 379 * @param int $user_id Optional. ID of the user whose blogs are being 376 * queried. Defaults to logged-in user. 380 * queried. Defaults to logged-in user. 381 * 377 382 * @return int Blog count for the user. 378 383 */ … … 400 405 * 401 406 * @param string $filter The search term. 402 * @param int $limit Optional. The maximum number of items to return. 403 * Default: null (no limit). 404 * @param int $page Optional. The page of results to return. Default: 405 * null (no limit). 407 * @param int $limit Optional. The maximum number of items to return. 408 * Default: null (no limit). 409 * @param int $page Optional. The page of results to return. Default: 410 * null (no limit). 411 * 406 412 * @return array Multidimensional results array, structured as follows: 407 * 'blogs' - Array of located blog objects408 * 'total' - A count of the total blogs matching the query.413 * 'blogs' - Array of located blog objects. 414 * 'total' - A count of the total blogs matching the query. 409 415 */ 410 416 public static function search_blogs( $filter, $limit = null, $page = null ) { … … 438 444 * 439 445 * @param int $limit Optional. The maximum number of items to return. 440 * Default: null (no limit). 441 * @param int $page Optional. The page of results to return. Default: 442 * null (no limit). 446 * Default: null (no limit). 447 * @param int $page Optional. The page of results to return. Default: 448 * null (no limit). 449 * 443 450 * @return array Multidimensional results array, structured as follows: 444 * 'blogs' - Array of located blog objects445 * 'total' - A count of the total blogs.451 * 'blogs' - Array of located blog objects. 452 * 'total' - A count of the total blogs. 446 453 */ 447 454 public static function get_all( $limit = null, $page = null ) { … … 466 473 * 467 474 * @param string $letter. The letter you're looking for. 468 * @param int $limit Optional. The maximum number of items to return. 469 * Default: null (no limit). 470 * @param int $page Optional. The page of results to return. Default: 471 * null (no limit). 475 * @param int $limit Optional. The maximum number of items to return. 476 * Default: null (no limit). 477 * @param int $page Optional. The page of results to return. Default: 478 * null (no limit). 479 * 472 480 * @return array Multidimensional results array, structured as follows: 473 * 'blogs' - Array of located blog objects.474 * 'total' - A count of the total blogs matching the query.481 * 'blogs' - Array of located blog objects. 482 * 'total' - A count of the total blogs matching the query. 475 483 */ 476 484 public static function get_by_letter( $letter, $limit = null, $page = null ) { … … 505 513 * - The blog description 506 514 * 507 * @param array $paged_blogs Array of results from the original query. 508 * @param array $blog_ids Array of IDs returned from the original query. 509 * @param string|bool $type Not currently used. Default: false. 515 * @param array $paged_blogs Array of results from the original query. 516 * @param array $blog_ids Array of IDs returned from the original query. 517 * @param string|bool $type Not currently used. Default: false. 518 * 510 519 * @return array $paged_blogs The located blogs array, with the extras added. 511 520 */ … … 572 581 * 573 582 * @param int $blog_id The ID of the blog being checked. 583 * 574 584 * @return bool True if hidden (public = 0), false otherwise. 575 585 */ … … 589 599 * @param int $user_id ID of user. 590 600 * @param int $blog_id ID of blog. 601 * 591 602 * @return int|bool ID of user-blog link, or false if not found. 592 603 */
Note: See TracChangeset
for help on using the changeset viewer.