| [ Root ] [ Search ] [ Index ] |
PHP Cross Reference of bbPress TrunkProvided by Yoast |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * Deprecated functions from past bbPress versions. You shouldn't use these 4 * globals and functions and look for the alternatives instead. The functions 5 * and globals will be removed in a later version. 6 * 7 * @package bbPress 8 * @subpackage Deprecated 9 */ 10 11 12 13 function bb_specialchars( $text, $quotes = 0 ) { 14 bb_log_deprecated('function', __FUNCTION__, 'esc_html'); 15 return esc_html( $text, $quotes ); 16 } 17 18 function bb_make_clickable( $ret ) { 19 bb_log_deprecated('function', __FUNCTION__, 'make_clickable'); 20 return make_clickable( $ret ); 21 } 22 23 function bb_apply_filters($tag, $string, $filter = true) { 24 bb_log_deprecated('function', __FUNCTION__, 'apply_filters'); 25 $args = func_get_args(); 26 return call_user_func_array('apply_filters', $args); 27 } 28 29 function bb_add_filter($tag, $function_to_add, $priority = 10) { 30 bb_log_deprecated('function', __FUNCTION__, 'add_filter'); 31 $args = func_get_args(); 32 return call_user_func_array('add_filter', $args); 33 } 34 35 function bb_remove_filter($tag, $function_to_remove, $priority = 10) { 36 bb_log_deprecated('function', __FUNCTION__, 'remove_filter'); 37 $args = func_get_args(); 38 return call_user_func_array('remove_filter', $args); 39 } 40 41 function bb_do_action($tag) { 42 bb_log_deprecated('function', __FUNCTION__, 'do_action'); 43 $args = func_get_args(); 44 return call_user_func_array('do_action', $args); 45 } 46 47 function bb_add_action($tag, $function_to_add, $priority = 10) { 48 bb_log_deprecated('function', __FUNCTION__, 'add_action'); 49 $args = func_get_args(); 50 return call_user_func_array('add_action', $args); 51 } 52 53 function bb_remove_action($tag, $function_to_remove, $priority = 10) { 54 bb_log_deprecated('function', __FUNCTION__, 'remove_action'); 55 $args = func_get_args(); 56 return call_user_func_array('remove_action', $args); 57 } 58 59 function bb_add_query_arg() { 60 bb_log_deprecated('function', __FUNCTION__, 'add_query_arg'); 61 $args = func_get_args(); 62 return call_user_func_array('add_query_arg', $args); 63 } 64 65 function bb_remove_query_arg($key, $query = '') { 66 bb_log_deprecated('function', __FUNCTION__, 'remove_query_arg'); 67 return remove_query_arg($key, $query); 68 } 69 70 if ( !function_exists('language_attributes') ) : 71 function language_attributes( $xhtml = 0 ) { 72 bb_log_deprecated('function', __FUNCTION__, 'bb_language_attributes'); 73 bb_language_attributes( $xhtml ); 74 } 75 endif; 76 77 function cast_meta_value( $data ) { 78 bb_log_deprecated('function', __FUNCTION__, 'maybe_unserialize'); 79 return maybe_unserialize( $data ); 80 } 81 82 function option( $option ) { 83 bb_log_deprecated('function', __FUNCTION__, 'bb_option'); 84 return bb_option( $option ); 85 } 86 87 // Use topic_time 88 function topic_date( $format = '', $id = 0 ) { 89 bb_log_deprecated('function', __FUNCTION__, 'bb_gmdate_i18n( $format, get_topic_timestamp( $id ) )'); 90 echo bb_gmdate_i18n( $format, get_topic_timestamp( $id ) ); 91 } 92 function get_topic_date( $format = '', $id = 0 ){ 93 bb_log_deprecated('function', __FUNCTION__, 'bb_gmdate_i18n( $format, get_topic_timestamp( $id ) )'); 94 return bb_gmdate_i18n( $format, get_topic_timestamp( $id ) ); 95 } 96 function get_topic_timestamp( $id = 0 ) { 97 bb_log_deprecated('function', __FUNCTION__, 'bb_gmtstrtotime( $topic->topic_time )'); 98 global $topic; 99 if ( $id ) 100 $topic = get_topic( $id ); 101 return bb_gmtstrtotime( $topic->topic_time ); 102 } 103 104 // Use topic_start_time 105 function topic_start_date( $format = '', $id = 0 ) { 106 bb_log_deprecated('function', __FUNCTION__, 'bb_gmdate_i18n( $format, get_topic_start_timestamp( $id ) )'); 107 echo bb_gmdate_i18n( $format, get_topic_start_timestamp( $id ) ); 108 } 109 function get_topic_start_timestamp( $id = 0 ) { 110 bb_log_deprecated('function', __FUNCTION__, 'bb_gmtstrtotime( $topic->topic_start_time )'); 111 global $topic; 112 if ( $id ) 113 $topic = get_topic( $id ); 114 return bb_gmtstrtotime( $topic->topic_start_time ); 115 } 116 117 // Use bb_post_time 118 function post_date( $format ) { 119 bb_log_deprecated('function', __FUNCTION__, 'bb_gmdate_i18n( $format, bb_gmtstrtotime( $bb_post->post_time ) )'); 120 global $bb_post; 121 echo bb_gmdate_i18n( $format, bb_gmtstrtotime( $bb_post->post_time ) ); 122 } 123 function get_post_timestamp() { 124 bb_log_deprecated('function', __FUNCTION__, 'bb_gmtstrtotime( $bb_post->post_time )'); 125 global $bb_post; 126 return bb_gmtstrtotime( $bb_post->post_time ); 127 } 128 129 function get_inception() { 130 bb_log_deprecated('function', __FUNCTION__, 'bb_get_inception( \'timestamp\' )'); 131 return bb_get_inception( 'timestamp' ); 132 } 133 134 function forum_dropdown( $c = false, $a = false ) { 135 bb_log_deprecated('function', __FUNCTION__, 'bb_forum_dropdown'); 136 bb_forum_dropdown( $c, $a ); 137 } 138 139 function get_ids_by_role( $role = 'moderator', $sort = 0, $limit_str = '' ) { 140 bb_log_deprecated('function', __FUNCTION__, 'bb_get_ids_by_role'); 141 return bb_get_ids_by_role( $role , $sort , $limit_str); 142 } 143 144 function get_deleted_posts( $page = 1, $limit = false, $status = 1, $topic_status = 0 ) { 145 bb_log_deprecated('function', __FUNCTION__, 'no alternative'); 146 } 147 148 function bozo_posts( $where ) { 149 bb_log_deprecated('function', __FUNCTION__, 'bb_bozo_posts'); 150 return bb_bozo_posts( $where ); 151 } 152 153 function bozo_topics( $where ) { 154 bb_log_deprecated('function', __FUNCTION__, 'bb_bozo_topics'); 155 return bb_bozo_topics( $where ); 156 } 157 158 function get_bozos( $page = 1 ) { 159 bb_log_deprecated('function', __FUNCTION__, 'bb_get_bozos'); 160 return bb_get_bozos($page); 161 } 162 163 function current_user_is_bozo( $topic_id = false ) { 164 bb_log_deprecated('function', __FUNCTION__, 'bb_current_user_is_bozo'); 165 return bb_current_user_is_bozo( $topic_id ); 166 } 167 168 function bozo_pre_permalink() { 169 bb_log_deprecated('function', __FUNCTION__, 'bb_bozo_pre_permalink'); 170 return bb_bozo_pre_permalink(); 171 } 172 173 function bozo_latest_filter() { 174 bb_log_deprecated('function', __FUNCTION__, 'bb_bozo_latest_filter'); 175 return bb_bozo_latest_filter(); 176 } 177 178 function bozo_topic_db_filter() { 179 bb_log_deprecated('function', __FUNCTION__, 'bb_bozo_topic_db_filter'); 180 return bb_bozo_topic_db_filter(); 181 } 182 183 function bozo_profile_db_filter() { 184 bb_log_deprecated('function', __FUNCTION__, 'bb_bozo_profile_db_filter'); 185 return bb_bozo_profile_db_filter(); 186 } 187 188 function bozo_recount_topics() { 189 bb_log_deprecated('function', __FUNCTION__, 'bb_bozo_recount_topics'); 190 return bb_bozo_recount_topics(); 191 } 192 193 function bozo_recount_users() { 194 bb_log_deprecated('function', __FUNCTION__, 'bb_bozo_recount_users'); 195 return bb_bozo_recount_users(); 196 } 197 198 function bozo_post_del_class( $status ) { 199 bb_log_deprecated('function', __FUNCTION__, 'bb_bozo_post_del_class'); 200 return bb_bozo_post_del_class( $status ); 201 } 202 203 function bozo_add_recount_list() { 204 bb_log_deprecated('function', __FUNCTION__, 'bb_bozo_add_recount_list'); 205 return bb_bozo_add_recount_list() ; 206 } 207 208 function bozo_topic_pages_add( $add ) { 209 bb_log_deprecated('function', __FUNCTION__, 'bb_bozo_topic_pages_add'); 210 return bb_bozo_topic_pages_add( $add ); 211 } 212 213 function bozo_get_topic_posts( $topic_posts ) { 214 bb_log_deprecated('function', __FUNCTION__, 'bb_bozo_get_topic_posts'); 215 return bb_bozo_get_topic_posts( $topic_posts ) ; 216 } 217 218 function bozo_new_post( $post_id ) { 219 bb_log_deprecated('function', __FUNCTION__, 'bb_bozo_new_post'); 220 return bb_bozo_new_post( $post_id ); 221 } 222 223 function bozo_pre_post_status( $status, $post_id, $topic_id ) { 224 bb_log_deprecated('function', __FUNCTION__, 'bb_bozo_pre_post_status'); 225 return bb_bozo_pre_post_status( $status, $post_id, $topic_id ) ; 226 } 227 228 function bozo_delete_post( $post_id, $new_status, $old_status ) { 229 bb_log_deprecated('function', __FUNCTION__, 'bb_bozo_delete_post'); 230 return bb_bozo_delete_post( $post_id, $new_status, $old_status ) ; 231 } 232 233 function bozon( $user_id, $topic_id = 0 ) { 234 bb_log_deprecated('function', __FUNCTION__, 'bb_bozon'); 235 return bb_bozon( $user_id, $topic_id ) ; 236 } 237 238 function fermion( $user_id, $topic_id = 0 ) { 239 bb_log_deprecated('function', __FUNCTION__, 'bb_fermion'); 240 return bb_fermion( $user_id, $topic_id ) ; 241 } 242 243 function bozo_profile_admin_keys( $a ) { 244 bb_log_deprecated('function', __FUNCTION__, 'bb_bozo_profile_admin_keys'); 245 return bb_bozo_profile_admin_keys( $a ) ; 246 } 247 function bozo_add_admin_page() { 248 bb_log_deprecated('function', __FUNCTION__, 'bb_bozo_add_admin_page'); 249 return bb_bozo_add_admin_page() ; 250 } 251 252 function bozo_admin_page() { 253 bb_log_deprecated('function', __FUNCTION__, 'bb_bozo_admin_page'); 254 return bb_bozo_admin_page() ; 255 } 256 257 function encodeit( $matches ) { 258 bb_log_deprecated('function', __FUNCTION__, 'bb_encodeit'); 259 return bb_encodeit( $matches ) ; 260 } 261 262 function decodeit( $matches ) { 263 bb_log_deprecated('function', __FUNCTION__, 'bb_decodeit'); 264 return bb_decodeit( $matches ) ; 265 } 266 267 function code_trick( $text ) { 268 bb_log_deprecated('function', __FUNCTION__, 'bb_code_trick'); 269 return bb_code_trick( $text ) ; 270 } 271 272 function code_trick_reverse( $text ) { 273 bb_log_deprecated('function', __FUNCTION__, 'bb_code_trick_reverse'); 274 return bb_code_trick_reverse( $text ) ; 275 } 276 277 function encode_bad( $text ) { 278 bb_log_deprecated('function', __FUNCTION__, 'bb_encode_bad'); 279 return bb_encode_bad( $text ) ; 280 } 281 282 function user_sanitize( $text, $strict = false ) { 283 bb_log_deprecated('function', __FUNCTION__, 'sanitize_user'); 284 return sanitize_user( $text, $strict ); 285 } 286 287 function bb_user_sanitize( $text, $strict = false ) { 288 bb_log_deprecated('function', __FUNCTION__, 'sanitize_user'); 289 return sanitize_user( $text, $strict ); 290 } 291 292 function utf8_cut( $utf8_string, $length ) { 293 bb_log_deprecated('function', __FUNCTION__, 'bb_utf8_cut'); 294 return bb_utf8_cut( $utf8_string, $length ) ; 295 } 296 297 function tag_sanitize( $tag ) { 298 bb_log_deprecated('function', __FUNCTION__, 'bb_tag_sanitize'); 299 return bb_tag_sanitize( $tag ) ; 300 } 301 302 function sanitize_with_dashes( $text, $length = 200 ) { // Multibyte aware 303 bb_log_deprecated('function', __FUNCTION__, 'bb_sanitize_with_dashes'); 304 return bb_sanitize_with_dashes( $text, $length ) ; 305 } 306 307 function bb_make_feed( $link ) { 308 bb_log_deprecated('function', __FUNCTION__, 'no aternative'); 309 return trim( $link ); 310 } 311 312 function show_context( $term, $text ) { 313 bb_log_deprecated('function', __FUNCTION__, 'bb_show_context'); 314 return bb_show_context( $term, $text ); 315 } 316 317 function closed_title( $title ) { 318 bb_log_deprecated('function', __FUNCTION__, 'bb_closed_label'); 319 return bb_closed_label( $title ); 320 } 321 322 // Closed label now applied using bb_topic_labels filters 323 function bb_closed_title( $title ) { 324 bb_log_deprecated('function', __FUNCTION__, 'bb_closed_label'); 325 return bb_closed_label( $title ); 326 } 327 328 function make_link_view_all( $link ) { 329 bb_log_deprecated('function', __FUNCTION__, 'bb_make_link_view_all'); 330 return bb_make_link_view_all( $link ); 331 } 332 333 function remove_topic_tag( $tag_id, $user_id, $topic_id ) { 334 bb_log_deprecated('function', __FUNCTION__, 'bb_remove_topic_tag'); 335 return bb_remove_topic_tag( $tag_id, $user_id, $topic_id ); 336 } 337 338 function add_topic_tag( $topic_id, $tag ) { 339 bb_log_deprecated('function', __FUNCTION__, 'bb_add_topic_tag'); 340 return bb_add_topic_tag( $topic_id, $tag ); 341 } 342 343 function add_topic_tags( $topic_id, $tags ) { 344 bb_log_deprecated('function', __FUNCTION__, 'bb_add_topic_tags'); 345 return bb_add_topic_tags( $topic_id, $tags ); 346 } 347 348 function create_tag( $tag ) { 349 bb_log_deprecated('function', __FUNCTION__, 'bb_create_tag'); 350 return bb_create_tag( $tag ); 351 } 352 353 function destroy_tag( $tag_id, $recount_topics = true ) { 354 bb_log_deprecated('function', __FUNCTION__, 'bb_destroy_tag'); 355 return bb_destroy_tag( $tag_id, $recount_topics ); 356 } 357 358 if ( !function_exists( 'get_tag_id' ) ) : 359 function get_tag_id( $tag ) { 360 bb_log_deprecated('function', __FUNCTION__, 'bb_get_tag_id'); 361 return bb_get_tag_id( $tag ); 362 } 363 endif; 364 365 if ( !function_exists( 'get_tag' ) ) : 366 function get_tag( $tag_id, $user_id = 0, $topic_id = 0 ) { 367 bb_log_deprecated('function', __FUNCTION__, 'bb_get_tag'); 368 return bb_get_tag( $tag_id, $user_id, $topic_id ); 369 } 370 endif; 371 372 if ( !function_exists( 'get_tag_by_name' ) ) : 373 function get_tag_by_name( $tag ) { 374 bb_log_deprecated('function', __FUNCTION__, 'bb_get_tag_by_name'); 375 return bb_get_tag( $tag ); 376 } 377 endif; 378 379 function get_topic_tags( $topic_id ) { 380 bb_log_deprecated('function', __FUNCTION__, 'bb_get_topic_tags'); 381 return bb_get_topic_tags( $topic_id ); 382 } 383 384 function get_user_tags( $topic_id, $user_id ) { 385 bb_log_deprecated('function', __FUNCTION__, 'bb_get_user_tags'); 386 return bb_get_user_tags( $topic_id, $user_id ); 387 } 388 389 function get_other_tags( $topic_id, $user_id ) { 390 bb_log_deprecated('function', __FUNCTION__, 'bb_get_other_tags'); 391 return bb_get_other_tags( $topic_id, $user_id ); 392 } 393 394 function get_public_tags( $topic_id ) { 395 bb_log_deprecated('function', __FUNCTION__, 'bb_get_public_tags'); 396 return bb_get_public_tags( $topic_id ); 397 } 398 399 function get_tagged_topic_ids( $tag_id ) { 400 bb_log_deprecated('function', __FUNCTION__, 'bb_get_tagged_topic_ids'); 401 return bb_get_tagged_topic_ids( $tag_id ); 402 } 403 404 if ( !function_exists( 'get_top_tags' ) ) : 405 function get_top_tags( $recent = true, $limit = 40 ) { 406 bb_log_deprecated('function', __FUNCTION__, 'bb_get_top_tags'); 407 return bb_get_top_tags( array( 'number' => $limit ) ); 408 } 409 endif; 410 411 if ( !function_exists( 'get_tag_name' ) ) : 412 function get_tag_name( $id = 0 ) { 413 bb_log_deprecated('function', __FUNCTION__, 'bb_get_tag_name'); 414 return bb_get_tag_name( $id ); 415 } 416 endif; 417 418 if ( !function_exists( 'tag_name' ) ) : 419 function tag_name( $id = 0 ) { 420 bb_log_deprecated('function', __FUNCTION__, 'bb_tag_name'); 421 bb_tag_name( $id ); 422 } 423 endif; 424 425 if ( !function_exists( 'get_tag_rss_link' ) ) : 426 function get_tag_rss_link( $id = 0 ) { 427 bb_log_deprecated('function', __FUNCTION__, 'bb_get_tag_posts_rss_link'); 428 return bb_get_tag_posts_rss_link( $id ); 429 } 430 endif; 431 432 if ( !function_exists( 'tag_rss_link' ) ) : 433 function tag_rss_link( $id = 0 ) { 434 bb_log_deprecated('function', __FUNCTION__, 'bb_tag_posts_rss_link'); 435 bb_tag_posts_rss_link( $id ); 436 } 437 endif; 438 439 if ( !function_exists( 'get_tag_page_link' ) ) : 440 function get_tag_page_link() { 441 bb_log_deprecated('function', __FUNCTION__, 'bb_get_tag_page_link'); 442 bb_get_tag_page_link(); 443 } 444 endif; 445 446 if ( !function_exists( 'tag_page_link' ) ) : 447 function tag_page_link() { 448 bb_log_deprecated('function', __FUNCTION__, 'bb_tag_page_link'); 449 bb_tag_page_link(); 450 } 451 endif; 452 453 if ( !function_exists( 'get_tag_remove_link' ) ) : 454 function get_tag_remove_link() { 455 bb_log_deprecated('function', __FUNCTION__, 'bb_get_tag_remove_link'); 456 bb_get_tag_remove_link(); 457 } 458 endif; 459 460 if ( !function_exists( 'tag_remove_link' ) ) : 461 function tag_remove_link() { 462 bb_log_deprecated('function', __FUNCTION__, 'bb_tag_remove_link'); 463 bb_tag_remove_link(); 464 } 465 endif; 466 467 if ( !function_exists( 'tag_heat_map' ) ) : 468 function tag_heat_map( $args = '' ) { 469 bb_log_deprecated('function', __FUNCTION__, 'bb_tag_heat_map (with variations to arguments)'); 470 $defaults = array( 'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'limit' => 45, 'format' => 'flat' ); 471 $args = wp_parse_args( $args, $defaults ); 472 473 if ( 1 < $fn = func_num_args() ) : // For back compat 474 $args['smallest'] = func_get_arg(0); 475 $args['largest'] = func_get_arg(1); 476 $args['unit'] = 2 < $fn ? func_get_arg(2) : $unit; 477 $args['limit'] = 3 < $fn ? func_get_arg(3) : $limit; 478 endif; 479 480 bb_tag_heat_map( $args ); 481 } 482 endif; 483 484 function get_bb_location() { 485 bb_log_deprecated('function', __FUNCTION__, 'no alternative'); 486 $r = bb_get_location(); 487 if ( !$r ) 488 $r = apply_filters( 'get_bb_location', '' ); // Deprecated filter 489 return $r; 490 } 491 492 function bb_parse_args( $args, $defaults = '' ) { 493 bb_log_deprecated('function', __FUNCTION__, 'wp_parse_args'); 494 return wp_parse_args( $args, $defaults ); 495 } 496 497 if ( !function_exists( 'is_tag' ) ) : 498 function is_tag() { 499 bb_log_deprecated('function', __FUNCTION__, 'bb_is_tag'); 500 return bb_is_tag(); 501 } 502 endif; 503 504 if ( !function_exists( 'is_tags' ) ) : 505 function is_tags() { 506 bb_log_deprecated('function', __FUNCTION__, 'bb_is_tags'); 507 return bb_is_tags(); 508 } 509 endif; 510 511 if ( !function_exists( 'tag_link' ) ) : 512 function tag_link() { 513 bb_log_deprecated('function', __FUNCTION__, 'bb_tag_link'); 514 bb_tag_link(); 515 } 516 endif; 517 518 if ( !function_exists( 'tag_link_base' ) ) : 519 function tag_link_base() { 520 bb_log_deprecated('function', __FUNCTION__, 'bb_tag_link_base'); 521 bb_tag_link_base(); 522 } 523 endif; 524 525 if ( !function_exists( 'get_tag_link' ) ) : 526 function get_tag_link() { 527 bb_log_deprecated('function', __FUNCTION__, 'bb_get_tag_link'); 528 bb_get_tag_link(); 529 } 530 endif; 531 532 if ( !function_exists( 'get_tag_link_base' ) ) : 533 function get_tag_link_base() { 534 bb_log_deprecated('function', __FUNCTION__, 'bb_get_tag_link_base'); 535 bb_get_tag_link_base(); 536 } 537 endif; 538 539 // It's not omnipotent 540 function bb_path_to_url( $path ) { 541 bb_log_deprecated('function', __FUNCTION__, 'no alternative'); 542 return apply_filters( 'bb_path_to_url', bb_convert_path_base( $path, BB_PATH, bb_get_uri(null, null, BB_URI_CONTEXT_TEXT) ), $path ); 543 } 544 545 // Neither is this one 546 function bb_url_to_path( $url ) { 547 bb_log_deprecated('function', __FUNCTION__, 'no alternative'); 548 return apply_filters( 'bb_url_to_path', bb_convert_path_base( $url, bb_get_uri(null, null, BB_URI_CONTEXT_TEXT), BB_PATH ), $url ); 549 } 550 551 function bb_convert_path_base( $path, $from_base, $to_base ) { 552 bb_log_deprecated('function', __FUNCTION__, 'no alternative'); 553 $last_char = $path{strlen($path)-1}; 554 if ( '/' != $last_char && '\\' != $last_char ) 555 $last_char = ''; 556 557 list($from_base, $to_base) = bb_trim_common_path_right($from_base, $to_base); 558 559 if ( 0 === strpos( $path, $from_base ) ) 560 $r = $to_base . substr($path, strlen($from_base)) . $last_char; 561 else 562 return false; 563 564 $r = str_replace(array('//', '\\\\'), array('/', '\\'), $r); 565 $r = preg_replace('|:/([^/])|', '://$1', $r); 566 567 return $r; 568 } 569 570 function bb_trim_common_path_right( $one, $two ) { 571 bb_log_deprecated('function', __FUNCTION__, 'no alternative'); 572 $root_one = false; 573 $root_two = false; 574 575 while ( false === $root_one ) { 576 $base_one = basename($one); 577 $base_two = basename($two); 578 if ( !$base_one || !$base_two ) 579 break; 580 if ( $base_one == $base_two ) { 581 $one = dirname($one); 582 $two = dirname($two); 583 } else { 584 $root_one = $one; 585 $root_two = $two; 586 } 587 } 588 589 return array($root_one, $root_two); 590 } 591 592 function deleted_topics( $where ) { 593 bb_log_deprecated('function', __FUNCTION__, 'no alternative'); 594 return preg_replace( '/(\w+\.)?topic_status = ["\']?0["\']?/', "\\1topic_status = 1", $where); 595 } 596 597 function no_replies( $where ) { 598 bb_log_deprecated('function', __FUNCTION__, 'no alternative'); 599 return $where . ' AND topic_posts = 1 '; 600 } 601 602 function untagged( $where ) { 603 bb_log_deprecated('function', __FUNCTION__, 'no alternative'); 604 return $where . ' AND tag_count = 0 '; 605 } 606 607 function get_views() { 608 bb_log_deprecated('function', __FUNCTION__, 'bb_get_views'); 609 return bb_get_views(); 610 } 611 612 if ( !function_exists( 'balanceTags' ) ) : 613 function balanceTags( $text ) { 614 bb_log_deprecated('function', __FUNCTION__, 'force_balance_tags'); 615 return force_balance_tags( $text ); 616 } 617 endif; 618 619 // With no extra arguments, converts array of objects into object of arrays 620 // With extra arguments corresponding to name of object properties, returns array of arrays: 621 // list($a, $b) = bb_pull_cols( $obj_array, 'a', 'b' ); 622 function bb_pull_cols( $obj_array ) { 623 bb_log_deprecated('function', __FUNCTION__, 'no alternative'); 624 $r = new stdClass; 625 foreach ( array_keys($obj_array) as $o ) 626 foreach ( get_object_vars( $obj_array[$o] ) as $k => $v ) 627 $r->{$k}[] = $v; 628 629 if ( 1 == func_num_args() ) 630 return $r; 631 632 $args = func_get_args(); 633 $args = array_splice($args, 1); 634 635 $a = array(); 636 foreach ( $args as $arg ) 637 $a[] = $r->$arg; 638 return $a; 639 } 640 641 // $length parameter is deprecated 642 function bb_random_pass( $length ) { 643 bb_log_deprecated('function', __FUNCTION__, 'bb_generate_password'); 644 if ( 12 < (int) $length ) { 645 $length = 12; 646 } 647 return bb_generate_password( $length ); 648 } 649 650 // Old RSS related functions 651 function get_recent_rss_link() { 652 bb_log_deprecated('function', __FUNCTION__, 'bb_get_posts_rss_link'); 653 return bb_get_posts_rss_link(); 654 } 655 656 function forum_rss_link( $forum_id = 0 ) { 657 bb_log_deprecated('function', __FUNCTION__, 'bb_get_forum_posts_rss_link'); 658 bb_forum_posts_rss_link( $forum_id ); 659 } 660 661 function get_forum_rss_link( $forum_id = 0 ) { 662 bb_log_deprecated('function', __FUNCTION__, 'bb_get_forum_posts_rss_link'); 663 return bb_get_forum_posts_rss_link( $forum_id ); 664 } 665 666 function bb_register_activation_hook($file, $function) { 667 bb_log_deprecated('function', __FUNCTION__, 'bb_register_plugin_activation_hook'); 668 bb_register_plugin_activation_hook($file, $function); 669 } 670 671 function bb_register_deactivation_hook($file, $function) { 672 bb_log_deprecated('function', __FUNCTION__, 'bb_register_plugin_deactivation_hook'); 673 bb_register_plugin_deactivation_hook($file, $function); 674 } 675 676 function bb_enqueue_script( $handle, $src = false, $deps = array(), $ver = false ) { 677 bb_log_deprecated('function', __FUNCTION__, 'wp_enqueue_script'); 678 wp_enqueue_script( $handle, $src, $deps, $ver ); 679 } 680 681 function bb_get_user_by_name( $name ) { 682 bb_log_deprecated('function', __FUNCTION__, 'bb_get_user'); 683 return bb_get_user( $name, array( 'by' => 'login' ) ); 684 } 685 686 function bb_user_exists( $user ) { 687 bb_log_deprecated('function', __FUNCTION__, 'bb_get_user'); 688 return bb_get_user( $user ); 689 } 690 691 function bb_maybe_serialize( $string ) { 692 bb_log_deprecated('function', __FUNCTION__, 'maybe_serialize'); 693 return maybe_serialize( $string ); 694 } 695 696 function bb_maybe_unserialize( $string ) { 697 bb_log_deprecated('function', __FUNCTION__, 'maybe_unserialize'); 698 return maybe_unserialize( $string ); 699 } 700 701 function bb_get_active_theme_folder() { 702 bb_log_deprecated('function', __FUNCTION__, 'bb_get_active_theme_directory'); 703 return apply_filters( 'bb_get_active_theme_folder', bb_get_active_theme_directory() ); 704 } 705 706 function bb_tag_sanitize( $tag ) { 707 bb_log_deprecated('function', __FUNCTION__, 'bb_pre_term_slug'); 708 return bb_pre_term_slug( $tag ); 709 } 710 711 function bb_get_tag_by_name( $tag ) { 712 bb_log_deprecated('function', __FUNCTION__, 'bb_get_tag'); 713 return bb_get_tag( $tag ); 714 } 715 716 function bb_dbDelta($queries, $execute = true) { 717 bb_log_deprecated('function', __FUNCTION__, 'bb_sql_delta'); 718 return bb_sql_delta($queries, $execute); 719 } 720 721 function bb_make_db_current() { 722 bb_log_deprecated('function', __FUNCTION__, 'no alternative'); 723 return false; 724 } 725 726 function bb_maybe_add_column( $table_name, $column_name, $create_ddl ) { 727 bb_log_deprecated('function', __FUNCTION__, 'no alternative'); 728 return false; 729 } 730 731 class BB_Cache { 732 var $use_cache = false; 733 var $flush_freq = 100; 734 var $flush_time = 172800; // 2 days 735 736 function get_user( $user_id, $use_cache = true ) { 737 bb_log_deprecated('class::function', __CLASS__ . '::' . __FUNCTION__, 'bb_get_user'); 738 return bb_get_user( $user_id ); 739 } 740 741 function append_current_user_meta( $user ) { 742 bb_log_deprecated('class::function', __CLASS__ . '::' . __FUNCTION__, 'bb_append_meta'); 743 return bb_append_meta( $user, 'user' ); 744 } 745 746 function append_user_meta( $user ) { 747 bb_log_deprecated('class::function', __CLASS__ . '::' . __FUNCTION__, 'bb_append_meta'); 748 return bb_append_meta( $user, 'user' ); 749 } 750 751 // NOT bbdb::prepared 752 function cache_users( $ids, $use_cache = true ) { 753 bb_log_deprecated('class::function', __CLASS__ . '::' . __FUNCTION__, 'bb_cache_users'); 754 return bb_cache_users( $ids ); 755 } 756 757 // NOT bbdb::prepared 758 function get_topic( $topic_id, $use_cache = true ) { 759 bb_log_deprecated('class::function', __CLASS__ . '::' . __FUNCTION__, 'get_topic'); 760 return get_topic( $topic_id, $use_cache ); 761 } 762 763 // NOT bbdb::prepared 764 function get_thread( $topic_id, $page = 1, $reverse = 0 ) { 765 bb_log_deprecated('class::function', __CLASS__ . '::' . __FUNCTION__, 'get_thread'); 766 return get_thread( $topic_id, $page, $reverse ); 767 } 768 769 // NOT bbdb::prepared 770 function cache_posts( $query ) { // soft cache 771 bb_log_deprecated('class::function', __CLASS__ . '::' . __FUNCTION__, 'bb_cache_posts'); 772 return bb_cache_posts( $query ); 773 } 774 775 // NOT bbdb::prepared 776 function get_forums() { 777 bb_log_deprecated('class::function', __CLASS__ . '::' . __FUNCTION__, 'bb_get_forums'); 778 return bb_get_forums(); 779 } 780 781 function get_forum( $forum_id ) { 782 bb_log_deprecated('class::function', __CLASS__ . '::' . __FUNCTION__, 'bb_get_forum'); 783 return bb_get_forum( $forum_id ); 784 } 785 786 function read_cache($file) { 787 bb_log_deprecated('class::function', __CLASS__ . '::' . __FUNCTION__, 'no alternative'); 788 return false; 789 } 790 791 function write_cache($file, $data) { 792 bb_log_deprecated('class::function', __CLASS__ . '::' . __FUNCTION__, 'no alternative'); 793 return false; 794 } 795 796 function flush_one( $type, $id = false, $page = 0 ) { 797 bb_log_deprecated('class::function', __CLASS__ . '::' . __FUNCTION__, 'no alternative'); 798 return true; 799 } 800 801 function flush_many( $type, $id, $start = 0 ) { 802 bb_log_deprecated('class::function', __CLASS__ . '::' . __FUNCTION__, 'no alternative'); 803 return true; 804 } 805 806 function flush_old() { 807 bb_log_deprecated('class::function', __CLASS__ . '::' . __FUNCTION__, 'no alternative'); 808 return true; 809 } 810 811 function flush_all() { 812 bb_log_deprecated('class::function', __CLASS__ . '::' . __FUNCTION__, 'no alternative'); 813 return true; 814 } 815 816 } 817 818 function new_topic( $args = null ) { 819 bb_log_deprecated( 'function', __FUNCTION__, 'bb_new_topic_link' ); 820 bb_new_topic_link( $args ); 821 } 822 823 function bb_upgrade_1060() { 824 bb_log_deprecated( 'function', __FUNCTION__, 'no alternative' ); 825 } 826 827 if ( !function_exists( 'paginate_links' ) ) : // Deprecated in bbPress not WordPress 828 function paginate_links( $args = '' ) { 829 bb_log_deprecated( 'function', __FUNCTION__, 'bb_paginate_links' ); 830 return bb_paginate_links( $args ); 831 } 832 endif; 833 834 if ( !function_exists('wp_clear_auth_cookie') ) : // Deprecated in bbPress not WordPress 835 function wp_clear_auth_cookie() { 836 bb_log_deprecated( 'function', __FUNCTION__, 'bb_clear_auth_cookie' ); 837 bb_clear_auth_cookie(); 838 } 839 endif; 840 841 if ( !function_exists( 'wp_validate_auth_cookie' ) ) : // Deprecated in bbPress not WordPress 842 function wp_validate_auth_cookie( $cookie = '', $scheme = 'auth' ) { 843 bb_log_deprecated( 'function', __FUNCTION__, 'bb_validate_auth_cookie' ); 844 return bb_validate_auth_cookie( $cookie, $scheme ); 845 } 846 endif; 847 848 if ( !function_exists( 'wp_set_auth_cookie' ) ) : // Deprecated in bbPress not WordPress 849 function wp_set_auth_cookie( $user_id, $remember = false, $secure = '' ) { 850 bb_log_deprecated( 'function', __FUNCTION__, 'bb_set_auth_cookie' ); 851 bb_set_auth_cookie( $user_id, $remember, $secure ); 852 } 853 endif; 854 855 if ( !function_exists( 'wp_salt' ) ) : // Deprecated in bbPress not WordPress 856 function wp_salt( $scheme = 'auth' ) { 857 bb_log_deprecated( 'function', __FUNCTION__, 'bb_salt' ); 858 return bb_salt( $scheme ); 859 } 860 endif; 861 862 if ( !function_exists( 'wp_hash' ) ) : // Deprecated in bbPress not WordPress 863 function wp_hash( $data, $scheme = 'auth' ) { 864 bb_log_deprecated( 'function', __FUNCTION__, 'bb_hash' ); 865 return bb_hash( $data, $scheme ); 866 } 867 endif; 868 869 if ( !function_exists( 'wp_hash_password' ) ) : // Deprecated in bbPress not WordPress 870 function wp_hash_password( $password ) { 871 bb_log_deprecated( 'function', __FUNCTION__, 'bb_hash_password' ); 872 return bb_hash_password( $password ); 873 } 874 endif; 875 876 if ( !function_exists( 'wp_check_password') ) : // Deprecated in bbPress not WordPress 877 function wp_check_password( $password, $hash, $user_id = '' ) { 878 bb_log_deprecated( 'function', __FUNCTION__, 'bb_check_password' ); 879 return bb_check_password( $password, $hash, $user_id ); 880 } 881 endif; 882 883 if ( !function_exists( 'wp_generate_password' ) ) : // Deprecated in bbPress not WordPress 884 function wp_generate_password( $length = 12, $special_chars = true ) { 885 bb_log_deprecated( 'function', __FUNCTION__, 'bb_generate_password' ); 886 return bb_generate_password( $length, $special_chars ); 887 } 888 endif; 889 890 if ( !class_exists( 'WP_User' ) ) : // Deprecated in BackPress not WordPress 891 class WP_User extends BP_User { 892 function WP_User( $id, $name = '' ) { 893 return parent::BP_User( $id, $name ); 894 } 895 } 896 endif; 897 898 function bb_sql_get_column_definition( $column_data ) { 899 require_once( BACKPRESS_PATH . 'class.bp-sql-schema-parser.php' ); 900 bb_log_deprecated( 'function', __FUNCTION__, 'BP_SQL_Schema_Parser::get_column_definition' ); 901 return BP_SQL_Schema_Parser::get_column_definition( $column_data ); 902 } 903 904 function bb_sql_get_index_definition( $index_data ) { 905 require_once( BACKPRESS_PATH . 'class.bp-sql-schema-parser.php' ); 906 bb_log_deprecated( 'function', __FUNCTION__, 'BP_SQL_Schema_Parser::get_index_definition' ); 907 return BP_SQL_Schema_Parser::get_index_definition( $index_data ); 908 } 909 910 function bb_sql_describe_table( $query ) { 911 require_once( BACKPRESS_PATH . 'class.bp-sql-schema-parser.php' ); 912 bb_log_deprecated( 'function', __FUNCTION__, 'BP_SQL_Schema_Parser::describe_table' ); 913 return BP_SQL_Schema_Parser::describe_table( $query ); 914 } 915 916 function bb_sql_parse( $sql ) { 917 require_once( BACKPRESS_PATH . 'class.bp-sql-schema-parser.php' ); 918 bb_log_deprecated( 'function', __FUNCTION__, 'BP_SQL_Schema_Parser::parse' ); 919 return BP_SQL_Schema_Parser::parse( $sql ); 920 } 921 922 function bb_sql_delta( $queries, $execute = true ) { 923 require_once( BACKPRESS_PATH . 'class.bp-sql-schema-parser.php' ); 924 bb_log_deprecated( 'function', __FUNCTION__, 'BP_SQL_Schema_Parser::delta' ); 925 global $bbdb; 926 return BP_SQL_Schema_Parser::delta( $bbdb, $queries, false, $execute ); 927 } 928 929 function is_front() { 930 bb_log_deprecated( 'function', __FUNCTION__, 'bb_is_front' ); 931 return bb_is_front(); 932 } 933 934 function is_forum() { 935 bb_log_deprecated( 'function', __FUNCTION__, 'bb_is_forum' ); 936 return bb_is_forum(); 937 } 938 939 function is_bb_tags() { 940 bb_log_deprecated( 'function', __FUNCTION__, 'bb_is_tags' ); 941 return bb_is_tags(); 942 } 943 944 function is_bb_tag() { 945 bb_log_deprecated( 'function', __FUNCTION__, 'bb_is_tag' ); 946 return bb_is_tag(); 947 } 948 949 function is_topic_edit() { 950 bb_log_deprecated( 'function', __FUNCTION__, 'bb_is_topic_edit' ); 951 return bb_is_topic_edit(); 952 } 953 954 function is_topic() { 955 bb_log_deprecated( 'function', __FUNCTION__, 'bb_is_topic' ); 956 return bb_is_topic(); 957 } 958 959 function is_bb_feed() { 960 bb_log_deprecated( 'function', __FUNCTION__, 'bb_is_feed' ); 961 return bb_is_feed(); 962 } 963 964 function is_bb_search() { 965 bb_log_deprecated( 'function', __FUNCTION__, 'bb_is_search' ); 966 return bb_is_search(); 967 } 968 969 function is_bb_profile() { 970 bb_log_deprecated( 'function', __FUNCTION__, 'bb_is_profile' ); 971 return bb_is_profile(); 972 } 973 974 function is_bb_favorites() { 975 bb_log_deprecated( 'function', __FUNCTION__, 'bb_is_favorites' ); 976 return bb_is_favorites(); 977 } 978 979 function is_view() { 980 bb_log_deprecated( 'function', __FUNCTION__, 'bb_is_view' ); 981 return bb_is_view(); 982 } 983 984 function is_bb_stats() { 985 bb_log_deprecated( 'function', __FUNCTION__, 'bb_is_statistics' ); 986 return bb_is_statistics(); 987 } 988 989 function is_bb_admin() { 990 bb_log_deprecated( 'function', __FUNCTION__, 'bb_is_admin' ); 991 return bb_is_admin(); 992 } 993 994 function bb_verify_email( $email, $check_dns = false ) 995 { 996 bb_log_deprecated( 'function', __FUNCTION__, 'is_email' ); 997 return is_email( $email, $check_dns ); 998 } 999 1000 function bb_tag_rss_link( $tag_id = 0, $context = 0 ) 1001 { 1002 bb_log_deprecated( 'function', __FUNCTION__, 'bb_tag_posts_rss_link' ); 1003 return bb_tag_posts_rss_link( $tag_id, $context ); 1004 } 1005 1006 function bb_get_tag_rss_link( $tag_id = 0, $context = 0 ) 1007 { 1008 bb_log_deprecated( 'function', __FUNCTION__, 'bb_get_tag_posts_rss_link' ); 1009 return bb_get_tag_posts_rss_link( $tag_id, $context ); 1010 } 1011 1012 function rename_tag( $tag_id, $tag_name ) 1013 { 1014 bb_log_deprecated( 'function', __FUNCTION__, 'bb_rename_tag' ); 1015 return bb_rename_tag( $tag_id, $tag_name ); 1016 } 1017 1018 function merge_tags( $old_id, $new_id ) 1019 { 1020 bb_log_deprecated( 'function', __FUNCTION__, 'bb_merge_tags' ); 1021 return bb_merge_tags( $old_id, $new_id ); 1022 } 1023 1024 function bb_related_tags( $_tag = false, $number = 0 ) 1025 { 1026 bb_log_deprecated( 'function', __FUNCTION__, 'no alternative' ); 1027 return false; 1028 } 1029 1030 function bb_related_tags_heat_map( $args = '' ) 1031 { 1032 bb_log_deprecated( 'function', __FUNCTION__, 'no alternative' ); 1033 return; 1034 } 1035 1036 function bb_cache_javascript_headers() 1037 { 1038 bb_log_deprecated( 'function', __FUNCTION__, 'cache_javascript_headers' ); 1039 cache_javascript_headers(); 1040 } 1041 1042 function bb_is_ssl() 1043 { 1044 bb_log_deprecated( 'function', __FUNCTION__, 'is_ssl' ); 1045 return is_ssl(); 1046 } 1047 1048 function bb_force_ssl_user_forms( $force = '' ) 1049 { 1050 bb_log_deprecated( 'function', __FUNCTION__, 'force_ssl_login' ); 1051 return force_ssl_login( $force ); 1052 } 1053 1054 function bb_force_ssl_admin( $force = '' ) 1055 { 1056 bb_log_deprecated( 'function', __FUNCTION__, 'force_ssl_admin' ); 1057 return force_ssl_admin( $force ); 1058 } 1059 1060 function get_forums( $args = null ) 1061 { 1062 bb_log_deprecated( 'function', __FUNCTION__, 'bb_get_forums' ); 1063 return bb_get_forums( $args ); 1064 } 1065 1066 function get_forum( $id ) 1067 { 1068 bb_log_deprecated( 'function', __FUNCTION__, 'bb_get_forum' ); 1069 return bb_get_forum( $id ); 1070 } 1071 1072 function get_latest_posts( $limit = 0, $page = 1 ) 1073 { 1074 bb_log_deprecated( 'function', __FUNCTION__, 'bb_get_latest_posts' ); 1075 return bb_get_latest_posts( $limit, $page ); 1076 } 1077 1078 function get_latest_forum_posts( $forum_id, $limit = 0, $page = 1 ) 1079 { 1080 bb_log_deprecated( 'function', __FUNCTION__, 'bb_get_latest_forum_posts' ); 1081 return bb_get_latest_forum_posts( $forum_id, $limit, $page ); 1082 } 1083 1084 function update_post_positions( $topic_id ) 1085 { 1086 bb_log_deprecated( 'function', __FUNCTION__, 'bb_update_post_positions' ); 1087 return bb_update_post_positions( $topic_id ); 1088 } 1089 1090 function topics_replied_on_undelete_post( $post_id ) 1091 { 1092 bb_log_deprecated( 'function', __FUNCTION__, 'bb_topics_replied_on_undelete_post' ); 1093 return bb_topics_replied_on_undelete_post( $post_id ); 1094 } 1095 1096 function post_author_cache( $posts ) 1097 { 1098 bb_log_deprecated( 'function', __FUNCTION__, 'bb_post_author_cache' ); 1099 return bb_post_author_cache( $posts ); 1100 } 1101 1102 function get_recent_user_replies( $user_id ) 1103 { 1104 bb_log_deprecated( 'function', __FUNCTION__, 'bb_get_recent_user_replies' ); 1105 return bb_get_recent_user_replies( $user_id ); 1106 } 1107 1108 function no_where( $where ) 1109 { 1110 bb_log_deprecated( 'function', __FUNCTION__, 'bb_no_where' ); 1111 return bb_no_where( $where ); 1112 } 1113 1114 function get_path( $level = 1, $base = false, $request = false ) 1115 { 1116 bb_log_deprecated( 'function', __FUNCTION__, 'bb_get_path' ); 1117 return bb_get_path( $level, $base, $request ); 1118 } 1119 1120 function add_profile_tab( $tab_title, $users_cap, $others_cap, $file, $arg = false ) 1121 { 1122 bb_log_deprecated( 'function', __FUNCTION__, 'bb_add_profile_tab' ); 1123 return bb_add_profile_tab( $tab_title, $users_cap, $others_cap, $file, $arg ); 1124 } 1125 1126 function can_access_tab( $profile_tab, $viewer_id, $owner_id ) 1127 { 1128 bb_log_deprecated( 'function', __FUNCTION__, 'bb_can_access_tab' ); 1129 return bb_can_access_tab( $profile_tab, $viewer_id, $owner_id ); 1130 } 1131 1132 function get_profile_info_keys( $context = null ) 1133 { 1134 bb_log_deprecated( 'function', __FUNCTION__, 'bb_get_profile_info_keys' ); 1135 return bb_get_profile_info_keys( $context ); 1136 } 1137 1138 function get_profile_admin_keys( $context = null ) 1139 { 1140 bb_log_deprecated( 'function', __FUNCTION__, 'bb_get_profile_admin_keys' ); 1141 return bb_get_profile_admin_keys( $context ); 1142 } 1143 1144 function get_assignable_caps() 1145 { 1146 bb_log_deprecated( 'function', __FUNCTION__, 'bb_get_assignable_caps' ); 1147 return bb_get_assignable_caps(); 1148 } 1149 1150 function get_page_number( $item, $per_page = 0 ) 1151 { 1152 bb_log_deprecated( 'function', __FUNCTION__, 'bb_get_page_number' ); 1153 return bb_get_page_number( $item, $per_page ); 1154 } 1155 1156 function get_recent_registrants( $num = 10 ) 1157 { 1158 bb_log_deprecated('function', __FUNCTION__, 'no aternative'); 1159 return; 1160 } 1161 1162 if ( !function_exists( 'get_total_users' ) ) { 1163 function get_total_users() 1164 { 1165 bb_log_deprecated( 'function', __FUNCTION__, 'bb_get_total_users' ); 1166 return bb_get_total_users(); 1167 } 1168 } 1169 1170 function total_users() 1171 { 1172 bb_log_deprecated( 'function', __FUNCTION__, 'bb_total_users' ); 1173 bb_total_users(); 1174 } 1175 1176 if ( !function_exists( 'update_user_status' ) ) { 1177 function update_user_status( $user_id, $user_status = 0 ) 1178 { 1179 bb_log_deprecated( 'function', __FUNCTION__, 'bb_update_user_status' ); 1180 return bb_update_user_status( $user_id, $user_status ); 1181 } 1182 } 1183 1184 function bb_get_current_commenter() { 1185 bb_log_deprecated( 'function', __FUNCTION__, 'bb_get_current_poster' ); 1186 extract( bb_get_current_poster() ); 1187 return array( 'comment_author' => $post_author, 'comment_email' => $post_author_email, 'comment_author_url' => $post_author_url ); 1188 } 1189 1190 function bb_check_comment_flood( $ip = '', $email = '', $date = '' ) { 1191 bb_log_deprecated( 'function', __FUNCTION__, 'bb_check_post_flood' ); 1192 bb_check_post_flood(); 1193 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Mon Nov 15 04:45:27 2010 | Cross-referenced by PHPXref 0.7 |