Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/23/2013 12:14:44 AM (13 years ago)
Author:
boonebgorges
Message:

Improve inline docs in bp-core. See #5022

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-wpabstraction.php

    r7228 r7457  
    11<?php
    2 /*****
    3  * WordPress Abstraction
    4  *
    5  * The functions within this file will detect the version of WordPress you are running
    6  * and will alter the environment so BuddyPress can run regardless.
    7  *
    8  * The code below mostly contains function mappings. This file is subject to change at any time.
     2/**
     3 * WordPress Abstraction.
     4 *
     5 * The functions within this file will detect the version of WordPress you are
     6 * running and will alter the environment so BuddyPress can run regardless.
     7 *
     8 * The code below mostly contains function mappings. This file is subject to
     9 * change at any time.
    910 */
    1011
     
    1314
    1415/**
    15  * Parse the WordPress core version number into the major release
     16 * Parse the WordPress core version number into the major release.
    1617 *
    1718 * @since BuddyPress (1.5.2)
     19 *
    1820 * @global string $wp_version
    19  * @return string
     21 * @return string $wp_version
    2022 */
    2123function bp_get_major_wp_version() {
     
    3537
    3638        if ( !function_exists( 'get_blog_option' ) ) {
     39                /**
     40                 * @see get_blog_option()
     41                 */
    3742                function get_blog_option( $blog_id, $option_name, $default = false ) {
    3843                        return get_option( $option_name, $default );
     
    4146
    4247        if ( !function_exists( 'update_blog_option' ) ) {
     48                /**
     49                 * @see update_blog_option()
     50                 */
    4351                function update_blog_option( $blog_id, $option_name, $value ) {
    4452                        return update_option( $option_name, $value );
     
    4755
    4856        if ( !function_exists( 'delete_blog_option' ) ) {
     57                /**
     58                 * @see delete_blog_option()
     59                 */
    4960                function delete_blog_option( $blog_id, $option_name ) {
    5061                        return delete_option( $option_name );
     
    5364
    5465        if ( !function_exists( 'switch_to_blog' ) ) {
     66                /**
     67                 * @see switch_to_blog()
     68                 */
    5569                function switch_to_blog() {
    5670                        return bp_get_root_blog_id();
     
    5973
    6074        if ( !function_exists( 'restore_current_blog' ) ) {
     75                /**
     76                 * @see restore_current_blog()
     77                 */
    6178                function restore_current_blog() {
    6279                        return bp_get_root_blog_id();
     
    6582
    6683        if ( !function_exists( 'get_blogs_of_user' ) ) {
     84                /**
     85                 * @see get_blogs_of_user()
     86                 */
    6787                function get_blogs_of_user() {
    6888                        return false;
     
    7191
    7292        if ( !function_exists( 'update_blog_status' ) ) {
     93                /**
     94                 * @see update_blog_status()
     95                 */
    7396                function update_blog_status() {
    7497                        return true;
     
    77100
    78101        if ( !function_exists( 'is_subdomain_install' ) ) {
     102                /**
     103                 * @see is_subdomain_install()
     104                 */
    79105                function is_subdomain_install() {
    80106                        if ( ( defined( 'VHOST' ) && 'yes' == VHOST ) || ( defined( 'SUBDOMAIN_INSTALL' ) && SUBDOMAIN_INSTALL ) )
     
    86112}
    87113
     114/**
     115 * Get SQL chunk for filtering spam users from member queries.
     116 *
     117 * @internal
     118 * @todo Why is this function defined in this file?
     119 *
     120 * @param string $prefix Global table prefix.
     121 * @return string SQL chunk.
     122 */
    88123function bp_core_get_status_sql( $prefix = false ) {
    89124        if ( !is_multisite() )
     
    103138if ( !function_exists( 'mb_strlen' ) ) {
    104139        /**
    105          * Fallback implementation of mb_strlen, hardcoded to UTF-8.
    106          * @param string $str
    107          * @param string $enc optional encoding; ignored
    108          * @return int
     140         * Fallback implementation of mb_strlen(), hardcoded to UTF-8.
     141         *
     142         * @param string $str String to be measured.
     143         * @param string $enc Optional. Encoding type. Ignored.
     144         * @return int String length.
    109145         */
    110146        function mb_strlen( $str, $enc = '' ) {
     
    127163if ( !function_exists( 'mb_strpos' ) ) {
    128164        /**
    129          * Fallback implementation of mb_strpos, hardcoded to UTF-8.
    130          * @param string $haystack
    131          * @param string $needle
    132          * @param int $offset optional; start position.
    133          * @param string $encoding optional; not used.
    134          * @return int
     165         * Fallback implementation of mb_strpos(), hardcoded to UTF-8.
     166         *
     167         * @param string $haystack String to search in.
     168         * @param string $needle String to search for.
     169         * @param int $offset Optional. Start position for the search. Default: 0.
     170         * @param string $enc Optional. Encoding type. Ignored.
     171         * @return int|bool Position of needle in haystack if found, else false.
    135172         */
    136173        function mb_strpos( $haystack, $needle, $offset = 0, $encoding = '' ) {
     
    150187if ( !function_exists( 'mb_strrpos' ) ) {
    151188        /**
    152          * Fallback implementation of mb_strrpos, hardcoded to UTF-8.
    153          * @param string $haystack
    154          * @param string $needle
    155          * @param int $offset optional; start position.
    156          * @param string $encoding optional; not used.
    157          * @return int
     189         * Fallback implementation of mb_strrpos(), hardcoded to UTF-8.
     190         *
     191         * @param string $haystack String to search in.
     192         * @param string $needle String to search for.
     193         * @param int $offset Optional. Start position for the search. Default: 0.
     194         * @param string $enc Optional. Encoding type. Ignored.
     195         * @return int Position of last needle in haystack if found, else false.
    158196         */
    159197        function mb_strrpos( $haystack, $needle, $offset = 0, $encoding = '' ) {
Note: See TracChangeset for help on using the changeset viewer.