Changeset 6372 for trunk/bp-blogs/bp-blogs-template.php
- Timestamp:
- 10/01/2012 08:20:19 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/bp-blogs/bp-blogs-template.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs/bp-blogs-template.php
r6342 r6372 361 361 362 362 return apply_filters( 'bp_get_blog_latest_post', sprintf( __( 'Latest Post: %s', 'buddypress' ), '<a href="' . $blogs_template->blog->latest_post->guid . '">' . apply_filters( 'the_title', $blogs_template->blog->latest_post->post_title ) . '</a>' ) ); 363 } 364 365 /** 366 * Prints this site's latest article's title 367 * 368 * @see bp_get_blog_latest_post_title() 369 * @since BuddyPress (1.7) 370 */ 371 function bp_blog_latest_post_title() { 372 echo bp_get_blog_latest_post_title(); 373 } 374 /** 375 * Returns this site's latest article's title 376 * 377 * @global BP_Blogs_Template 378 * @return string 379 * @since BuddyPress (1.7) 380 */ 381 function bp_get_blog_latest_post_title() { 382 global $blogs_template; 383 384 if ( empty( $blogs_template->blog->latest_post ) ) 385 return ''; 386 387 return apply_filters( 'bp_get_blog_latest_post_title', $blogs_template->blog->latest_post->post_title ); 388 } 389 390 /** 391 * Prints this site's latest article's content 392 * 393 * @see bp_get_blog_latest_post_content() 394 * @since BuddyPress (1.7) 395 */ 396 function bp_blog_latest_post_content() { 397 $content = bp_get_blog_latest_post_content(); 398 $content = apply_filters( 'bp_blog_latest_post_content', $content ); 399 $content = str_replace( ']]>', ']]>', $content ); 400 echo $content; 401 } 402 /** 403 * Returns this site's latest article's content 404 * 405 * @global BP_Blogs_Template 406 * @return string 407 * @since BuddyPress (1.7) 408 */ 409 function bp_get_blog_latest_post_content() { 410 global $blogs_template; 411 412 if ( empty( $blogs_template->blog->latest_post ) ) 413 return ''; 414 415 return apply_filters( 'bp_get_blog_latest_post_content', $blogs_template->blog->latest_post->post_content ); 416 } 417 418 /** 419 * Prints this site's latest article's featured image 420 * 421 * @param string $size Image version to return. Either "thumbnail", "medium", "large", "post-thumbnail". 422 * @see bp_get_blog_latest_post_content() 423 * @since BuddyPress (1.7) 424 */ 425 function bp_blog_latest_post_featured_image( $size = 'thumbnail' ) { 426 echo bp_get_blog_latest_post_featured_image( $size ); 427 } 428 /** 429 * Returns this site's latest article's featured image 430 * 431 * @global BP_Blogs_Template 432 * @param string $size Image version to return. Either "thumbnail", "medium", "large", "post-thumbnail". 433 * @return string 434 * @since BuddyPress (1.7) 435 */ 436 function bp_get_blog_latest_post_featured_image( $size = 'thumbnail' ) { 437 global $blogs_template; 438 439 if ( empty( $blogs_template->blog->latest_post->images[$size] ) ) 440 return ''; 441 442 return apply_filters( 'bp_get_blog_latest_post_featured_image', $blogs_template->blog->latest_post->images[$size] ); 363 443 } 364 444
Note: See TracChangeset
for help on using the changeset viewer.