diff --git a/.build-excludes b/.build-excludes
index b1e9681..fb53173 100644
--- a/.build-excludes
+++ b/.build-excludes
@@ -7,7 +7,6 @@ build
node_modules
src/assets
tests
-vendor/typisttech
.build-excludes
.editorconfig
.gitattributes
diff --git a/.editorconfig b/.editorconfig
index caa69d4..a98b2d7 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -9,3 +9,7 @@ indent_style = tab
[{*.txt,wp-config-sample.php}]
end_of_line = crlf
+
+[*.yml]
+indent_style = space
+indent_size = 2
diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml
index 55482b6..028c8b3 100644
--- a/.github/workflows/develop.yml
+++ b/.github/workflows/develop.yml
@@ -6,30 +6,25 @@ on:
- develop
jobs:
-
# Builds the package and creates artifact with dist files
build:
name: Build
runs-on: ubuntu-latest
steps:
- - name: Set PHP version
- run: sudo update-alternatives --set php /usr/bin/php7.4
- name: Checkout
uses: actions/checkout@v2
- - name: Install OS dependencies
- run: sudo apt-get install zip -y
- - name: Setup variables
- id: vars
- run: |
- echo "::set-output name=composer-cache-path::$(composer config cache-files-dir)"
- - name: Cache Composer
- uses: actions/cache@v1
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
with:
- path: ${{ steps.vars.outputs.composer-cache-path }}
- key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
- restore-keys: ${{ runner.os }}-composer-
+ php-version: '7.4'
+ extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, soap, intl, gd, exif, iconv, imagick
+ coverage: none
- name: Install Composer dependencies
- run: composer install -o --no-dev --no-progress
+ uses: "ramsey/composer-install@v2"
+ with:
+ composer-options: "--no-dev"
+ - name: Run Strauss
+ run: composer run-script prefix-namespaces-prod
- name: Create build dir
run: mkdir build
- name: Copy files
@@ -42,48 +37,7 @@ jobs:
src: '.'
dest: 'build'
- name: Upload artifact
- uses: actions/upload-artifact@v1
+ uses: actions/upload-artifact@v4
with:
- name: build
+ name: ${{ secrets.SLUG }}-dev
path: build
-
- # Creates the dev package artifact from develop branch
- pack:
- name: Pack
- runs-on: ubuntu-latest
- needs: build
- steps:
- - name: Download artifact
- uses: actions/download-artifact@v1
- with:
- name: build
- path: ${{ secrets.SLUG }}
- - name: Create archive
- run: |
- zip -rq ${{ secrets.SLUG }}-dev.zip ${{ secrets.SLUG }}
- - name: Upload artifact
- uses: actions/upload-artifact@v1
- with:
- name: ${{ secrets.SLUG }}-dev
- path: ${{ secrets.SLUG }}-dev.zip
-
- # Uploads the develop package to internal repository
- upload:
- name: Upload to repo
- runs-on: ubuntu-latest
- needs: pack
- steps:
- - name: Download artifact
- uses: actions/download-artifact@v1
- with:
- name: ${{ secrets.SLUG }}-dev
- path: .
- - name: Upload to repo
- uses: Pendect/action-rsyncer@v1.1.0
- env:
- DEPLOY_KEY: ${{ secrets.PACKAGES_DEPLOY_KEY }}
- with:
- flags: '-avz'
- options: '--recursive '
- src: '.'
- dest: '${{ secrets.BRACKETSPACE_REPO_RSYNC_URL }}${{ secrets.SLUG }}/'
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 15cbc10..7042d34 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -12,8 +12,6 @@ jobs:
name: Release
runs-on: ubuntu-latest
steps:
- - name: Set PHP version
- run: sudo update-alternatives --set php /usr/bin/php7.4
- name: Checkout master
uses: actions/checkout@v1
with:
@@ -33,17 +31,29 @@ jobs:
run: git flow init -d
- name: Start release
run: git flow release start ${{ github.event.inputs.new_version }}
- - name: Replace 2.0.0 tags with new version number
+ - name: Replace Next tags with new version number
uses: jacobtomlinson/gha-find-replace@master
with:
find: "(?i)\\[Next\\]"
replace: "${{ github.event.inputs.new_version }}"
+ - name: Replace stable tag in readme
+ uses: jacobtomlinson/gha-find-replace@master
+ with:
+ find: "Stable tag: [0-9]+.[0-9]+.[0-9]+"
+ replace: "Stable tag: ${{ github.event.inputs.new_version }}"
+ include: "readme.txt"
- name: Replace version tag in main file
uses: jacobtomlinson/gha-find-replace@master
with:
find: "Version: [0-9]+.[0-9]+.[0-9]+"
replace: "Version: ${{ github.event.inputs.new_version }}"
include: "${{ secrets.SLUG }}.php"
+ - name: Replace constant tag in Runtime file
+ uses: jacobtomlinson/gha-find-replace@master
+ with:
+ find: "VERSION = '[0-9]+.[0-9]+.[0-9]+'"
+ replace: "VERSION = '${{ github.event.inputs.new_version }}'"
+ include: "src/classes/Runtime.php"
- name: Commit version bump
run: git commit -am "Version bump"
- name: Finish release
diff --git a/.github/workflows/stable.yml b/.github/workflows/stable.yml
index ed2a774..927b582 100644
--- a/.github/workflows/stable.yml
+++ b/.github/workflows/stable.yml
@@ -12,24 +12,20 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- - name: Set PHP version
- run: sudo update-alternatives --set php /usr/bin/php7.4
- name: Checkout
uses: actions/checkout@v2
- - name: Install OS dependencies
- run: sudo apt-get install zip -y
- - name: Setup variables
- id: vars
- run: |
- echo "::set-output name=composer-cache-path::$(composer config cache-files-dir)"
- - name: Cache Composer
- uses: actions/cache@v1
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
with:
- path: ${{ steps.vars.outputs.composer-cache-path }}
- key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
- restore-keys: ${{ runner.os }}-composer-
+ php-version: '7.4'
+ extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, soap, intl, gd, exif, iconv, imagick
+ coverage: none
- name: Install Composer dependencies
- run: composer install -o --no-dev --no-progress
+ uses: "ramsey/composer-install@v2"
+ with:
+ composer-options: "--no-dev"
+ - name: Run Strauss
+ run: composer run-script prefix-namespaces-prod
- name: Create build dir
run: mkdir build
- name: Copy files
@@ -42,7 +38,7 @@ jobs:
src: '.'
dest: 'build'
- name: Upload artifact
- uses: actions/upload-artifact@v1
+ uses: actions/upload-artifact@v4
with:
name: build
path: build
@@ -58,7 +54,7 @@ jobs:
run: |
echo "::set-output name=package-name::${{ secrets.SLUG }}-${GITHUB_REF#refs/tags/}"
- name: Download artifact
- uses: actions/download-artifact@v1
+ uses: actions/download-artifact@v4
with:
name: build
path: ${{ secrets.SLUG }}
@@ -66,54 +62,11 @@ jobs:
run: |
zip -rq ${{ steps.vars.outputs.package-name }}.zip ${{ secrets.SLUG }}
- name: Upload artifact
- uses: actions/upload-artifact@v1
+ uses: actions/upload-artifact@v4
with:
name: ${{ steps.vars.outputs.package-name }}
path: ${{ steps.vars.outputs.package-name }}.zip
- # Uploads the stable package to internal repository
- upload:
- name: Upload to repo
- runs-on: ubuntu-latest
- needs: pack
- steps:
- - name: Setup variables
- id: vars
- run: |
- echo "::set-output name=package-name::${{ secrets.SLUG }}-${GITHUB_REF#refs/tags/}"
- - name: Download artifact
- uses: actions/download-artifact@v1
- with:
- name: ${{ steps.vars.outputs.package-name }}
- path: .
- - name: Upload to repo
- uses: Pendect/action-rsyncer@v1.1.0
- env:
- DEPLOY_KEY: ${{ secrets.PACKAGES_DEPLOY_KEY }}
- with:
- flags: '-avz'
- options: '--recursive '
- src: '.'
- dest: '${{ secrets.BRACKETSPACE_REPO_RSYNC_URL }}${{ secrets.SLUG }}/'
-
- # Deploys the stable tag to WordPress.org repository
- wordpress-org-release:
- name: Release on WordPress.org
- runs-on: ubuntu-latest
- needs: build
- steps:
- - name: Download artifact
- uses: actions/download-artifact@v1
- with:
- name: build
- path: .
- - name: Deploy to WordPress repository
- uses: 10up/action-wordpress-plugin-deploy@1.4.0
- env:
- SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
- SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
- SLUG: ${{ secrets.SLUG }}
-
# Release on GitHub
github-release:
name: Release on GitHub
@@ -127,21 +80,14 @@ jobs:
run: |
echo "::set-output name=version::${GITHUB_REF#refs/tags/}"
echo "::set-output name=package-name::${{ secrets.SLUG }}-${GITHUB_REF#refs/tags/}"
- - name: Parse changelog
- run: |
- START="= ${{ steps.vars.outputs.version }} ="
- END="= [0-9]+.[0-9]+.[0-9]+ =|==|\$"
- grep -oPz "(?s)${START}.*?\n\K.*?(?=${END})" changelog.txt > release-changelog.txt
- truncate -s-2 changelog.txt
- name: Download artifact
- uses: actions/download-artifact@v1
+ uses: actions/download-artifact@v4
with:
name: ${{ steps.vars.outputs.package-name }}
path: .
- name: Release
uses: softprops/action-gh-release@v1
with:
- body_path: release-changelog.txt
files: ${{ steps.vars.outputs.package-name }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index ae2ed34..ab4a64e 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -4,68 +4,59 @@ on: push
jobs:
phpcs:
- name: WordPress Coding Standards
+ name: PHP Coding Standards
runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ php: ['7.4', '8.0', '8.1', '8.2', '8.3']
steps:
- - name: Set PHP version
- run: sudo update-alternatives --set php /usr/bin/php7.4
- - name: Checkout
- uses: actions/checkout@v2
- - name: Setup variables
- id: vars
- run: |
- echo "::set-output name=composer-cache-path::$(composer config cache-files-dir)"
- - name: Cache Composer
- uses: actions/cache@v1
- with:
- path: ${{ steps.vars.outputs.composer-cache-path }}
- key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
- restore-keys: ${{ runner.os }}-composer-
- - name: Install dependencies
- run: composer install --no-progress
- - name: Coding Standards
- run: composer phpcs
- php-lint:
- name: PHP Lint
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php }}
+ extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, soap, intl, gd, exif, iconv, imagick
+ coverage: none
+ - name: Install Composer dependencies
+ uses: "ramsey/composer-install@v2"
+ - name: Coding Standards
+ run: composer phpcs
+ phpstan:
+ name: PHPStan
runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ php: ['7.4', '8.0', '8.1', '8.2', '8.3']
steps:
- - name: Set PHP version
- run: sudo update-alternatives --set php /usr/bin/php7.4
- - name: Checkout
- uses: actions/checkout@v2
- - name: Setup variables
- id: vars
- run: |
- echo "::set-output name=composer-cache-path::$(composer config cache-files-dir)"
- - name: Cache Composer
- uses: actions/cache@v1
- with:
- path: ${{ steps.vars.outputs.composer-cache-path }}
- key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
- restore-keys: ${{ runner.os }}-composer-
- - name: Install dependencies
- run: composer install --no-progress
- - name: Coding Standards
- run: composer phpcs
- php-compat:
- name: PHP Compatibility
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php }}
+ extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, soap, intl, gd, exif, iconv, imagick
+ coverage: none
+ - name: Install Composer dependencies
+ uses: "ramsey/composer-install@v2"
+ - name: Analyze
+ run: composer phpstan
+ phplint:
+ name: PHP Lint
runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ php: ['7.4', '8.0', '8.1', '8.2', '8.3']
steps:
- - name: Set PHP version
- run: sudo update-alternatives --set php /usr/bin/php7.4
- - name: Checkout
- uses: actions/checkout@v2
- - name: Setup variables
- id: vars
- run: |
- echo "::set-output name=composer-cache-path::$(composer config cache-files-dir)"
- - name: Cache Composer
- uses: actions/cache@v1
- with:
- path: ${{ steps.vars.outputs.composer-cache-path }}
- key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
- restore-keys: ${{ runner.os }}-composer-
- - name: Install dependencies
- run: composer install --no-progress
- - name: Coding Standards
- run: composer phpcompat
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php }}
+ extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, soap, intl, gd, exif, iconv, imagick
+ coverage: none
+ - name: Install Composer dependencies
+ uses: "ramsey/composer-install@v2"
+ - name: Lint
+ run: composer phplint
diff --git a/.gitignore b/.gitignore
index 5d12c9a..30ba7ca 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,11 @@
### Project ###
composer.lock
+yarn.lock
*.log
+/dependencies/*
+!/dependencies/.gitkeep
node_modules/
-/dist
+resources/*/dist/
/vendor
### Windows ###
diff --git a/.wordpress-org/banner-1544x500.png b/.wordpress-org/banner-1544x500.png
deleted file mode 100644
index 15085b4..0000000
Binary files a/.wordpress-org/banner-1544x500.png and /dev/null differ
diff --git a/.wordpress-org/banner-772x250.png b/.wordpress-org/banner-772x250.png
deleted file mode 100644
index 024ec31..0000000
Binary files a/.wordpress-org/banner-772x250.png and /dev/null differ
diff --git a/.wordpress-org/icon-128x128.png b/.wordpress-org/icon-128x128.png
deleted file mode 100644
index ef13e89..0000000
Binary files a/.wordpress-org/icon-128x128.png and /dev/null differ
diff --git a/.wordpress-org/icon-256x256.png b/.wordpress-org/icon-256x256.png
deleted file mode 100644
index e7f19df..0000000
Binary files a/.wordpress-org/icon-256x256.png and /dev/null differ
diff --git a/.wordpress-org/icon.svg b/.wordpress-org/icon.svg
deleted file mode 100644
index 3c87493..0000000
--- a/.wordpress-org/icon.svg
+++ /dev/null
@@ -1,50 +0,0 @@
-
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..d1094ca
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,43 @@
+# How to Contribute
+
+Thank you for taking the time to contribute to our project. We're thrilled to share our work with you and hope you'll enjoy sharing your work with us! Here's a bunch of useful information for you to start.
+
+## Gitflow
+
+We use [Gitflow](https://danielkummer.github.io/git-flow-cheatsheet/) on each of our projects. According to the basic assumptions of this workflow, here are the steps that you need to take when developing a new feature:
+
+1. Create a new branch from `develop`
+2. Work on this branch until your feature is finished
+3. Rebase your branch onto current `develop`
+4. Create a Pull Request and wait for the Code Review
+5. Iterate with all needed changes and fixes
+6. Enjoy your branch being merged once accepted
+
+### Branch names
+
+Typically, branches are named after the developed feature, i.e. `feature/Name-of-the-Feature` and so we do.
+
+## Conventional Commits
+
+We're following the rule of [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).
+
+A well-formed git commit description line should always be able to complete the following sentence:
+> When applied, this commit should *\*
+
+## Pull Requests
+
+When you're done with developing your feature, you should create a [Pull Request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) and wait for your code to be reviewed. Once all the changes and fixes will be applied, the PR will be merged into the develop branch.
+
+### PR size
+
+Create PRs as small as they can possibly be. Create as much of them as you need. This makes them easier to review and less likely to cause serious merge conflicts.
+
+## Changelog
+
+We appreciate it if you keep the changelog for every change.
+
+Changelog usually lives in `readme.txt` files when it comes to a plugin, or it is in `CHANGELOG.md`. New sections (unreleased changes) can be marked as `3.0.0`. It will be changed to the next version number when a new version is released.
+
+***
+
+And that's it for the basic information you need. Thanks!
diff --git a/compat/buddypress-stubs.php b/compat/buddypress-stubs.php
new file mode 100644
index 0000000..74855cd
--- /dev/null
+++ b/compat/buddypress-stubs.php
@@ -0,0 +1,73078 @@
+id}-awesome.php" and you could use
+ * bp_is_active( $this->id, 'awesome' ) to determine if the feature is active.
+ * @type string $search_query_arg String to be used as the query argument in component search URLs.
+ * }
+ */
+ public function start($id = '', $name = '', $path = '', $params = array())
+ {
+ }
+ /**
+ * Set up component global variables.
+ *
+ * @since 1.5.0
+ * @since 2.0.0 Adds the `$directory_title` argument to the `$args` parameter.
+ * @since 9.0.0 Adds the `$block_globals` argument to the `$args` parameter.
+ * @since 12.0.0 Adds the `$rewrite_ids` argument to the `$args` parameter.
+ *
+ * @param array $args {
+ * All values are optional.
+ * @type string $slug The component slug. Used to construct certain URLs, such as 'friends' in
+ * http://example.com/members/joe/friends/. Default: the value of $this->id.
+ * @type string $root_slug The component root slug. Note that this value is generally unused if the
+ * component has a root directory (the slug will be overridden by the
+ * post_name of the directory page). Default: the slug of the directory page
+ * if one is found, otherwise an empty string.
+ * @type bool $has_directory Set to true if the component requires an associated WordPress page.
+ * @type array $rewrite_ids The list of rewrited IDs to use for the component.
+ * @type string $directory_title The title to use for the directory page.
+ * @type callable $notification_callback The callable function that formats the component's notifications.
+ * @type string $search_string The placeholder text for the directory search box. Eg: 'Search Groups...'.
+ * @type array $global_tables An array of database table names.
+ * @type array $meta_tables An array of metadata table names.
+ * @type array $block_globals An array of globalized data for BP Blocks.
+ * }
+ */
+ public function setup_globals($args = array())
+ {
+ }
+ /**
+ * Include required files.
+ *
+ * Please note that, by default, this method is fired on the bp_include
+ * hook, with priority 8. This is necessary so that core components are
+ * loaded in time to be available to third-party plugins. However, this
+ * load order means that third-party plugins whose main files are
+ * loaded at bp_include with priority 10 (as recommended), will not be
+ * loaded in time for their includes() method to fire automatically.
+ *
+ * For this reason, it is recommended that your plugin has its own
+ * method or function for requiring necessary files. If you must use
+ * this method, you will have to call it manually in your constructor
+ * class, ie
+ * $this->includes();
+ *
+ * Note that when you pass an array value like 'actions' to includes,
+ * it looks for the following three files (assuming your component is
+ * called 'my_component'):
+ * - ./actions
+ * - ./bp-my_component/actions
+ * - ./bp-my_component/bp-my_component-actions.php
+ *
+ * @since 1.5.0
+ *
+ * @param array $includes An array of file names, or file name chunks,
+ * to be parsed and then included.
+ */
+ public function includes($includes = array())
+ {
+ }
+ /**
+ * Late includes method.
+ *
+ * Components should include files here only on specific pages using
+ * conditionals such as {@link bp_is_current_component()}. Intentionally left
+ * empty.
+ *
+ * @since 3.0.0
+ */
+ public function late_includes()
+ {
+ }
+ /**
+ * Set up the actions.
+ *
+ * @since 1.5.0
+ */
+ public function setup_actions()
+ {
+ }
+ /**
+ * Set up the canonical URL stack for this component.
+ *
+ * @since 2.1.0
+ */
+ public function setup_canonical_stack()
+ {
+ }
+ /**
+ * Registers nav items globalizing them into `BP_Component::$main_nav` & `BP_Component::$sub_nav` properties.
+ *
+ * @since 12.0.0
+ *
+ * @param array $main_nav Optional. Passed directly to bp_core_new_nav_item().
+ * See that function for a description.
+ * @param array $sub_nav Optional. Multidimensional array, each item in
+ * which is passed to bp_core_new_subnav_item(). See that
+ * function for a description.
+ */
+ public function register_nav($main_nav = array(), $sub_nav = array())
+ {
+ }
+ /**
+ * Set up component navigation.
+ *
+ * @since 1.5.0
+ * @since 12.0.0 Uses the registered navigations to generate it.
+ *
+ * @param array $main_nav Optional. Passed directly to bp_core_new_nav_item().
+ * See that function for a description.
+ * @param array $sub_nav Optional. Multidimensional array, each item in
+ * which is passed to bp_core_new_subnav_item(). See that
+ * function for a description.
+ */
+ public function setup_nav($main_nav = array(), $sub_nav = array())
+ {
+ }
+ /**
+ * Set up the component entries in the WordPress Admin Bar.
+ *
+ * @since 1.5.0
+ *
+ * @see WP_Admin_Bar::add_menu() for a description of the syntax
+ * required by each item in the $wp_admin_nav parameter array.
+ *
+ * @global WP_Admin_Bar $wp_admin_bar WordPress object implementing a Toolbar API.
+ *
+ * @param array $wp_admin_nav An array of nav item arguments. Each item in this parameter
+ * array is passed to {@link WP_Admin_Bar::add_menu()}.
+ * See that method for a description of the required syntax for
+ * each item.
+ */
+ public function setup_admin_bar($wp_admin_nav = array())
+ {
+ }
+ /**
+ * Set up the component title.
+ *
+ * @since 1.5.0
+ */
+ public function setup_title()
+ {
+ }
+ /**
+ * Setup component-specific cache groups.
+ *
+ * @since 2.2.0
+ */
+ public function setup_cache_groups()
+ {
+ }
+ /**
+ * Register global tables for the component, so that it may use WordPress's database API.
+ *
+ * @since 2.0.0
+ *
+ * @param array $tables Table names to register.
+ */
+ public function register_global_tables($tables = array())
+ {
+ }
+ /**
+ * Register component metadata tables.
+ *
+ * Metadata tables are registered in the $wpdb global, for
+ * compatibility with the WordPress metadata API.
+ *
+ * @since 2.0.0
+ *
+ * @param array $tables Table names to register.
+ */
+ public function register_meta_tables($tables = array())
+ {
+ }
+ /**
+ * Set up the component post types.
+ *
+ * @since 1.5.0
+ */
+ public function register_post_types()
+ {
+ }
+ /**
+ * Set up the component post statuses.
+ *
+ * @since 12.0.0
+ */
+ public function register_post_statuses()
+ {
+ }
+ /**
+ * Register component-specific taxonomies.
+ *
+ * @since 1.5.0
+ */
+ public function register_taxonomies()
+ {
+ }
+ /**
+ * Add Component's additional rewrite tags.
+ *
+ * @since 1.5.0
+ * @since 12.0.0 Adds the `$rewrite_tags` parameter.
+ *
+ * @param array $rewrite_tags Array of arguments list used to add WordPress rewrite tags.
+ * Each argument key needs to match one of `$this->rewrite_ids` keys.
+ */
+ public function add_rewrite_tags($rewrite_tags = array())
+ {
+ }
+ /**
+ * Add Component's additional rewrite rules.
+ *
+ * @since 1.9.0
+ * @since 12.0.0 Adds the `$rewrite_rules` parameter.
+ *
+ * @param array $rewrite_rules {
+ * Array of associative arrays of arguments list used to add WordPress rewrite rules.
+ * Each associative array needs to include the following keys.
+ *
+ * @type string $regex Regular expression to match request against. Required.
+ * @type string $query The corresponding query vars for this rewrite rule. Required.
+ * @type int $order The insertion order for the rewrite rule. Required.
+ * @type string $priority The Priority of the new rule. Accepts 'top' or 'bottom'. Optional.
+ * Default 'top'.
+ * }
+ */
+ public function add_rewrite_rules($rewrite_rules = array())
+ {
+ }
+ /**
+ * Add Component's permalink structures.
+ *
+ * @since 1.9.0
+ * @since 12.0.0 Adds the `$permastructs` parameter.
+ *
+ * @param array $permastructs {
+ * Array of associative arrays of arguments list used to register WordPress additional permalink structures.
+ * Each array enty is keyed with the permalink structure.
+ * Each associative array needs to include the following keys.
+ *
+ * @type string $permastruct The permalink structure. Required.
+ * @type array $args The permalink structure arguments. Optional.
+ * }
+ */
+ public function add_permastructs($permastructs = array())
+ {
+ }
+ /**
+ * Allow components to parse the main query.
+ *
+ * @since 1.9.0
+ *
+ * @param object $query The main WP_Query.
+ */
+ public function parse_query($query)
+ {
+ }
+ /**
+ * Make sure to avoid querying for regular posts when displaying a BuddyPress page.
+ *
+ * @since 12.0.0
+ *
+ * @param null $posts A null value to use the regular WP Query.
+ * @param WP_Query $query The WP Query object.
+ * @return null|array Null if not displaying a BuddyPress page.
+ * An array containing the BuddyPress directory page otherwise.
+ */
+ public function pre_query($posts = \null, $query = \null)
+ {
+ }
+ /**
+ * Generate any additional rewrite rules.
+ *
+ * @since 1.5.0
+ */
+ public function generate_rewrite_rules()
+ {
+ }
+ /**
+ * Init the BP REST API.
+ *
+ * @since 5.0.0
+ *
+ * @param array $controllers The list of BP REST controllers to load.
+ */
+ public function rest_api_init($controllers = array())
+ {
+ }
+ /**
+ * Register the BP Blocks.
+ *
+ * @since 6.0.0
+ *
+ * @see `BP_Block->construct()` for a full description of a BP Block arguments.
+ *
+ * @param array $blocks The list of BP Blocks to register.
+ */
+ public function blocks_init($blocks = array())
+ {
+ }
+ /**
+ * Add component's directory states.
+ *
+ * @since 10.0.0
+ * @deprecated 12.0.0
+ *
+ * @param string[] $states An array of post display states.
+ * @return array The component's directory states.
+ */
+ public function admin_directory_states($states = array())
+ {
+ }
+ }
+ /**
+ * Creates our Blogs component.
+ *
+ * @since 1.5.0
+ */
+ #[\AllowDynamicProperties]
+ class BP_Blogs_Component extends \BP_Component
+ {
+ /**
+ * Start the blogs component creation process.
+ *
+ * @since 1.5.0
+ */
+ public function __construct()
+ {
+ }
+ /**
+ * Set up global settings for the blogs component.
+ *
+ * The BP_BLOGS_SLUG constant is deprecated.
+ *
+ * @since 1.5.0
+ *
+ * @see BP_Component::setup_globals() for description of parameters.
+ *
+ * @param array $args See {@link BP_Component::setup_globals()}.
+ */
+ public function setup_globals($args = array())
+ {
+ }
+ /**
+ * Include bp-blogs files.
+ *
+ * @see BP_Component::includes() for description of parameters.
+ *
+ * @param array $includes See {@link BP_Component::includes()}.
+ */
+ public function includes($includes = array())
+ {
+ }
+ /**
+ * Late includes method.
+ *
+ * Only load up certain code when on specific pages.
+ *
+ * @since 3.0.0
+ */
+ public function late_includes()
+ {
+ }
+ /**
+ * Register component navigation.
+ *
+ * @since 12.0.0
+ *
+ * @see `BP_Component::register_nav()` for a description of arguments.
+ *
+ * @param array $main_nav Optional. See `BP_Component::register_nav()` for
+ * description.
+ * @param array $sub_nav Optional. See `BP_Component::register_nav()` for
+ * description.
+ */
+ public function register_nav($main_nav = array(), $sub_nav = array())
+ {
+ }
+ /**
+ * Set up component navigation.
+ *
+ * @since 1.5.0
+ * @since 12.0.0 Used to customize the main navigation name.
+ *
+ * @see `BP_Component::setup_nav()` for a description of arguments.
+ *
+ * @param array $main_nav Optional. See `BP_Component::setup_nav()` for
+ * description.
+ * @param array $sub_nav Optional. See `BP_Component::setup_nav()` for
+ * description.
+ */
+ public function setup_nav($main_nav = array(), $sub_nav = array())
+ {
+ }
+ /**
+ * Set up bp-blogs integration with the WordPress admin bar.
+ *
+ * @since 1.5.0
+ *
+ * @see BP_Component::setup_admin_bar() for a description of arguments.
+ *
+ * @param array $wp_admin_nav See BP_Component::setup_admin_bar()
+ * for description.
+ */
+ public function setup_admin_bar($wp_admin_nav = array())
+ {
+ }
+ /**
+ * Set up the title for pages and .
+ */
+ public function setup_title()
+ {
+ }
+ /**
+ * Setup cache groups
+ *
+ * @since 2.2.0
+ */
+ public function setup_cache_groups()
+ {
+ }
+ /**
+ * Add the Blog Create rewrite tags.
+ *
+ * @since 12.0.0
+ *
+ * @param array $rewrite_tags Optional. See BP_Component::add_rewrite_tags() for
+ * description.
+ */
+ public function add_rewrite_tags($rewrite_tags = array())
+ {
+ }
+ /**
+ * Add the Registration and Activation rewrite rules.
+ *
+ * @since 12.0.0
+ *
+ * @param array $rewrite_rules Optional. See BP_Component::add_rewrite_rules() for
+ * description.
+ */
+ public function add_rewrite_rules($rewrite_rules = array())
+ {
+ }
+ /**
+ * Parse the WP_Query and eventually display the component's directory or single item.
+ *
+ * @since 12.0.0
+ *
+ * @param WP_Query $query Required. See BP_Component::parse_query() for
+ * description.
+ */
+ public function parse_query($query)
+ {
+ }
+ /**
+ * Init the BP REST API.
+ *
+ * @since 6.0.0
+ *
+ * @param array $controllers Optional. See BP_Component::rest_api_init() for
+ * description.
+ */
+ public function rest_api_init($controllers = array())
+ {
+ }
+ /**
+ * Register the BP Blogs Blocks.
+ *
+ * @since 9.0.0
+ * @since 12.0.0 Use the WP Blocks API v2.
+ *
+ * @param array $blocks Optional. See BP_Component::blocks_init() for
+ * description.
+ */
+ public function blocks_init($blocks = array())
+ {
+ }
+ }
+ /**
+ * List table class for signups network admin page.
+ *
+ * @since 2.0.0
+ */
+ class BP_Members_MS_List_Table extends \WP_MS_Users_List_Table
+ {
+ /**
+ * Signup counts.
+ *
+ * @since 2.0.0
+ *
+ * @var int
+ */
+ public $signup_counts = 0;
+ /**
+ * Signup profile fields.
+ *
+ * @since 10.0.0
+ *
+ * @var array
+ */
+ public $signup_field_labels = array();
+ /**
+ * Constructor.
+ *
+ * @since 2.0.0
+ */
+ public function __construct()
+ {
+ }
+ /**
+ * Set up items for display in the list table.
+ *
+ * Handles filtering of data, sorting, pagination, and any other data
+ * manipulation required prior to rendering.
+ *
+ * @since 2.0.0
+ *
+ * @global string $usersearch The users search terms.
+ * @global string $mode The display mode.
+ */
+ public function prepare_items()
+ {
+ }
+ /**
+ * Display the users screen views
+ *
+ * @since 2.5.0
+ *
+ * @global string $role The name of role the users screens is filtered by
+ */
+ public function views()
+ {
+ }
+ /**
+ * Specific signups columns.
+ *
+ * @since 2.0.0
+ *
+ * @return array
+ */
+ public function get_columns()
+ {
+ }
+ /**
+ * Specific bulk actions for signups.
+ *
+ * @since 2.0.0
+ */
+ public function get_bulk_actions()
+ {
+ }
+ /**
+ * The text shown when no items are found.
+ *
+ * Nice job, clean sheet!
+ *
+ * @since 2.0.0
+ */
+ public function no_items()
+ {
+ }
+ /**
+ * The columns signups can be reordered with.
+ *
+ * @since 2.0.0
+ */
+ public function get_sortable_columns()
+ {
+ }
+ /**
+ * Display signups rows.
+ *
+ * @since 2.0.0
+ */
+ public function display_rows()
+ {
+ }
+ /**
+ * Display a signup row.
+ *
+ * @since 2.0.0
+ *
+ * @see WP_List_Table::single_row() for explanation of params.
+ *
+ * @param object|null $signup_object Signup user object.
+ * @param string $style Styles for the row.
+ */
+ public function single_row($signup_object = \null, $style = '')
+ {
+ }
+ /**
+ * Prevents regular users row actions to be output.
+ *
+ * @since 2.4.0
+ *
+ * @param object|null $signup_object Signup being acted upon.
+ * @param string $column_name Current column name.
+ * @param string $primary Primary column name.
+ * @return string
+ */
+ protected function handle_row_actions($signup_object = \null, $column_name = '', $primary = '')
+ {
+ }
+ /**
+ * Markup for the checkbox used to select items for bulk actions.
+ *
+ * @since 2.0.0
+ *
+ * @param object|null $signup_object The signup data object.
+ */
+ public function column_cb($signup_object = \null)
+ {
+ }
+ /**
+ * The row actions (delete/activate/email).
+ *
+ * @since 2.0.0
+ *
+ * @param object|null $signup_object The signup data object.
+ */
+ public function column_username($signup_object = \null)
+ {
+ }
+ /**
+ * Display user name, if any.
+ *
+ * @since 2.0.0
+ *
+ * @param object|null $signup_object The signup data object.
+ */
+ public function column_name($signup_object = \null)
+ {
+ }
+ /**
+ * Display user email.
+ *
+ * @since 2.0.0
+ *
+ * @param object|null $signup_object The signup data object.
+ */
+ public function column_email($signup_object = \null)
+ {
+ }
+ /**
+ * Display registration date.
+ *
+ * @since 2.0.0
+ *
+ * @global string $mode The display mode.
+ *
+ * @param object|null $signup_object The signup data object.
+ */
+ public function column_registered($signup_object = \null)
+ {
+ }
+ /**
+ * Display the last time an activation email has been sent.
+ *
+ * @since 2.0.0
+ *
+ * @global string $mode The display mode.
+ *
+ * @param object|null $signup_object Signup object instance.
+ */
+ public function column_date_sent($signup_object = \null)
+ {
+ }
+ /**
+ * Display number of time an activation email has been sent.
+ *
+ * @since 2.0.0
+ *
+ * @param object|null $signup_object Signup object instance.
+ */
+ public function column_count_sent($signup_object = \null)
+ {
+ }
+ /**
+ * Allow plugins to add their custom column.
+ *
+ * @since 2.1.0
+ *
+ * @param object|null $signup_object The signup data object.
+ * @param string $column_name The column name.
+ * @return string
+ */
+ function column_default($signup_object = \null, $column_name = '')
+ {
+ }
+ }
+ /**
+ * The main theme compat class for BuddyPress Registration.
+ *
+ * This class sets up the necessary theme compatibility actions to safely output
+ * registration template parts to the_title and the_content areas of a theme.
+ *
+ * @since 1.7.0
+ */
+ class BP_Registration_Theme_Compat
+ {
+ /**
+ * Setup the groups component theme compatibility.
+ *
+ * @since 1.7.0
+ */
+ public function __construct()
+ {
+ }
+ /**
+ * Are we looking at either the registration or activation pages?
+ *
+ * @since 1.7.0
+ */
+ public function is_registration()
+ {
+ }
+ /** Template ***********************************************************/
+ /**
+ * Add template hierarchy to theme compat for registration/activation pages.
+ *
+ * This is to mirror how WordPress has
+ * {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
+ *
+ * @since 1.8.0
+ *
+ * @param string $templates The templates from bp_get_theme_compat_templates().
+ * @return array $templates Array of custom templates to look for.
+ */
+ public function template_hierarchy($templates)
+ {
+ }
+ /**
+ * Update the global $post with dummy data.
+ *
+ * @since 1.7.0
+ */
+ public function dummy_post()
+ {
+ }
+ /**
+ * Filter the_content with either the register or activate templates.
+ *
+ * @since 1.7.0
+ */
+ public function dummy_content()
+ {
+ }
+ }
+ /**
+ * The main membership invitations template loop class.
+ *
+ * Responsible for loading a group of membership invitations into a loop for display.
+ *
+ * @since 8.0.0
+ */
+ class BP_Members_Invitations_Template
+ {
+ /**
+ * The loop iterator.
+ *
+ * @since 8.0.0
+ * @var int
+ */
+ public $current_invitation = -1;
+ /**
+ * The number of invitations returned by the paged query.
+ *
+ * @since 8.0.0
+ * @var int
+ */
+ public $current_invitation_count;
+ /**
+ * Total number of invitations matching the query.
+ *
+ * @since 8.0.0
+ * @var int
+ */
+ public $total_invitation_count;
+ /**
+ * Array of network invitations located by the query.
+ *
+ * @since 8.0.0
+ * @var array
+ */
+ public $invitations;
+ /**
+ * The invitation object currently being iterated on.
+ *
+ * @since 8.0.0
+ * @var object
+ */
+ public $invitation;
+ /**
+ * A flag for whether the loop is currently being iterated.
+ *
+ * @since 8.0.0
+ * @var bool
+ */
+ public $in_the_loop;
+ /**
+ * The ID of the user to whom the displayed invitations were sent.
+ *
+ * @since 8.0.0
+ * @var int
+ */
+ public $user_id;
+ /**
+ * The ID of the user to whom the displayed invitations belong.
+ *
+ * @since 8.0.0
+ * @var int
+ */
+ public $inviter_id;
+ /**
+ * The page number being requested.
+ *
+ * @since 8.0.0
+ * @var int
+ */
+ public $pag_page;
+ /**
+ * The $_GET argument used in URLs for determining pagination.
+ *
+ * @since 8.0.0
+ * @var int
+ */
+ public $pag_arg;
+ /**
+ * The number of items to display per page of results.
+ *
+ * @since 8.0.0
+ * @var int
+ */
+ public $pag_num;
+ /**
+ * An HTML string containing pagination links.
+ *
+ * @since 8.0.0
+ * @var string
+ */
+ public $pag_links;
+ /**
+ * A string to match against.
+ *
+ * @since 8.0.0
+ * @var string
+ */
+ public $search_terms;
+ /**
+ * A database column to order the results by.
+ *
+ * @since 8.0.0
+ * @var string
+ */
+ public $order_by;
+ /**
+ * The direction to sort the results (ASC or DESC).
+ *
+ * @since 8.0.0
+ * @var string
+ */
+ public $sort_order;
+ /**
+ * Array of variables used in this invitation query.
+ *
+ * @since 8.0.0
+ * @var array
+ */
+ public $query_vars;
+ /**
+ * Constructor method.
+ *
+ * @see bp_has_members_invitations() For information on the array format.
+ *
+ * @since 8.0.0
+ *
+ * @param array $args {
+ * An array of arguments. See {@link bp_has_members_invitations()}
+ * for more details.
+ * }
+ */
+ public function __construct($args = array())
+ {
+ }
+ /**
+ * Whether there are invitations available in the loop.
+ *
+ * @since 8.0.0
+ *
+ * @see bp_has_members_invitations()
+ *
+ * @return bool True if there are items in the loop, otherwise false.
+ */
+ public function has_invitations()
+ {
+ }
+ /**
+ * Set up the next invitation and iterate index.
+ *
+ * @since 8.0.0
+ *
+ * @return object The next invitation to iterate over.
+ */
+ public function next_invitation()
+ {
+ }
+ /**
+ * Rewind the blogs and reset blog index.
+ *
+ * @since 8.0.0
+ */
+ public function rewind_invitations()
+ {
+ }
+ /**
+ * Whether there are invitations left in the loop to iterate over.
+ *
+ * This method is used by {@link bp_members_invitations()} as part of the
+ * while loop that controls iteration inside the invitations loop, eg:
+ * while ( bp_members_invitations() ) { ...
+ *
+ * @since 8.0.0
+ *
+ * @see bp_members_invitations()
+ *
+ * @return bool True if there are more invitations to show,
+ * otherwise false.
+ */
+ public function invitations()
+ {
+ }
+ /**
+ * Set up the current invitation inside the loop.
+ *
+ * Used by {@link bp_the_invitation()} to set up the current
+ * invitation data while looping, so that template tags used during
+ * that iteration make reference to the current invitation.
+ *
+ * @since 8.0.0
+ *
+ * @see bp_the_invitation()
+ */
+ public function the_invitation()
+ {
+ }
+ }
+ /**
+ * List table class for signups admin page.
+ *
+ * @since 2.0.0
+ */
+ class BP_Members_List_Table extends \WP_Users_List_Table
+ {
+ /**
+ * Signup counts.
+ *
+ * @since 2.0.0
+ *
+ * @var int
+ */
+ public $signup_counts = 0;
+ /**
+ * Signup profile fields.
+ *
+ * @since 10.0.0
+ *
+ * @var array
+ */
+ public $signup_field_labels = array();
+ /**
+ * Constructor.
+ *
+ * @since 2.0.0
+ */
+ public function __construct()
+ {
+ }
+ /**
+ * Set up items for display in the list table.
+ *
+ * Handles filtering of data, sorting, pagination, and any other data
+ * manipulation required prior to rendering.
+ *
+ * @since 2.0.0
+ *
+ * @global string $usersearch The users search terms.
+ */
+ public function prepare_items()
+ {
+ }
+ /**
+ * Display the users screen views
+ *
+ * @since 2.5.0
+ *
+ * @global string $role The name of role the users screens is filtered by.
+ */
+ public function views()
+ {
+ }
+ /**
+ * Get rid of the extra nav.
+ *
+ * WP_Users_List_Table will add an extra nav to change user's role.
+ * As we're dealing with signups, we don't need this.
+ *
+ * @since 2.0.0
+ *
+ * @param array $which Current table nav item.
+ */
+ public function extra_tablenav($which)
+ {
+ }
+ /**
+ * Specific signups columns.
+ *
+ * @since 2.0.0
+ *
+ * @return array
+ */
+ public function get_columns()
+ {
+ }
+ /**
+ * Specific bulk actions for signups.
+ *
+ * @since 2.0.0
+ */
+ public function get_bulk_actions()
+ {
+ }
+ /**
+ * The text shown when no items are found.
+ *
+ * Nice job, clean sheet!
+ *
+ * @since 2.0.0
+ */
+ public function no_items()
+ {
+ }
+ /**
+ * The columns signups can be reordered with.
+ *
+ * @since 2.0.0
+ */
+ public function get_sortable_columns()
+ {
+ }
+ /**
+ * Display signups rows.
+ *
+ * @since 2.0.0
+ */
+ public function display_rows()
+ {
+ }
+ /**
+ * Display a signup row.
+ *
+ * @since 2.0.0
+ *
+ * @see WP_List_Table::single_row() for explanation of params.
+ *
+ * @param object|null $signup_object Signup user object.
+ * @param string $style Styles for the row.
+ * @param string $role Role to be assigned to user.
+ * @param int $numposts Numper of posts.
+ */
+ public function single_row($signup_object = \null, $style = '', $role = '', $numposts = 0)
+ {
+ }
+ /**
+ * Markup for the checkbox used to select items for bulk actions.
+ *
+ * @since 2.0.0
+ *
+ * @param object|null $signup_object The signup data object.
+ */
+ public function column_cb($signup_object = \null)
+ {
+ }
+ /**
+ * The row actions (delete/activate/email).
+ *
+ * @since 2.0.0
+ *
+ * @param object|null $signup_object The signup data object.
+ */
+ public function column_username($signup_object = \null)
+ {
+ }
+ /**
+ * Display user name, if any.
+ *
+ * @since 2.0.0
+ *
+ * @param object|null $signup_object The signup data object.
+ */
+ public function column_name($signup_object = \null)
+ {
+ }
+ /**
+ * Display user email.
+ *
+ * @since 2.0.0
+ *
+ * @param object|null $signup_object The signup data object.
+ */
+ public function column_email($signup_object = \null)
+ {
+ }
+ /**
+ * Display registration date.
+ *
+ * @since 2.0.0
+ *
+ * @param object|null $signup_object The signup data object.
+ */
+ public function column_registered($signup_object = \null)
+ {
+ }
+ /**
+ * Display the last time an activation email has been sent.
+ *
+ * @since 2.0.0
+ *
+ * @param object|null $signup_object The signup data object.
+ */
+ public function column_date_sent($signup_object = \null)
+ {
+ }
+ /**
+ * Display number of times an activation email has been sent.
+ *
+ * @since 2.0.0
+ *
+ * @param object|null $signup_object Signup object instance.
+ */
+ public function column_count_sent($signup_object = \null)
+ {
+ }
+ /**
+ * Allow plugins to add their custom column.
+ *
+ * @since 2.1.0
+ *
+ * @param object|null $signup_object The signup data object.
+ * @param string $column_name The column name.
+ * @return string
+ */
+ function column_default($signup_object = \null, $column_name = '')
+ {
+ }
+ }
+ /**
+ * Members Widget.
+ *
+ * @since 1.0.3
+ * @deprecated 12.0.0
+ */
+ class BP_Core_Members_Widget
+ {
+ /**
+ * Constructor method.
+ *
+ * @since 1.5.0
+ * @since 9.0.0 Adds the `show_instance_in_rest` property to Widget options.
+ * @deprecated 12.0.0
+ */
+ public function __construct()
+ {
+ }
+ /**
+ * Enqueue scripts.
+ *
+ * @since 2.6.0
+ * @deprecated 12.0.0
+ */
+ public function enqueue_scripts()
+ {
+ }
+ /**
+ * Display the Members widget.
+ *
+ * @since 1.0.3
+ * @deprecated 12.0.0
+ *
+ * @see WP_Widget::widget() for description of parameters.
+ *
+ * @param array $args Widget arguments.
+ * @param array $instance Widget settings, as saved by the user.
+ */
+ public function widget($args, $instance)
+ {
+ }
+ /**
+ * Update the Members widget options.
+ *
+ * @since 1.0.3
+ * @deprecated 12.0.0
+ *
+ * @param array $new_instance The new instance options.
+ * @param array $old_instance The old instance options.
+ */
+ public function update($new_instance, $old_instance)
+ {
+ }
+ /**
+ * Output the Members widget options form.
+ *
+ * @since 1.0.3
+ * @deprecated 12.0.0
+ *
+ * @param array $instance Widget instance settings.
+ */
+ public function form($instance)
+ {
+ }
+ /**
+ * Merge the widget settings into defaults array.
+ *
+ * @since 2.3.0
+ * @deprecated 12.0.0
+ *
+ * @param array $instance Widget instance settings.
+ */
+ public function parse_settings($instance = array())
+ {
+ }
+ }
+ /**
+ * BuddyPress Members endpoints.
+ *
+ * /members/
+ * /members/{id}
+ *
+ * @since 5.0.0
+ */
+ class BP_REST_Members_Endpoint extends \WP_REST_Users_Controller
+ {
+ /**
+ * Constructor.
+ *
+ * @since 5.0.0
+ */
+ public function __construct()
+ {
+ }
+ /**
+ * Registers the routes for the objects of the controller.
+ *
+ * @since 7.0.0
+ *
+ * @see register_rest_route()
+ */
+ public function register_routes()
+ {
+ }
+ /**
+ * Retrieve users.
+ *
+ * @since 5.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return WP_REST_Response
+ */
+ public function get_items($request)
+ {
+ }
+ /**
+ * Checks if a given request has access to get all users.
+ *
+ * @since 5.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return true|WP_Error
+ */
+ public function get_items_permissions_check($request)
+ {
+ }
+ /**
+ * Retrieves a single member.
+ *
+ * @since 7.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
+ */
+ public function get_item($request)
+ {
+ }
+ /**
+ * Checks if a given request has access to read a user.
+ *
+ * @since 5.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return true|WP_Error
+ */
+ public function get_item_permissions_check($request)
+ {
+ }
+ /**
+ * Checks if a given request has access create members.
+ *
+ * @since 5.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return true|WP_Error
+ */
+ public function create_item_permissions_check($request)
+ {
+ }
+ /**
+ * Check if a given request has access to update a member.
+ *
+ * @since 5.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return true|WP_Error
+ */
+ public function update_item_permissions_check($request)
+ {
+ }
+ /**
+ * Check if a given request has access to delete a member.
+ *
+ * @since 5.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return true|WP_Error
+ */
+ public function delete_item_permissions_check($request)
+ {
+ }
+ /**
+ * Checks if a given request has access to delete the current user.
+ *
+ * @since 5.0.0
+ * @since 0.7.0 Do implement this method.
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return true|WP_Error True if the request has access to delete the item, WP_Error object otherwise.
+ */
+ public function delete_current_item_permissions_check($request)
+ {
+ }
+ /**
+ * Deletes the current user.
+ *
+ * @since 5.0.0
+ * @since 0.7.0 Do implement this method.
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
+ */
+ public function delete_current_item($request)
+ {
+ }
+ /**
+ * Prepares a single user output for response.
+ *
+ * @since 5.0.0
+ *
+ * @param WP_User $user User object.
+ * @param WP_REST_Request $request Full details about the request.
+ * @return WP_REST_Response
+ */
+ public function prepare_item_for_response($user, $request)
+ {
+ }
+ /**
+ * Prepares links for the user request.
+ *
+ * @since 11.0.0
+ *
+ * @param WP_User $user User object.
+ * @param array $user_data User data.
+ * @return array
+ */
+ protected function prepare_links($user, $user_data = array())
+ {
+ }
+ /**
+ * Method to facilitate fetching of user data.
+ *
+ * This was abstracted to be used in other BuddyPress endpoints.
+ *
+ * @since 5.0.0
+ * @since 7.0.0 Add the `$request` parameter.
+ *
+ * @param WP_User $user User object.
+ * @param string $context The context of the request. Defaults to 'view'.
+ * @param WP_REST_Request $request Full details about the request.
+ * @return array
+ */
+ public function user_data($user, $context, $request)
+ {
+ }
+ /**
+ * Prepares a single user for creation or update.
+ *
+ * @todo Improve sanitization and schema verification.
+ *
+ * @since 5.0.0
+ *
+ * @param WP_REST_Request $request Request object.
+ * @return stdClass
+ */
+ protected function prepare_item_for_database($request)
+ {
+ }
+ /**
+ * Get XProfile info from the user.
+ *
+ * @since 5.0.0
+ *
+ * @param int $user_id User ID.
+ * @return array
+ */
+ protected function xprofile_data($user_id)
+ {
+ }
+ /**
+ * Can user manage (delete/update) a member?
+ *
+ * @since 5.0.0
+ *
+ * @param WP_User $user User object.
+ * @param string $action The action to perform (update or delete).
+ * @return bool
+ */
+ protected function can_manage_member($user, $action = 'delete')
+ {
+ }
+ /**
+ * Updates the values of additional fields added to a data object.
+ *
+ * This function makes sure updating the field value thanks to the `id` property of
+ * the created/updated object type is consistent accross BuddyPress components.
+ *
+ * @since 5.0.0
+ *
+ * @param WP_User $user The WordPress user object.
+ * @param WP_REST_Request $request Full details about the request.
+ * @return bool|WP_Error True on success, WP_Error object if a field cannot be updated.
+ */
+ protected function update_additional_fields_for_object($user, $request)
+ {
+ }
+ /**
+ * Make sure to retrieve the needed arguments for the endpoint CREATABLE method.
+ *
+ * @since 5.0.0
+ *
+ * @param string $method Optional. HTTP method of the request.
+ * @return array Endpoint arguments.
+ */
+ public function get_endpoint_args_for_item_schema($method = \WP_REST_Server::CREATABLE)
+ {
+ }
+ /**
+ * Get the members schema, conforming to JSON Schema.
+ *
+ * @since 5.0.0
+ *
+ * @return array
+ */
+ public function get_item_schema()
+ {
+ }
+ /**
+ * Get the query params for collections.
+ *
+ * @since 5.0.0
+ *
+ * @return array
+ */
+ public function get_collection_params()
+ {
+ }
+ }
+ /**
+ * Member Avatar endpoints.
+ *
+ * @since 5.0.0
+ */
+ class BP_REST_Attachments_Member_Avatar_Endpoint extends \WP_REST_Controller
+ {
+ use \BP_REST_Attachments;
+ /**
+ * BP_Attachment_Avatar Instance.
+ *
+ * @since 5.0.0
+ *
+ * @var BP_Attachment_Avatar
+ */
+ protected $avatar_instance;
+ /**
+ * Member object.
+ *
+ * @since 5.0.0
+ *
+ * @var WP_User
+ */
+ protected $user;
+ /**
+ * Member object type.
+ *
+ * @since 5.0.0
+ *
+ * @var string
+ */
+ protected $object = 'user';
+ /**
+ * Constructor.
+ *
+ * @since 5.0.0
+ */
+ public function __construct()
+ {
+ }
+ /**
+ * Register the component routes.
+ *
+ * @since 5.0.0
+ */
+ public function register_routes()
+ {
+ }
+ /**
+ * Fetch an existing member avatar.
+ *
+ * @since 5.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return WP_REST_Response|WP_Error
+ */
+ public function get_item($request)
+ {
+ }
+ /**
+ * Checks if a given request has access to get a member avatar.
+ *
+ * @since 5.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return true|WP_Error
+ */
+ public function get_item_permissions_check($request)
+ {
+ }
+ /**
+ * Upload a member avatar.
+ *
+ * @since 5.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return WP_REST_Response|WP_Error
+ */
+ public function create_item($request)
+ {
+ }
+ /**
+ * Checks if a given request has access to upload a member avatar.
+ *
+ * @since 5.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return true|WP_Error
+ */
+ public function create_item_permissions_check($request)
+ {
+ }
+ /**
+ * Delete an existing member avatar.
+ *
+ * @since 5.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return WP_REST_Response|WP_Error
+ */
+ public function delete_item($request)
+ {
+ }
+ /**
+ * Checks if a given request has access to delete member avatar.
+ *
+ * @since 5.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return true|WP_Error
+ */
+ public function delete_item_permissions_check($request)
+ {
+ }
+ /**
+ * Prepares avatar data to return as an object.
+ *
+ * @since 5.0.0
+ *
+ * @param object $avatar Avatar object.
+ * @param WP_REST_Request $request Full details about the request.
+ * @return WP_REST_Response
+ */
+ public function prepare_item_for_response($avatar, $request)
+ {
+ }
+ /**
+ * Get the member avatar schema, conforming to JSON Schema.
+ *
+ * @since 5.0.0
+ *
+ * @return array
+ */
+ public function get_item_schema()
+ {
+ }
+ /**
+ * Get the query params for the `get_item`.
+ *
+ * @since 5.0.0
+ *
+ * @return array
+ */
+ public function get_item_collection_params()
+ {
+ }
+ }
+ /**
+ * List table class for Invitations admin page.
+ *
+ * @since 8.0.0
+ */
+ class BP_Members_Invitations_List_Table extends \WP_Users_List_Table
+ {
+ /**
+ * The type of view currently being displayed.
+ *
+ * E.g. "All", "Pending", "Sent", "Unsent"...
+ *
+ * @since 8.0.0
+ * @var string
+ */
+ public $active_filters = array();
+ /**
+ * Invitation counts.
+ *
+ * @since 8.0.0
+ * @var int
+ */
+ public $total_items = 0;
+ /**
+ * Constructor.
+ *
+ * @since 8.0.0
+ */
+ public function __construct()
+ {
+ }
+ /**
+ * Set up items for display in the list table.
+ *
+ * Handles filtering of data, sorting, pagination, and any other data
+ * manipulation required prior to rendering.
+ *
+ * @since 8.0.0
+ */
+ public function prepare_items()
+ {
+ }
+ /**
+ * Gets the name of the default primary column.
+ *
+ * @since 10.1.0
+ *
+ * @return string Name of the default primary column, in this case, 'invitee_email'.
+ */
+ protected function get_default_primary_column_name()
+ {
+ }
+ /**
+ * Get the list of views available on this table (e.g. "all", "public").
+ *
+ * @since 8.0.0
+ */
+ public function views()
+ {
+ }
+ /**
+ * Get rid of the extra nav.
+ *
+ * WP_Users_List_Table will add an extra nav to change user's role.
+ * As we're dealing with invitations, we don't need this.
+ *
+ * @since 8.0.0
+ *
+ * @param array $which Current table nav item.
+ */
+ public function extra_tablenav($which)
+ {
+ }
+ /**
+ * Specific signups columns.
+ *
+ * @since 8.0.0
+ *
+ * @return array
+ */
+ public function get_columns()
+ {
+ }
+ /**
+ * Specific bulk actions for signups.
+ *
+ * @since 8.0.0
+ */
+ public function get_bulk_actions()
+ {
+ }
+ /**
+ * The text shown when no items are found.
+ *
+ * Nice job, clean sheet!
+ *
+ * @since 8.0.0
+ */
+ public function no_items()
+ {
+ }
+ /**
+ * The columns invitations can be reordered by.
+ *
+ * @since 8.0.0
+ */
+ public function get_sortable_columns()
+ {
+ }
+ /**
+ * Display invitation rows.
+ *
+ * @since 8.0.0
+ */
+ public function display_rows()
+ {
+ }
+ /**
+ * Display an invitation row.
+ *
+ * @since 8.0.0
+ *
+ * @see WP_List_Table::single_row() for explanation of params.
+ *
+ * @param BP_Invitation $invite BP_Invitation object.
+ * @param string $style Styles for the row.
+ * @param string $role Role to be assigned to user.
+ * @param int $numposts Number of posts.
+ */
+ public function single_row($invite = \null, $style = '', $role = '', $numposts = 0)
+ {
+ }
+ /**
+ * Markup for the checkbox used to select items for bulk actions.
+ *
+ * @since 8.0.0
+ *
+ * @param BP_Invitation $invite BP_Invitation object.
+ */
+ public function column_cb($invite = \null)
+ {
+ }
+ /**
+ * Markup for the checkbox used to select items for bulk actions.
+ *
+ * @since 8.0.0
+ *
+ * @param BP_Invitation $invite BP_Invitation object.
+ */
+ public function column_invitee_email($invite = \null)
+ {
+ }
+ /**
+ * Display invited user's email address.
+ *
+ * @since 8.0.0
+ *
+ * @param BP_Invitation $invite BP_Invitation object.
+ */
+ public function column_email($invite = \null)
+ {
+ }
+ /**
+ * The inviter.
+ *
+ * @since 8.0.0
+ *
+ * @param BP_Invitation $invite BP_Invitation object.
+ */
+ public function column_username($invite = \null)
+ {
+ }
+ /**
+ * Display invitation date.
+ *
+ * @since 8.0.0
+ *
+ * @param BP_Invitation $invite BP_Invitation object.
+ */
+ public function column_inviter_registered_date($invite = \null)
+ {
+ }
+ /**
+ * Display invitation date.
+ *
+ * @since 8.0.0
+ *
+ * @param BP_Invitation $invite BP_Invitation object.
+ */
+ public function column_invitation_date_modified($invite = \null)
+ {
+ }
+ /**
+ * Display invitation date.
+ *
+ * @since 8.0.0
+ *
+ * @param BP_Invitation $invite BP_Invitation object.
+ */
+ public function column_invitation_sent($invite = \null)
+ {
+ }
+ /**
+ * Display invitation acceptance status.
+ *
+ * @since 8.0.0
+ *
+ * @param BP_Invitation $invite BP_Invitation object.
+ */
+ public function column_invitation_accepted($invite = \null)
+ {
+ }
+ /**
+ * Allow plugins to add their custom column.
+ *
+ * @since 8.0.0
+ *
+ * @param BP_Invitation $invite BP_Invitation object.
+ * @param string $column_name The column name.
+ * @return string
+ */
+ function column_default($invite = \null, $column_name = '')
+ {
+ }
+ }
+ /**
+ * Defines the BuddyPress Members Component.
+ *
+ * @since 1.5.0
+ */
+ #[\AllowDynamicProperties]
+ class BP_Members_Component extends \BP_Component
+ {
+ /**
+ * Member types.
+ *
+ * @see bp_register_member_type()
+ *
+ * @since 2.2.0
+ * @var array
+ */
+ public $types = array();
+ /**
+ * Main nav arguments.
+ *
+ * @since 2.2.0
+ * @var array
+ */
+ public $main_nav = array();
+ /**
+ * Main nav arguments.
+ *
+ * @since 2.2.0
+ * @var array
+ */
+ public $sub_nav = array();
+ /**
+ * Nav for the members component.
+ *
+ * @since 2.2.0
+ * @var BP_Core_Nav
+ */
+ public $nav;
+ /**
+ * Member admin.
+ *
+ * @since 2.0.0
+ * @var BP_Members_Admin
+ */
+ public $admin;
+ /**
+ * Invitations.
+ *
+ * @var stdClass
+ */
+ public $invitations;
+ /**
+ * Start the members component creation process.
+ *
+ * @since 1.5.0
+ */
+ public function __construct()
+ {
+ }
+ /**
+ * Include bp-members files.
+ *
+ * @since 1.5.0
+ *
+ * @see BP_Component::includes() for description of parameters.
+ *
+ * @param array $includes See {@link BP_Component::includes()}.
+ */
+ public function includes($includes = array())
+ {
+ }
+ /**
+ * Late includes method.
+ *
+ * Only load up certain code when on specific pages.
+ *
+ * @since 3.0.0
+ */
+ public function late_includes()
+ {
+ }
+ /**
+ * Set up the component actions.
+ *
+ * @since 12.0.0
+ */
+ public function setup_actions()
+ {
+ }
+ /**
+ * Set up additional globals for the component.
+ *
+ * @since 10.0.0
+ */
+ public function setup_additional_globals()
+ {
+ }
+ /**
+ * Set up bp-members global settings.
+ *
+ * The BP_MEMBERS_SLUG constant is deprecated.
+ *
+ * @since 1.5.0
+ *
+ * @see BP_Component::setup_globals() for description of parameters.
+ *
+ * @global wpdb $wpdb The WordPress database object.
+ *
+ * @param array $args See {@link BP_Component::setup_globals()}.
+ */
+ public function setup_globals($args = array())
+ {
+ }
+ /**
+ * Set up canonical stack for this component.
+ *
+ * @since 2.1.0
+ */
+ public function setup_canonical_stack()
+ {
+ }
+ /**
+ * Get the Avatar and Cover image subnavs.
+ *
+ * @since 6.0.0
+ * @deprecated 12.0.0
+ *
+ * @return array The Avatar and Cover image subnavs.
+ */
+ public function get_avatar_cover_image_subnavs()
+ {
+ }
+ /**
+ * Register component navigation.
+ *
+ * @since 12.0.0
+ *
+ * @see `BP_Component::register_nav()` for a description of arguments.
+ *
+ * @param array $main_nav Optional. See `BP_Component::register_nav()` for
+ * description.
+ * @param array $sub_nav Optional. See `BP_Component::register_nav()` for
+ * description.
+ */
+ public function register_nav($main_nav = array(), $sub_nav = array())
+ {
+ }
+ /**
+ * Set up a profile nav in case the xProfile
+ * component is not active and a front template is
+ * used.
+ *
+ * @since 2.6.0
+ * @deprecated 12.0.0
+ */
+ public function setup_profile_nav()
+ {
+ }
+ /**
+ * Set up the xProfile nav.
+ *
+ * @since 6.0.0
+ * @deprecated 12.0.0
+ */
+ public function setup_xprofile_nav()
+ {
+ }
+ /**
+ * Get the Avatar and Cover image admin navs.
+ *
+ * @since 6.0.0
+ *
+ * @param string $admin_bar_menu_id The Admin bar menu ID to attach sub items to.
+ * @return array The Avatar and Cover image admin navs.
+ */
+ public function get_avatar_cover_image_admin_navs($admin_bar_menu_id = '')
+ {
+ }
+ /**
+ * Set up the Admin Bar.
+ *
+ * @since 6.0.0
+ *
+ * @param array $wp_admin_nav Admin Bar items.
+ */
+ public function setup_admin_bar($wp_admin_nav = array())
+ {
+ }
+ /**
+ * Adds "Profile > Change Avatar" & "Profile > Change Cover Image" subnav item
+ * under the "Profile" adminbar menu.
+ *
+ * @since 6.0.0
+ *
+ * @param array $wp_admin_nav The Profile adminbar nav array.
+ * @return array
+ */
+ public function setup_xprofile_admin_nav($wp_admin_nav)
+ {
+ }
+ /**
+ * Set up the title for pages and .
+ *
+ * @since 1.5.0
+ */
+ public function setup_title()
+ {
+ }
+ /**
+ * Setup cache groups.
+ *
+ * @since 2.2.0
+ */
+ public function setup_cache_groups()
+ {
+ }
+ /**
+ * Adds the Members directory type, Registration and Activation rewrite tags.
+ *
+ * @since 12.0.0
+ *
+ * @param array $rewrite_tags Optional. See BP_Component::add_rewrite_tags() for
+ * description.
+ */
+ public function add_rewrite_tags($rewrite_tags = array())
+ {
+ }
+ /**
+ * Adds the Registration and Activation rewrite rules.
+ *
+ * @since 12.0.0
+ *
+ * @param array $rewrite_rules Optional. See BP_Component::add_rewrite_rules() for
+ * description.
+ */
+ public function add_rewrite_rules($rewrite_rules = array())
+ {
+ }
+ /**
+ * Adds the Registration and Activation permastructs.
+ *
+ * @since 12.0.0
+ *
+ * @param array $permastructs Optional. See BP_Component::add_permastructs() for
+ * description.
+ */
+ public function add_permastructs($permastructs = array())
+ {
+ }
+ /**
+ * Parse the WP_Query and eventually display the component's directory or single item.
+ *
+ * @since 12.0.0
+ *
+ * @param WP_Query $query Required. See BP_Component::parse_query() for
+ * description.
+ */
+ public function parse_query($query)
+ {
+ }
+ /**
+ * Check the parsed query is consistent with Members navigation.
+ *
+ * As the members’ component pages need a valid screen function to load the right BP Template,
+ * we need to make sure the current single item action exists inside the Members navigation and
+ * that the corresponding screen function is a valid callback.
+ *
+ * @since 12.0.0
+ */
+ public function check_parsed_query()
+ {
+ }
+ /**
+ * Init the BP REST API.
+ *
+ * @since 5.0.0
+ * @since 6.0.0 Adds the Member Cover and Signup REST endpoints.
+ * @since 9.0.0 Moves the `BP_REST_Components_Endpoint` controller in `BP_Core` component.
+ *
+ * @param array $controllers Optional. See BP_Component::rest_api_init() for
+ * description.
+ */
+ public function rest_api_init($controllers = array())
+ {
+ }
+ /**
+ * Register the BP Members Blocks.
+ *
+ * @since 6.0.0
+ * @since 12.0.0 Use the WP Blocks API v2.
+ *
+ * @param array $blocks Optional. See BP_Component::blocks_init() for
+ * description.
+ */
+ public function blocks_init($blocks = array())
+ {
+ }
+ }
+ /**
+ * Load Members admin area.
+ *
+ * @since 2.0.0
+ */
+ class BP_Members_Admin
+ {
+ /** Directory *************************************************************/
+ /**
+ * Path to the BP Members Admin directory.
+ *
+ * @var string $admin_dir
+ */
+ public $admin_dir = '';
+ /** URLs ******************************************************************/
+ /**
+ * URL to the BP Members Admin directory.
+ *
+ * @var string $admin_url
+ */
+ public $admin_url = '';
+ /**
+ * URL to the BP Members Admin CSS directory.
+ *
+ * @var string $css_url
+ */
+ public $css_url = '';
+ /**
+ * URL to the BP Members Admin JS directory.
+ *
+ * @var string
+ */
+ public $js_url = '';
+ /** Other *****************************************************************/
+ /**
+ * Support forum link.
+ *
+ * @since 14.0.0
+ * @var string
+ */
+ private $bp_forum = '';
+ /**
+ * Redirect.
+ *
+ * @since 2.0.0
+ * @var string
+ */
+ public $redirect;
+ /**
+ * Screen id for edit user's profile page.
+ *
+ * @since 2.0.0
+ * @var string
+ */
+ public $user_page = '';
+ /**
+ * User capability.
+ *
+ * @since 2.0.0
+ * @var string
+ */
+ public $capability;
+ /**
+ * Show Profile Screen id.
+ *
+ * @since 2.0.0
+ * @var string
+ */
+ public $user_profile;
+ /**
+ * Current user ID.
+ *
+ * @since 2.0.0
+ * @var int
+ */
+ public $current_user_id;
+ /**
+ * User ID being edited.
+ *
+ * @since 2.0.0
+ * @var int
+ */
+ public $user_id = 0;
+ /**
+ * Is a member editing their own profile.
+ *
+ * @since 2.0.0
+ * @var bool
+ */
+ public $is_self_profile = \false;
+ /**
+ * The screen ids to load specific css for.
+ *
+ * @since 2.0.0
+ * @var array
+ */
+ public $screen_id = array();
+ /**
+ * The stats metabox default position.
+ *
+ * @since 2.0.0
+ * @var stdClass
+ */
+ public $stats_metabox;
+ /**
+ * Edit user's profile args.
+ *
+ * @since 2.0.0
+ * @var array
+ */
+ public $edit_profile_args;
+ /**
+ * Edit user's profile URL.
+ *
+ * @since 2.0.0
+ * @var string
+ */
+ public $edit_profile_url = '';
+ /**
+ * Edit URL.
+ *
+ * @since 2.0.0
+ * @var string
+ */
+ public $edit_url = '';
+ /**
+ * Users page.
+ *
+ * @since 2.0.0
+ * @var string
+ */
+ public $users_page = '';
+ /**
+ * Signups page.
+ *
+ * @since 2.0.0
+ * @var string
+ */
+ public $signups_page = '';
+ /**
+ * Users URL.
+ *
+ * @since 2.0.0
+ * @var string
+ */
+ public $users_url;
+ /**
+ * Users screen.
+ *
+ * @since 2.0.0
+ * @var string
+ */
+ public $users_screen;
+ /**
+ * Members' Invite Page.
+ *
+ * @since 2.0.0
+ * @var string
+ */
+ public $members_invites_page = '';
+ /**
+ * Status of BuddyPress network.
+ *
+ * @since 2.0.0
+ * @var bool
+ */
+ public $subsite_activated;
+ /**
+ * Tools menu.
+ *
+ * @since 2.0.0
+ * @var string
+ */
+ public $tools_parent = 'tools.php';
+ /**
+ * Constructor method.
+ *
+ * @since 2.0.0
+ */
+ public function __construct()
+ {
+ }
+ /**
+ * Set admin-related globals.
+ *
+ * @since 2.0.0
+ */
+ private function setup_globals()
+ {
+ }
+ /**
+ * Set admin-related actions and filters.
+ *
+ * @since 2.0.0
+ */
+ private function setup_actions()
+ {
+ }
+ /**
+ * Create registration pages when multisite user registration is turned on.
+ *
+ * @since 2.7.0
+ *
+ * @param string $option_name Current option name; value is always 'registration'.
+ * @param string $value
+ */
+ public function multisite_registration_on($option_name, $value)
+ {
+ }
+ /**
+ * Create registration pages when single site registration is turned on.
+ *
+ * @since 2.7.0
+ *
+ * @param string $old_value
+ * @param string $value
+ */
+ public function single_site_registration_on($old_value, $value)
+ {
+ }
+ /**
+ * Setup BP Members Admin.
+ *
+ * @since 2.0.0
+ *
+ * @return BP_Members_Admin|null
+ */
+ public static function register_members_admin()
+ {
+ }
+ /**
+ * Get the user ID.
+ *
+ * Look for $_GET['user_id']. If anything else, force the user ID to the
+ * current user's ID so they aren't left without a user to edit.
+ *
+ * @since 2.1.0
+ *
+ * @return int
+ */
+ private function get_user_id()
+ {
+ }
+ /**
+ * Can the current user edit the one displayed.
+ *
+ * Self profile editing / or bp_moderate check.
+ * This might be replaced by more granular capabilities
+ * in the future.
+ *
+ * @since 2.1.0
+ *
+ * @param int $user_id ID of the user being checked for edit ability.
+ *
+ * @return bool
+ */
+ private function member_can_edit($user_id = 0)
+ {
+ }
+ /**
+ * Get admin notice when saving a user or member profile.
+ *
+ * @since 2.1.0
+ *
+ * @return array
+ */
+ private function get_user_notice()
+ {
+ }
+ /**
+ * Create the /user/ admin Profile submenus for all members.
+ *
+ * @since 2.1.0
+ */
+ public function user_profile_menu()
+ {
+ }
+ /**
+ * Create the All Users / Profile > Edit Profile and All Users Signups submenus.
+ *
+ * @since 2.0.0
+ */
+ public function admin_menus()
+ {
+ }
+ /**
+ * Include the Members Invitations tab to the Admin tabs needing specific inline styles.
+ *
+ * @since 10.0.0
+ *
+ * @param array $submenu_pages The BP_Admin submenu pages passed by reference.
+ */
+ public function set_submenu_page(&$submenu_pages)
+ {
+ }
+ /**
+ * Highlight the Users menu if on Edit Profile and check if on the user's admin profile.
+ *
+ * @since 2.1.0
+ *
+ * @global string $submenu_file The name of the submenu file.
+ * @global string $parent_file The name of the parent file.
+ */
+ public function profile_admin_head()
+ {
+ }
+ /**
+ * Remove the Edit Profile page.
+ *
+ * We add these pages in order to integrate with WP's Users panel, but
+ * we want them to show up as a row action of the WP panel, not as separate
+ * subnav items under the Users menu.
+ *
+ * @since 2.0.0
+ */
+ public function admin_head()
+ {
+ }
+ /** Community Profile *****************************************************/
+ /**
+ * Add some specific styling to the Edit User and Edit User's Profile page.
+ *
+ * @since 2.0.0
+ */
+ public function enqueue_scripts()
+ {
+ }
+ /**
+ * Create the Profile navigation in Edit User & Edit Profile pages.
+ *
+ * @since 2.0.0
+ *
+ * @param object|null $user User to create profile navigation for.
+ * @param string $active Which profile to highlight.
+ * @return string|null
+ */
+ public function profile_nav($user = \null, $active = 'WordPress')
+ {
+ }
+ /**
+ * Set up the user's profile admin page.
+ *
+ * Loaded before the page is rendered, this function does all initial
+ * setup, including: processing form requests, registering contextual
+ * help, and setting up screen options.
+ *
+ * @since 2.0.0
+ * @since 6.0.0 The `delete_avatar` action is now managed into this method.
+ */
+ public function user_admin_load()
+ {
+ }
+ /**
+ * Display the user's profile.
+ *
+ * @since 2.0.0
+ */
+ public function user_admin()
+ {
+ }
+ /**
+ * Render the Status metabox for user's profile screen.
+ *
+ * Actions are:
+ * - Update profile fields if xProfile component is active
+ * - Spam/Unspam user
+ *
+ * @since 2.0.0
+ *
+ * @param WP_User|null $user The WP_User object to be edited.
+ */
+ public function user_admin_status_metabox($user = \null)
+ {
+ }
+ /**
+ * Render the fallback metabox in case a user has been marked as a spammer.
+ *
+ * @since 2.0.0
+ *
+ * @param WP_User|null $user The WP_User object to be edited.
+ */
+ public function user_admin_spammer_metabox($user = \null)
+ {
+ }
+ /**
+ * Render the Stats metabox to moderate inappropriate images.
+ *
+ * @since 2.0.0
+ *
+ * @param WP_User|null $user The WP_User object to be edited.
+ */
+ public function user_admin_stats_metabox($user = \null)
+ {
+ }
+ /**
+ * Render the Avatar metabox to moderate inappropriate images.
+ *
+ * @since 6.0.0
+ *
+ * @param WP_User|null $user The WP_User object for the user being edited.
+ */
+ public function user_admin_avatar_metabox($user = \null)
+ {
+ }
+ /**
+ * Render the Member Type metabox.
+ *
+ * @since 2.2.0
+ *
+ * @param WP_User|null $user The WP_User object to be edited.
+ */
+ public function user_admin_member_type_metabox($user = \null)
+ {
+ }
+ /**
+ * Process changes from the Member Type metabox.
+ *
+ * @since 2.2.0
+ */
+ public function process_member_type_update()
+ {
+ }
+ /**
+ * Add a link to Profile in Users listing row actions.
+ *
+ * @since 2.0.0
+ *
+ * @param array|string $actions WordPress row actions (edit, delete).
+ * @param object|null $user The object for the user row.
+ * @return null|string|array Merged actions.
+ */
+ public function row_actions($actions = '', $user = \null)
+ {
+ }
+ /**
+ * Add a filter to edit profile url in WP Admin Bar.
+ *
+ * @since 2.1.0
+ */
+ public function add_edit_profile_url_filter()
+ {
+ }
+ /**
+ * Filter the profile url.
+ *
+ * @since 2.1.0
+ *
+ *
+ * @param string $profile_link Profile Link for admin bar.
+ * @param string $url Profile URL.
+ * @param int $user_id User ID.
+ * @return string
+ */
+ public function filter_adminbar_profile_link($profile_link = '', $url = '', $user_id = 0)
+ {
+ }
+ /**
+ * Remove the filter to edit profile url in WP Admin Bar.
+ *
+ * @since 2.1.0
+ */
+ public function remove_edit_profile_url_filter()
+ {
+ }
+ /** Signups Management ****************************************************/
+ /**
+ * Display the admin preferences about signups pagination.
+ *
+ * @since 2.0.0
+ *
+ * @param int $value Value for signup option.
+ * @param string $option Value for the option key.
+ * @param int $new_value Value for the saved option.
+ * @return int The pagination preferences.
+ */
+ public function signup_screen_options($value = 0, $option = '', $new_value = 0)
+ {
+ }
+ /**
+ * Make sure no signups will show in users list.
+ *
+ * This is needed to handle signups that may have not been activated
+ * before the 2.0.0 upgrade.
+ *
+ * @since 2.0.0
+ *
+ * @global wpdb $wpdb The WordPress database object.
+ *
+ * @param WP_User_Query|null $query The users query.
+ * @return WP_User_Query|null The users query without the signups.
+ */
+ public function remove_signups_from_user_query($query = \null)
+ {
+ }
+ /**
+ * Filter the WP Users List Table views to include 'bp-signups'.
+ *
+ * @since 2.0.0
+ *
+ * @global string $role The name of the WP Role.
+ *
+ * @param array $views WP List Table views.
+ * @return array The views with the signup view added.
+ */
+ public function signup_filter_view($views = array())
+ {
+ }
+ /**
+ * Load the Signup WP Users List table.
+ *
+ * @since 2.0.0
+ *
+ * @param string $class The name of the class to use.
+ * @param string $required The parent class.
+ * @return WP_List_Table|null The List table.
+ */
+ public static function get_list_table_class($class = '', $required = '')
+ {
+ }
+ /**
+ * Set up the signups admin page.
+ *
+ * Loaded before the page is rendered, this function does all initial
+ * setup, including: processing form requests, registering contextual
+ * help, and setting up screen options.
+ *
+ * @since 2.0.0
+ *
+ * @global object $bp_members_signup_list_table
+ */
+ public function signups_admin_load()
+ {
+ }
+ /**
+ * Display any activation errors.
+ *
+ * @since 2.0.0
+ */
+ public function signups_display_errors()
+ {
+ }
+ /**
+ * Get admin notice when viewing the sign-up page.
+ *
+ * @since 2.1.0
+ *
+ * @return array
+ */
+ private function get_signup_notice()
+ {
+ }
+ /**
+ * Signups admin page router.
+ *
+ * Depending on the context, display
+ * - the list of signups,
+ * - or the delete confirmation screen,
+ * - or the activate confirmation screen,
+ * - or the "resend" email confirmation screen.
+ *
+ * Also prepare the admin notices.
+ *
+ * @since 2.0.0
+ */
+ public function signups_admin()
+ {
+ }
+ /**
+ * This is the list of the Pending accounts (signups).
+ *
+ * @since 2.0.0
+ *
+ * @global string $plugin_page
+ * @global object $bp_members_signup_list_table
+ */
+ public function signups_admin_index()
+ {
+ }
+ /**
+ * This is the confirmation screen for actions.
+ *
+ * @since 2.0.0
+ *
+ * @param string $action Delete, activate, or resend activation link.
+ *
+ * @return null|false
+ */
+ public function signups_admin_manage($action = '')
+ {
+ }
+ /** Users List Management ****************************************************/
+ /**
+ * Display a dropdown to bulk change the member type of selected user(s).
+ *
+ * @since 2.7.0
+ *
+ * @param string $which Where this dropdown is displayed - top or bottom.
+ */
+ public function users_table_output_type_change_select($which = 'top')
+ {
+ }
+ /**
+ * Process bulk member type change submission from the WP admin users list table.
+ *
+ * @since 2.7.0
+ */
+ public function users_table_process_bulk_type_change()
+ {
+ }
+ /**
+ * Display an admin notice upon member type bulk update.
+ *
+ * @since 2.7.0
+ */
+ public function users_type_change_notice()
+ {
+ }
+ /**
+ * Add member type column to the WordPress admin users list table.
+ *
+ * @since 2.7.0
+ *
+ * @param array $columns Users table columns.
+ *
+ * @return array $columns
+ */
+ public function users_table_add_type_column($columns = array())
+ {
+ }
+ /**
+ * Return member's type for display in the WP admin users list table.
+ *
+ * @since 2.7.0
+ *
+ * @param string $retval
+ * @param string $column_name
+ * @param int $user_id
+ *
+ * @return string Member type as a link to filter all users.
+ */
+ public function users_table_populate_type_cell($retval = '', $column_name = '', $user_id = 0)
+ {
+ }
+ /**
+ * Filter WP Admin users list table to include users of the specified type.
+ *
+ * @since 2.7.0
+ *
+ * @global string $pagenow The filename of the current screen.
+ *
+ * @param WP_Query $query The WordPress Query object.
+ */
+ public function users_table_filter_by_type($query)
+ {
+ }
+ /**
+ * Formats a signup's xprofile field data for display.
+ *
+ * Operates recursively on arrays, which are then imploded with commas.
+ *
+ * @since 2.8.0
+ * @deprecated 10.0.0
+ *
+ * @param string|array $value Field value.
+ * @return string
+ */
+ protected function format_xprofile_field_for_display($value)
+ {
+ }
+ /**
+ * Set up the signups admin page.
+ *
+ * Loaded before the page is rendered, this function does all initial
+ * setup, including: processing form requests, registering contextual
+ * help, and setting up screen options.
+ *
+ * @since 8.0.0
+ *
+ * @global object $bp_members_invitations_list_table
+ */
+ public function members_invitations_admin_load()
+ {
+ }
+ /**
+ * Get admin notice when viewing the invitations management page.
+ *
+ * @since 8.0.0
+ *
+ * @return array
+ */
+ private function get_members_invitations_notice()
+ {
+ }
+ /**
+ * Member invitations admin page router.
+ *
+ * Depending on the context, display
+ * - the list of invitations,
+ * - or the delete confirmation screen,
+ * - or the "resend" email confirmation screen.
+ *
+ * Also prepare the admin notices.
+ *
+ * @since 8.0.0
+ */
+ public function invitations_admin()
+ {
+ }
+ /**
+ * This is the list of invitations.
+ *
+ * @since 8.0.0
+ *
+ * @global string $plugin_page
+ * @global object $bp_members_invitations_list_table
+ */
+ public function invitations_admin_index()
+ {
+ }
+ /**
+ * This is the confirmation screen for actions.
+ *
+ * @since 8.0.0
+ *
+ * @param string $action Delete or resend invitation.
+ * @return null|false
+ */
+ public function invitations_admin_manage($action = '')
+ {
+ }
+ }
+ /**
+ * Member Cover endpoints.
+ *
+ * /members//cover
+ *
+ * @since 6.0.0
+ */
+ class BP_REST_Attachments_Member_Cover_Endpoint extends \WP_REST_Controller
+ {
+ use \BP_REST_Attachments;
+ /**
+ * BP_Attachment_Cover_Image Instance.
+ *
+ * @since 6.0.0
+ *
+ * @var BP_Attachment_Cover_Image
+ */
+ protected $attachment_instance;
+ /**
+ * Member object.
+ *
+ * @since 6.0.0
+ *
+ * @var WP_User
+ */
+ protected $user;
+ /**
+ * Member object type.
+ *
+ * @since 6.0.0
+ *
+ * @var string
+ */
+ protected $object = 'user';
+ /**
+ * Constructor.
+ *
+ * @since 6.0.0
+ */
+ public function __construct()
+ {
+ }
+ /**
+ * Register the component routes.
+ *
+ * @since 6.0.0
+ */
+ public function register_routes()
+ {
+ }
+ /**
+ * Fetch an existing user cover.
+ *
+ * @since 6.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return WP_REST_Response|WP_Error
+ */
+ public function get_item($request)
+ {
+ }
+ /**
+ * Checks if a given request has access to get a user cover.
+ *
+ * @since 6.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return true|WP_Error
+ */
+ public function get_item_permissions_check($request)
+ {
+ }
+ /**
+ * Upload a user cover.
+ *
+ * @since 6.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return WP_REST_Response|WP_Error
+ */
+ public function create_item($request)
+ {
+ }
+ /**
+ * Checks if a given request has access to upload a user cover.
+ *
+ * @since 6.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return true|WP_Error
+ */
+ public function create_item_permissions_check($request)
+ {
+ }
+ /**
+ * Delete an existing user cover.
+ *
+ * @since 6.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return WP_REST_Response|WP_Error
+ */
+ public function delete_item($request)
+ {
+ }
+ /**
+ * Checks if a given request has access to delete a user cover.
+ *
+ * @since 6.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return true|WP_Error
+ */
+ public function delete_item_permissions_check($request)
+ {
+ }
+ /**
+ * Prepares user cover to return as an object.
+ *
+ * @since 6.0.0
+ *
+ * @param string $cover_url User cover url.
+ * @param WP_REST_Request $request Full details about the request.
+ * @return WP_REST_Response
+ */
+ public function prepare_item_for_response($cover_url, $request)
+ {
+ }
+ /**
+ * Get the plugin schema, conforming to JSON Schema.
+ *
+ * @since 6.0.0
+ *
+ * @return array
+ */
+ public function get_item_schema()
+ {
+ }
+ }
+ /**
+ * Signups Management class.
+ *
+ * @package BuddyPress
+ * @subpackage coreClasses
+ * @since 2.0.0
+ */
+ /**
+ * Class used to handle Signups.
+ *
+ * @since 2.0.0
+ */
+ #[\AllowDynamicProperties]
+ class BP_Signup
+ {
+ /**
+ * ID of the signup which the object relates to.
+ *
+ * @since 2.0.0
+ * @var integer
+ */
+ public $id;
+ /**
+ * ID of the signup which the object relates to.
+ *
+ * @since 2.0.0
+ * @var integer
+ */
+ public $signup_id;
+ /**
+ * The URL to the full size of the avatar for the user.
+ *
+ * @since 2.0.0
+ * @var string
+ */
+ public $avatar;
+ /**
+ * The username for the user.
+ *
+ * @since 2.0.0
+ * @var string
+ */
+ public $user_login;
+ /**
+ * The email for the user.
+ *
+ * @since 2.0.0
+ * @var string
+ */
+ public $user_email;
+ /**
+ * The full name of the user.
+ *
+ * @since 2.0.0
+ * @var string
+ */
+ public $user_name;
+ /**
+ * Metadata associated with the signup.
+ *
+ * @since 2.0.0
+ * @var array
+ */
+ public $meta;
+ /**
+ * The registered date for the user.
+ *
+ * @since 2.0.0
+ * @var string
+ */
+ public $registered;
+ /**
+ * The activation key for the user.
+ *
+ * @since 2.0.0
+ * @var string
+ */
+ public $activation_key;
+ /**
+ * The activated date for the user.
+ *
+ * @since 10.0.0
+ * @var string
+ */
+ public $activated;
+ /**
+ * Whether the user account is activated or not.
+ *
+ * @since 10.0.0
+ * @var bool
+ */
+ public $active;
+ /**
+ * The date that the last activation email was sent.
+ *
+ * @since 10.0.0
+ * @var string
+ */
+ public $date_sent;
+ /**
+ * Was the last activation email sent in the last 24 hours?
+ *
+ * @since 10.0.0
+ * @var bool
+ */
+ public $recently_sent;
+ /**
+ * The number of activation emails sent to this user.
+ *
+ * @since 10.0.0
+ * @var int
+ */
+ public $count_sent;
+ /**
+ * The domain for the signup.
+ *
+ * @since 10.0.0
+ * @var string
+ */
+ public $domain;
+ /**
+ * The path for the signup.
+ *
+ * @since 10.0.0
+ * @var string
+ */
+ public $path;
+ /**
+ * The title for the signup.
+ *
+ * @since 10.0.0
+ * @var string
+ */
+ public $title;
+ /** Public Methods *******************************************************/
+ /**
+ * Class constructor.
+ *
+ * @since 2.0.0
+ *
+ * @param integer $signup_id The ID for the signup being queried.
+ */
+ public function __construct($signup_id = 0)
+ {
+ }
+ /**
+ * Populate the instantiated class with data based on the signup_id provided.
+ *
+ * @since 2.0.0
+ *
+ * @global wpdb $wpdb The WordPress database object.
+ */
+ public function populate()
+ {
+ }
+ /** Static Methods *******************************************************/
+ /**
+ * Fetch signups based on parameters.
+ *
+ * @since 2.0.0
+ * @since 6.0.0 Added a list of allowed orderby parameters.
+ *
+ * @global wpdb $wpdb The WordPress database object.
+ *
+ * @param array $args {
+ * The argument to retrieve desired signups.
+ * @type int $offset Offset amount. Default 0.
+ * @type int $number How many to fetch. Pass -1 to fetch all. Default 1.
+ * @type bool|string $usersearch Whether or not to search for a username. Default false.
+ * @type string $orderby Order By parameter. Possible values are `signup_id`, `login`, `email`,
+ * `registered`, `activated`. Default `signup_id`.
+ * @type string $order Order direction. Default 'DESC'.
+ * @type bool $include Whether or not to include more specific query params.
+ * @type string $activation_key Activation key to search for. If specified, all other
+ * parameters will be ignored.
+ * @type int|bool $active Pass 0 for inactive signups, 1 for active signups,
+ * and `false` to ignore.
+ * @type string $user_login Specific user login to return.
+ * @type string $fields Which fields to return. Specify 'ids' to fetch a list of signups IDs.
+ * Default: 'all' (return BP_Signup objects).
+ * }
+ * @return array {
+ * @type array $signups Located signups. (IDs only if `fields` is set to `ids`.)
+ * @type int $total Total number of signups matching params.
+ * }
+ */
+ public static function get($args = array())
+ {
+ }
+ /**
+ * Add a signup.
+ *
+ * @since 2.0.0
+ *
+ * @global wpdb $wpdb The WordPress database object.
+ *
+ * @param array $args {
+ * Array of arguments for signup addition.
+ * @type string $domain New user's domain.
+ * @type string $path New user's path.
+ * @type string $title New user's title.
+ * @type string $user_login New user's user_login.
+ * @type string $user_email New user's email address.
+ * @type int|string $registered Time the user registered.
+ * @type string $activation_key New user's activation key.
+ * @type string $meta New user's user meta.
+ * }
+ * @return int|bool ID of newly created signup on success, false on failure.
+ */
+ public static function add($args = array())
+ {
+ }
+ /**
+ * Create a WP user at signup.
+ *
+ * Since BP 2.0, non-multisite configurations have stored signups in
+ * the same way as Multisite configs traditionally have: in the
+ * wp_signups table. However, because some plugins may be looking
+ * directly in the wp_users table for non-activated signups, we
+ * mirror signups there by creating "phantom" users, mimicking WP's
+ * default behavior.
+ *
+ * @since 2.0.0
+ * @deprecated 14.0.0
+ *
+ * @global wpdb $wpdb The WordPress database object.
+ *
+ * @param string $user_login User login string.
+ * @param string $user_password User password.
+ * @param string $user_email User email address.
+ * @param array $usermeta Metadata associated with the signup.
+ * @return int User id.
+ */
+ public static function add_backcompat($user_login = '', $user_password = '', $user_email = '', $usermeta = array())
+ {
+ }
+ /**
+ * Check a user status (from wp_users) on a non-multisite config.
+ *
+ * @since 2.0.0
+ *
+ * @param int $user_id ID of the user being checked.
+ * @return int|bool The status if found, otherwise false.
+ */
+ public static function check_user_status($user_id = 0)
+ {
+ }
+ /**
+ * Activate a signup.
+ *
+ * @since 2.0.0
+ *
+ * @global wpdb $wpdb The WordPress database object.
+ *
+ * @param string $key Activation key.
+ * @return bool
+ */
+ public static function validate($key = '')
+ {
+ }
+ /**
+ * How many inactive signups do we have?
+ *
+ * @since 2.0.0
+ *
+ * @return int The number of signups.
+ */
+ public static function count_signups()
+ {
+ }
+ /**
+ * Update the meta for a signup.
+ *
+ * This is the way we use to "trace" the last date an activation
+ * email was sent and how many times activation was sent.
+ *
+ * @since 2.0.0
+ *
+ * @global wpdb $wpdb The WordPress database object.
+ *
+ * @param array $args {
+ * Array of arguments for the signup update.
+ * @type int $signup_id User signup ID.
+ * @type array $meta Meta to update.
+ * }
+ * @return int The signup id.
+ */
+ public static function update($args = array())
+ {
+ }
+ /**
+ * Resend an activation email.
+ *
+ * @since 2.0.0
+ *
+ * @param array $signup_ids Single ID or list of IDs to resend.
+ * @return array
+ */
+ public static function resend($signup_ids = array())
+ {
+ }
+ /**
+ * Activate a pending account.
+ *
+ * @since 2.0.0
+ *
+ * @param array $signup_ids Single ID or list of IDs to activate.
+ * @return array
+ */
+ public static function activate($signup_ids = array())
+ {
+ }
+ /**
+ * Delete a pending account.
+ *
+ * @since 2.0.0
+ *
+ * @global wpdb $wpdb The WordPress database object.
+ *
+ * @param array $signup_ids Single ID or list of IDs to delete.
+ * @return array
+ */
+ public static function delete($signup_ids = array())
+ {
+ }
+ }
+ /**
+ * The main theme compat class for BuddyPress Members.
+ *
+ * This class sets up the necessary theme compatibility actions to safely output
+ * member template parts to the_title and the_content areas of a theme.
+ *
+ * @since 1.7.0
+ */
+ class BP_Members_Theme_Compat
+ {
+ /**
+ * Set up the members component theme compatibility.
+ *
+ * @since 1.7.0
+ */
+ public function __construct()
+ {
+ }
+ /**
+ * Are we looking at something that needs members theme compatibility?
+ *
+ * @since 1.7.0
+ */
+ public function is_members()
+ {
+ }
+ /** Directory *************************************************************/
+ /**
+ * Add template hierarchy to theme compat for the members directory page.
+ *
+ * This is to mirror how WordPress has
+ * {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
+ *
+ * @since 1.8.0
+ *
+ * @param array $templates The templates from bp_get_theme_compat_templates().
+ * @return array $templates Array of custom templates to look for.
+ */
+ public function directory_template_hierarchy($templates = array())
+ {
+ }
+ /**
+ * Update the global $post with directory data.
+ *
+ * @since 1.7.0
+ */
+ public function directory_dummy_post()
+ {
+ }
+ /**
+ * Filter the_content with the members index template part.
+ *
+ * @since 1.7.0
+ */
+ public function directory_content()
+ {
+ }
+ /** Single ****************************************************************/
+ /**
+ * Add custom template hierarchy to theme compat for member pages.
+ *
+ * This is to mirror how WordPress has
+ * {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
+ *
+ * @since 1.8.0
+ *
+ * @param string $templates The templates from
+ * bp_get_theme_compat_templates().
+ * @return array $templates Array of custom templates to look for.
+ */
+ public function single_template_hierarchy($templates)
+ {
+ }
+ /**
+ * Update the global $post with the displayed user's data.
+ *
+ * @since 1.7.0
+ */
+ public function single_dummy_post()
+ {
+ }
+ /**
+ * Filter the_content with the members' single home template part.
+ *
+ * @since 1.7.0
+ */
+ public function single_dummy_content()
+ {
+ }
+ }
+ /**
+ * Signup endpoints.
+ *
+ * Use /signup
+ * Use /signup/{id}
+ * Use /signup/resend
+ * Use /signup/activate/{activation_key}
+ *
+ * @since 6.0.0
+ */
+ class BP_REST_Signup_Endpoint extends \WP_REST_Controller
+ {
+ /**
+ * Constructor.
+ *
+ * @since 6.0.0
+ */
+ public function __construct()
+ {
+ }
+ /**
+ * Register the component routes.
+ *
+ * @since 6.0.0
+ */
+ public function register_routes()
+ {
+ }
+ /**
+ * Retrieve signups.
+ *
+ * @since 6.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return WP_REST_Response
+ */
+ public function get_items($request)
+ {
+ }
+ /**
+ * Check if a given request has access to signup items.
+ *
+ * @since 6.0.0
+ *
+ * @param WP_REST_Request $request Full data about the request.
+ * @return true|WP_Error
+ */
+ public function get_items_permissions_check($request)
+ {
+ }
+ /**
+ * Retrieve single signup.
+ *
+ * @since 6.0.0
+ *
+ * @param WP_REST_Request $request Full data about the request.
+ * @return WP_REST_Response|WP_Error
+ */
+ public function get_item($request)
+ {
+ }
+ /**
+ * Check if a given request has access to get a signup.
+ *
+ * @since 6.0.0
+ *
+ * @param WP_REST_Request $request Full data about the request.
+ * @return true|WP_Error
+ */
+ public function get_item_permissions_check($request)
+ {
+ }
+ /**
+ * Create signup.
+ *
+ * @since 6.0.0
+ *
+ * @param WP_REST_Request $request Full data about the request.
+ * @return WP_REST_Response|WP_Error
+ */
+ public function create_item($request)
+ {
+ }
+ /**
+ * Checks if a given request has access to create a signup.
+ *
+ * @since 6.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return true
+ */
+ public function create_item_permissions_check($request)
+ {
+ }
+ /**
+ * Delete a signup.
+ *
+ * @since 6.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return WP_REST_Response|WP_Error
+ */
+ public function delete_item($request)
+ {
+ }
+ /**
+ * Check if a given request has access to delete a signup.
+ *
+ * @since 6.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return true|WP_Error
+ */
+ public function delete_item_permissions_check($request)
+ {
+ }
+ /**
+ * Activate a signup.
+ *
+ * @since 6.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return WP_REST_Response|WP_Error
+ */
+ public function activate_item($request)
+ {
+ }
+ /**
+ * Check if a given request has access to activate a signup.
+ *
+ * @since 6.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return true|WP_Error
+ */
+ public function activate_item_permissions_check($request)
+ {
+ }
+ /**
+ * Resend the activation email.
+ *
+ * @since 9.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return WP_REST_Response|WP_Error
+ */
+ public function signup_resend_activation_email($request)
+ {
+ }
+ /**
+ * Check if a given request has access to resend the activation email.
+ *
+ * @since 9.0.0
+ *
+ * @param WP_REST_Request $request Full data about the request.
+ * @return true|WP_Error
+ */
+ public function signup_resend_activation_email_permissions_check($request)
+ {
+ }
+ /**
+ * Prepares signup to return as an object.
+ *
+ * @since 6.0.0
+ *
+ * @param BP_Signup $signup Signup object.
+ * @param WP_REST_Request $request Full data about the request.
+ * @return WP_REST_Response
+ */
+ public function prepare_item_for_response($signup, $request)
+ {
+ }
+ /**
+ * Prepares links for the signup request.
+ *
+ * @param BP_Signup $signup The signup object.
+ * @return array
+ */
+ protected function prepare_links($signup)
+ {
+ }
+ /**
+ * Get signup object.
+ *
+ * @since 6.0.0
+ *
+ * @param int|string $identifier Signup identifier.
+ * @return BP_Signup|false
+ */
+ public function get_signup_object($identifier)
+ {
+ }
+ /**
+ * Check a user password for the REST API.
+ *
+ * @since 6.0.0
+ *
+ * @param string $value The password submitted in the request.
+ * @return string|WP_Error The sanitized password, if valid, otherwise an error.
+ */
+ public function check_user_password($value)
+ {
+ }
+ /**
+ * Is it possible to signup with a blog?
+ *
+ * @since 6.0.0
+ *
+ * @return bool True if blog signup is allowed. False otherwise.
+ */
+ public function is_blog_signup_allowed()
+ {
+ }
+ /**
+ * Get site's available locales.
+ *
+ * @since 6.0.0
+ *
+ * @return array The list of available locales.
+ */
+ public function get_available_languages()
+ {
+ }
+ /**
+ * Edit the type of the some properties for the CREATABLE & EDITABLE methods.
+ *
+ * @since 6.0.0
+ *
+ * @param string $method HTTP method of the request. Default is WP_REST_Server::CREATABLE.
+ * @return array Endpoint arguments.
+ */
+ public function get_endpoint_args_for_item_schema($method = \WP_REST_Server::CREATABLE)
+ {
+ }
+ /**
+ * Get the signup schema, conforming to JSON Schema.
+ *
+ * @since 6.0.0
+ *
+ * @return array
+ */
+ public function get_item_schema()
+ {
+ }
+ /**
+ * Get the query params for collections.
+ *
+ * @since 6.0.0
+ *
+ * @return array
+ */
+ public function get_collection_params()
+ {
+ }
+ }
+ /**
+ * Recently Active Members Widget.
+ *
+ * @since 1.0.3
+ * @deprecated 12.0.0
+ */
+ class BP_Core_Recently_Active_Widget extends \WP_Widget
+ {
+ /**
+ * Constructor method.
+ *
+ * @since 1.5.0
+ * @since 9.0.0 Adds the `show_instance_in_rest` property to Widget options.
+ * @deprecated 12.0.0
+ */
+ public function __construct()
+ {
+ }
+ /**
+ * Display the Recently Active widget.
+ *
+ * @since 1.0.3
+ * @deprecated 12.0.0
+ *
+ * @see WP_Widget::widget() for description of parameters.
+ *
+ * @param array $args Widget arguments.
+ * @param array $instance Widget settings, as saved by the user.
+ */
+ public function widget($args, $instance)
+ {
+ }
+ /**
+ * Update the Recently Active widget options.
+ *
+ * @since 1.0.3
+ * @deprecated 12.0.0
+ *
+ * @param array $new_instance The new instance options.
+ * @param array $old_instance The old instance options.
+ */
+ public function update($new_instance, $old_instance)
+ {
+ }
+ /**
+ * Output the Recently Active widget options form.
+ *
+ * @since 1.0.3
+ * @deprecated 12.0.0
+ *
+ * @param array $instance Widget instance settings.
+ */
+ public function form($instance)
+ {
+ }
+ /**
+ * Merge the widget settings into defaults array.
+ *
+ * @since 2.3.0
+ * @deprecated 12.0.0
+ *
+ * @param array $instance Widget instance settings.
+ */
+ public function parse_settings($instance = array())
+ {
+ }
+ }
+ class BP_Members_Invitations_Component extends \BP_Component
+ {
+ function __construct()
+ {
+ }
+ /**
+ * Register component navigation.
+ *
+ * @since 12.0.0
+ *
+ * @see `BP_Component::register_nav()` for a description of arguments.
+ *
+ * @param array $main_nav Optional. See `BP_Component::register_nav()` for
+ * description.
+ * @param array $sub_nav Optional. See `BP_Component::register_nav()` for
+ * description.
+ */
+ public function register_nav($main_nav = array(), $sub_nav = array())
+ {
+ }
+ /**
+ * Set up component navigation.
+ *
+ * @since 12.0.0 Used to customize the default subnavigation slug.
+ *
+ * @see `BP_Component::setup_nav()` for a description of arguments.
+ *
+ * @param array $main_nav Optional. See `BP_Component::setup_nav()` for
+ * description.
+ * @param array $sub_nav Optional. See `BP_Component::setup_nav()` for
+ * description.
+ */
+ public function setup_nav($main_nav = array(), $sub_nav = array())
+ {
+ }
+ /**
+ * Set up the component entries in the WordPress Admin Bar.
+ *
+ * @since 1.0.0
+ *
+ * @see BP_Component::setup_admin_bar() for a description of arguments.
+ *
+ * @param array $wp_admin_nav See BP_Component::setup_admin_bar()
+ * for description.
+ */
+ public function setup_admin_bar($wp_admin_nav = array())
+ {
+ }
+ }
+ /**
+ * BP Invitations class.
+ *
+ * Extend it to manage your class's invitations.
+ * Your extension class, must, at a minimum, provide the
+ * run_send_action() and run_acceptance_action() methods.
+ *
+ * @since 5.0.0
+ */
+ abstract class BP_Invitation_Manager
+ {
+ /**
+ * The name of the related class.
+ *
+ * @since 5.0.0
+ *
+ * @var string
+ */
+ protected $class_name;
+ /**
+ * Construct parameters.
+ *
+ * @since 5.0.0
+ */
+ public function __construct()
+ {
+ }
+ /**
+ * Get the invitations table name.
+ *
+ * @since 5.0.0
+ *
+ * @return string
+ */
+ public static function get_table_name()
+ {
+ }
+ /** Create ********************************************************************/
+ /**
+ * Add an invitation to a specific user, from a specific user, related to a
+ * specific class.
+ *
+ * @since 5.0.0
+ *
+ * @param array $args {
+ * Array of arguments describing the invitation. All are optional.
+ * @type int $user_id ID of the invited user.
+ * @type int $inviter_id ID of the user who created the invitation.
+ * @type string $invitee_email Email address of the invited user.
+ * @type int $item_id ID associated with the invitation and class.
+ * @type int $secondary_item_id Secondary ID associated with the
+ * invitation and class.
+ * @type string $type Type of record this is: 'invite' or 'request'.
+ * @type string $content Extra information provided by the requester
+ * or inviter.
+ * @type string $date_modified Date the invitation was last modified.
+ * @type int $send_invite Should the invitation also be sent, or is it a
+ * draft invite?
+ * }
+ * @return int|bool ID of the newly created invitation on success, false
+ * on failure.
+ */
+ public function add_invitation($args = array())
+ {
+ }
+ /**
+ * Send an invitation notification.
+ *
+ * @since 5.0.0
+ *
+ * @param int $invitation_id ID of invitation to send.
+ * @param array $args See BP_Invitation::mark_sent().
+ * @return bool
+ */
+ public function send_invitation_by_id($invitation_id = 0, $args = array())
+ {
+ }
+ /**
+ * Add a request to an item for a specific user, related to a
+ * specific class.
+ *
+ * @since 5.0.0
+ *
+ * @param array $args {
+ * Array of arguments describing the invitation. All are optional.
+ * @type int $user_id ID of the invited user.
+ * @type int $inviter_id ID of the user who created the invitation.
+ * @type string $class Name of the invitations class.
+ * @type int $item_id ID associated with the invitation and class.
+ * @type int $secondary_item_id secondary ID associated with the
+ * invitation and class.
+ * @type string $type Type of record this is: 'invite' or 'request'.
+ * @type string $content Extra information provided by the requester
+ * or inviter.
+ * @type string $date_modified Date the invitation was last modified.
+ * @type int $invite_sent Has the invitation been sent, or is it a
+ * draft invite?
+ * }
+ * @return int|bool ID of the newly created invitation on success, false
+ * on failure.
+ */
+ public function add_request($args = array())
+ {
+ }
+ /**
+ * Send a request notification.
+ *
+ * @since 5.0.0
+ *
+ * @param int $request_id ID of request to send.
+ * @param array $args See BP_Invitation::mark_sent().
+ * @return bool
+ */
+ public function send_request_notification_by_id($request_id = 0, $args = array())
+ {
+ }
+ /** Retrieve ******************************************************************/
+ /**
+ * Get a specific invitation by its ID.
+ *
+ * @since 5.0.0
+ *
+ * @param int $id ID of the invitation.
+ * @return BP_Invitation object
+ */
+ public function get_by_id($id = 0)
+ {
+ }
+ /**
+ * Get invitations, based on provided filter parameters.
+ *
+ * @since 5.0.0
+ *
+ * @param array $args {@see BP_Invitation::get()}.
+ * @return array Located invitations.
+ */
+ public function get_invitations($args = array())
+ {
+ }
+ /**
+ * Get a count of the number of invitations that match provided filter parameters.
+ *
+ * @since 8.0.0
+ *
+ * @param array $args {@see BP_Invitation::get_total_count()}.
+ * @return int Total number of invitations.
+ */
+ public function get_invitations_total_count($args = array())
+ {
+ }
+ /**
+ * Get requests, based on provided filter parameters.
+ *
+ * @since 5.0.0
+ *
+ * @param array $args {@see BP_Invitation::get()}.
+ * @return array Located invitations.
+ */
+ public function get_requests($args = array())
+ {
+ }
+ /**
+ * Check whether an invitation exists matching the passed arguments.
+ *
+ * @since 5.0.0
+ *
+ * @param array $args {@see BP_Invitation::get()}.
+ * @return int|bool ID of first found invitation or false if none found.
+ */
+ public function invitation_exists($args = array())
+ {
+ }
+ /**
+ * Check whether a request exists matching the passed arguments.
+ *
+ * @since 5.0.0
+ *
+ * @param array $args {@see BP_Invitation::get()}.
+ * @return int|bool ID of existing request or false if none found.
+ */
+ public function request_exists($args = array())
+ {
+ }
+ /** Update ********************************************************************/
+ /**
+ * Accept invitation, based on provided filter parameters.
+ *
+ * @since 5.0.0
+ *
+ * @param array $args {BP_Invitation::get()}.
+ * @return int|bool Number of rows updated on success, false on failure.
+ */
+ public function accept_invitation($args = array())
+ {
+ }
+ /**
+ * Accept invitation, based on provided filter parameters.
+ *
+ * @since 5.0.0
+ *
+ * @param array $args {BP_Invitation::get()}.
+ * @return bool Number of rows updated on success, false on failure.
+ */
+ public function accept_request($args = array())
+ {
+ }
+ /**
+ * Update invitation, based on provided filter parameters.
+ *
+ * @since 5.0.0
+ *
+ * @see BP_Invitation::update() for a description of
+ * accepted update/where arguments.
+ *
+ * @param array $update_args Associative array of fields to update,
+ * and the values to update them to. Of the format
+ * array( 'user_id' => 4 ).
+ * @param array $where_args Associative array of columns/values, to
+ * determine which invitations should be updated. Formatted as
+ * array( 'item_id' => 7 ).
+ * @return int|bool Number of rows updated on success, false on failure.
+ */
+ public function update_invitation($update_args = array(), $where_args = array())
+ {
+ }
+ /**
+ * This is where custom actions are added (in child classes)
+ * to run when an invitation or request needs to be "sent."
+ *
+ * @since 5.0.0
+ *
+ * @param BP_Invitation $invitation The invitation to send.
+ * @return bool
+ */
+ public abstract function run_send_action(\BP_Invitation $invitation);
+ /**
+ * Mark invitations as sent that are found by user_id, inviter_id,
+ * invitee_email, class name, optional item id,
+ * optional secondary item id.
+ *
+ * @since 5.0.0
+ *
+ * @param array $args {
+ * Associative array of arguments. All arguments but $page and
+ * $per_page can be treated as filter values for get_where_sql()
+ * and get_query_clauses(). All items are optional.
+ * @type int|array $user_id ID of user being queried. Can be an
+ * array of user IDs.
+ * @type int|array $inviter_id ID of user who created the
+ * invitation. Can be an array of user IDs.
+ * Special cases
+ * @type string|array $invitee_email Email address of invited users
+ * being queried. Can be an array of addresses.
+ * @type string|array $class Name of the class to
+ * filter by. Can be an array of class names.
+ * @type int|array $item_id ID of associated item. Can be an array
+ * of multiple item IDs.
+ * @type int|array $secondary_item_id ID of secondary associated
+ * item. Can be an array of multiple IDs.
+ * }
+ */
+ public function mark_sent($args)
+ {
+ }
+ /**
+ * This is where custom actions are added (in child classes)
+ * to run when an invitation or request is accepted.
+ *
+ * @since 5.0.0
+ *
+ * @param string $type The type of record being accepted: 'invite' or 'request'.
+ * @param array $r Associative array of arguments.
+ * @return bool
+ */
+ public abstract function run_acceptance_action($type, $r);
+ /**
+ * Mark invitation as accepted by invitation ID.
+ *
+ * @since 5.0.0
+ *
+ * @param int $id ID of the invitation to mark as accepted.
+ * @param array $args {@see BP_Invitation::mark_accepted()}.
+ * @return int|bool Number of rows updated on success, false on failure.
+ */
+ public function mark_accepted_by_id($id, $args)
+ {
+ }
+ /**
+ * Mark invitations as sent that are found by user_id, inviter_id,
+ * invitee_email, class name, item id, and
+ * optional secondary item id.
+ *
+ * @since 5.0.0
+ *
+ * @param array $args {BP_Invitation::mark_accepted_by_data()}.
+ * @return int|bool Number of rows updated on success, false on failure.
+ */
+ public function mark_accepted($args)
+ {
+ }
+ /** Delete ********************************************************************/
+ /**
+ * Delete an invitation or invitations by query data.
+ *
+ * @since 5.0.0
+ *
+ * @param array $args {BP_Invitation::delete()}.
+ * @return int|bool Number of rows deleted on success, false on failure.
+ */
+ public function delete($args)
+ {
+ }
+ /**
+ * Delete a request or requests by query data.
+ *
+ * @since 5.0.0
+ *
+ * @param array $args {BP_Invitation::delete()}.
+ * @return int|bool Number of rows deleted on success, false on failure.
+ */
+ public function delete_requests($args)
+ {
+ }
+ /**
+ * Delete all invitations by class.
+ *
+ * Used when clearing out invitations for an entire class. Possibly used
+ * when deactivating a component related to a class that created invitations.
+ *
+ * @since 5.0.0
+ *
+ * @return int|bool Number of rows deleted on success, false on failure.
+ */
+ public function delete_all()
+ {
+ }
+ /**
+ * Delete an invitation by id.
+ *
+ * @since 8.0.0
+ *
+ * @param int $id ID of the invitation to delete.
+ * @return int|bool Number of rows deleted on success, false on failure.
+ */
+ public function delete_by_id($id)
+ {
+ }
+ /**
+ * This is where custom actions are added (in child classes)
+ * to determine whether an invitation should be allowed.
+ *
+ * @since 5.0.0
+ *
+ * @param array $args The parameters that describe the invitation.
+ * @return bool
+ */
+ public function allow_invitation($args)
+ {
+ }
+ /**
+ * This is where custom actions are added (in child classes)
+ * to determine whether a request should be allowed.
+ *
+ * @since 5.0.0
+ *
+ * @param array $args The parameters describing the request.
+ * @return bool
+ */
+ public function allow_request($args)
+ {
+ }
+ }
+ /**
+ * Membership invitations class.
+ *
+ * An extension of the core Invitations class that adapts the
+ * core logic to accommodate site membership invitation behavior.
+ *
+ * @since 8.0.0
+ */
+ class BP_Members_Invitation_Manager extends \BP_Invitation_Manager
+ {
+ /**
+ * Construct parameters.
+ *
+ * @since 8.0.0
+ *
+ * @param array|string $args.
+ */
+ public function __construct($args = '')
+ {
+ }
+ /**
+ * This is where custom actions are added to run when notifications of an
+ * invitation or request need to be generated & sent.
+ *
+ * @since 8.0.0
+ *
+ * @param obj BP_Invitation $invitation The invitation to send.
+ * @return bool
+ */
+ public function run_send_action(\BP_Invitation $invitation)
+ {
+ }
+ /**
+ * This is where custom actions are added to run when an invitation
+ * or request is accepted.
+ *
+ * @since 8.0.0
+ *
+ * @param string $type Are we accepting an invitation or request?
+ * @param array $r Parameters that describe the invitation being accepted.
+ * @return bool
+ */
+ public function run_acceptance_action($type, $r)
+ {
+ }
+ /**
+ * Should this invitation be created?
+ *
+ * @since 8.0.0
+ *
+ * @param array $args Array of arguments.
+ * @return bool
+ */
+ public function allow_invitation($args)
+ {
+ }
+ /**
+ * Should this request be created?
+ *
+ * @since 8.0.0
+ *
+ * @param array $args.
+ * @return bool.
+ */
+ public function allow_request($args)
+ {
+ }
+ }
+ /**
+ * Who's Online Widget.
+ *
+ * @since 1.0.3
+ * @since 9.0.0 Adds the `show_instance_in_rest` property to Widget options.
+ * @deprecated 12.0.0
+ */
+ class BP_Core_Whos_Online_Widget extends \WP_Widget
+ {
+ /**
+ * Constructor method.
+ *
+ * @since 1.5.0
+ * @since 9.0.0 Adds the `show_instance_in_rest` property to Widget options.
+ * @deprecated 12.0.0
+ */
+ public function __construct()
+ {
+ }
+ /**
+ * Display the Who's Online widget.
+ *
+ * @since 1.0.3
+ * @deprecated 12.0.0
+ *
+ * @see WP_Widget::widget() for description of parameters.
+ *
+ * @param array $args Widget arguments.
+ * @param array $instance Widget settings, as saved by the user.
+ */
+ public function widget($args, $instance)
+ {
+ }
+ /**
+ * Update the Who's Online widget options.
+ *
+ * @since 1.0.3
+ * @deprecated 12.0.0
+ *
+ * @param array $new_instance The new instance options.
+ * @param array $old_instance The old instance options.
+ */
+ public function update($new_instance, $old_instance)
+ {
+ }
+ /**
+ * Output the Who's Online widget options form.
+ *
+ * @since 1.0.3
+ * @deprecated 12.0.0
+ *
+ * @param array $instance Widget instance settings.
+ */
+ public function form($instance)
+ {
+ }
+ /**
+ * Merge the widget settings into defaults array.
+ *
+ * @since 2.3.0
+ * @deprecated 12.0.0
+ *
+ * @param array $instance Widget instance settings.
+ */
+ public function parse_settings($instance = array())
+ {
+ }
+ }
+ /**
+ * The main member template loop class.
+ *
+ * Responsible for loading a group of members into a loop for display.
+ *
+ * @since 1.0.0
+ */
+ class BP_Core_Members_Template
+ {
+ /**
+ * The loop iterator.
+ *
+ * @since 1.0.0
+ * @var int
+ */
+ public $current_member = -1;
+ /**
+ * The number of members returned by the paged query.
+ *
+ * @since 1.0.0
+ * @var int
+ */
+ public $member_count;
+ /**
+ * Array of members located by the query.
+ *
+ * @since 1.0.0
+ * @var array
+ */
+ public $members;
+ /**
+ * The member object currently being iterated on.
+ *
+ * @since 1.0.0
+ * @var object
+ */
+ public $member;
+ /**
+ * A flag for whether the loop is currently being iterated.
+ *
+ * @since 1.0.0
+ * @var bool
+ */
+ public $in_the_loop;
+ /**
+ * The type of member being requested. Used for ordering results.
+ *
+ * @since 2.3.0
+ * @var string
+ */
+ public $type;
+ /**
+ * The unique string used for pagination queries.
+ *
+ * @since 2.2.0
+ * @var string
+ */
+ public $pag_arg;
+ /**
+ * The page number being requested.
+ *
+ * @since 1.0.0
+ * @var string
+ */
+ public $pag_page;
+ /**
+ * The number of items being requested per page.
+ *
+ * @since 1.0.0
+ * @var string
+ */
+ public $pag_num;
+ /**
+ * An HTML string containing pagination links.
+ *
+ * @since 1.0.0
+ * @var string
+ */
+ public $pag_links;
+ /**
+ * The total number of members matching the query parameters.
+ *
+ * @since 1.0.0
+ * @var int
+ */
+ public $total_member_count;
+ /**
+ * Constructor method.
+ *
+ * @since 1.5.0
+ * @since 7.0.0 Added `$xprofile_query` parameter. Added `$user_ids` parameter.
+ * @since 10.0.0 Added `$date_query` parameter.
+ *
+ * @see BP_User_Query for an in-depth description of parameters.
+ *
+ * @param array ...$args {
+ * Array of arguments. Supports all arguments of BP_User_Query. Additional
+ * arguments, or those with different defaults, are described below.
+ *
+ * @type int $page_number Page of results. Accepted for legacy reasons. Use 'page' instead.
+ * @type int $max Max number of results to return.
+ * @type string $page_arg Optional. The string used as a query parameter in pagination links.
+ * }
+ */
+ public function __construct(...$args)
+ {
+ }
+ /**
+ * Whether there are members available in the loop.
+ *
+ * @since 1.0.0
+ *
+ * @see bp_has_members()
+ *
+ * @return bool True if there are items in the loop, otherwise false.
+ */
+ public function has_members()
+ {
+ }
+ /**
+ * Set up the next member and iterate index.
+ *
+ * @since 1.0.0
+ *
+ * @return object The next member to iterate over.
+ */
+ public function next_member()
+ {
+ }
+ /**
+ * Rewind the members and reset member index.
+ *
+ * @since 1.0.0
+ */
+ public function rewind_members()
+ {
+ }
+ /**
+ * Whether there are members left in the loop to iterate over.
+ *
+ * This method is used by {@link bp_members()} as part of the while loop
+ * that controls iteration inside the members loop, eg:
+ * while ( bp_members() ) { ...
+ *
+ * @since 1.2.0
+ *
+ * @see bp_members()
+ *
+ * @return bool True if there are more members to show, otherwise false.
+ */
+ public function members()
+ {
+ }
+ /**
+ * Set up the current member inside the loop.
+ *
+ * Used by {@link bp_the_member()} to set up the current member data
+ * while looping, so that template tags used during that iteration make
+ * reference to the current member.
+ *
+ * @since 1.0.0
+ *
+ * @see bp_the_member()
+ */
+ public function the_member()
+ {
+ }
+ }
+ /**
+ * BuddyPress Friendship object.
+ *
+ * @since 1.0.0
+ */
+ #[\AllowDynamicProperties]
+ class BP_Friends_Friendship
+ {
+ /**
+ * ID of the friendship.
+ *
+ * @since 1.0.0
+ * @var int
+ */
+ public $id;
+ /**
+ * User ID of the friendship initiator.
+ *
+ * @since 1.0.0
+ * @var int
+ */
+ public $initiator_user_id;
+ /**
+ * User ID of the 'friend' - the one invited to the friendship.
+ *
+ * @since 1.0.0
+ * @var int
+ */
+ public $friend_user_id;
+ /**
+ * Has the friendship been confirmed/accepted?
+ *
+ * @since 1.0.0
+ * @var int
+ */
+ public $is_confirmed;
+ /**
+ * Is this a "limited" friendship?
+ *
+ * Not currently used by BuddyPress.
+ *
+ * @since 1.0.0
+ * @var int
+ */
+ public $is_limited;
+ /**
+ * Date the friendship was created.
+ *
+ * @since 1.0.0
+ * @var string
+ */
+ public $date_created;
+ /**
+ * Is this a request?
+ *
+ * Not currently used in BuddyPress.
+ *
+ * @since 1.0.0
+ * @var bool
+ */
+ public $is_request;
+ /**
+ * Should additional friend details be queried?
+ *
+ * @since 1.0.0
+ * @var bool
+ */
+ public $populate_friend_details;
+ /**
+ * Details about the friend.
+ *
+ * @since 1.0.0
+ * @var BP_Core_User
+ */
+ public $friend;
+ /**
+ * Constructor method.
+ *
+ * @since 1.5.0
+ * @since 10.0.0 Updated to add deprecated notice for `$is_request`.
+ *
+ * @param int|null $id Optional. The ID of an existing friendship.
+ * @param bool $is_request Deprecated.
+ * @param bool $populate_friend_details Optional. True if friend details should be queried.
+ */
+ public function __construct($id = \null, $is_request = \false, $populate_friend_details = \true)
+ {
+ }
+ /**
+ * Set up data about the current friendship.
+ *
+ * @since 1.0.0
+ *
+ * @global wpdb $wpdb WordPress database object.
+ */
+ public function populate()
+ {
+ }
+ /**
+ * Save the current friendship to the database.
+ *
+ * @since 1.0.0
+ *
+ * @global wpdb $wpdb WordPress database object.
+ *
+ * @return bool
+ */
+ public function save()
+ {
+ }
+ /**
+ * Delete the current friendship from the database.
+ *
+ * @since 1.0.0
+ *
+ * @global wpdb $wpdb WordPress database object.
+ *
+ * @return bool|int
+ */
+ public function delete()
+ {
+ }
+ /** Static Methods ********************************************************/
+ /**
+ * Get the friendships for a given user.
+ *
+ * @since 2.6.0
+ *
+ * @param int $user_id ID of the user whose friends are being retrieved.
+ * @param array $args {
+ * Optional. Filter parameters.
+ * @type int $id ID of specific friendship to retrieve.
+ * @type int $initiator_user_id ID of friendship initiator.
+ * @type int $friend_user_id ID of specific friendship to retrieve.
+ * @type int $is_confirmed Whether the friendship has been accepted.
+ * @type int $is_limited Whether the friendship is limited.
+ * @type string $order_by Column name to order by.
+ * @type string $sort_order Optional. ASC or DESC. Default: 'DESC'.
+ * }
+ * @param string $operator Optional. Operator to use in `wp_list_filter()`.
+ *
+ * @return array $friendships Array of friendship objects.
+ */
+ public static function get_friendships($user_id, $args = array(), $operator = 'AND')
+ {
+ }
+ /**
+ * Get all friendship IDs for a user.
+ *
+ * @since 2.7.0
+ *
+ * @global wpdb $wpdb WordPress database object.
+ *
+ * @param int $user_id ID of the user.
+ * @return array
+ */
+ public static function get_friendship_ids_for_user($user_id)
+ {
+ }
+ /**
+ * Get the IDs of a given user's friends.
+ *
+ * @since 1.0.0
+ *
+ * @param int $user_id ID of the user whose friends are being retrieved.
+ * @param bool $friend_requests_only Optional. Whether to fetch
+ * unaccepted requests only. Default: false.
+ * @param bool $assoc_arr Optional. True to receive an array of arrays
+ * keyed as 'user_id' => $user_id; false to get a one-dimensional
+ * array of user IDs. Default: false.
+ * @return array $fids IDs of friends for provided user.
+ */
+ public static function get_friend_user_ids($user_id, $friend_requests_only = \false, $assoc_arr = \false)
+ {
+ }
+ /**
+ * Get the ID of the friendship object, if any, between a pair of users.
+ *
+ * @since 1.0.0
+ *
+ * @param int $user_id The ID of the first user.
+ * @param int $friend_id The ID of the second user.
+ * @return int|null The ID of the friendship object if found, otherwise null.
+ */
+ public static function get_friendship_id($user_id, $friend_id)
+ {
+ }
+ /**
+ * Get a list of IDs of users who have requested friendship of a given user.
+ *
+ * @since 1.2.0
+ *
+ * @param int $user_id The ID of the user who has received the
+ * friendship requests.
+ * @return array|bool An array of user IDs or false if none are found.
+ */
+ public static function get_friendship_request_user_ids($user_id)
+ {
+ }
+ /**
+ * Get a total friend count for a given user.
+ *
+ * @since 1.0.0
+ *
+ * @param int $user_id Optional. ID of the user whose friendships you
+ * are counting. Default: displayed user (if any), otherwise
+ * logged-in user.
+ * @return int Friend count for the user.
+ */
+ public static function total_friend_count($user_id = 0)
+ {
+ }
+ /**
+ * Search the friends of a user by a search string.
+ *
+ * @todo Optimize this function.
+ *
+ * @since 1.0.0
+ *
+ * @global wpdb $wpdb WordPress database object.
+ *
+ * @param string $filter The search string, matched against xprofile
+ * fields (if available), or usermeta 'nickname' field.
+ * @param int $user_id ID of the user whose friends are being searched.
+ * @param int|null $limit Optional. Max number of friends to return.
+ * @param int|null $page Optional. The page of results to return. Default:
+ * null (no pagination - return all results).
+ * @return array|bool On success, an array: {
+ * @type array $friends IDs of friends returned by the query.
+ * @type int $count Total number of friends (disregarding
+ * pagination) who match the search.
+ * }. Returns false on failure.
+ */
+ public static function search_friends($filter, $user_id, $limit = \null, $page = \null)
+ {
+ }
+ /**
+ * Check friendship status between two users.
+ *
+ * Note that 'pending' means that $initiator_userid has sent a friend
+ * request to $possible_friend_userid that has not yet been approved,
+ * while 'awaiting_response' is the other way around ($possible_friend_userid
+ * sent the initial request).
+ *
+ * @since 1.0.0
+ *
+ * @param int $initiator_userid The ID of the user who is the initiator
+ * of the potential friendship/request.
+ * @param int $possible_friend_userid The ID of the user who is the
+ * recipient of the potential friendship/request.
+ * @return string|false $value The friendship status, from among 'not_friends',
+ * 'is_friend', 'pending', and 'awaiting_response'.
+ */
+ public static function check_is_friend($initiator_userid, $possible_friend_userid)
+ {
+ }
+ /**
+ * Find uncached friendships between a user and one or more other users and cache them.
+ *
+ * @since 3.0.0
+ *
+ * @global wpdb $wpdb WordPress database object.
+ *
+ * @param int $user_id The ID of the primary user for whom we want
+ * to check friendships statuses.
+ * @param int|array|string $possible_friend_ids The IDs of the one or more users
+ * to check friendship status with primary user.
+ */
+ public static function update_bp_friends_cache($user_id, $possible_friend_ids)
+ {
+ }
+ /**
+ * Get the last active date of many users at once.
+ *
+ * @todo Why is this in the Friends component?
+ *
+ * @since 1.0.0
+ *
+ * @param array $user_ids IDs of users whose last_active meta is
+ * being queried.
+ * @return array $retval Array of last_active values + user_ids.
+ */
+ public static function get_bulk_last_active($user_ids)
+ {
+ }
+ /**
+ * Mark a friendship as accepted.
+ *
+ * @since 1.0.0
+ *
+ * @global wpdb $wpdb WordPress database object.
+ *
+ * @param int $friendship_id ID of the friendship to be accepted.
+ * @return int Number of database rows updated.
+ */
+ public static function accept($friendship_id)
+ {
+ }
+ /**
+ * Remove a friendship or a friendship request INITIATED BY the logged-in user.
+ *
+ * @since 1.6.0
+ *
+ * @global wpdb $wpdb WordPress database object.
+ *
+ * @param int $friendship_id ID of the friendship to be withdrawn.
+ * @return int Number of database rows deleted.
+ */
+ public static function withdraw($friendship_id)
+ {
+ }
+ /**
+ * Remove a friendship or a friendship request MADE OF the logged-in user.
+ *
+ * @since 1.0.0
+ *
+ * @global wpdb $wpdb WordPress database object.
+ *
+ * @param int $friendship_id ID of the friendship to be rejected.
+ * @return int Number of database rows deleted.
+ */
+ public static function reject($friendship_id)
+ {
+ }
+ /**
+ * Search users.
+ *
+ * @todo Why does this exist, and why is it in bp-friends?
+ *
+ * @since 1.0.0
+ *
+ * @global wpdb $wpdb WordPress database object.
+ *
+ * @param string $filter String to search by.
+ * @param int $user_id A user ID param that is unused.
+ * @param int|null $limit Optional. Max number of records to return.
+ * @param int|null $page Optional. Number of the page to return. Default:
+ * false (no pagination - return all results).
+ * @return array $filtered_ids IDs of users who match the query.
+ */
+ public static function search_users($filter, $user_id, $limit = \null, $page = \null)
+ {
+ }
+ /**
+ * Get a count of users who match a search term.
+ *
+ * @todo Why does this exist, and why is it in bp-friends?
+ *
+ * @since 1.0.0
+ *
+ * @global wpdb $wpdb WordPress database object.
+ *
+ * @param string $filter Search term.
+ * @return int Count of users matching the search term.
+ */
+ public static function search_users_count($filter)
+ {
+ }
+ /**
+ * Sort a list of user IDs by their display names.
+ *
+ * @todo Why does this exist, and why is it in bp-friends?
+ *
+ * @since 1.0.0
+ *
+ * @global wpdb $wpdb WordPress database object.
+ *
+ * @param array $user_ids Array of user IDs.
+ * @return array|bool User IDs, sorted by the associated display names.
+ * False if XProfile component is not active.
+ */
+ public static function sort_by_name($user_ids)
+ {
+ }
+ /**
+ * Get a list of random friend IDs.
+ *
+ * @since 1.0.0
+ *
+ * @global wpdb $wpdb WordPress database object.
+ *
+ * @param int $user_id ID of the user whose friends are being retrieved.
+ * @param int $total_friends Optional. Number of random friends to get.
+ * Default: 5.
+ * @return array|false An array of random friend user IDs on success;
+ * false if none are found.
+ */
+ public static function get_random_friends($user_id, $total_friends = 5)
+ {
+ }
+ /**
+ * Get a count of a user's friends who can be invited to a given group.
+ *
+ * Users can invite any of their friends except:
+ *
+ * - users who are already in the group
+ * - users who have a pending invite to the group
+ * - users who have been banned from the group
+ *
+ * @todo Need to do a group component check before using group functions.
+ *
+ * @since 1.0.0
+ *
+ * @param int $user_id ID of the user whose friends are being counted.
+ * @param int $group_id ID of the group friends are being invited to.
+ * @return bool|int False if group component is not active, and friend count.
+ */
+ public static function get_invitable_friend_count($user_id, $group_id)
+ {
+ }
+ /**
+ * Get friendship objects by ID (or an array of IDs).
+ *
+ * @since 2.7.0
+ *
+ * @global wpdb $wpdb WordPress database object.
+ *
+ * @param int|string|array $friendship_ids Single friendship ID or comma-separated/array list of friendship IDs.
+ * @return array
+ */
+ public static function get_friendships_by_id($friendship_ids)
+ {
+ }
+ /**
+ * Get the friend user IDs for a given friendship.
+ *
+ * @since 1.0.0
+ *
+ * @param int $friendship_id ID of the friendship.
+ * @return null|stdClass
+ */
+ public static function get_user_ids_for_friendship($friendship_id)
+ {
+ }
+ /**
+ * Delete all friendships and friend notifications related to a user.
+ *
+ * @since 1.0.0
+ *
+ * @global wpdb $wpdb WordPress database object.
+ *
+ * @param int $user_id ID of the user being expunged.
+ */
+ public static function delete_all_for_user($user_id)
+ {
+ }
+ }
+ /**
+ * The User Friends widget class.
+ *
+ * @since 1.9.0
+ * @deprecated 12.0.0
+ */
+ class BP_Core_Friends_Widget
+ {
+ /**
+ * Class constructor.
+ *
+ * @since 1.9.0
+ * @since 9.0.0 Adds the `show_instance_in_rest` property to Widget options.
+ * @deprecated 12.0.0
+ */
+ public function __construct()
+ {
+ }
+ /**
+ * Enqueue scripts.
+ *
+ * @since 2.6.0
+ * @deprecated 12.0.0
+ */
+ public function enqueue_scripts()
+ {
+ }
+ /**
+ * Display the widget.
+ *
+ * @since 1.9.0
+ * @deprecated 12.0.0
+ *
+ * @global BP_Core_Members_Template $members_template The main member template loop class.
+ *
+ * @param array $args Widget arguments.
+ * @param array $instance The widget settings, as saved by the user.
+ */
+ public function widget($args, $instance)
+ {
+ }
+ /**
+ * Process a widget save.
+ *
+ * @since 1.9.0
+ * @deprecated 12.0.0
+ *
+ * @param array $new_instance The parameters saved by the user.
+ * @param array $old_instance The parameters as previously saved to the database.
+ * @return array $instance The processed settings to save.
+ */
+ public function update($new_instance, $old_instance)
+ {
+ }
+ /**
+ * Render the widget edit form.
+ *
+ * @since 1.9.0
+ * @deprecated 12.0.0
+ *
+ * @param array $instance The saved widget settings.
+ */
+ public function form($instance)
+ {
+ }
+ }
+ /**
+ * Friendship endpoints.
+ *
+ * /friends/
+ * /friends/{id}
+ *
+ * @since 6.0.0
+ */
+ class BP_REST_Friends_Endpoint extends \WP_REST_Controller
+ {
+ /**
+ * Constructor.
+ *
+ * @since 6.0.0
+ */
+ public function __construct()
+ {
+ }
+ /**
+ * Register the component routes.
+ *
+ * @since 6.0.0
+ */
+ public function register_routes()
+ {
+ }
+ /**
+ * Retrieve friendships.
+ *
+ * @since 6.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return WP_REST_Response|WP_Error
+ */
+ public function get_items($request)
+ {
+ }
+ /**
+ * Check if a given request has access to friendship items.
+ *
+ * @since 6.0.0
+ *
+ * @param WP_REST_Request $request Full data about the request.
+ * @return true|WP_Error
+ */
+ public function get_items_permissions_check($request)
+ {
+ }
+ /**
+ * Retrieve single friendship.
+ *
+ * @since 6.0.0
+ *
+ * @param WP_REST_Request $request Full data about the request.
+ * @return WP_REST_Response|WP_Error
+ */
+ public function get_item($request)
+ {
+ }
+ /**
+ * Check if a given request has access to get a friendship.
+ *
+ * @since 6.0.0
+ *
+ * @param WP_REST_Request $request Full data about the request.
+ * @return true|WP_Error
+ */
+ public function get_item_permissions_check($request)
+ {
+ }
+ /**
+ * Create a new friendship.
+ *
+ * @since 6.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return WP_REST_Response|WP_Error
+ */
+ public function create_item($request)
+ {
+ }
+ /**
+ * Check if a given request has access to create a friendship.
+ *
+ * @since 6.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return true|WP_Error
+ */
+ public function create_item_permissions_check($request)
+ {
+ }
+ /**
+ * Update, accept, friendship.
+ *
+ * @since 6.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return WP_REST_Response|WP_Error
+ */
+ public function update_item($request)
+ {
+ }
+ /**
+ * Check if a given request has access to update a friendship.
+ *
+ * @since 6.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return true|WP_Error
+ */
+ public function update_item_permissions_check($request)
+ {
+ }
+ /**
+ * Reject/withdraw/remove friendship.
+ *
+ * @since 6.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return WP_REST_Response|WP_Error
+ */
+ public function delete_item($request)
+ {
+ }
+ /**
+ * Check if a given request has access to delete a friendship.
+ *
+ * @since 6.0.0
+ *
+ * @param WP_REST_Request $request Full details about the request.
+ * @return true|WP_Error
+ */
+ public function delete_item_permissions_check($request)
+ {
+ }
+ /**
+ * Prepares friendship data to return as an object.
+ *
+ * @since 6.0.0
+ *
+ * @param BP_Friends_Friendship $friendship Friendship object.
+ * @param WP_REST_Request $request Full details about the request.
+ * @return WP_REST_Response
+ */
+ public function prepare_item_for_response($friendship, $request)
+ {
+ }
+ /**
+ * Prepare links for the request.
+ *
+ * @since 6.0.0
+ *
+ * @param BP_Friends_Friendship $friendship Friendship object.
+ * @return array
+ */
+ protected function prepare_links($friendship)
+ {
+ }
+ /**
+ * Get friendship object.
+ *
+ * @since 6.0.0
+ *
+ * @param int $friendship_id Friendship ID.
+ * @return BP_Friends_Friendship
+ */
+ public function get_friendship_object($friendship_id)
+ {
+ }
+ /**
+ * Edit some arguments for the endpoint's methods.
+ *
+ * @since 6.0.0
+ *
+ * @param string $method Optional. HTTP method of the request.
+ * @return array Endpoint arguments.
+ */
+ public function get_endpoint_args_for_item_schema($method = \WP_REST_Server::CREATABLE)
+ {
+ }
+ /**
+ * Get the friends schema, conforming to JSON Schema.
+ *
+ * @since 6.0.0
+ *
+ * @return array
+ */
+ public function get_item_schema()
+ {
+ }
+ /**
+ * Get the query params for friends collections.
+ *
+ * @since 6.0.0
+ *
+ * @return array
+ */
+ public function get_collection_params()
+ {
+ }
+ }
+ /**
+ * Defines the BuddyPress Friends Component.
+ *
+ * @since 1.5.0
+ */
+ #[\AllowDynamicProperties]
+ class BP_Friends_Component extends \BP_Component
+ {
+ /**
+ * Start the friends component creation process.
+ *
+ * @since 1.5.0
+ */
+ public function __construct()
+ {
+ }
+ /**
+ * Include bp-friends files.
+ *
+ * @since 1.5.0
+ *
+ * @see BP_Component::includes() for description of parameters.
+ *
+ * @param array $includes See {@link BP_Component::includes()}.
+ */
+ public function includes($includes = array())
+ {
+ }
+ /**
+ * Late includes method.
+ *
+ * Only load up certain code when on specific pages.
+ *
+ * @since 3.0.0
+ */
+ public function late_includes()
+ {
+ }
+ /**
+ * Set up bp-friends global settings.
+ *
+ * The BP_FRIENDS_SLUG constant is deprecated.
+ *
+ * @since 1.5.0
+ *
+ * @see BP_Component::setup_globals() for description of parameters.
+ *
+ * @param array $args See {@link BP_Component::setup_globals()}.
+ */
+ public function setup_globals($args = array())
+ {
+ }
+ /**
+ * Register component navigation.
+ *
+ * @since 12.0.0
+ *
+ * @see `BP_Component::register_nav()` for a description of arguments.
+ *
+ * @param array $main_nav Optional. See `BP_Component::register_nav()` for
+ * description.
+ * @param array $sub_nav Optional. See `BP_Component::register_nav()` for
+ * description.
+ */
+ public function register_nav($main_nav = array(), $sub_nav = array())
+ {
+ }
+ /**
+ * Set up component navigation.
+ *
+ * @since 1.5.0
+ *
+ * @see `BP_Component::setup_nav()` for a description of arguments.
+ *
+ * @param array $main_nav Optional. See `BP_Component::setup_nav()` for
+ * description.
+ * @param array $sub_nav Optional. See `BP_Component::setup_nav()` for
+ * description.
+ */
+ public function setup_nav($main_nav = array(), $sub_nav = array())
+ {
+ }
+ /**
+ * Set up bp-friends integration with the WordPress admin bar.
+ *
+ * @since 1.5.0
+ *
+ * @see BP_Component::setup_admin_bar() for a description of arguments.
+ *
+ * @param array $wp_admin_nav See BP_Component::setup_admin_bar()
+ * for description.
+ */
+ public function setup_admin_bar($wp_admin_nav = array())
+ {
+ }
+ /**
+ * Set up the title for pages and .
+ *
+ * @since 1.5.0
+ */
+ public function setup_title()
+ {
+ }
+ /**
+ * Setup cache groups.
+ *
+ * @since 2.2.0
+ */
+ public function setup_cache_groups()
+ {
+ }
+ /**
+ * Init the BP REST API.
+ *
+ * @since 6.0.0
+ *
+ * @param array $controllers Optional. See BP_Component::rest_api_init() for
+ * description.
+ */
+ public function rest_api_init($controllers = array())
+ {
+ }
+ /**
+ * Register the BP Friends Blocks.
+ *
+ * @since 9.0.0
+ * @since 12.0.0 Use the WP Blocks API v2.
+ *
+ * @param array $blocks Optional. See BP_Component::blocks_init() for
+ * description.
+ */
+ public function blocks_init($blocks = array())
+ {
+ }
+ }
+}
+namespace Buddypress\CLI\Command {
+ /**
+ * Base component class.
+ *
+ * @since 1.0
+ */
+ abstract class BuddyPressCommand extends \WP_CLI\CommandWithDBObject
+ {
+ /**
+ * Default dependency check for a BuddyPress CLI command.
+ *
+ * @since 2.0
+ */
+ public static function check_dependencies()
+ {
+ }
+ /**
+ * Get Formatter object based on supplied parameters.
+ *
+ * @since 2.0
+ *
+ * @param array $assoc_args Parameters passed to command. Determines formatting.
+ * @return \WP_CLI\Formatter
+ */
+ protected function get_formatter(&$assoc_args)
+ {
+ }
+ /**
+ * Get a random user id.
+ *
+ * @global wpdb $wpdb WordPress database abstraction object.
+ *
+ * @since 1.1
+ *
+ * @return int
+ */
+ protected function get_random_user_id()
+ {
+ }
+ /**
+ * Get an activity ID.
+ *
+ * @since 2.0
+ *
+ * @param int $activity_id Activity ID.
+ * @param bool $activity_object Return BP_Activity_Activity object.
+ * @return int|BP_Activity_Activity
+ */
+ protected function get_activity_id_from_identifier($activity_id, $activity_object = false)
+ {
+ }
+ /**
+ * Get a group ID from its identifier (ID or slug).
+ *
+ * @since 1.5.0
+ *
+ * @param int|string $group_id Group ID or slug.
+ * @return int|bool
+ */
+ protected function get_group_id_from_identifier($group_id)
+ {
+ }
+ /**
+ * Verify a user ID by the passed identifier.
+ *
+ * @since 1.2.0
+ *
+ * @param mixed $identifier User ID, email, or login.
+ * @return WP_User
+ */
+ protected function get_user_id_from_identifier($identifier)
+ {
+ }
+ /**
+ * Generate random text
+ *
+ * @since 1.1
+ *
+ * @return string
+ */
+ protected function generate_random_text()
+ {
+ }
+ /**
+ * Get field from an ID.
+ *
+ * @since 1.5.0
+ *
+ * @param int|string $field_id Field ID or Field name.
+ * @return int Field ID.
+ */
+ protected function get_field_id($field_id)
+ {
+ }
+ /**
+ * String sanitization.
+ *
+ * @since 1.5.0
+ *
+ * @param string $type String to sanitize.
+ * @return string Sanitized string.
+ */
+ protected function sanitize_string($type)
+ {
+ }
+ /**
+ * Pull up a random active component.
+ *
+ * @since 1.1
+ *
+ * @return string
+ */
+ protected function get_random_component()
+ {
+ }
+ /**
+ * Get a list of activity components and actions.
+ *
+ * @since 1.1
+ *
+ * @return array
+ */
+ protected function get_components_and_actions()
+ {
+ }
+ /**
+ * Generate callback.
+ *
+ * @param string $message Message to display.
+ * @param array $assoc_args Command arguments.
+ * @param callable $callback Callback to execute.
+ */
+ protected function generate_callback($message, $assoc_args, $callback)
+ {
+ }
+ }
+ /**
+ * Manage BuddyPress Emails.
+ *
+ * ## EXAMPLES
+ *
+ * # Create email post
+ * $ wp bp email create --type=new-event --type-description="Send an email when a new event is created" --subject="[{{{site.name}}}] A new event was created" --content="A new event was created" --plain-text-content="A new event was created"
+ * Success: Email post created for type "new-event".
+ *
+ * # Create email post with content from given file
+ * $ wp bp email create ./email-content.txt --type=new-event --type-description="Send an email when a new event is created" --subject="[{{{site.name}}}] A new event was created" --plain-text-content="A new event was created"
+ * Success: Email post created for type "new-event".
+ *
+ * @since 1.6.0
+ */
+ class Email extends \Buddypress\CLI\Command\BuddyPressCommand
+ {
+ /**
+ * Create a new email post connected to an email type.
+ *
+ * ## OPTIONS
+ *
+ * --type=
+ * : Email type for the email (should be unique identifier, sanitized like a post slug).
+ *
+ * --type-description=
+ * : Email type description.
+ *
+ * --subject=
+ * : Email subject line. Email tokens allowed. View https://codex.buddypress.org/emails/email-tokens/ for more info.
+ *
+ * [--content=]
+ * : Email content. Email tokens allowed. View https://codex.buddypress.org/emails/email-tokens/ for more info.
+ *
+ * [--plain-text-content=]
+ * : Plain-text email content. Email tokens allowed. View https://codex.buddypress.org/emails/email-tokens/ for more info.
+ *
+ * []
+ * : Read content from . If this value is present, the
+ * `--content` argument will be ignored.
+ *
+ * Passing `-` as the filename will cause post content to
+ * be read from STDIN.
+ *
+ * [--edit]
+ * : Immediately open system's editor to write or edit email content.
+ *
+ * If content is read from a file, from STDIN, or from the `--content`
+ * argument, that text will be loaded into the editor.
+ *
+ * ## EXAMPLES
+ *
+ * # Create email post
+ * $ wp bp email create --type=new-event --type-description="Send an email when a new event is created" --subject="[{{{site.name}}}] A new event was created" --content="A new event was created" --plain-text-content="A new event was created"
+ * Success: Email post created for type "new-event".
+ *
+ * # Create email post with content from given file
+ * $ wp bp email create ./email-content.txt --type=new-event --type-description="Send an email when a new event is created" --subject="[{{{site.name}}}] A new event was created" --plain-text-content="A new event was created"
+ * Success: Email post created for type "new-event".
+ *
+ * @alias add
+ */
+ public function create($args, $assoc_args)
+ {
+ }
+ /**
+ * Get details for a post connected to an email type.
+ *
+ * ## OPTIONS
+ *
+ *
+ * : The email type to fetch the post details for.
+ *
+ * [--field=]
+ * : Instead of returning the whole post, returns the value of a single field.
+ *
+ * [--fields=]
+ * : Limit the output to specific fields.
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: table
+ * options:
+ * - table
+ * - csv
+ * - json
+ * - yaml
+ * ---
+ *
+ * ## EXAMPLE
+ *
+ * # Output the post ID for the 'activity-at-message' email type
+ * $ wp bp email get-post activity-at-message --fields=ID
+ *
+ * @alias get-post
+ * @alias see
+ */
+ public function get_post($args, $assoc_args)
+ {
+ }
+ /**
+ * Reinstall BuddyPress default emails.
+ *
+ * ## OPTIONS
+ *
+ * [--yes]
+ * : Answer yes to the confirmation message.
+ *
+ * ## EXAMPLE
+ *
+ * # Reinstall BuddyPress default emails.
+ * $ wp bp email reinstall --yes
+ * Success: Emails have been successfully reinstalled.
+ */
+ public function reinstall($args, $assoc_args)
+ {
+ }
+ /**
+ * Helper method to use the '--edit' flag.
+ *
+ * Copied from Post_Command::_edit().
+ *
+ * @param string $content Post content.
+ * @param string $title Post title.
+ * @return mixed
+ */
+ protected function edit_email($content, $title)
+ {
+ }
+ }
+ /**
+ * Manage BuddyPress Tools.
+ *
+ * ## EXAMPLES
+ *
+ * # Repair the friend count.
+ * $ wp bp tool repair friend-count
+ * Success: Counting the number of friends for each user. Complete!
+ *
+ * # Display BuddyPress version.
+ * $ wp bp tool version
+ * BuddyPress: 6.0.0
+ *
+ * # Activate the signup tool.
+ * $ wp bp tool signup 1
+ * Success: Signup tool updated.
+ *
+ * @since 1.5.0
+ */
+ class Tool extends \Buddypress\CLI\Command\BuddyPressCommand
+ {
+ /**
+ * Dependency check for this CLI command.
+ */
+ public static function check_dependencies()
+ {
+ }
+ /**
+ * Repair.
+ *
+ * ## OPTIONS
+ *
+ *
+ * : Name of the repair tool.
+ * ---
+ * options:
+ * - friend-count
+ * - group-count
+ * - blog-records
+ * - count-members
+ * ---
+ *
+ * ## EXAMPLES
+ *
+ * # Repair the friend count.
+ * $ wp bp tool repair friend-count
+ * Success: Counting the number of friends for each user. Complete!
+ *
+ * @alias fix
+ */
+ public function repair($args)
+ {
+ }
+ /**
+ * Display BuddyPress version currently installed.
+ *
+ * ## EXAMPLE
+ *
+ * # Display BuddyPress version.
+ * $ wp bp tool version
+ * BuddyPress: 6.0.0
+ */
+ public function version()
+ {
+ }
+ /**
+ * (De)Activate the signup feature.
+ *
+ *
+ * : Status of the feature.
+ *
+ * ## EXAMPLES
+ *
+ * # Activate the signup tool.
+ * $ wp bp tool signup 1
+ * Success: Signup tool updated.
+ *
+ * # Deactivate the signup tool.
+ * $ wp bp tool signup 0
+ * Success: Signup tool updated.
+ */
+ public function signup($args)
+ {
+ }
+ }
+ /**
+ * Adds, updates, deletes, and lists activity custom fields.
+ *
+ * ## EXAMPLES
+ *
+ * # Set activity meta
+ * $ wp bp activity meta set 123 description "Mary is a activity user."
+ * Success: Updated custom field 'description'.
+ *
+ * # Get activity meta
+ * $ wp bp activity meta get 123 description
+ * Mary is a Activity user.
+ *
+ * # Update activity meta
+ * $ wp bp activity meta update 123 description "Mary is an awesome activity user."
+ * Success: Updated custom field 'description'.
+ *
+ * # Delete activity meta
+ * $ wp bp activity meta delete 123 description
+ * Success: Deleted custom field.
+ *
+ * @since 2.0.0
+ */
+ class Activity_Meta extends \WP_CLI\CommandWithMeta
+ {
+ /**
+ * Type of the meta.
+ *
+ * @var string
+ */
+ protected $meta_type = 'activity';
+ /**
+ * Wrapper method for add_metadata that can be overridden in sub classes.
+ *
+ * @param int $object_id ID of the object the metadata is for.
+ * @param string $meta_key Metadata key to use.
+ * @param mixed $meta_value Metadata value. Must be serializable if
+ * non-scalar.
+ * @param bool $unique Optional, default is false. Whether the
+ * specified metadata key should be unique for the
+ * object. If true, and the object already has a
+ * value for the specified metadata key, no change
+ * will be made.
+ *
+ * @return int|false The meta ID on success, false on failure.
+ */
+ protected function add_metadata($object_id, $meta_key, $meta_value, $unique = false)
+ {
+ }
+ /**
+ * Wrapper method for update_metadata that can be overridden in sub classes.
+ *
+ * @param int $object_id ID of the object the metadata is for.
+ * @param string $meta_key Metadata key to use.
+ * @param mixed $meta_value Metadata value. Must be serializable if
+ * non-scalar.
+ * @param mixed $prev_value Optional. If specified, only update existing
+ * metadata entries with the specified value.
+ * Otherwise, update all entries.
+ *
+ * @return int|bool Meta ID if the key didn't exist, true on successful
+ * update, false on failure.
+ */
+ protected function update_metadata($object_id, $meta_key, $meta_value, $prev_value = '')
+ {
+ }
+ /**
+ * Wrapper method for get_metadata that can be overridden in sub classes.
+ *
+ * @param int $object_id ID of the object the metadata is for.
+ * @param string $meta_key Optional. Metadata key. If not specified,
+ * retrieve all metadata for the specified object.
+ * @param bool $single Optional, default is false. If true, return only
+ * the first value of the specified meta_key. This
+ * parameter has no effect if meta_key is not
+ * specified.
+ *
+ * @return mixed Single metadata value, or array of values.
+ */
+ protected function get_metadata($object_id, $meta_key = '', $single = true)
+ {
+ }
+ /**
+ * Wrapper method for delete_metadata that can be overridden in sub classes.
+ *
+ * @param int $object_id ID of the object metadata is for
+ * @param string $meta_key Metadata key
+ * @param mixed $meta_value Optional. Metadata value. Must be serializable
+ * if non-scalar. If specified, only delete
+ * metadata entries with this value. Otherwise,
+ * delete all entries with the specified meta_key.
+ * Pass `null, `false`, or an empty string to skip
+ * this check. For backward compatibility, it is
+ * not possible to pass an empty string to delete
+ * those entries with an empty string for a value.
+ *
+ * @return bool True on successful delete, false on failure.
+ */
+ protected function delete_metadata($object_id, $meta_key, $meta_value = '')
+ {
+ }
+ /**
+ * Check that the activity ID exists.
+ *
+ * @param int $object_id Object ID.
+ * @return int
+ */
+ protected function check_object_id($object_id)
+ {
+ }
+ }
+ /**
+ * Manage BuddyPress activity favorites.
+ *
+ * ## EXAMPLES
+ *
+ * # Add an activity item as a favorite for a user.
+ * $ wp bp activity favorite add 100 500
+ * Success: Activity item added as a favorite for the user.
+ *
+ * # Add an activity item as a favorite for a user using user_login.
+ * $ wp bp activity favorite create 100 user_test
+ * Success: Activity item added as a favorite for the user.
+ *
+ * @since 1.5.0
+ */
+ class Activity_Favorite extends \Buddypress\CLI\Command\BuddyPressCommand
+ {
+ /**
+ * Object fields.
+ *
+ * @var array
+ */
+ protected $obj_fields = ['id', 'user_id', 'component', 'type', 'action', 'item_id', 'primary_link', 'secondary_item_id', 'date_recorded', 'hide_sitewide', 'is_spam'];
+ /**
+ * Add an activity item as a favorite for a user.
+ *
+ * ## OPTIONS
+ *
+ *
+ * : ID of the activity.
+ *
+ *
+ * : Identifier for the user. Accepts either a user_login or a numeric ID.
+ *
+ * ## EXAMPLES
+ *
+ * # Add an activity item as a favorite.
+ * $ wp bp activity favorite add 100 500
+ * Success: Activity item added as a favorite for the user.
+ *
+ * # Add an activity item as a favorite using a user_login identifier.
+ * $ wp bp activity favorite create 100 user_test
+ * Success: Activity item added as a favorite for the user.
+ *
+ * @alias add
+ */
+ public function create($args)
+ {
+ }
+ /**
+ * Remove an activity item as a favorite for a user.
+ *
+ * ## OPTIONS
+ *
+ *
+ * : ID of the activity.
+ *
+ *
+ * : Identifier for the user. Accepts either a user_login or a numeric ID.
+ *
+ * [--yes]
+ * : Answer yes to the confirmation message.
+ *
+ * ## EXAMPLES
+ *
+ * # Remove an activity item as a favorite for a user.
+ * $ wp bp activity favorite remove 100 500
+ * Success: Activity item removed as a favorite for the user.
+ *
+ * # Remove an activity item as a favorite for a user.
+ * $ wp bp activity favorite delete 100 user_test --yes
+ * Success: Activity item removed as a favorite for the user.
+ *
+ * @alias remove
+ * @alias trash
+ */
+ public function delete($args, $assoc_args)
+ {
+ }
+ /**
+ * Get a user's favorite activity items.
+ *
+ * ## OPTIONS
+ *
+ *
+ * : Identifier for the user. Accepts either a user_login or a numeric ID.
+ *
+ * [--=]
+ * : One or more parameters to pass to \BP_Activity_Activity::get()
+ *
+ * [--count=]
+ * : How many activity favorites to list.
+ * ---
+ * default: 50
+ * ---
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: table
+ * options:
+ * - table
+ * - csv
+ * - ids
+ * - json
+ * - count
+ * - yaml
+ * ---
+ *
+ * ## EXAMPLE
+ *
+ * # Get a user's favorite activity items.
+ * $ wp bp activity favorite list 315
+ *
+ * @subcommand list
+ * @alias user-items
+ */
+ public function list_($args, $assoc_args)
+ {
+ }
+ }
+ /**
+ * Manage BuddyPress Groups.
+ *
+ * ## EXAMPLES
+ *
+ * # Create a public group.
+ * $ wp bp group create --name="Totally Cool Group"
+ * Success: Group (ID 5465) created: http://example.com/groups/totally-cool-group/
+ *
+ * # Create a private group.
+ * $ wp bp group create --name="Another Cool Group" --description="Cool Group" --creator-id=54 --status=private
+ * Success: Group (ID 6454)6 created: http://example.com/groups/another-cool-group/
+ *
+ * @since 1.5.0
+ */
+ class Group extends \Buddypress\CLI\Command\BuddyPressCommand
+ {
+ /**
+ * Object fields.
+ *
+ * @var array
+ */
+ protected $obj_fields = ['id', 'name', 'slug', 'status', 'date_created'];
+ /**
+ * Group ID Object Key
+ *
+ * @var string
+ */
+ protected $obj_id_key = 'group_id';
+ /**
+ * Group Object Type
+ *
+ * @var string
+ */
+ protected $obj_type = 'group';
+ /**
+ * Dependency check for this CLI command.
+ */
+ public static function check_dependencies()
+ {
+ }
+ /**
+ * Create a group.
+ *
+ * ## OPTIONS
+ *
+ * --name=
+ * : Name of the group.
+ *
+ * [--slug=]
+ * : URL-safe slug for the group. If not provided, one will be generated automatically.
+ *
+ * [--description=]
+ * : Group description.
+ *
+ * [--creator-id=]
+ * : ID of the group creator.
+ * ---
+ * default: 1
+ * ---
+ *
+ * [--slug=]
+ * : URL-safe slug for the group.
+ *
+ * [--status=]
+ * : Group status.
+ * ---
+ * default: public
+ * options:
+ * - public
+ * - private
+ * - hidden
+ * ---
+ *
+ * [--enable-forum=]
+ * : Whether to enable legacy bbPress forums.
+ *
+ * [--date-created=]
+ * : GMT timestamp, in Y-m-d h:i:s format.
+ *
+ * [--silent]
+ * : Whether to silent the group creation.
+ *
+ * [--porcelain]
+ * : Return only the new group id.
+ *
+ * ## EXAMPLES
+ *
+ * # Create a public group.
+ * $ wp bp group create --name="Totally Cool Group"
+ * Success: Successfully created new group (ID 5465)
+ *
+ * # Create a private group.
+ * $ wp bp group create --name="Another Cool Group" --description="Cool Group" --creator-id=54 --status=private
+ * Success: Successfully created new group (ID 6454)
+ *
+ * @alias add
+ */
+ public function create($args, $assoc_args)
+ {
+ }
+ /**
+ * Generate random groups.
+ *
+ * ## OPTIONS
+ *
+ * [--count=]
+ * : How many groups to generate.
+ * ---
+ * default: 100
+ * ---
+ *
+ * [--status=]
+ * : The status of the generated groups.
+ * ---
+ * default: mixed
+ * options:
+ * - public
+ * - private
+ * - hidden
+ * - mixed
+ * ---
+ *
+ * [--creator-id=]
+ * : ID of the group creator.
+ * ---
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: progress
+ * options:
+ * - progress
+ * - ids
+ * ---
+ *
+ * ## EXAMPLES
+ *
+ * # Generate 50 random groups.
+ * $ wp bp group generate --count=50
+ * Generating groups 100% [======================] 0:00 / 0:00
+ *
+ * # Generate 5 groups with mixed status.
+ * $ wp bp group generate --count=5 --status=mixed
+ * Generating groups 100% [======================] 0:00 / 0:00
+ *
+ * # Generate 10 hidden groups with a specific creator.
+ * $ wp bp group generate --count=10 --status=hidden --creator-id=30
+ * Generating groups 100% [======================] 0:00 / 0:00
+ *
+ * # Generate 5 random groups and output only the IDs.
+ * $ wp bp group generate --count=5 --format=ids
+ * 70 71 72 73 74
+ */
+ public function generate($args, $assoc_args)
+ {
+ }
+ /**
+ * Get a group.
+ *
+ * ## OPTIONS
+ *
+ *
+ * : Identifier for the group. Can be a numeric ID or the group slug.
+ *
+ * [--fields=]
+ * : Limit the output to specific fields.
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: table
+ * options:
+ * - table
+ * - json
+ * - csv
+ * - yaml
+ * ---
+ *
+ * ## EXAMPLES
+ *
+ * # Get group by ID.
+ * $ wp bp group get 500
+ *
+ * # Get group by group slug.
+ * $ wp bp group get group-slug
+ *
+ * @alias see
+ */
+ public function get($args, $assoc_args)
+ {
+ }
+ /**
+ * Delete a group.
+ *
+ * ## OPTIONS
+ *
+ * ...
+ * : ID or IDs of group(s) to delete. Can be a numeric ID or the group slug.
+ *
+ * [--yes]
+ * : Answer yes to the confirmation message.
+ *
+ * ## EXAMPLES
+ *
+ * # Delete a group.
+ * $ wp bp group delete 500 --yes
+ * Success: Deleted group 500.
+ *
+ * # Delete a group and its metadata.
+ * $ wp bp group delete group-slug --yes
+ * Success: Deleted group group-slug.
+ *
+ * # Delete multiple groups.
+ * $ wp bp group delete 55654 54564 --yes
+ * Success: Deleted group 55654.
+ * Success: Deleted group 54564.
+ *
+ * @alias remove
+ * @alias trash
+ */
+ public function delete($args, $assoc_args)
+ {
+ }
+ /**
+ * Update a group.
+ *
+ * ## OPTIONS
+ *
+ * ...
+ * : Identifier(s) for the group(s). Can be a numeric ID or the group slug.
+ *
+ * [--=]
+ * : One or more fields to update. See groups_create_group()
+ *
+ * ## EXAMPLES
+ *
+ * # Update a group.
+ * $ wp bp group update 35 --description="What a cool group!" --name="Group of Cool People"
+ * Success: Group updated.
+ */
+ public function update($args, $assoc_args)
+ {
+ }
+ /**
+ * Get a list of groups.
+ *
+ * ## OPTIONS
+ *
+ * [--=]
+ * : One or more parameters to pass. See groups_get_groups()
+ *
+ * [--fields=]
+ * : Fields to display.
+ *
+ * [--user-id=]
+ * : Limit results to groups of which a specific user is a member. Accepts either a user_login or a numeric ID.
+ *
+ * [--orderby=]
+ * : Sort order for results.
+ * ---
+ * default: name
+ * options:
+ * - name
+ * - date_created
+ * - last_activity
+ * - total_member_count
+ *
+ * [--count=]
+ * : Number of group to list.
+ * ---
+ * default: 50
+ * ---
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: table
+ * options:
+ * - table
+ * - ids
+ * - count
+ * - csv
+ * - json
+ * - yaml
+ * ---
+ *
+ * ## AVAILABLE FIELDS
+ *
+ * These fields will be displayed by default for each group:
+ *
+ * * id
+ * * name
+ * * slug
+ * * status
+ * * date_created
+ *
+ * ## EXAMPLES
+ *
+ * # List groups and get the count.
+ * $ wp bp group list --format=count
+ * 100
+ *
+ * # List groups and get the IDs.
+ * $ wp bp group list --format=ids
+ * 70 71 72 73 74
+ *
+ * # List groups.
+ * $ wp bp group list
+ * +----+------------+---------+---------+---------------------+
+ * | id | name | slug | status | date_created |
+ * +----+------------+---------+---------+---------------------+
+ * | 1 | Group - #0 | group-0 | hidden | 2022-07-04 02:12:02 |
+ * | 2 | Group - #1 | group-1 | hidden | 2022-07-04 02:12:02 |
+ * | 4 | Group - #3 | group-3 | private | 2022-07-04 02:12:02 |
+ * | 5 | Group - #4 | group-4 | private | 2022-07-04 02:12:02 |
+ * | 3 | Group – #2 | group-2 | public | 2022-07-04 02:12:02 |
+ * +----+------------+---------+---------+---------------------+
+ *
+ * @subcommand list
+ */
+ public function list_($args, $assoc_args)
+ {
+ }
+ /**
+ * Gets a randon group status.
+ *
+ * @since 1.5.0
+ *
+ * @param string $status Group status.
+ * @return string
+ */
+ protected function random_group_status($status)
+ {
+ }
+ }
+ /**
+ * Manage BuddyPress Sitewide Notices.
+ *
+ * ## EXAMPLES
+ *
+ * # Get a sitewide notice.
+ * $ wp bp notice get 500
+ * +-----------+---------------------+
+ * | Field | Value |
+ * +-----------+---------------------+
+ * | id | 4 |
+ * | subject | Important message |
+ * | message | Let's talk! |
+ * | date_sent | 2023-01-11 12:47:00 |
+ * | is_active | 1 |
+ * +-----------+---------------------+
+ *
+ * # Get a sitewide notice in JSON format.
+ * $ wp bp notice get 56 --format=json
+ * {"id":4,"subject":"Important message","message":"Let's talk!","date_sent":"2023-01-11 12:47:00","is_active":1}
+ *
+ * $ wp bp notice delete 55654 54564 --yes
+ * Success: Deleted notice 55654.
+ * Success: Deleted notice 54564.
+ */
+ class Sitewide_Notice extends \Buddypress\CLI\Command\BuddyPressCommand
+ {
+ /**
+ * Object fields.
+ *
+ * @var array
+ */
+ protected $obj_fields = ['id', 'subject', 'message', 'is_active', 'date_sent'];
+ /**
+ * Dependency check for this CLI command.
+ */
+ public static function check_dependencies()
+ {
+ }
+ /**
+ * Create a sitewide notice.
+ *
+ * ## OPTIONS
+ *
+ * --subject=
+ * : Notice subject text.
+ *
+ * --message=
+ * : Notice message text.
+ *
+ * [--silent]
+ * : Whether to silent the notice creation.
+ *
+ * [--porcelain]
+ * : Output the new notice id only.
+ *
+ * ## EXAMPLES
+ *
+ * # Create a sitewide notice.
+ * $ wp bp notice create --subject=Hello --message=Folks!
+ * Success: Successfully created new sitewide notice. (ID #5464)
+ *
+ * # Create a sitewide notice and return its ID.
+ * $ wp bp notice create --subject=Hello --message=Folks! --porcelain
+ * 36565
+ *
+ * @alias add
+ */
+ public function create($args, $assoc_args)
+ {
+ }
+ /**
+ * Get specific sitewide notice.
+ *
+ * ## OPTIONS
+ *
+ *
+ * : Identifier for the notice.
+ *
+ * [--fields=]
+ * : Limit the output to specific fields.
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: table
+ * options:
+ * - table
+ * - json
+ * - csv
+ * - yaml
+ * ---
+ *
+ * ## EXAMPLES
+ *
+ * # Get a sitewide notice.
+ * $ wp bp notice get 500
+ * +-----------+---------------------+
+ * | Field | Value |
+ * +-----------+---------------------+
+ * | id | 4 |
+ * | subject | Important message |
+ * | message | Let's talk! |
+ * | date_sent | 2023-01-11 12:47:00 |
+ * | is_active | 1 |
+ * +-----------+---------------------+
+ *
+ * # Get a sitewide notice in JSON format.
+ * $ wp bp notice get 56 --format=json
+ * {"id":4,"subject":"Important message","message":"Let's talk!","date_sent":"2023-01-11 12:47:00","is_active":1}
+ *
+ * @alias see
+ */
+ public function get($args, $assoc_args)
+ {
+ }
+ /**
+ * Delete sitewide notice(s).
+ *
+ * ## OPTIONS
+ *
+ * ...
+ * : ID or IDs of sitewide notices to delete.
+ *
+ * [--yes]
+ * : Answer yes to the confirmation message.
+ *
+ * ## EXAMPLES
+ *
+ * # Delete a sitewide notice.
+ * $ wp bp notice delete 520 --yes
+ * Success: Sitewide notice deleted 520.
+ *
+ * # Delete multiple sitewide notices.
+ * $ wp bp notice delete 55654 54564 --yes
+ * Success: Sitewide notice deleted 55654.
+ * Success: Sitewide notice deleted 54564.
+ *
+ * @alias remove
+ * @alias trash
+ */
+ public function delete($args, $assoc_args)
+ {
+ }
+ /**
+ * Activate a sitewide notice.
+ *
+ * ## OPTIONS
+ *
+ *
+ * : Identifier for the notice.
+ *
+ * ## EXAMPLE
+ *
+ * $ wp bp notice activate 123
+ * Success: Sitewide notice activated.
+ */
+ public function activate($args)
+ {
+ }
+ /**
+ * Deactivate a sitewide notice.
+ *
+ * ## OPTIONS
+ *
+ *
+ * : Identifier for the notice.
+ *
+ * ## EXAMPLE
+ *
+ * $ wp bp notice deactivate 123
+ * Success: Sitewide notice has been deactivated.
+ */
+ public function deactivate($args)
+ {
+ }
+ /**
+ * Get a list of sitewide notices.
+ *
+ * ## OPTIONS
+ *
+ * [--fields=]
+ * : Fields to display.
+ *
+ * [--count=]
+ * : How many notices to list.
+ * ---
+ * default: 50
+ * ---
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: table
+ * options:
+ * - table
+ * - ids
+ * - count
+ * - csv
+ * - json
+ * - yaml
+ * ---
+ * ## EXAMPLES
+ *
+ * # List all sitewide notices, and output only the IDs.
+ * $ wp bp notice list --format=ids
+ * 15 25 34 37 198
+ *
+ * # List all sitewide notices, and output the count.
+ * $ wp bp notice list --format=count
+ * 10
+ *
+ * # List all sitewide notices, and output the IDs.
+ * $ wp bp notice list --fields=id
+ * | id |
+ * | 66546 |
+ * | 54554 |
+ *
+ * @subcommand list
+ */
+ public function list_($args, $assoc_args)
+ {
+ }
+ }
+ /**
+ * Scaffold BuddyPress unit tests.
+ *
+ * ## EXAMPLE
+ *
+ * # Scaffold BuddyPress specific tests.
+ * $ wp bp scaffold tests sample-plugin
+ * Success: Created BuddyPress test files.
+ *
+ * @since 2.0
+ */
+ class Scaffold extends \Scaffold_Command
+ {
+ /**
+ * Default dependency check for a BuddyPress CLI command.
+ */
+ public static function check_dependencies()
+ {
+ }
+ /**
+ * Plugin scaffold command.
+ *
+ * ## OPTIONS
+ *
+ *
+ * : The slug of the BuddyPress plugin.
+ *
+ * [--force]
+ * : Whether to overwrite files.
+ *
+ * ## EXAMPLES
+ *
+ * # Scaffold BuddyPress specific tests.
+ * $ wp bp scaffold plugin sample-test
+ * Success: Created BuddyPress test files.
+ *
+ * # Scaffold BuddyPress specific tests.
+ * $ wp bp scaffold tests another-sample-test
+ * Success: Created BuddyPress test files.
+ *
+ * @subcommand tests
+ */
+ public function plugin($args, $assoc_args)
+ {
+ }
+ /**
+ * Checks that the `$target_dir` is a child directory of the WP themes or plugins directory, depending on `$type`.
+ *
+ * @param string $type "theme" or "plugin"
+ * @param string $target_dir The theme/plugin directory to check.
+ * @return null|string Returns null on success, error message on error.
+ */
+ public function check_target_directory($target_dir)
+ {
+ }
+ /**
+ * Canonicalizes a path.
+ *
+ * @param string $path Path.
+ * @return string
+ */
+ public static function canonicalize_path($path)
+ {
+ }
+ /**
+ * Gets the template path based on installation type.
+ *
+ * @return string Template path.
+ */
+ public static function get_template_path($template)
+ {
+ }
+ }
+ /**
+ * Manage BuddyPress Members.
+ *
+ * ## EXAMPLES
+ *
+ * # Generate 50 members.
+ * $ wp bp member generate --count=50
+ *
+ * # Add meta to every generated users.
+ * $ wp user generate --format=ids --count=3 | xargs -d ' ' -I % wp user meta add % foo bar
+ * Success: Added custom field.
+ * Success: Added custom field.
+ * Success: Added custom field.
+ *
+ * @since 1.0.0
+ */
+ class Member extends \Buddypress\CLI\Command\BuddyPressCommand
+ {
+ /**
+ * Generate BuddyPress members. See documentation for `wp_user_generate`.
+ *
+ * ## OPTIONS
+ *
+ * [--count=]
+ * : How many members to generate.
+ * ---
+ * default: 100
+ * ---
+ *
+ * [--role=]
+ * : The role of the generated users. Defaults to role from WP.
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: progress
+ * options:
+ * - progress
+ * - ids
+ * ---
+ *
+ * ## EXAMPLES
+ *
+ * # Generate 50 members.
+ * $ wp bp member generate --count=50
+ * Generating users 100% [======================] 0:00 / 0:00
+ *
+ * # Add meta to every generated users.
+ * $ wp user generate --format=ids --count=3 | xargs -d ' ' -I % wp user meta add % foo bar
+ * Success: Added custom field.
+ * Success: Added custom field.
+ * Success: Added custom field.
+ */
+ public function generate($args, $assoc_args)
+ {
+ }
+ /**
+ * Update the last user activity with a random date.
+ *
+ * @since 1.0
+ *
+ * @param int $user_id User ID.
+ */
+ public static function update_user_last_activity_random($user_id)
+ {
+ }
+ }
+ /**
+ * Manage BuddyPress group invites.
+ *
+ * ## EXAMPLES
+ *
+ * # Invite a member to a group.
+ * $ wp bp group invite add --group-id=40 --user-id=10 --inviter-id=1331
+ * Success: Member invited to the group.
+ *
+ * # Invite a member to a group.
+ * $ wp bp group invite create --group-id=40 --user-id=user_slug --inviter-id=804
+ * Success: Member invited to the group.
+ *
+ * @since 1.5.0
+ */
+ class Group_Invite extends \Buddypress\CLI\Command\BuddyPressCommand
+ {
+ /**
+ * Group ID Object Key
+ *
+ * @var string
+ */
+ protected $obj_id_key = 'group_id';
+ /**
+ * Group Object Type
+ *
+ * @var string
+ */
+ protected $obj_type = 'group';
+ /**
+ * Invite a member to a group.
+ *
+ * ## OPTIONS
+ *
+ * --group-id=
+ * : Identifier for the group. Accepts either a slug or a numeric ID.
+ *
+ * --user-id=
+ * : Identifier for the user. Accepts either a user_login or a numeric ID.
+ *
+ * --inviter-id=
+ * : Identifier for the inviter. Accepts either a user_login or a numeric ID.
+ *
+ * [--message=]
+ * : Message to send with the invitation.
+ *
+ * [--porcelain]
+ * : Return only the invitation id.
+ *
+ * [--silent]
+ * : Whether to silent the invite creation.
+ *
+ * ## EXAMPLES
+ *
+ * # Invite a member to a group.
+ * $ wp bp group invite add --group-id=40 --user-id=10 --inviter-id=1331
+ * Success: Member invited to the group.
+ *
+ * # Invite a member to a group.
+ * $ wp bp group invite create --group-id=40 --user-id=user_slug --inviter-id=804
+ * Success: Member invited to the group.
+ *
+ * @alias add
+ */
+ public function create($args, $assoc_args)
+ {
+ }
+ /**
+ * Uninvite a user from a group.
+ *
+ * ## OPTIONS
+ *
+ * --group-id=
+ * : Identifier for the group. Accepts either a slug or a numeric ID.
+ *
+ * --user-id=
+ * : Identifier for the user. Accepts either a user_login or a numeric ID.
+ *
+ * ## EXAMPLES
+ *
+ * # Uninvite a user from a group.
+ * $ wp bp group invite uninvite --group-id=3 --user-id=10
+ * Success: User uninvited from the group.
+ *
+ * # Uninvite a user from a group.
+ * $ wp bp group invite uninvite --group-id=foo --user-id=admin
+ * Success: User uninvited from the group.
+ */
+ public function uninvite($args, $assoc_args)
+ {
+ }
+ /**
+ * Get a list of invitations from a group.
+ *
+ * ## OPTIONS
+ *
+ * --group-id=
+ * : Identifier for the group. Accepts either a slug or a numeric ID.
+ *
+ * --user-id=
+ * : Identifier for the user. Accepts either a user_login or a numeric ID.
+ *
+ * [--count=]
+ * : How many invitations to list.
+ * ---
+ * default: 50
+ * ---
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: table
+ * options:
+ * - table
+ * - csv
+ * - ids
+ * - json
+ * - count
+ * - yaml
+ * ---
+ *
+ * ## EXAMPLE
+ *
+ * # Get a list of invitations from a group.
+ * $ wp bp group invite list --group-id=56 --user-id=30
+ *
+ * @subcommand list
+ */
+ public function list_($args, $assoc_args)
+ {
+ }
+ /**
+ * Generate group invitations.
+ *
+ * ## OPTIONS
+ *
+ * [--count=]
+ * : How many group invitations to generate.
+ * ---
+ * default: 100
+ * ---
+ *
+ * [--user-id=]
+ * : ID of the first user. Accepts either a user_login or a numeric ID.
+ *
+ * [--inviter-id=]
+ * : ID for the inviter. Accepts either a user_login or a numeric ID.
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: progress
+ * options:
+ * - progress
+ * - ids
+ * ---
+ *
+ * ## EXAMPLES
+ *
+ * # Generate random group invitations.
+ * $ wp bp group invite generate --count=50
+ * Generating group invitations 100% [======================] 0:00 / 0:00
+ *
+ * # Generate random group invitations with a specific user.
+ * $ wp bp group invite generate --inviter-id=121 --count=5
+ * Generating group invitations 100% [======================] 0:00 / 0:00
+ *
+ * # Generate 5 random group invitations and output only the IDs.
+ * $ wp bp group invite generate --count=5 --format=ids
+ * 70 71 72 73 74
+ */
+ public function generate($args, $assoc_args)
+ {
+ }
+ /**
+ * Accept a group invitation.
+ *
+ * ## OPTIONS
+ *
+ * --group-id=
+ * : Identifier for the group. Accepts either a slug or a numeric ID.
+ *
+ * --user-id=
+ * : Identifier for the user. Accepts either a user_login or a numeric ID.
+ *
+ * ## EXAMPLES
+ *
+ * # Accept a group invitation.
+ * $ wp bp group invite accept --group-id=3 --user-id=10
+ * Success: User is now a "member" of the group.
+ *
+ * # Accept a group invitation.
+ * $ wp bp group invite accept --group-id=foo --user-id=admin
+ * Success: User is now a "member" of the group.
+ */
+ public function accept($args, $assoc_args)
+ {
+ }
+ /**
+ * Reject a group invitation.
+ *
+ * ## OPTIONS
+ *
+ * --group-id=
+ * : Identifier for the group. Accepts either a slug or a numeric ID.
+ *
+ * --user-id=
+ * : Identifier for the user. Accepts either a user_login or a numeric ID.
+ *
+ * ## EXAMPLES
+ *
+ * # Reject a group invitation.
+ * $ wp bp group invite reject --group-id=3 --user-id=10
+ * Success: Member invitation rejected.
+ *
+ * # Reject a group invitation.
+ * $ wp bp group invite reject --group-id=foo --user-id=admin
+ * Success: Member invitation rejected.
+ */
+ public function reject($args, $assoc_args)
+ {
+ }
+ /**
+ * Delete a group invitation.
+ *
+ * ## OPTIONS
+ *
+ * --group-id=
+ * : Identifier for the group. Accepts either a slug or a numeric ID.
+ *
+ * --user-id=
+ * : Identifier for the user. Accepts either a user_login or a numeric ID.
+ *
+ * [--yes]
+ * : Answer yes to the confirmation message.
+ *
+ * ## EXAMPLES
+ *
+ * # Delete a group invitation.
+ * $ wp bp group invite delete --group-id=3 --user-id=10 --yes
+ * Success: Group invitation deleted.
+ *
+ * # Delete a group invitation.
+ * $ wp bp group invite delete --group-id=foo --user-id=admin --yes
+ * Success: Group invitation deleted.
+ *
+ * @alias delete
+ * @alias trash
+ */
+ public function delete($args, $assoc_args)
+ {
+ }
+ }
+ /**
+ * Manage BuddyPress group members.
+ *
+ * ## EXAMPLES
+ *
+ * # Add a user to a group as a member.
+ * $ wp bp group member add --group-id=3 --user-id=10
+ * Success: Added user #3 to group #3 as member.
+ *
+ * # Add a user to a group as a mod.
+ * $ wp bp group member create --group-id=bar --user-id=20 --role=mod
+ * Success: Added user #20 to group #45 as mod.
+ *
+ * @since 1.5.0
+ */
+ class Group_Member extends \Buddypress\CLI\Command\BuddyPressCommand
+ {
+ /**
+ * Group ID Object Key
+ *
+ * @var string
+ */
+ protected $obj_id_key = 'group_id';
+ /**
+ * Group Object Type
+ *
+ * @var string
+ */
+ protected $obj_type = 'group';
+ /**
+ * Add a member to a group.
+ *
+ * ## OPTIONS
+ *
+ * --group-id=
+ * : Identifier for the group. Accepts either a slug or a numeric ID.
+ *
+ * --user-id=
+ * : Identifier for the user. Accepts either a user_login or a numeric ID.
+ *
+ * [--role=]
+ * : Group member role (member, mod, admin).
+ * ---
+ * default: member
+ * options:
+ * - member
+ * - mod
+ * - admin
+ * ---
+ *
+ * ## EXAMPLES
+ *
+ * # Add a user to a group as a member.
+ * $ wp bp group member add --group-id=3 --user-id=10
+ * Success: Added user #3 to group #3 as member.
+ *
+ * # Add a user to a group as a moderator.
+ * $ wp bp group member create --group-id=bar --user-id=20 --role=mod
+ * Success: Added user #20 to group #45 as mod.
+ *
+ * @alias add
+ */
+ public function create($args, $assoc_args)
+ {
+ }
+ /**
+ * Remove a member from a group.
+ *
+ * ## OPTIONS
+ *
+ * --group-id=
+ * : Identifier for the group. Accepts either a slug or a numeric ID.
+ *
+ * --user-id=
+ * : Identifier for the user. Accepts either a user_login or a numeric ID.
+ *
+ * ## EXAMPLES
+ *
+ * # Remove a member from a group.
+ * $ wp bp group member remove --group-id=3 --user-id=10
+ * Success: Member #10 removed from the group #3.
+ *
+ * # Remove a member from a group.
+ * $ wp bp group member delete --group-id=foo --user-id=admin
+ * Success: Member #545 removed from the group #12.
+ *
+ * @alias remove
+ * @alias trash
+ */
+ public function delete($args, $assoc_args)
+ {
+ }
+ /**
+ * Get a list of group memberships.
+ *
+ * This command can be used to fetch a list of a user's groups (using the --user-id
+ * parameter) or a group's members (using the --group-id flag).
+ *
+ * ## OPTIONS
+ *
+ *
+ * : Identifier for the group. Can be a numeric ID or the group slug.
+ *
+ * [--fields=]
+ * : Limit the output to specific signup fields.
+ *
+ * [--=]
+ * : One or more parameters to pass. See groups_get_group_members()
+ *
+ * [--role=]
+ * : Limit the output to members with a specific role.
+ * ---
+ * default: members
+ * options:
+ * - members
+ * - mod
+ * - admin
+ * - banned
+ * ---
+ *
+ * [--count=]
+ * : How many members to list.
+ * ---
+ * default: 50
+ * ---
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: table
+ * options:
+ * - table
+ * - csv
+ * - ids
+ * - json
+ * - count
+ * - yaml
+ * ---
+ *
+ * ## AVAILABLE FIELDS
+ *
+ * These fields will be displayed by default for each group member:
+ *
+ * * id
+ * * user_login
+ * * fullname
+ * * date_modified
+ * * role
+ *
+ * ## EXAMPLE
+ *
+ * # Get a list of group members.
+ * $ wp bp group member list 3
+ * +---------+------------+----------+---------------------+-------+
+ * | id | user_login | fullname | date_modified | role |
+ * +---------+------------+----------+---------------------+-------+
+ * | 1 | user | User | 2022-07-04 02:12:02 | admin |
+ * +---------+------------+----------+---------------------+-------+
+ *
+ * # Get a list of group members and get the count.
+ * $ wp bp group member list 65465 --format=count
+ * 100
+ *
+ * @subcommand list
+ */
+ public function list_($args, $assoc_args)
+ {
+ }
+ /**
+ * Promote a member to a new status within a group.
+ *
+ * ## OPTIONS
+ *
+ * --group-id=
+ * : Identifier for the group. Accepts either a slug or a numeric ID.
+ *
+ * --user-id=
+ * : Identifier for the user. Accepts either a user_login or a numeric ID.
+ *
+ * --role=
+ * : Group role to promote the member.
+ * ---
+ * options:
+ * - mod
+ * - admin
+ * ---
+ *
+ * ## EXAMPLES
+ *
+ * # Promote a member to a new role.
+ * $ wp bp group member promote --group-id=3 --user-id=10 --role=admin
+ * Success: Member promoted to new role successfully.
+ *
+ * # Promote a member to a new role.
+ * $ wp bp group member promote --group-id=foo --user-id=admin --role=mod
+ * Success: Member promoted to new role successfully.
+ */
+ public function promote($args, $assoc_args)
+ {
+ }
+ /**
+ * Demote user to the 'member' status.
+ *
+ * ## OPTIONS
+ *
+ * --group-id=
+ * : Identifier for the group. Accepts either a slug or a numeric ID.
+ *
+ * --user-id=
+ * : Identifier for the user. Accepts either a user_login or a numeric ID.
+ *
+ * ## EXAMPLES
+ *
+ * # Demote a user to the "member" status using numeric IDs.
+ * $ wp bp group member demote --group-id=3 --user-id=10
+ * Success: User demoted to the "member" status.
+ *
+ * # Demote a user to the "member" status using slugs.
+ * $ wp bp group member demote --group-id=foo --user-id=admin
+ * Success: User demoted to the "member" status.
+ *
+ * # Demote a user not part of the group.
+ * $ wp bp group member demote --group-id=foo --user-id=admin
+ * Error: User is not a member of the group.
+ */
+ public function demote($args, $assoc_args)
+ {
+ }
+ /**
+ * Ban a member from a group.
+ *
+ * ## OPTIONS
+ *
+ * --group-id=
+ * : Identifier for the group. Accepts either a slug or a numeric ID.
+ *
+ * --user-id=
+ * : Identifier for the user. Accepts either a user_login or a numeric ID.
+ *
+ * ## EXAMPLES
+ *
+ * # Ban a member from a group.
+ * $ wp bp group member ban --group-id=3 --user-id=10
+ * Success: Member banned from the group.
+ *
+ * # Ban a member from a group.
+ * $ wp bp group member ban --group-id=foo --user-id=admin
+ * Success: Member banned from the group.
+ */
+ public function ban($args, $assoc_args)
+ {
+ }
+ /**
+ * Unban a member from a group.
+ *
+ * ## OPTIONS
+ *
+ * --group-id=
+ * : Identifier for the group. Accepts either a slug or a numeric ID.
+ *
+ * --user-id=
+ * : Identifier for the user. Accepts either a user_login or a numeric ID.
+ *
+ * ## EXAMPLES
+ *
+ * # Unban a member from a group.
+ * $ wp bp group member unban --group-id=3 --user-id=10
+ * Success: Member unbanned from the group.
+ *
+ * # Unban a member from a group.
+ * $ wp bp group member unban --group-id=foo --user-id=admin
+ * Success: Member unbanned from the group.
+ */
+ public function unban($args, $assoc_args)
+ {
+ }
+ }
+ /**
+ * Fetch a BuddyPress group based on one of its attributes.
+ */
+ class Group_Fetcher extends \WP_CLI\Fetchers\Base
+ {
+ /**
+ * @var string $msg Error message to use when invalid data is provided.
+ */
+ protected $msg = 'Could not find the group with ID %d.';
+ /**
+ * Get a group ID from its identifier (ID or slug).
+ *
+ * @param int|string $arg Group ID or slug.
+ * @return BP_Groups_Group|bool
+ */
+ public function get($arg)
+ {
+ }
+ }
+ /**
+ * Adds, updates, deletes, and lists group custom fields.
+ *
+ * ## EXAMPLES
+ *
+ * # Set group meta
+ * $ wp bp group meta set 123 description "Mary is a Group user."
+ * Success: Updated custom field 'description'.
+ *
+ * # Get group meta
+ * $ wp bp group meta get 123 description
+ * Mary is a Group user.
+ *
+ * # Update group meta
+ * $ wp bp group meta update 123 description "Mary is an awesome Group user."
+ * Success: Updated custom field 'description'.
+ *
+ * # List group meta.
+ * $ wp bp group meta list 123
+ *
+ * # Delete group meta
+ * $ wp bp group meta delete 123 description
+ * Success: Deleted custom field.
+ *
+ * @since 2.0.0
+ */
+ class Group_Meta extends \WP_CLI\CommandWithMeta
+ {
+ protected $meta_type = 'group';
+ /**
+ * Wrapper method for add_metadata that can be overridden in sub classes.
+ *
+ * @param int $object_id ID of the object the metadata is for.
+ * @param string $meta_key Metadata key to use.
+ * @param mixed $meta_value Metadata value. Must be serializable if
+ * non-scalar.
+ * @param bool $unique Optional, default is false. Whether the
+ * specified metadata key should be unique for the
+ * object. If true, and the object already has a
+ * value for the specified metadata key, no change
+ * will be made.
+ *
+ * @return int|false The meta ID on success, false on failure.
+ */
+ protected function add_metadata($object_id, $meta_key, $meta_value, $unique = false)
+ {
+ }
+ /**
+ * Wrapper method for update_metadata that can be overridden in sub classes.
+ *
+ * @param int $object_id ID of the object the metadata is for.
+ * @param string $meta_key Metadata key to use.
+ * @param mixed $meta_value Metadata value. Must be serializable if
+ * non-scalar.
+ * @param mixed $prev_value Optional. If specified, only update existing
+ * metadata entries with the specified value.
+ * Otherwise, update all entries.
+ *
+ * @return int|bool Meta ID if the key didn't exist, true on successful
+ * update, false on failure.
+ */
+ protected function update_metadata($object_id, $meta_key, $meta_value, $prev_value = '')
+ {
+ }
+ /**
+ * Wrapper method for get_metadata that can be overridden in sub classes.
+ *
+ * @param int $object_id ID of the object the metadata is for.
+ * @param string $meta_key Optional. Metadata key. If not specified,
+ * retrieve all metadata for the specified object.
+ * @param bool $single Optional, default is false. If true, return only
+ * the first value of the specified meta_key. This
+ * parameter has no effect if meta_key is not
+ * specified.
+ *
+ * @return mixed Single metadata value, or array of values.
+ */
+ protected function get_metadata($object_id, $meta_key = '', $single = true)
+ {
+ }
+ /**
+ * Wrapper method for delete_metadata that can be overridden in sub classes.
+ *
+ * @param int $object_id ID of the object metadata is for
+ * @param string $meta_key Metadata key
+ * @param mixed $meta_value Optional. Metadata value. Must be serializable
+ * if non-scalar. If specified, only delete
+ * metadata entries with this value. Otherwise,
+ * delete all entries with the specified meta_key.
+ * Pass `null, `false`, or an empty string to skip
+ * this check. For backward compatibility, it is
+ * not possible to pass an empty string to delete
+ * those entries with an empty string for a value.
+ *
+ * @return bool True on successful delete, false on failure.
+ */
+ protected function delete_metadata($object_id, $meta_key, $meta_value = '')
+ {
+ }
+ /**
+ * Check that the group ID exists.
+ *
+ * @param int $object_id Object ID.
+ * @return int
+ */
+ protected function check_object_id($object_id)
+ {
+ }
+ }
+ /**
+ * Manage BuddyPress Friends.
+ *
+ * ## EXAMPLES
+ *
+ * $ wp bp friend create user1 another_use
+ * Success: Friendship successfully created.
+ *
+ * $ wp bp friend create user1 another_use --force-accept
+ * Success: Friendship successfully created.
+ *
+ * @since 1.6.0
+ */
+ class Friends extends \Buddypress\CLI\Command\BuddyPressCommand
+ {
+ /**
+ * Object fields.
+ *
+ * @var array
+ */
+ protected $obj_fields = ['id', 'initiator_user_id', 'friend_user_id', 'is_confirmed', 'is_limited'];
+ /**
+ * Dependency check for this CLI command.
+ */
+ public static function check_dependencies()
+ {
+ }
+ /**
+ * Create a new friendship.
+ *
+ * ## OPTIONS
+ *
+ *
+ * : ID of the user who is sending the friendship request. Accepts either a user_login or a numeric ID.
+ *
+ *
+ * : ID of the user whose friendship is being requested. Accepts either a user_login or a numeric ID.
+ *
+ * [--force-accept]
+ * : Whether to force acceptance.
+ *
+ * [--silent]
+ * : Whether to silent the message creation.
+ *
+ * [--porcelain]
+ * : Return only the friendship id.
+ *
+ * ## EXAMPLES
+ *
+ * # Create a new friendship.
+ * $ wp bp friend create user1 another_use
+ * Success: Friendship successfully created.
+ *
+ * # Create a new friendship, forcing acceptance.
+ * $ wp bp friend create user1 another_use --force-accept
+ * Success: Friendship successfully created.
+ *
+ * @alias add
+ */
+ public function create($args, $assoc_args)
+ {
+ }
+ /**
+ * Remove a friendship.
+ *
+ * ## OPTIONS
+ *
+ *
+ * : ID of the friendship initiator. Accepts either a user_login or a numeric ID.
+ *
+ *
+ * : ID of the friend user. Accepts either a user_login or a numeric ID.
+ *
+ * ## EXAMPLE
+ *
+ * # Remove a friendship.
+ * $ wp bp friend remove user_1 user_2
+ * Success: Friendship successfully removed.
+ *
+ * @alias remove
+ * @alias trash
+ */
+ public function delete($args)
+ {
+ }
+ /**
+ * Mark a friendship request as accepted.
+ *
+ * ## OPTIONS
+ *
+ * ...
+ * : ID(s) of the friendship(s).
+ *
+ * ## EXAMPLES
+ *
+ * $ wp bp friend accept-invitation 2161
+ * Success: Friendship successfully accepted.
+ *
+ * $ wp bp friend accept 2161
+ * Success: Friendship successfully accepted.
+ *
+ * @alias accept-invitation
+ */
+ public function accept($args, $assoc_args)
+ {
+ }
+ /**
+ * Mark a friendship request as rejected.
+ *
+ * ## OPTIONS
+ *
+ * ...
+ * : ID(s) of the friendship(s).
+ *
+ * ## EXAMPLES
+ *
+ * $ wp bp friend reject-invitation 2161
+ * Success: Friendship successfully accepted.
+ *
+ * $ wp bp friend reject 2161 151 2121
+ * Success: Friendship successfully accepted.
+ *
+ * @alias reject-invitation
+ */
+ public function reject($args, $assoc_args)
+ {
+ }
+ /**
+ * Check whether two users are friends.
+ *
+ * ## OPTIONS
+ *
+ *
+ * : ID of the first user. Accepts either a user_login or a numeric ID.
+ *
+ *
+ * : ID of the other user. Accepts either a user_login or a numeric ID.
+ *
+ * ## EXAMPLES
+ *
+ * $ wp bp friend check 2161 65465
+ * Success: Yes, they are friends.
+ *
+ * $ wp bp friend see 2121 65456
+ * Success: Yes, they are friends.
+ *
+ * @alias see
+ */
+ public function check($args)
+ {
+ }
+ /**
+ * Get a list of user's friends.
+ *
+ * ## OPTIONS
+ *
+ *
+ * : ID of the user. Accepts either a user_login or a numeric ID.
+ *
+ * [--fields=]
+ * : Fields to display.
+ *
+ * [--count=]
+ * : How many user's friends to list.
+ * ---
+ * default: 50
+ * ---
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: table
+ * options:
+ * - table
+ * - ids
+ * - count
+ * - csv
+ * - json
+ * - yaml
+ * ---
+ *
+ * ## EXAMPLES
+ *
+ * # List a user's friends and get the count.
+ * $ wp bp friend list 65465 --format=count
+ * 100
+ *
+ * # List a user's friends and get the IDs.
+ * $ wp bp friend list 2422 --format=ids
+ * 70 71 72 73 74
+ *
+ * @subcommand list
+ */
+ public function list_($args, $assoc_args)
+ {
+ }
+ /**
+ * Generate random friendships.
+ *
+ * ## OPTIONS
+ *
+ * [--initiator=]
+ * : ID of the first user. Accepts either a user_login or a numeric ID.
+ *
+ * [--friend=]
+ * : ID of the second user. Accepts either a user_login or a numeric ID.
+ *
+ * [--count=]
+ * : How many friendships to generate.
+ * ---
+ * default: 100
+ * ---
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: progress
+ * options:
+ * - progress
+ * - ids
+ * ---
+ *
+ * ## EXAMPLES
+ *
+ * # Generate 50 random friendships.
+ * $ wp bp friend generate --count=50
+ * Generating friendships 100% [======================] 0:00 / 0:00
+ *
+ * # Generate 50 friendships with a specific user.
+ * $ wp bp friend generate --initiator=121 --count=50
+ * Generating friendships 100% [======================] 0:00 / 0:00
+ *
+ * # Generate 5 random friendships and output only the IDs.
+ * $ wp bp friend generate --count=5 --format=ids
+ * 70 71 72 73 74
+ */
+ public function generate($args, $assoc_args)
+ {
+ }
+ }
+ /**
+ * Manage XProfile Fields.
+ *
+ * @since 1.5.0
+ */
+ class XProfile_Field extends \Buddypress\CLI\Command\BuddyPressCommand
+ {
+ /**
+ * XProfile object fields.
+ *
+ * @var array
+ */
+ protected $obj_fields = ['id', 'name', 'description', 'type', 'group_id', 'is_required'];
+ /**
+ * Get a list of XProfile fields.
+ *
+ * ## OPTIONS
+ *
+ * [--=]
+ * : One or more parameters to pass. See bp_xprofile_get_groups()
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: table
+ * options:
+ * - table
+ * - csv
+ * - ids
+ * - json
+ * - count
+ * - yaml
+ * ---
+ *
+ * * ## AVAILABLE FIELDS
+ *
+ * These fields will be displayed by default for each field:
+ *
+ * * id
+ * * name
+ * * description
+ * * type
+ * * group_id
+ * * is_required
+ *
+ * ## EXAMPLE
+ *
+ * # List XProfile fields.
+ * $ wp bp xprofile field list
+ * +----+------+-------------+---------+----------+-------------+
+ * | id | name | description | type | group_id | is_required |
+ * +----+------+-------------+---------+----------+-------------+
+ * | 1 | Name | | textbox | 1 | 1 |
+ * +----+------+-------------+---------+----------+-------------+
+ *
+ * @subcommand list
+ */
+ public function list_($args, $assoc_args)
+ {
+ }
+ /**
+ * Create a XProfile field.
+ *
+ * ## OPTIONS
+ *
+ * --field-group-id=
+ * : ID of the field group where the new field will be created.
+ *
+ * --name=
+ * : Name of the new field.
+ *
+ * [--type=]
+ * : Field type.
+ * ---
+ * default: textbox
+ * ---
+ *
+ * [--silent]
+ * : Whether to silent the XProfile field creation.
+ *
+ * [--porcelain]
+ * : Output just the new field id.
+ *
+ * ## EXAMPLES
+ *
+ * # Create a XProfile field.
+ * $ wp bp xprofile field create --type=checkbox --field-group-id=508 --name="Field Name"
+ * Success: Created XProfile field "Field Name" (ID 24564).
+ *
+ * # Create a XProfile field.
+ * $ wp bp xprofile field add --field-group-id=165 --name="Another Field"
+ * Success: Created XProfile field "Another Field" (ID 5465).
+ *
+ * @alias add
+ */
+ public function create($args, $assoc_args)
+ {
+ }
+ /**
+ * Get an XProfile field.
+ *
+ * ## OPTIONS
+ *
+ *
+ * : Identifier for the field. Accepts either the name of the field or a numeric ID.
+ *
+ * [--fields=]
+ * : Limit the output to specific fields.
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: table
+ * options:
+ * - table
+ * - json
+ * - csv
+ * - yaml
+ * ---
+ *
+ * ## EXAMPLES
+ *
+ * # Get a xprofile field.
+ * $ wp bp xprofile field get 500
+ *
+ * # Get a xprofile field in JSON format.
+ * $ wp bp xprofile field see 56 --format=json
+ *
+ * @alias see
+ */
+ public function get($args, $assoc_args)
+ {
+ }
+ /**
+ * Delete an XProfile field.
+ *
+ * ## OPTIONS
+ *
+ * ...
+ * : ID or IDs for the field. Accepts either the name of the field or a numeric ID.
+ *
+ * [--delete-data]
+ * : Delete user data for the field as well.
+ *
+ * [--yes]
+ * : Answer yes to the confirmation message.
+ *
+ * ## EXAMPLES
+ *
+ * # Delete a field.
+ * $ wp bp xprofile field delete 500 --yes
+ * Success: Deleted XProfile field "Field Name" (ID 500).
+ *
+ * # Delete a field and its data.
+ * $ wp bp xprofile field remove 458 --delete-data --yes
+ * Success: Deleted XProfile field "Another Field Name" (ID 458).
+ *
+ * @alias remove
+ * @alias trash
+ */
+ public function delete($args, $assoc_args)
+ {
+ }
+ }
+ /**
+ * Manage BuddyPress Components.
+ *
+ * ## EXAMPLES
+ *
+ * # Activate a component.
+ * $ wp bp component activate groups
+ * Success: The Groups component has been activated.
+ *
+ * # Deactive a component.
+ * $ wp bp component deactivate groups
+ * Success: The Groups component has been deactivated.
+ *
+ * # List required components.
+ * $ wp bp component list --type=required
+ * +--------+---------+--------+------------------------+--------------------------------------------+
+ * | number | id | status | title | description |
+ * +--------+---------+--------+------------------------------------------+--------------------------+
+ * | 1 | core | Active | BuddyPress Core | It's what makes time travel |
+ * | | | | | BuddyPress possible! |
+ * | 2 | members | Active | Community Members | Everything in a BuddyPress community |
+ * | | | | | revolves around its members. |
+ * +--------+---------+--------+------------------------------------------+--------------------------+
+ *
+ * @since 1.6.0
+ */
+ class Components extends \Buddypress\CLI\Command\BuddyPressCommand
+ {
+ /**
+ * Object fields.
+ *
+ * @var array
+ */
+ protected $obj_fields = ['number', 'id', 'status', 'title', 'description'];
+ /**
+ * Activate a component.
+ *
+ * ## OPTIONS
+ *
+ *
+ * : Name of the component to activate.
+ *
+ * ## EXAMPLE
+ *
+ * # Activate a component.
+ * $ wp bp component activate groups
+ * Success: The Groups component has been activated.
+ */
+ public function activate($args)
+ {
+ }
+ /**
+ * Deactivate a component.
+ *
+ * ## OPTIONS
+ *
+ *
+ * : Name of the component to deactivate.
+ *
+ * ## EXAMPLE
+ *
+ * # Deactive a component.
+ * $ wp bp component deactivate groups
+ * Success: The Groups component has been deactivated.
+ */
+ public function deactivate($args)
+ {
+ }
+ /**
+ * Get a list of components.
+ *
+ * ## OPTIONS
+ *
+ * [--type=]
+ * : Type of the component (all, optional, retired, required).
+ * ---
+ * default: all
+ * options:
+ * - all
+ * - optional
+ * - retired
+ * - required
+ * ---
+ *
+ * [--status=]
+ * : Status of the component (all, active, inactive).
+ * ---
+ * default: all
+ * options:
+ * - all
+ * - active
+ * - inactive
+ * ---
+ *
+ * [--fields=]
+ * : Fields to display (id, title, description).
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: table
+ * options:
+ * - table
+ * - csv
+ * - ids
+ * - json
+ * - count
+ * - yaml
+ * ---
+ *
+ * ## EXAMPLES
+ *
+ * # List components and get the count.
+ * $ wp bp component list --format=count
+ * 10
+ *
+ * # List components and get the ids.
+ * $ wp bp component list --format=ids
+ * core members xprofile settings friends messages activity notifications groups
+ *
+ * # List components.
+ * $ wp bp component list
+ * +--------+---------------+--------+--------------------+---------------------------------------------------------------------------------+
+ * | number | id | status | title | description |
+ * +--------+---------------+--------+--------------------+---------------------------------------------------------------------------------+
+ * | 1 | core | active | BuddyPress Core | It‘s what makes time travel BuddyPress possible! |
+ * | 2 | members | active | Community Members | Everything in a BuddyPress community revolves around its members. |
+ * | 3 | xprofile | active | Extended Profiles | Customize your community with fully editable profile fields that allow your use |
+ * | | | | | rs to describe themselves. |
+ * | 4 | settings | active | Account Settings | Allow your users to modify their account and notification settings directly fro |
+ * | | | | | m within their profiles. |
+ * | 5 | friends | active | Friend Connections | Let your users make connections so they can track the activity of others and fo |
+ * | | | | | cus on the people they care about the most. |
+ * | 6 | messages | active | Private Messaging | Allow your users to talk to each other directly and in private. Not just limite |
+ * | | | | | d to one-on-one discussions, messages can be sent between any number of members |
+ * | | | | | . |
+ * | 7 | activity | active | Activity Streams | Global, personal, and group activity streams with threaded commenting, direct p |
+ * | | | | | osting, favoriting, and @mentions, all with full RSS feed and email notificatio |
+ * | | | | | n support. |
+ * | 8 | notifications | active | Notifications | Notify members of relevant activity with a toolbar bubble and/or via email, and |
+ * | | | | | allow them to customize their notification settings. |
+ * | 9 | groups | active | User Groups | Groups allow your users to organize themselves into specific public, private or |
+ * | | | | | hidden sections with separate activity streams and member listings. |
+ * | 10 | blogs | active | Site Tracking | Record activity for new sites, posts, and comments across your network. |
+ * +--------+---------------+--------+--------------------+---------------------------------------------------------------------------------+
+ *
+ * @subcommand list
+ */
+ public function list_($args, $assoc_args)
+ {
+ }
+ /**
+ * Does the component exist?
+ *
+ * @param string $component_key Component key.
+ * @return bool
+ */
+ protected function component_exists($component_key)
+ {
+ }
+ /**
+ * Verify Component Status.
+ *
+ * @since 1.7.0
+ *
+ * @param string $component_key Component key.
+ * @return string
+ */
+ protected function verify_component_status($component_key)
+ {
+ }
+ }
+ /**
+ * Fetch a BuddyPress activity based on one of its attributes.
+ *
+ * @since 2.0.0
+ */
+ class Activity_Fetcher extends \WP_CLI\Fetchers\Base
+ {
+ /**
+ * @var string $msg Error message to use when invalid data is provided.
+ */
+ protected $msg = 'Could not find the activity with ID %d.';
+ /**
+ * Get an activity ID.
+ *
+ * @param int $activity_id Activity ID.
+ * @return BP_Activity_Activity|bool
+ */
+ public function get($activity_id)
+ {
+ }
+ }
+ /**
+ * Manage BuddyPress Signups.
+ *
+ * ## EXAMPLES
+ *
+ * # Add a signup.
+ * $ wp bp signup create --user-login=test_user --user-email=teste@site.com
+ * Success: Successfully added new user signup (ID #345).
+ *
+ * # Activate a signup.
+ * $ wp bp signup activate ee48ec319fef3nn4
+ * Success: Signup activated, new user (ID #545).
+ *
+ * @since 1.5.0
+ */
+ class Signup extends \Buddypress\CLI\Command\BuddyPressCommand
+ {
+ /**
+ * Signup object fields.
+ *
+ * @var array
+ */
+ protected $obj_fields = ['id', 'user_name', 'user_login', 'user_email', 'registered', 'meta', 'activation_key', 'count_sent'];
+ /**
+ * Dependency check for this CLI command.
+ */
+ public static function check_dependencies()
+ {
+ }
+ /**
+ * Add a signup.
+ *
+ * ## OPTIONS
+ *
+ * [--user-login=]
+ * : User login for the signup.
+ *
+ * [--user-email=]
+ * : User email for the signup.
+ *
+ * [--activation-key=]
+ * : Activation key for the signup. If none is provided, a random one will be used.
+ *
+ * [--silent]
+ * : Whether to silent the signup creation.
+ *
+ * [--porcelain]
+ * : Output only the new signup id.
+ *
+ * ## EXAMPLES
+ *
+ * # Add a signup.
+ * $ wp bp signup create --user-login=test_user --user-email=teste@site.com
+ * Success: Successfully added new user signup (ID #345).
+ *
+ * @alias add
+ */
+ public function create($args, $assoc_args)
+ {
+ }
+ /**
+ * Get a signup.
+ *
+ * ## OPTIONS
+ *
+ *
+ * : Identifier for the signup. Can be a signup ID, an email address, or a user_login.
+ *
+ * [--match-field=]
+ * : Field to match the signup-id to. Use if there is ambiguity between, eg, signup ID and user_login.
+ * ---
+ * options:
+ * - signup_id
+ * - user_email
+ * - user_login
+ * ---
+ *
+ * [--fields=]
+ * : Limit the output to specific signup fields.
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: table
+ * options:
+ * - table
+ * - json
+ * - csv
+ * - yaml
+ * ---
+ *
+ * ## EXAMPLES
+ *
+ * # Get a signup.
+ * $ wp bp signup get 35 --fields=id,user_login,user_name,count_sent
+ * +------------+------------+
+ * | Field | Value |
+ * +------------+------------+
+ * | id | 35 |
+ * | user_login | user897616 |
+ * | user_name | Test user |
+ * | count_sent | 4 |
+ * +------------+------------+
+ */
+ public function get($args, $assoc_args)
+ {
+ }
+ /**
+ * Delete a signup.
+ *
+ * ## OPTIONS
+ *
+ * ...
+ * : ID or IDs of signup to delete.
+ *
+ * [--yes]
+ * : Answer yes to the confirmation message.
+ *
+ * ## EXAMPLES
+ *
+ * # Delete a signup.
+ * $ wp bp signup delete 520 --yes
+ * Success: Signup deleted 54565.
+ *
+ * # Delete multiple signups.
+ * $ wp bp signup delete 55654 54565 --yes
+ * Success: Signup deleted 55654.
+ * Success: Signup deleted 54565.
+ *
+ * @alias remove
+ * @alias trash
+ */
+ public function delete($args, $assoc_args)
+ {
+ }
+ /**
+ * Activate a signup.
+ *
+ * ## OPTIONS
+ *
+ *
+ * : Identifier for the signup. Can be a signup ID, an email address, or a user_login.
+ *
+ * ## EXAMPLES
+ *
+ * # Activate a signup.
+ * $ wp bp signup activate ee48ec319fef3nn4
+ * Success: Signup activated, new user (ID #545).
+ */
+ public function activate($args, $assoc_args)
+ {
+ }
+ /**
+ * Generate random signups.
+ *
+ * ## OPTIONS
+ *
+ * [--count=]
+ * : How many signups to generate.
+ * ---
+ * default: 100
+ * ---
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: progress
+ * options:
+ * - progress
+ * - ids
+ * ---
+ *
+ * ## EXAMPLES
+ *
+ * # Generate 50 random signups.
+ * $ wp bp signup generate --count=50
+ * Generating signups 100% [======================] 0:00 / 0:00
+ *
+ * # Generate 5 random signups and return their IDs.
+ * $ wp bp signup generate --count=5 --format=ids
+ * 70 71 72 73 74
+ */
+ public function generate($args, $assoc_args)
+ {
+ }
+ /**
+ * Resend activation e-mail to a newly registered user.
+ *
+ * ## OPTIONS
+ *
+ *
+ * : Identifier for the signup. Can be a signup ID, an email address, or a user_login.
+ *
+ * ## EXAMPLES
+ *
+ * # Resend activation e-mail to a newly registered user.
+ * $ wp bp signup resend test@example.com
+ * Success: Email sent successfully.
+ *
+ * @alias send
+ */
+ public function resend($args, $assoc_args)
+ {
+ }
+ /**
+ * Get a list of signups.
+ *
+ * ## OPTIONS
+ *
+ * [--=]
+ * : One or more parameters to pass. See \BP_Signup::get()
+ *
+ * [--fields=]
+ * : Fields to display.
+ *
+ * [--count=]
+ * : How many signups to list.
+ * ---
+ * default: 50
+ * ---
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: table
+ * options:
+ * - table
+ * - csv
+ * - ids
+ * - json
+ * - count
+ * - yaml
+ * ---
+ *
+ * ## EXAMPLES
+ *
+ * # List signups and get the IDs.
+ * $ wp bp signup list --format=ids
+ * 70 71 72 73 74
+ *
+ * # List 100 signups and return the count.
+ * $ wp bp signup list --count=100 --format=count
+ * 100
+ *
+ * # List active signups.
+ * $ wp bp signup list --active=1 --count=10
+ * 50
+ *
+ * @subcommand list
+ */
+ public function list_($args, $assoc_args)
+ {
+ }
+ /**
+ * Look up a signup by the provided identifier.
+ *
+ * @since 1.5.0
+ *
+ * @return mixed
+ */
+ protected function get_signup_by_identifier($identifier, $assoc_args)
+ {
+ }
+ }
+ /**
+ * Manage BuddyPress XProfile.
+ *
+ * ## EXAMPLES
+ *
+ * # Save a xprofile data to a user with its field and value.
+ * $ wp bp xprofile data set --user-id=45 --field-id=120 --value=test
+ * Success: Updated XProfile field "Field Name" (ID 120) with value "test" for user user_login (ID 45).
+ *
+ * # Create a xprofile group.
+ * $ wp bp xprofile group create --name="Group Name" --description="Xprofile Group Description"
+ * Success: Created XProfile field group "Group Name" (ID 123).
+ *
+ * # List xprofile fields.
+ * $ wp bp xprofile field list
+ * +----+------+-------------+---------+----------+-------------+
+ * | id | name | description | type | group_id | is_required |
+ * +----+------+-------------+---------+----------+-------------+
+ * | 1 | Name | | textbox | 1 | 1 |
+ * +----+------+-------------+---------+----------+-------------+
+ */
+ class XProfile extends \Buddypress\CLI\Command\BuddyPressCommand
+ {
+ /**
+ * Dependency check for this CLI command.
+ */
+ public static function check_dependencies()
+ {
+ }
+ }
+ /**
+ * Manage BuddyPress Activities.
+ *
+ * ## EXAMPLES
+ *
+ * # Create an activity marked as spam.
+ * $ wp bp activity create --is-spam=1
+ * Success: Successfully created new activity item (ID #5464)
+ *
+ * # Create an activity in a group.
+ * $ wp bp activity add --component=groups --item-id=2 --user-id=10
+ * Success: Successfully created new activity item (ID #48949)
+ *
+ * @since 1.5.0
+ */
+ class Activity extends \Buddypress\CLI\Command\BuddyPressCommand
+ {
+ /**
+ * Object fields.
+ *
+ * @var array
+ */
+ protected $obj_fields = ['id', 'user_id', 'component', 'type', 'action', 'item_id', 'primary_link', 'secondary_item_id', 'date_recorded', 'hide_sitewide', 'is_spam'];
+ /**
+ * Dependency check for this CLI command.
+ */
+ public static function check_dependencies()
+ {
+ }
+ /**
+ * Create an activity item.
+ *
+ * ## OPTIONS
+ *
+ * [--component=]
+ * : The component for the activity item (groups, activity, etc). If
+ * none is provided, a component will be randomly selected from the
+ * active components.
+ *
+ * [--type=]
+ * : Activity type (activity_update, group_created, etc). If none is
+ * provided, a type will be randomly chose from those natively
+ * associated with your .
+ *
+ * [--action=]
+ * : Action text (eg "Joe created a new group Foo"). If none is
+ * provided, one will be generated automatically based on other params.
+ *
+ * [--content=]
+ * : Activity content text. If none is provided, default text will be
+ * generated.
+ *
+ * [--primary-link=]
+ * : URL of the item, as used in RSS feeds. If none is provided, a URL
+ * will be generated based on passed parameters.
+ *
+ * [--user-id=]
+ * : ID of the user associated with the new item. If none is provided,
+ * a user will be randomly selected.
+ *
+ * [--item-id=]
+ * : ID of the associated item. If none is provided, one will be
+ * generated automatically, if your activity type requires it.
+ *
+ * [--secondary-item-id=]
+ * : ID of the secondary associated item. If none is provided, one will
+ * be generated automatically, if your activity type requires it.
+ *
+ * [--date-recorded=]
+ * : GMT timestamp, in Y-m-d h:i:s format.
+ *
+ * [--hide-sitewide=]
+ * : Whether to hide in sitewide streams.
+ *
+ * [--is-spam=]
+ * : Whether the item should be marked as spam.
+ *
+ * [--silent]
+ * : Whether to silent the activity creation.
+ *
+ * [--porcelain]
+ * : Output only the new activity id.
+ *
+ * ## EXAMPLES
+ *
+ * # Create an activity marked as spam.
+ * $ wp bp activity create --is-spam=1
+ * Success: Successfully created new activity item (ID #5464)
+ *
+ * # Create an activity.
+ * $ wp bp activity add --component=groups --item-id=564 --user-id=10
+ * Success: Successfully created new activity item (ID #48949)
+ *
+ * @alias add
+ */
+ public function create($args, $assoc_args)
+ {
+ }
+ /**
+ * Retrieve a list of activities.
+ *
+ * ## OPTIONS
+ *
+ * [--=]
+ * : One or more parameters to pass to \BP_Activity_Activity::get()
+ *
+ * [--user-id=]
+ * : Limit activities to a specific user id. Accepts a numeric ID.
+ *
+ * [--component=]
+ * : Limit activities to a specific or certain components.
+ *
+ * [--type=]
+ * : Type of the activity. Ex.: activity_update, profile_updated.
+ *
+ * [--primary-id=]
+ * : Object ID to filter the activities. Ex.: group_id or forum_id or blog_id, etc.
+ *
+ * [--secondary-id=]
+ * : Secondary object ID to filter the activities. Ex.: a post_id.
+ *
+ * [--count=]
+ * : How many activities to list.
+ * ---
+ * default: 50
+ * ---
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: table
+ * options:
+ * - table
+ * - csv
+ * - ids
+ * - json
+ * - count
+ * - yaml
+ * ---
+ *
+ * ## AVAILABLE FIELDS
+ *
+ * These fields will be displayed by default for each activity:
+ *
+ * * id
+ * * user_id
+ * * component
+ * * type
+ * * action
+ * * content
+ * * item_id
+ * * secondary_item_id
+ * * primary_link
+ * * date_recorded
+ * * is_spam
+ * * user_email
+ * * user_nicename
+ * * user_login
+ * * display_name
+ * * user_fullname
+ *
+ * ## EXAMPLES
+ *
+ * # List activities and get the count.
+ * $ wp bp activity list --format=count
+ * 100
+ *
+ * # List activities and get the IDs.
+ * $ wp bp activity list --format=ids
+ * 70 71 72 73 74
+ *
+ * @subcommand list
+ */
+ public function list_($args, $assoc_args)
+ {
+ }
+ /**
+ * Generate random activity items.
+ *
+ * ## OPTIONS
+ *
+ * [--count=]
+ * : How many activities to generate.
+ * ---
+ * default: 100
+ * ---
+ *
+ * [--skip-activity-comments=]
+ * : Whether to skip activity comments. Recording activity_comment
+ * items requires a resource-intensive tree rebuild.
+ * ---
+ * default: 1
+ * ---
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: progress
+ * options:
+ * - progress
+ * - ids
+ * ---
+ *
+ * ## EXAMPLES
+ *
+ * # Generate 5 activity items.
+ * $ wp bp activity generate --count=5
+ * Generating activities 100% [======================] 0:00 / 0:00
+ *
+ * # Generate 5 activity items and output only the IDs.
+ * $ wp bp activity generate --count=5 --format=ids
+ * 70 71 72 73 74
+ */
+ public function generate($args, $assoc_args)
+ {
+ }
+ /**
+ * Fetch specific activity.
+ *
+ * ## OPTIONS
+ *
+ *
+ * : Identifier for the activity.
+ *
+ * [--fields=]
+ * : Limit the output to specific fields.
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: table
+ * options:
+ * - table
+ * - json
+ * - csv
+ * - yaml
+ * ---
+ *
+ * ## EXAMPLE
+ *
+ * # Get activity by ID.
+ * $ wp bp activity get 58
+ * +-------------------+----------------------------------------------------------------------------------------------+
+ * | Field | Value |
+ * +-------------------+----------------------------------------------------------------------------------------------+
+ * | id | 58 |
+ * | user_id | 7 |
+ * | component | xprofile |
+ * | type | updated_profile |
+ * | action | User 4's profile was updated |
+ * | content | Here is some random text |
+ * | primary_link | |
+ * | item_id | 0 |
+ * | secondary_item_id | 0 |
+ * | date_recorded | 2024-02-08 01:53:59 |
+ * | hide_sitewide | 0 |
+ * | mptt_left | 0 |
+ * | mptt_right | 0 |
+ * | is_spam | 0 |
+ * | user_email | |
+ * | user_nicename | user_1_4 |
+ * | user_login | user_1_4 |
+ * | display_name | User 4 |
+ * | user_fullname | User 4 |
+ * | children | [] |
+ * | url | https://wp.test/activity/p/58/ |
+ * +-------------------+----------------------------------------------------------------------------------------------+
+ *
+ * @alias see
+ */
+ public function get($args, $assoc_args)
+ {
+ }
+ /**
+ * Delete an activity.
+ *
+ * ## OPTIONS
+ *
+ * ...
+ * : ID or IDs of activities to delete.
+ *
+ * [--yes]
+ * : Answer yes to the confirmation message.
+ *
+ * ## EXAMPLES
+ *
+ * # Delete an activity.
+ * $ wp bp activity delete 958695 --yes
+ * Success: Deleted activity 958695.
+ *
+ * # Delete multiple activities.
+ * $ wp bp activity delete 500 600 --yes
+ * Success: Deleted activity 500.
+ * Success: Deleted activity 600.
+ *
+ * @alias remove
+ * @alias trash
+ */
+ public function delete($args, $assoc_args)
+ {
+ }
+ /**
+ * Spam an activity.
+ *
+ * ## OPTIONS
+ *
+ *
+ * : Identifier for the activity.
+ *
+ * ## EXAMPLES
+ *
+ * # Spam an activity.
+ * $ wp bp activity spam 500
+ * Success: Activity marked as spam.
+ *
+ * # Spam an activity.
+ * $ wp bp activity unham 165165
+ * Success: Activity marked as spam.
+ *
+ * @alias unham
+ */
+ public function spam($args)
+ {
+ }
+ /**
+ * Ham an activity.
+ *
+ * ## OPTIONS
+ *
+ *
+ * : Identifier for the activity.
+ *
+ * ## EXAMPLES
+ *
+ * # Mark an activity as ham.
+ * $ wp bp activity ham 500
+ * Success: Activity marked as ham.
+ *
+ * # Mark an activity as ham.
+ * $ wp bp activity unspam 4679
+ * Success: Activity marked as ham.
+ *
+ * @alias unspam
+ */
+ public function ham($args)
+ {
+ }
+ /**
+ * Post an activity update.
+ *
+ * ## OPTIONS
+ *
+ * --user-id=
+ * : ID of the user.
+ *
+ * --content=
+ * : Activity content text.
+ *
+ * [--silent]
+ * : Whether to silent the activity update.
+ *
+ * [--porcelain]
+ * : Output only the new activity id.
+ *
+ * ## EXAMPLES
+ *
+ * # Post an activity update.
+ * $ wp bp activity post-update --user-id=50 --content="Content to update"
+ * Success: Successfully updated with a new activity item (ID #13165)
+ *
+ * # Post an activity update.
+ * $ wp bp activity post-update --user-id=140
+ * Success: Successfully updated with a new activity item (ID #4548)
+ *
+ * @alias post-update
+ */
+ public function post_update($args, $assoc_args)
+ {
+ }
+ /**
+ * Add an activity comment.
+ *
+ * ## OPTIONS
+ *
+ *
+ * : ID of the activity to add the comment.
+ *
+ * --user-id=
+ * : ID of the user. If none is provided, a user will be randomly selected.
+ *
+ * --content=
+ * : Activity content text. If none is provided, default text will be generated.
+ *
+ * [--skip-notification]
+ * : Whether to skip notification.
+ *
+ * [--silent]
+ * : Whether to silent the activity comment.
+ *
+ * [--porcelain]
+ * : Output only the new activity comment id.
+ *
+ * ## EXAMPLES
+ *
+ * # Add an activity comment.
+ * $ wp bp activity comment 560 --user-id=50 --content="New activity comment"
+ * Success: Successfully added a new activity comment (ID #4645)
+ *
+ * # Add an activity comment, skipping notification.
+ * $ wp bp activity comment 459 --user-id=140 --skip-notification=1
+ * Success: Successfully added a new activity comment (ID #494)
+ */
+ public function comment($args, $assoc_args)
+ {
+ }
+ /**
+ * Delete an activity comment.
+ *
+ * ## OPTIONS
+ *
+ *
+ * : Identifier for the activity.
+ *
+ * --comment-id=
+ * : ID of the comment to delete.
+ *
+ * [--yes]
+ * : Answer yes to the confirmation message.
+ *
+ * ## EXAMPLES
+ *
+ * # Delete an activity comment.
+ * $ wp bp activity delete-comment 100 --comment-id=500 --yes
+ * Success: Activity comment deleted.
+ *
+ * # Delete an activity comment.
+ * $ wp bp activity delete-comment 165 --comment-id=35435 --yes
+ * Success: Activity comment deleted.
+ *
+ * @alias remove-comment
+ * @alias delete-comment
+ */
+ public function delete_comment($args, $assoc_args)
+ {
+ }
+ /**
+ * Get a random type from a component.
+ *
+ * @since 1.1
+ *
+ * @param string $component Component name.
+ * @return string
+ */
+ protected function get_random_type_from_component($component)
+ {
+ }
+ /**
+ * Generate item details.
+ *
+ * @global wpdb $wpdb WordPress database abstraction object.
+ *
+ * @since 1.1
+ *
+ * @param array $r Params.
+ * @return array
+ */
+ protected function generate_item_details($r)
+ {
+ }
+ }
+ /**
+ * Manage XProfile Data.
+ *
+ * @since 1.5.0
+ */
+ class XProfile_Data extends \Buddypress\CLI\Command\BuddyPressCommand
+ {
+ /**
+ * XProfile object fields.
+ *
+ * @var array
+ */
+ protected $obj_fields = ['id', 'field_id', 'user_id', 'value', 'last_updated'];
+ /**
+ * Set profile data for a user.
+ *
+ * ## OPTIONS
+ *
+ * --user-id=
+ * : Identifier for the user. Accepts either a user_login or a numeric ID.
+ *
+ * --field-id=
+ * : Identifier for the field. Accepts either the name of the field or a numeric ID.
+ *
+ * --value=
+ * : Value to set.
+ *
+ * [--silent]
+ * : Whether to silent the success message.
+ *
+ * ## EXAMPLE
+ *
+ * # Set profile data for a user.
+ * $ wp bp xprofile data set --user-id=45 --field-id=120 --value=test
+ * Success: Updated XProfile field "Field Name" (ID 120) with value "test" for user user_login (ID 45).
+ *
+ * @alias set
+ * @alias add
+ * @alias update
+ */
+ public function create($args, $assoc_args)
+ {
+ }
+ /**
+ * Get profile data for a user.
+ *
+ * ## OPTIONS
+ *
+ * --user-id=
+ * : Identifier for the user. Accepts either a user_login or a numeric ID.
+ *
+ * [--field-id=]
+ * : Identifier for the field. Accepts either the name of the field or a numeric ID.
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: table
+ * options:
+ * - table
+ * - json
+ * - csv
+ * - yaml
+ * ---
+ *
+ * [--multi-format=]
+ * : The format for the array data.
+ * ---
+ * default: array
+ * options:
+ * - array
+ * - comma
+ * ---
+ *
+ * ## EXAMPLES
+ *
+ * # Get profile data for a user.
+ * $ wp bp xprofile data get --user-id=45 --field-id=120
+ *
+ * # Get profile data for a user, formatting the data.
+ * $ wp bp xprofile data see --user-id=user_test --field-id=Hometown --multi-format=comma
+ *
+ * @alias see
+ */
+ public function get($args, $assoc_args)
+ {
+ }
+ /**
+ * Delete XProfile data for a user.
+ *
+ * ## OPTIONS
+ *
+ * --user-id=
+ * : Identifier for the user. Accepts either a user_login or a numeric ID.
+ *
+ * [--field-id=]
+ * : Identifier for the field. Accepts either the name of the field or a numeric ID.
+ *
+ * [--delete-all]
+ * : Delete all data for the user.
+ *
+ * [--yes]
+ * : Answer yes to the confirmation message.
+ *
+ * ## EXAMPLES
+ *
+ * # Delete a specific XProfile field data.
+ * $ wp bp xprofile data delete --user-id=45 --field-id=120 --yes
+ * Success: XProfile data removed.
+ *
+ * # Delete all XProfile data for a user.
+ * $ wp bp xprofile data remove --user-id=user_test --delete-all --yes
+ * Success: XProfile data removed.
+ *
+ * @alias remove
+ * @alias trash
+ */
+ public function delete($args, $assoc_args)
+ {
+ }
+ }
+ /**
+ * Manage XProfile Groups.
+ *
+ * @since 1.5.0
+ */
+ class XProfile_Group extends \Buddypress\CLI\Command\BuddyPressCommand
+ {
+ /**
+ * XProfile object fields.
+ *
+ * @var array
+ */
+ protected $obj_fields = ['id', 'name', 'description', 'group_order', 'can_delete'];
+ /**
+ * Object ID key.
+ *
+ * @var string
+ */
+ protected $obj_id_key = 'id';
+ /**
+ * Create an XProfile group.
+ *
+ * ## OPTIONS
+ *
+ * --name=
+ * : The name for this field group.
+ *
+ * [--description=]
+ * : The description for this field group.
+ *
+ * [--can-delete=]
+ * : Whether the group can be deleted.
+ * ---
+ * default: 1
+ * ---
+ *
+ * [--silent]
+ * : Whether to silent the XProfile group creation.
+ *
+ * [--porcelain]
+ * : Output just the new group id.
+ *
+ * ## EXAMPLES
+ *
+ * # Create XProfile field group.
+ * $ wp bp xprofile group create --name="Group Name" --description="Xprofile Group Description"
+ * Success: Created XProfile field group "Group Name" (ID 123).
+ *
+ * # Create XProfile field group that can't be deleted.
+ * $ wp bp xprofile group add --name="Another Group" --can-delete=false
+ * Success: Created XProfile field group "Another Group" (ID 21212).
+ *
+ * @alias add
+ */
+ public function create($args, $assoc_args)
+ {
+ }
+ /**
+ * Fetch specific XProfile field group.
+ *
+ * ## OPTIONS
+ *
+ *
+ * : Identifier for the field group.
+ *
+ * [--fields=]
+ * : Limit the output to specific fields.
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: table
+ * options:
+ * - table
+ * - json
+ * - csv
+ * - yaml
+ * ---
+ *
+ * ## EXAMPLES
+ *
+ * # Get a specific field group.
+ * $ wp bp xprofile group get 500
+ * +-------------+---------------+
+ * | Field | Value |
+ * +-------------+---------------+
+ * | id | 2 |
+ * | name | Group |
+ * | description | |
+ * | can_delete | 1 |
+ * | group_order | 0 |
+ * | fields | null |
+ * +-------------+---------------+
+ *
+ * # Get a specific field group in JSON format.
+ * $ wp bp xprofile group see 56 --format=json
+ * {"id":2,"name":"Group","description":"","can_delete":1,"group_order":0,"fields":null}
+ *
+ * @alias see
+ */
+ public function get($args, $assoc_args)
+ {
+ }
+ /**
+ * Delete specific XProfile field group(s).
+ *
+ * ## OPTIONS
+ *
+ * ...
+ * : ID or IDs of field groups to delete.
+ *
+ * [--yes]
+ * : Answer yes to the confirmation message.
+ *
+ * ## EXAMPLES
+ *
+ * # Delete a specific field group.
+ * $ wp bp xprofile group delete 500 --yes
+ * Success: Field group deleted 500.
+ *
+ * $ wp bp xprofile group delete 55654 54564 --yes
+ * Success: Field group deleted 55654.
+ * Success: Field group deleted 54564.
+ *
+ * @alias remove
+ * @alias trash
+ */
+ public function delete($args, $assoc_args)
+ {
+ }
+ }
+ /**
+ * Manage BuddyPress Notifications.
+ *
+ * ## EXAMPLES
+ *
+ * # Create notification item.
+ * $ wp bp notification create
+ * Success: Successfully created new notification. (ID #5464)
+ *
+ * # Delete a notification item.
+ * $ wp bp notification delete 520
+ * Success: Notification deleted.
+ *
+ * @since 1.8.0
+ */
+ class Notification extends \Buddypress\CLI\Command\BuddyPressCommand
+ {
+ /**
+ * Object fields.
+ *
+ * @var array
+ */
+ protected $obj_fields = ['id', 'user_id', 'item_id', 'secondary_item_id', 'component_name', 'component_action', 'date_notified', 'is_new'];
+ /**
+ * Dependency check for this CLI command.
+ */
+ public static function check_dependencies()
+ {
+ }
+ /**
+ * Create a notification.
+ *
+ * ## OPTIONS
+ *
+ * [--component=]
+ * : The component for the notification item (groups, activity, etc). If
+ * none is provided, a component will be randomly selected from the
+ * active components.
+ *
+ * [--action=]
+ * : Name of the action to associate the notification. (comment_reply, update_reply, etc).
+ *
+ * [--user-id=]
+ * : ID of the user associated with the new notification.
+ *
+ * [--item-id=]
+ * : ID of the associated notification.
+ *
+ * [--secondary-item-id=]
+ * : ID of the secondary associated notification.
+ *
+ * [--date=]
+ * : GMT timestamp, in Y-m-d h:i:s format.
+ *
+ * [--silent]
+ * : Whether to silent the notification creation.
+ *
+ * [--porcelain]
+ * : Output only the new notification id.
+ *
+ * ## EXAMPLES
+ *
+ * # Create a `update_reply` notification.
+ * $ wp bp notification create --component=messages --action=update_reply --user-id=523
+ * Success: Successfully created new notification. (ID #5464)
+ *
+ * # Create a `comment_reply` notification.
+ * $ wp bp notification add --component=groups --action=comment_reply --user-id=10
+ * Success: Successfully created new notification (ID #48949)
+ *
+ * @alias add
+ */
+ public function create($args, $assoc_args)
+ {
+ }
+ /**
+ * Get specific notification.
+ *
+ * ## OPTIONS
+ *
+ *
+ * : Identifier for the notification.
+ *
+ * [--fields=]
+ * : Limit the output to specific fields.
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: table
+ * options:
+ * - table
+ * - json
+ * - csv
+ * - yaml
+ * ---
+ *
+ * ## EXAMPLES
+ *
+ * # Get a notification by ID.
+ * $ wp bp notification get 10071
+ * +-------------------+---------------------+
+ * | Field | Value |
+ * +-------------------+---------------------+
+ * | id | 10071 |
+ * | item_id | 0 |
+ * | secondary_item_id | 0 |
+ * | user_id | 7 |
+ * | component_name | activity |
+ * | component_action | comment_reply |
+ * | date_notified | 2024-02-06 00:28:45 |
+ * | is_new | 1 |
+ * +-------------------+---------------------+
+ *
+ * # Get a notification in JSON format.
+ * $ wp bp notification get 10071 --format=json
+ * {"id":10071,"item_id":0,"secondary_item_id":0,"user_id":7,"component_name":"activity","component_action":"comment_reply","date_notified":"2024-02-06 00:28:45","is_new":1}
+ *
+ * # Get a notification using a invalid ID.
+ * $ wp bp notification see buddypress
+ * Error: Please provide a numeric notification ID.
+ *
+ * @alias see
+ */
+ public function get($args, $assoc_args)
+ {
+ }
+ /**
+ * Delete a notification.
+ *
+ * ## OPTIONS
+ *
+ * ...
+ * : ID or IDs of notification to delete.
+ *
+ * [--yes]
+ * : Answer yes to the confirmation message.
+ *
+ * ## EXAMPLES
+ *
+ * # Delete a notification.
+ * $ wp bp notification delete 520 --yes
+ * Success: Deleted notification 520.
+ *
+ * # Delete multiple notifications.
+ * $ wp bp notification delete 55654 54564 --yes
+ * Success: Deleted notification 55654.
+ * Success: Deleted notification 54564.
+ *
+ * @alias remove
+ * @alias trash
+ */
+ public function delete($args, $assoc_args)
+ {
+ }
+ /**
+ * Generate random notifications.
+ *
+ * ## OPTIONS
+ *
+ * [--count=]
+ * : How many notifications to generate.
+ * ---
+ * default: 100
+ * ---
+ *
+ * [--user-id=]
+ * : ID of the user. Accepts either a user_login or a numeric ID.
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: progress
+ * options:
+ * - progress
+ * - ids
+ * ---
+ *
+ * ## EXAMPLES
+ *
+ * # Generate 5 random notifications.
+ * $ wp bp notification generate --count=5
+ * Generating notifications 100% [======================] 0:00 / 0:00
+ *
+ * # Generate 5 random notifications and output only the IDs.
+ * $ wp bp notification generate --count=5 --format=ids
+ * 70 71 72 73 74
+ */
+ public function generate($args, $assoc_args)
+ {
+ }
+ /**
+ * Get a list of notifications.
+ *
+ * ## OPTIONS
+ *
+ * [--=]
+ * : One or more parameters to pass.
+ *
+ * [--fields=]
+ * : Fields to display.
+ *
+ * [--user-id=]
+ * : Limit results to a specific member. Accepts either a user_login or a numeric ID.
+ *
+ * [--component=]
+ * : The component to fetch notifications (groups, activity, etc).
+ *
+ * [--action=]
+ * : Name of the action to fetch notifications. (comment_reply, update_reply, etc).
+ *
+ * [--count=]
+ * : How many notification items to list.
+ * ---
+ * default: 50
+ * ---
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: table
+ * options:
+ * - table
+ * - ids
+ * - count
+ * - csv
+ * - json
+ * - yaml
+ * ---
+ * ## EXAMPLES
+ *
+ * # List all notifications and output only the IDs.
+ * $ wp bp notification list --format=ids
+ * 15 25 34 37 198
+ *
+ * # List all notifications and output the count.
+ * $ wp bp notification list --format=count
+ * 10
+ *
+ * # List all notifications and output the IDs and user_id.
+ * $ wp bp notification list --fields=id,user_id
+ * | id | user_id |
+ * | 66546 | 656 |
+ * | 54554 | 646546 |
+ *
+ * @subcommand list
+ */
+ public function list_($args, $assoc_args)
+ {
+ }
+ /**
+ * Get random notification actions based on component.
+ *
+ * @since 1.8.0
+ *
+ * @param string $component BuddyPress Component.
+ * @return string
+ */
+ protected function get_random_action($component)
+ {
+ }
+ }
+ /**
+ * Manage BuddyPress through the command-line.
+ *
+ * ## EXAMPLES
+ *
+ * # Create a user signup.
+ * $ wp bp signup create --user-login=test_user --user-email=teste@site.com
+ * Success: Successfully added new user signup (ID #345).
+ *
+ * # Activate a component.
+ * $ wp bp component activate groups
+ * Success: The Groups component has been activated.
+ *
+ * # List xprofile fields.
+ * $ wp bp xprofile field list
+ * +----+------+-------------+---------+----------+-------------+
+ * | id | name | description | type | group_id | is_required |
+ * +----+------+-------------+---------+----------+-------------+
+ * | 1 | Name | | textbox | 1 | 1 |
+ * +----+------+-------------+---------+----------+-------------+
+ */
+ class BuddyPress extends \Buddypress\CLI\Command\BuddyPressCommand
+ {
+ }
+ /**
+ * Manage BuddyPress Messages.
+ *
+ * ## EXAMPLES
+ *
+ * # Create message.
+ * $ wp bp message create --from=user1 --to=user2 --subject="Message Title" --content="We are ready"
+ * Success: Message successfully created.
+ *
+ * # Delete a thread.
+ * $ wp bp message delete-thread 564 5465465 456456 --user-id=user_login --yes
+ * Success: Thread successfully deleted.
+ *
+ * @since 1.6.0
+ */
+ class Messages extends \Buddypress\CLI\Command\BuddyPressCommand
+ {
+ /**
+ * Dependency check for this CLI command.
+ */
+ public static function check_dependencies()
+ {
+ }
+ /**
+ * Object fields.
+ *
+ * @var array
+ */
+ protected $obj_fields = ['id', 'subject', 'message', 'thread_id', 'sender_id', 'date_sent'];
+ /**
+ * Add a message.
+ *
+ * ## OPTIONS
+ *
+ * --from=
+ * : Identifier for the user. Accepts either a user_login or a numeric ID.
+ *
+ * [--to=]
+ * : Identifier for the recipient. To is not required when thread id is set.
+ * Accepts either a user_login or a numeric ID.
+ *
+ * --subject=
+ * : Subject of the message.
+ *
+ * --content=
+ * : Content of the message.
+ *
+ * [--thread-id=]
+ * : Thread ID.
+ *
+ * [--date-sent=]
+ * : GMT timestamp, in Y-m-d h:i:s format.
+ *
+ * [--silent]
+ * : Whether to silent the message creation.
+ *
+ * [--porcelain]
+ * : Return the thread id of the message.
+ *
+ * ## EXAMPLES
+ *
+ * # Add a message.
+ * $ wp bp message add --from=user1 --to=user2 --subject="Message Title" --content="We are ready"
+ * Success: Message successfully created.
+ *
+ * # Create a message.
+ * $ wp bp message create --from=545 --to=313 --subject="Another Message Title" --content="Message OK"
+ * Success: Message successfully created.
+ *
+ * @alias add
+ */
+ public function create($args, $assoc_args)
+ {
+ }
+ /**
+ * Delete thread(s) for a given user.
+ *
+ * ## OPTIONS
+ *
+ * ...
+ * : Thread ID(s).
+ *
+ * --user-id=
+ * : Identifier for the user. Accepts either a user_login or a numeric ID.
+ *
+ * [--yes]
+ * : Answer yes to the confirmation message.
+ *
+ * ## EXAMPLES
+ *
+ * $ wp bp message delete-thread 500 687867 --user-id=40
+ * Success: Thread successfully deleted.
+ *
+ * $ wp bp message delete-thread 564 5465465 456456 --user-id=user_logon --yes
+ * Success: Thread successfully deleted.
+ *
+ * @alias delete-thread
+ * @alias remove-thread
+ */
+ public function delete_thread($args, $assoc_args)
+ {
+ }
+ /**
+ * Get a message.
+ *
+ * ## OPTIONS
+ *
+ *
+ * : Identifier for the message.
+ *
+ * [--fields=]
+ * : Limit the output to specific fields.
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: table
+ * options:
+ * - table
+ * - json
+ * - csv
+ * - yaml
+ * ---
+ *
+ * ## EXAMPLES
+ *
+ * # Get message by ID.
+ * $ wp bp message get 5465
+ *
+ * # Get message with a string
+ * $ wp bp message get invalid-id
+ * Error: Please provide a numeric message ID.
+ *
+ * @alias see
+ */
+ public function get($args, $assoc_args)
+ {
+ }
+ /**
+ * Get a list of messages for a specific user.
+ *
+ * ## OPTIONS
+ *
+ * --user-id=
+ * : Identifier for the user. Accepts either a user_login or a numeric ID.
+ *
+ * [--=]
+ * : One or more parameters to pass. See \BP_Messages_Box_Template()
+ *
+ * [--fields=]
+ * : Fields to display.
+ *
+ * [--box=]
+ * : Box of the message.
+ * ---
+ * default: sentbox
+ * options:
+ * - sentbox
+ * - inbox
+ * - notices
+ * ---
+ *
+ * [--type=]
+ * : Type of the message.
+ * ---
+ * default: all
+ * options:
+ * - unread
+ * - read
+ * - all
+ * ---
+ *
+ * [--count=]
+ * : How many messages to list.
+ * ---
+ * default: 50
+ * ---
+ *
+ * [--format=]
+ * : Render output in a particular format.
+ * ---
+ * default: table
+ * options:
+ * - table
+ * - ids
+ * - count
+ * - csv
+ * - json
+ * - yaml
+ * ---
+ *
+ * ## AVAILABLE FIELDS
+ *
+ * These fields will be displayed by default for each message:
+ *
+ * * id
+ * * subject
+ * * message
+ * * thread_id
+ * * sender_id
+ * * date_sent
+ *
+ * ## EXAMPLES
+ *
+ * # Get a list of messages for a specific user.
+ * $ wp bp message list --user-id=544 --format=count
+ * 10
+ *
+ * # Get a list of messages for a specific user and output only the IDs.
+ * $ wp bp message list --user-id=user_login --count=3 --format=ids
+ * 5454 45454 4545 465465
+ *
+ * # Get a list of messages.
+ * # wp bp message list --user-id=1 --count=2
+ * +----+----------------------+--------------------------+-----------+-----------+---------------------+
+ * | id | subject | message | thread_id | sender_id | date_sent |
+ * +----+----------------------+--------------------------+-----------+-----------+---------------------+
+ * | 35 | Another Thread |
Another thread
| 2 | 1 | 2022-10-27 16:29:29 |
+ * | 37 | Message Subject - #0 | Here is some random text | 2 | 7 | 2022-10-27 19:06:54 |
+ * +----+----------------------+--------------------------+-----------+-----------+---------------------+
+ *
+ * @subcommand list
+ */
+ public function list_($args, $assoc_args)
+ {
+ }
+ /**
+ * Generate random messages.
+ *
+ * ## OPTIONS
+ *
+ * [--count=]
+ * : How many messages to generate.
+ * ---
+ * default: 100
+ * ---
+ *
+ * [--from=]
+ * : Identifier for the user. Accepts either a user_login or a numeric ID.
+ *
+ * [--to=]
+ * : Identifier for the recipient. To is not required when thread id is set.
+ * Accepts either a user_login or a numeric ID.
+ *
+ * [--thread-id=