Changeset 13303 for trunk/src/bp-blogs/bp-blogs-template.php
- Timestamp:
- 07/22/2022 12:54:40 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-blogs/bp-blogs-template.php
r13296 r13303 1543 1543 * Output button for visiting a blog in a loop. 1544 1544 * 1545 * @see bp_get_blogs_visit_blog_button () for description of arguments.1546 * 1547 * @param array|string $args See {@link bp_get_blogs_visit_blog_button ()}.1545 * @see bp_get_blogs_visit_blog_button_args() for description of arguments. 1546 * 1547 * @param array|string $args See {@link bp_get_blogs_visit_blog_button_args()}. 1548 1548 */ 1549 1549 function bp_blogs_visit_blog_button( $args = '' ) { 1550 1550 echo bp_get_blogs_visit_blog_button( $args ); 1551 1551 } 1552 /** 1553 * Return button for visiting a blog in a loop. 1552 1553 /** 1554 * Return the arguments of the button for visiting a blog in a loop. 1554 1555 * 1555 1556 * @see BP_Button for a complete description of arguments and return 1556 1557 * value. 1558 * 1559 * @since 11.0.0 1557 1560 * 1558 1561 * @param array|string $args { … … 1567 1570 * @type string $link_class Default: 'blog-button visit'. 1568 1571 * @type string $link_text Default: 'Visit Site'. 1572 * @type string $link_title Default: 'Visit Site'. 1569 1573 * } 1570 * @return string The HTML for the Visit button.1571 */ 1572 function bp_get_blogs_visit_blog_button ( $args = '' ) {1573 $button = bp_parse_args(1574 * @return array Thhe arguments of the button for visiting a blog in a loop. 1575 */ 1576 function bp_get_blogs_visit_blog_button_args( $args = '' ) { 1577 $button_args = bp_parse_args( 1574 1578 $args, 1575 1579 array( … … 1582 1586 'link_class' => 'blog-button visit', 1583 1587 'link_text' => __( 'Visit Site', 'buddypress' ), 1588 'link_title' => __( 'Visit Site', 'buddypress' ), 1584 1589 ) 1585 1590 ); … … 1590 1595 * @since 1.2.10 1591 1596 * 1592 * @param array $button Array of arguments to be used for the button to visit a blog. 1593 */ 1594 return bp_get_button( apply_filters( 'bp_get_blogs_visit_blog_button', $button ) ); 1597 * @param array $button_args Array of arguments to be used for the button to visit a blog. 1598 */ 1599 return apply_filters( 'bp_get_blogs_visit_blog_button', $button_args ); 1600 } 1601 1602 /** 1603 * Return button for visiting a blog in a loop. 1604 * 1605 * @see BP_Button for a complete description of arguments and return 1606 * value. 1607 * 1608 * @see bp_get_blogs_visit_blog_button_args() for description of arguments. 1609 * 1610 * @param array|string $args See {@link bp_get_blogs_visit_blog_button_args()}. 1611 * @return string The HTML for the Visit button. 1612 */ 1613 function bp_get_blogs_visit_blog_button( $args = '' ) { 1614 $button_args = bp_get_blogs_visit_blog_button_args( $args ); 1615 1616 if ( ! array_filter( $button_args ) ) { 1617 return ''; 1618 } 1619 1620 return bp_get_button( $button_args ); 1595 1621 } 1596 1622
Note: See TracChangeset
for help on using the changeset viewer.