bp_get_blogs_visit_blog_button( array|string $args = '' )

Return button for visiting a blog in a loop.


Description Description

See also See also

  • BP_Button: for a complete description of arguments and return value.

Top ↑

Parameters Parameters

$args

(array|string) (Optional) Arguments are listed below, with their default values. For a complete description of arguments, see BP_Button.

  • 'id'
    (string) Default: 'visit_blog'.
  • 'component'
    (string) Default: 'blogs'.
  • 'must_be_logged_in'
    (bool) Default: false.
  • 'block_self'
    (bool) Default: false.
  • 'wrapper_class'
    (string) Default: 'blog-button visit'.
  • 'link_href'
    (string) Permalink of the current blog in the loop.
  • 'link_class'
    (string) Default: 'blog-button visit'.
  • 'link_text'
    (string) Default: 'Visit Site'.

Default value: ''


Top ↑

Return Return

(string) The HTML for the Visit button.


Top ↑

Source Source

File: bp-blogs/bp-blogs-template.php

	function bp_get_blogs_visit_blog_button( $args = '' ) {
		$defaults = array(
			'id'                => 'visit_blog',
			'component'         => 'blogs',
			'must_be_logged_in' => false,
			'block_self'        => false,
			'wrapper_class'     => 'blog-button visit',
			'link_href'         => bp_get_blog_permalink(),
			'link_class'        => 'blog-button visit',
			'link_text'         => __( 'Visit Site', 'buddypress' ),
		);

		$button = wp_parse_args( $args, $defaults );

		/**
		 * Filters the button for visiting a blog in a loop.
		 *
		 * @since 1.2.10
		 *
		 * @param array $button Array of arguments to be used for the button to visit a blog.
		 */
		return bp_get_button( apply_filters( 'bp_get_blogs_visit_blog_button', $button ) );
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.