Changeset 10011 for trunk/src/bp-blogs/classes/class-bp-blogs-blog.php
- Timestamp:
- 07/11/2015 11:12:52 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.