[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-blogs/ -> bp-blogs-template.php (summary)

BuddyPress Blogs Template Tags.

File Size: 1663 lines (50 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 60 functions

  bp_blogs_slug()
  bp_get_blogs_slug()
  bp_blogs_root_slug()
  bp_get_blogs_root_slug()
  bp_blogs_directory_permalink()
  bp_get_blogs_directory_permalink()
  bp_rewind_blogs()
  bp_has_blogs()
  bp_blogs()
  bp_the_blog()
  bp_blogs_pagination_count()
  bp_get_blogs_pagination_count()
  bp_blogs_pagination_links()
  bp_get_blogs_pagination_links()
  bp_blog_avatar()
  bp_get_blog_avatar()
  bp_blog_permalink()
  bp_get_blog_permalink()
  bp_blog_name()
  bp_get_blog_name()
  bp_blog_id()
  bp_get_blog_id()
  bp_blog_description()
  bp_get_blog_description()
  bp_blog_class()
  bp_get_blog_class()
  bp_blog_last_active()
  bp_get_blog_last_active()
  bp_blog_latest_post()
  bp_get_blog_latest_post()
  bp_blog_latest_post_title()
  bp_get_blog_latest_post_title()
  bp_blog_latest_post_permalink()
  bp_get_blog_latest_post_permalink()
  bp_blog_latest_post_content()
  bp_get_blog_latest_post_content()
  bp_blog_latest_post_featured_image()
  bp_get_blog_latest_post_featured_image()
  bp_blog_latest_post_has_featured_image()
  bp_blog_hidden_fields()
  bp_total_blog_count()
  bp_get_total_blog_count()
  bp_total_blog_count_for_user()
  bp_get_total_blog_count_for_user()
  bp_show_blog_signup_form()
  bp_blogs_signup_blog()
  bp_blogs_validate_blog_signup()
  bp_blogs_confirm_blog_signup()
  bp_create_blog_link()
  bp_blogs_blog_tabs()
  bp_directory_blogs_search_form()
  bp_blog_create_button()
  bp_get_blog_create_button()
  bp_blog_create_nav_item()
  bp_get_blog_create_nav_item()
  bp_blog_backcompat_create_nav_item()
  bp_blogs_visit_blog_button()
  bp_get_blogs_visit_blog_button()
  bp_blogs_profile_stats()
  bp_blogs_get_profile_stats()

Functions
Functions that are not part of a class:

bp_blogs_slug()   X-Ref
Output the blogs component slug.

since: 1.5.0

bp_get_blogs_slug()   X-Ref
Return the blogs component slug.

return: string The 'blogs' slug.
since: 1.5.0

bp_blogs_root_slug()   X-Ref
Output the blogs component root slug.

since: 1.5.0

bp_get_blogs_root_slug()   X-Ref
Return the blogs component root slug.

return: string The 'blogs' root slug.
since: 1.5.0

bp_blogs_directory_permalink()   X-Ref
Output blog directory permalink.

since: 1.5.0

bp_get_blogs_directory_permalink()   X-Ref
Return blog directory permalink.

return: string The URL of the Blogs directory.
since: 1.5.0

bp_rewind_blogs()   X-Ref
Rewind the blogs and reset blog index.


bp_has_blogs( $args = '' )   X-Ref
Initialize the blogs loop.

Based on the $args passed, bp_has_blogs() populates the $blogs_template
global, enabling the use of BuddyPress templates and template functions to
display a list of blogs.

param: array|string $args {
return: bool Returns true when blogs are found, otherwise false.
since: 1.0.0
since: 1.2.0 Added $type, $page, $search_terms parameters
since: 1.6.0 Added $page_arg parameter
since: 2.0.0 Added $include_blog_ids, $update_meta_cache parameters
since: 10.0.0 Added $date_query parameter

bp_blogs()   X-Ref
Determine if there are still blogs left in the loop.

return: bool Returns true when blogs are found.

bp_the_blog()   X-Ref
Get the current blog object in the loop.

return: object The current blog within the loop.

bp_blogs_pagination_count()   X-Ref
Output the blogs pagination count.

since: 1.0.0

bp_get_blogs_pagination_count()   X-Ref
Get the blogs pagination count.

return: string
since: 2.7.0

bp_blogs_pagination_links()   X-Ref
Output the blogs pagination links.


bp_get_blogs_pagination_links()   X-Ref
Return the blogs pagination links.

return: string HTML pagination links.

bp_blog_avatar( $args = '' )   X-Ref
Output a blog's avatar.

param: array|string $args See {@link bp_get_blog_avatar()}.

bp_get_blog_avatar( $args = '' )   X-Ref
Get a blog's avatar.

At the moment, unless the blog has a site icon, the blog's avatar defaults
to the /bp-core/images/mystery-blog.png image or the Blog's Admin user avatar
if the `admin_user_id` argument contains the Blog's Admin user ID.

param: array|string $args  {
return: string User avatar string.
since: 2.4.0 Introduced `$title` argument.
since: 6.0.0 Introduced the `$blog_id`, `$admin_user_id` and `html` arguments.
since: 7.0.0 Introduced the Blog's default avatar {@see bp_blogs_default_avatar()}.

bp_blog_permalink()   X-Ref
No description

bp_get_blog_permalink()   X-Ref
No description

bp_blog_name()   X-Ref
Output the name of the current blog in the loop.


bp_get_blog_name()   X-Ref
Return the name of the current blog in the loop.

return: string The name of the current blog in the loop.

bp_blog_id()   X-Ref
Output the ID of the current blog in the loop.

since: 1.7.0

bp_get_blog_id()   X-Ref
Return the ID of the current blog in the loop.

return: int ID of the current blog in the loop.
since: 1.7.0

bp_blog_description()   X-Ref
Output the description of the current blog in the loop.


bp_get_blog_description()   X-Ref
Return the description of the current blog in the loop.

return: string Description of the current blog in the loop.

bp_blog_class( $classes = array()   X-Ref
Output the row class of the current blog in the loop.

param: array $classes Array of custom classes.
since: 1.7.0

bp_get_blog_class( $classes = array()   X-Ref
Return the row class of the current blog in the loop.

param: array $classes Array of custom classes.
return: string Row class of the site.
since: 1.7.0

bp_blog_last_active( $args = array()   X-Ref
Output the last active date of the current blog in the loop.

param: array $args See {@link bp_get_blog_last_active()}.

bp_get_blog_last_active( $args = array()   X-Ref
Return the last active date of the current blog in the loop.

param: array $args {
return: string Last active date.

bp_blog_latest_post( $args = array()   X-Ref
Output the latest post from the current blog in the loop.

param: array $args See {@link bp_get_blog_latest_post()}.

bp_get_blog_latest_post( $args = array()   X-Ref
Return the latest post from the current blog in the loop.

param: array $args {
return: string $retval String of the form 'Latest Post: [link to post]'.

bp_blog_latest_post_title()   X-Ref
Output the title of the latest post on the current blog in the loop.

since: 1.7.0

bp_get_blog_latest_post_title()   X-Ref
Return the title of the latest post on the current blog in the loop.

return: string Post title.
since: 1.7.0

bp_blog_latest_post_permalink()   X-Ref
Output the permalink of the latest post on the current blog in the loop.

since: 1.7.0

bp_get_blog_latest_post_permalink()   X-Ref
Return the permalink of the latest post on the current blog in the loop.

return: string URL of the blog's latest post.
since: 1.7.0

bp_blog_latest_post_content()   X-Ref
Output the content of the latest post on the current blog in the loop.

since: 1.7.0

bp_get_blog_latest_post_content()   X-Ref
Return the content of the latest post on the current blog in the loop.

return: string Content of the blog's latest post.
since: 1.7.0

bp_blog_latest_post_featured_image( $size = 'thumbnail' )   X-Ref
Output the featured image of the latest post on the current blog in the loop.

param: string $size See {@link bp_get_blog_latest_post_featured_image()}.
since: 1.7.0

bp_get_blog_latest_post_featured_image( $size = 'thumbnail' )   X-Ref
Return the featured image of the latest post on the current blog in the loop.

param: string $size Image version to return. 'thumbnail', 'medium',
return: string URL of the image.
since: 1.7.0

bp_blog_latest_post_has_featured_image( $thumbnail = 'thumbnail' )   X-Ref
Does the latest blog post have a featured image?

param: string $thumbnail Image version to return. 'thumbnail', 'medium', 'large',
return: bool True if the latest blog post from the current blog has a
since: 1.7.0

bp_blog_hidden_fields()   X-Ref
Output hidden fields to help with form submissions in Sites directory.

This function detects whether 's', 'letter', or 'blogs_search' requests are
currently being made (as in a URL parameter), and creates corresponding
hidden fields.

bp_total_blog_count()   X-Ref
Output the total number of blogs on the site.


bp_get_total_blog_count()   X-Ref
Return the total number of blogs on the site.

return: int Total number of blogs.

bp_total_blog_count_for_user( $user_id = 0 )   X-Ref
Output the total number of blogs for a given user.

param: int $user_id ID of the user.

bp_get_total_blog_count_for_user( $user_id = 0 )   X-Ref
Return the total number of blogs for a given user.

param: int $user_id ID of the user.
return: int Total number of blogs for the user.

bp_show_blog_signup_form( $blogname = '', $blog_title = '', $errors = '' )   X-Ref
Output the wrapper markup for the blog signup form.

param: string          $blogname   Optional. The default blog name (path or domain).
param: string          $blog_title Optional. The default blog title.
param: string|WP_Error $errors     Optional. The WP_Error object returned by a previous
since: 1.0.0

bp_blogs_signup_blog( $blogname = '', $blog_title = '', $errors = '' )   X-Ref
Output the input fields for the blog creation form.

param: string          $blogname   Optional. The default blog name (path or domain).
param: string          $blog_title Optional. The default blog title.
param: string|WP_Error $errors     Optional. The WP_Error object returned by a previous
since: 1.0.0

bp_blogs_validate_blog_signup()   X-Ref
Process a blog registration submission.

Passes submitted values to {@link wpmu_create_blog()}.

return: bool|int|WP_Error False if not a form submission, the Blog ID on success, a WP_Error object on failure.
since: 1.0.0

bp_blogs_confirm_blog_signup( $domain, $path, $blog_title, $user_name, $user_email = '', $meta = '', $blog_id = null )   X-Ref
Display a message after successful blog registration.

param: string       $domain     The new blog's domain.
param: string       $path       The new blog's path.
param: string       $blog_title The new blog's title.
param: string       $user_name  The user name of the user who created the blog. Unused.
param: string       $user_email The email of the user who created the blog. Unused.
param: string|array $meta       Meta values associated with the new blog. Unused.
param: int|null     $blog_id    ID of the newly created blog.
since: 1.0.0
since: 2.6.0 Introduced `$blog_id` parameter.

bp_create_blog_link()   X-Ref
Output a "Create a Site" link for users viewing their own profiles.

This function is not used by BuddyPress as of 1.2, but is kept here for older
themes that may still be using it.

bp_blogs_blog_tabs()   X-Ref
Output navigation tabs for a user Blogs page.

Currently unused by BuddyPress.

bp_directory_blogs_search_form()   X-Ref
Output the blog directory search form.


bp_blog_create_button()   X-Ref
Output the Create a Site button.

since: 2.0.0

bp_get_blog_create_button()   X-Ref
Get the Create a Site button.

return: false|string
since: 2.0.0

bp_blog_create_nav_item()   X-Ref
Output the Create a Site nav item.

since: 2.2.0

bp_get_blog_create_nav_item()   X-Ref
Get the Create a Site nav item.

return: string
since: 2.2.0

bp_blog_backcompat_create_nav_item()   X-Ref
Checks if a specific theme is still filtering the Blogs directory title
if so, transform the title button into a Blogs directory nav item.

return: string|null HTML Output
since: 2.2.0

bp_blogs_visit_blog_button( $args = '' )   X-Ref
Output button for visiting a blog in a loop.

param: array|string $args See {@link bp_get_blogs_visit_blog_button()}.

bp_get_blogs_visit_blog_button( $args = '' )   X-Ref
Return button for visiting a blog in a loop.

param: array|string $args {
return: string The HTML for the Visit button.

bp_blogs_profile_stats( $args = '' )   X-Ref
Display the number of blogs in user's profile.

param: array|string $args Before|after|user_id.
since: 2.0.0

bp_blogs_get_profile_stats( $args = '' )   X-Ref
Return the number of blogs in user's profile.

param: array|string $args Before|after|user_id.
return: string HTML for stats output.
since: 2.0.0



Generated: Tue Mar 19 01:01:09 2024 Cross-referenced by PHPXref 0.7.1