Changeset 7457 for trunk/bp-core/bp-core-wpabstraction.php
- Timestamp:
- 10/23/2013 12:14:44 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-wpabstraction.php
r7228 r7457 1 1 <?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. 9 10 */ 10 11 … … 13 14 14 15 /** 15 * Parse the WordPress core version number into the major release 16 * Parse the WordPress core version number into the major release. 16 17 * 17 18 * @since BuddyPress (1.5.2) 19 * 18 20 * @global string $wp_version 19 * @return string 21 * @return string $wp_version 20 22 */ 21 23 function bp_get_major_wp_version() { … … 35 37 36 38 if ( !function_exists( 'get_blog_option' ) ) { 39 /** 40 * @see get_blog_option() 41 */ 37 42 function get_blog_option( $blog_id, $option_name, $default = false ) { 38 43 return get_option( $option_name, $default ); … … 41 46 42 47 if ( !function_exists( 'update_blog_option' ) ) { 48 /** 49 * @see update_blog_option() 50 */ 43 51 function update_blog_option( $blog_id, $option_name, $value ) { 44 52 return update_option( $option_name, $value ); … … 47 55 48 56 if ( !function_exists( 'delete_blog_option' ) ) { 57 /** 58 * @see delete_blog_option() 59 */ 49 60 function delete_blog_option( $blog_id, $option_name ) { 50 61 return delete_option( $option_name ); … … 53 64 54 65 if ( !function_exists( 'switch_to_blog' ) ) { 66 /** 67 * @see switch_to_blog() 68 */ 55 69 function switch_to_blog() { 56 70 return bp_get_root_blog_id(); … … 59 73 60 74 if ( !function_exists( 'restore_current_blog' ) ) { 75 /** 76 * @see restore_current_blog() 77 */ 61 78 function restore_current_blog() { 62 79 return bp_get_root_blog_id(); … … 65 82 66 83 if ( !function_exists( 'get_blogs_of_user' ) ) { 84 /** 85 * @see get_blogs_of_user() 86 */ 67 87 function get_blogs_of_user() { 68 88 return false; … … 71 91 72 92 if ( !function_exists( 'update_blog_status' ) ) { 93 /** 94 * @see update_blog_status() 95 */ 73 96 function update_blog_status() { 74 97 return true; … … 77 100 78 101 if ( !function_exists( 'is_subdomain_install' ) ) { 102 /** 103 * @see is_subdomain_install() 104 */ 79 105 function is_subdomain_install() { 80 106 if ( ( defined( 'VHOST' ) && 'yes' == VHOST ) || ( defined( 'SUBDOMAIN_INSTALL' ) && SUBDOMAIN_INSTALL ) ) … … 86 112 } 87 113 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 */ 88 123 function bp_core_get_status_sql( $prefix = false ) { 89 124 if ( !is_multisite() ) … … 103 138 if ( !function_exists( 'mb_strlen' ) ) { 104 139 /** 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. 109 145 */ 110 146 function mb_strlen( $str, $enc = '' ) { … … 127 163 if ( !function_exists( 'mb_strpos' ) ) { 128 164 /** 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. 135 172 */ 136 173 function mb_strpos( $haystack, $needle, $offset = 0, $encoding = '' ) { … … 150 187 if ( !function_exists( 'mb_strrpos' ) ) { 151 188 /** 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. 158 196 */ 159 197 function mb_strrpos( $haystack, $needle, $offset = 0, $encoding = '' ) {
Note: See TracChangeset
for help on using the changeset viewer.