Skip to:
Content

BuddyPress.org

Changeset 13499


Ignore:
Timestamp:
06/09/2023 12:52:29 AM (18 months ago)
Author:
imath
Message:

Improve inline doc, informing about global variable usage in functions

These improvements are about various BP Members, BP Messages & BP Notifications files.

Props viralsampat

Fixes #8890

Location:
trunk/src
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/bp-members-functions.php

    r13493 r13499  
    880880 * @since 1.6.0
    881881 *
     882 * @global BP_Core_Members_Template $members_template The Members template loop class.
     883 *
    882884 * @param int $user_id The ID for the user.
    883885 * @return bool True if spammer, otherwise false.
     
    24562458 * @since 2.0.0
    24572459 *
     2460 * @global string $error The error message.
     2461 *
    24582462 * @see bp_core_signup_disable_inactive()
    24592463 */
     
    26252629 *
    26262630 * @since 1.8.0
     2631 *
     2632 * @global string $error The error message.
    26272633 */
    26282634function bp_live_spammer_login_error() {
  • trunk/src/bp-members/classes/class-bp-members-admin.php

    r13433 r13499  
    723723     *
    724724     * @since 2.1.0
     725     *
     726     * @global string $submenu_file The name of the submenu file.
     727     * @global string $parent_file  The name of the parent file.
    725728     */
    726729    public function profile_admin_head() {
     
    16841687     * @since 2.0.0
    16851688     *
     1689     * @global wpdb $wpdb The WordPress database object.
     1690     *
    16861691     * @param WP_User_Query|null $query The users query.
    16871692     * @return WP_User_Query|null The users query without the signups.
     
    17251730     *
    17261731     * @since 2.0.0
     1732     *
     1733     * @global string $role The name of the WP Role.
    17271734     *
    17281735     * @param array $views WP List Table views.
     
    27632770     * Filter WP Admin users list table to include users of the specified type.
    27642771     *
    2765      * @param WP_Query $query
    2766      *
    27672772     * @since 2.7.0
     2773     *
     2774     * @global string $pagenow The filename of the current screen.
     2775     *
     2776     * @param WP_Query $query The WordPress Query object.
    27682777     */
    27692778    public function users_table_filter_by_type( $query ) {
  • trunk/src/bp-members/classes/class-bp-members-component.php

    r13495 r13499  
    288288     *
    289289     * @see BP_Component::setup_globals() for description of parameters.
     290     *
     291     * @global wpdb $wpdb The WordPress database object.
    290292     *
    291293     * @param array $args See {@link BP_Component::setup_globals()}.
  • trunk/src/bp-members/classes/class-bp-members-list-table.php

    r13476 r13499  
    5858     *
    5959     * @since 2.0.0
     60     *
     61     * @global string $usersearch The users search terms.
    6062     */
    6163    public function prepare_items() {
     
    98100     * @since 2.5.0
    99101     *
    100      * @global string $role The name of role the users screens is filtered by
     102     * @global string $role The name of role the users screens is filtered by.
    101103     */
    102104    public function views() {
  • trunk/src/bp-members/classes/class-bp-members-ms-list-table.php

    r13476 r13499  
    5858     *
    5959     * @since 2.0.0
     60     *
     61     * @global string $usersearch The users search terms.
     62     * @global string $mode       The display mode.
    6063     */
    6164    public function prepare_items() {
     
    396399     * @since 2.0.0
    397400     *
     401     * @global string $mode The display mode.
     402     *
    398403     * @param object|null $signup_object The signup data object.
    399404     */
     
    414419     *
    415420     * @since 2.0.0
     421     *
     422     * @global string $mode The display mode.
    416423     *
    417424     * @param object|null $signup_object Signup object instance.
  • trunk/src/bp-members/classes/class-bp-signup.php

    r13469 r13499  
    173173     *
    174174     * @since 2.0.0
     175     *
     176     * @global wpdb $wpdb The WordPress database object.
    175177     */
    176178    public function populate() {
     
    258260     * @since 2.0.0
    259261     * @since 6.0.0 Added a list of allowed orderby parameters.
     262     *
     263     * @global wpdb $wpdb The WordPress database object.
    260264     *
    261265     * @param array $args {
     
    443447     * @since 2.0.0
    444448     *
     449     * @global wpdb $wpdb The WordPress database object.
     450     *
    445451     * @param array $args {
    446452     *     Array of arguments for signup addition.
     
    528534     *
    529535     * @since 2.0.0
     536     *
     537     * @global wpdb $wpdb The WordPress database object.
    530538     *
    531539     * @param string $user_login    User login string.
     
    642650     * @since 2.0.0
    643651     *
     652     * @global wpdb $wpdb The WordPress database object.
     653     *
    644654     * @param string $key Activation key.
    645655     * @return bool True on success, false on failure.
     
    715725     *
    716726     * @since 2.0.0
     727     *
     728     * @global wpdb $wpdb The WordPress database object.
    717729     *
    718730     * @param array $args {
     
    983995     * @since 2.0.0
    984996     *
     997     * @global wpdb $wpdb The WordPress database object.
     998     *
    985999     * @param array $signup_ids Single ID or list of IDs to delete.
    9861000     * @return array
  • trunk/src/bp-messages/classes/class-bp-messages-thread.php

    r13414 r13499  
    979979     * @since 1.0.0
    980980     *
     981     * @global wpdb $wpdb The WordPress database object.
     982     *
    981983     * @param int    $user_id The user ID.
    982984     * @param string $box     The type of mailbox to get. Either 'inbox' or 'sentbox'.
  • trunk/src/bp-notifications/bp-notifications-adminbar.php

    r13442 r13499  
    1818 * @since 1.9.0
    1919 *
    20  * @param WP_Admin_Bar $wp_admin_bar WordPress object implementing a Toolbar API, passed by reference.
     20 * @global WP_Admin_Bar $wp_admin_bar The WordPress object implementing a Toolbar API.
    2121 *
    2222 * @return bool
  • trunk/src/bp-notifications/bp-notifications-functions.php

    r13497 r13499  
    778778 * @since 2.3.0
    779779 *
    780  * @global wpdb $wpdb WordPress database object.
    781  *
    782780 * @param int    $notification_id ID of the notification item whose metadata is being deleted.
    783781 * @param string $meta_key        Optional. The key of the metadata being deleted. If
  • trunk/src/bp-notifications/classes/class-bp-notifications-notification.php

    r13414 r13499  
    910910     * @since 10.0.0
    911911     *
     912     * @global wpdb $wpdb The WordPress database object.
     913     *
    912914     * @param string $field The name of the db field of the items to update.
    913915     *                      Possible values are `id` or `item_id`.
     
    10071009     *
    10081010     * @since 10.0.0
     1011     *
     1012     * @global wpdb $wpdb The WordPress database object.
    10091013     *
    10101014     * @param string $field The name of the db field of the items to delete.
Note: See TracChangeset for help on using the changeset viewer.