[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-core/ -> bp-core-wpabstraction.php (summary)

WordPress Abstraction. The functions within this file will detect the version of WordPress you are running and will alter the environment so BuddyPress can run regardless.

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

Defines 18 functions

  bp_get_major_wp_version()
  get_blog_option()
  add_blog_option()
  update_blog_option()
  delete_blog_option()
  switch_to_blog()
  restore_current_blog()
  get_blogs_of_user()
  update_blog_status()
  is_subdomain_install()
  bp_core_get_status_sql()
  mb_strlen()
  mb_strpos()
  mb_strrpos()
  bp_catch_site_data()
  bp_insert_site()
  bp_delete_site_no_tables_drop()
  bp_delete_site()

Functions
Functions that are not part of a class:

bp_get_major_wp_version()   X-Ref
Parse the WordPress core version number into the major release.

since: 1.5.2
return: double $wp_version

get_blog_option( $blog_id, $option_name, $default = false )   X-Ref
Retrieve blog option.

param: int    $blog_id     Blog ID to fetch for. Not used.
param: string $option_name Option name to fetch.
param: bool   $default     Whether or not default.
since: 1.0.0
return: mixed

add_blog_option( $blog_id, $option_name, $option_value )   X-Ref
Add blog option.

param: int    $blog_id      Blog ID to add for. Not used.
param: string $option_name  Option name to add.
param: mixed  $option_value Option value to add.
since: 1.2.0
return: mixed

update_blog_option( $blog_id, $option_name, $value )   X-Ref
Update blog option.

param: int    $blog_id     Blog ID to update for. Not used.
param: string $option_name Option name to update.
param: mixed  $value       Option value to update.
since: 1.2.0
return: mixed

delete_blog_option( $blog_id, $option_name )   X-Ref
Delete blog option.

param: int    $blog_id     Blog ID to delete for. Not used.
param: string $option_name Option name to delete.
since: 1.5.0
return: mixed

switch_to_blog( $new_blog, $deprecated = null )   X-Ref
Switch to specified blog.

param: mixed $new_blog   New blog to switch to. Not used.
param: null  $deprecated Whether or not deprecated. Not used.
since: 1.2.0
return: int

restore_current_blog()   X-Ref
Restore current blog.

since: 1.2.0
return: int

get_blogs_of_user( $user_id, $all = false )   X-Ref
Retrive blogs associated with user.

param: int  $user_id ID of the user. Not used.
param: bool $all     Whether or not to return all. Not used.
since: 1.2.0
return: bool

update_blog_status( $blog_id, $pref, $value, $deprecated = null )   X-Ref
Whether or not to update blog status.

param: int    $blog_id    Blog to update status for. Not used.
param: mixed  $pref       Preference. Not used.
param: string $value      Value. Not used.
param: null   $deprecated Whether or not deprecated. Not used.
since: 1.2.0
return: bool

is_subdomain_install()   X-Ref
Whether or not if subdomain install.

since: 1.2.5.1
return: bool

bp_core_get_status_sql( $prefix = false )   X-Ref
Get SQL chunk for filtering spam users from member queries.

param: string|bool $prefix Global table prefix.
return: string SQL chunk.

mb_strlen( $str, $enc = '' )   X-Ref
Fallback implementation of mb_strlen(), hardcoded to UTF-8.

param: string $str String to be measured.
param: string $enc Optional. Encoding type. Ignored.
return: int String length.

mb_strpos( $haystack, $needle, $offset = 0, $encoding = '' )   X-Ref
Fallback implementation of mb_strpos(), hardcoded to UTF-8.

param: string $haystack String to search in.
param: string $needle String to search for.
param: int    $offset Optional. Start position for the search. Default: 0.
param: string $encoding Optional. Encoding type. Ignored.
return: int|false Position of needle in haystack if found, else false.

mb_strrpos( $haystack, $needle, $offset = 0, $encoding = '' )   X-Ref
Fallback implementation of mb_strrpos(), hardcoded to UTF-8.

param: string $haystack String to search in.
param: string $needle String to search for.
param: int    $offset Optional. Start position for the search. Default: 0.
param: string $encoding Optional. Encoding type. Ignored.
return: string|false Position of last needle in haystack if found, else false.

bp_catch_site_data( $errors = null, $data = array()   X-Ref
Catch the new site data for a later use.

since: 6.0.0

bp_insert_site( $site, $args_or_user_id = null, $domain = '', $path = '', $network_id = 0, $meta = array()   X-Ref
Fires a BuddyPress hook when a new WordPress site is inserted into the database.

This hook makes sure BuddyPress is back compatible with WordPress versions < 5.1.0.

param: int|WP_Site $site            The Site ID or the WP Site object.
param: int|array   $args_or_user_id An array of Site arguments or the User ID.
param: string      $domain          Site domain.
param: string      $path            Site path.
param: int         $network_id      Network ID. Only relevant on multi-network installations.
param: array       $meta            Meta data. Used to set initial site options.
since: 6.0.0

bp_delete_site_no_tables_drop( $site )   X-Ref
Makes sure the `bp_delete_site` hook is fired if site's deletion
was performed without dropping tables.

param: WP_Site $site The site object.
since: 6.0.0

bp_delete_site( $site_id_or_error, $drop_or_site = false )   X-Ref
Fires a BuddyPress hook when a new WordPress site is deleted.

This hook makes sure BuddyPress is back compatible with WordPress versions < 5.1.0.

param: int|WP_Error $site_id_or_error A WP Error object or the site ID.
param: bool|WP_Site $drop_or_site     A WP Site object or a boolean to inform whether site's table should be dropped.
since: 6.0.0



Generated: Sun Dec 22 01:00:54 2024 Cross-referenced by PHPXref 0.7.1