bp_dtheme_deprecated

Contains functions which were moved out of BP-Default's functions.php in BuddyPress 1.5.

Description

bp_dtheme_deprecated(); 

Usage

  1. if ( !function_exists( 'bp_dtheme_deprecated' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/deprecated/1.5.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_dtheme_deprecated(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bp-core/deprecated/1.5.php  
  1. function bp_dtheme_deprecated() { 
  2. if ( !function_exists( 'bp_dtheme_wp_pages_filter' ) ) : 
  3. /** 
  4. * In BuddyPress 1.2.x, this function filtered the dropdown on the 
  5. * Settings > Reading screen for selecting the page to show on front to 
  6. * include "Activity Stream." As of 1.5.x, it is no longer required. 
  7. * @deprecated 1.5.0 
  8. * @deprecated No longer required. 
  9. * @param string $page_html A list of pages as a dropdown (select list) 
  10. * @return string 
  11. * @see wp_dropdown_pages() 
  12. * @since 1.2.0 
  13. */ 
  14. function bp_dtheme_wp_pages_filter( $page_html ) { 
  15. _deprecated_function( __FUNCTION__, '1.5', "No longer required." ); 
  16. return $page_html; 
  17. endif; 
  18.  
  19. if ( !function_exists( 'bp_dtheme_page_on_front_update' ) ) : 
  20. /** 
  21. * In BuddyPress 1.2.x, this function hijacked the saving of page on front setting to save the activity stream setting. 
  22. * As of 1.5.x, it is no longer required. 
  23. * @deprecated 1.5.0 
  24. * @deprecated No longer required. 
  25. * @param string $oldvalue Previous value of get_option( 'page_on_front' ) 
  26. * @param string $oldvalue New value of get_option( 'page_on_front' ) 
  27. * @return bool|string 
  28. * @since 1.2.0 
  29. */ 
  30. function bp_dtheme_page_on_front_update( $oldvalue, $newvalue ) { 
  31. _deprecated_function( __FUNCTION__, '1.5', "No longer required." ); 
  32. if ( !is_admin() || !bp_current_user_can( 'bp_moderate' ) ) 
  33. return false; 
  34.  
  35. return $oldvalue; 
  36. endif; 
  37.  
  38. if ( !function_exists( 'bp_dtheme_page_on_front_template' ) ) : 
  39. /** 
  40. * In BuddyPress 1.2.x, this function loaded the activity stream template if the front page display settings allow. 
  41. * As of 1.5.x, it is no longer required. 
  42. * @deprecated 1.5.0 
  43. * @deprecated No longer required. 
  44. * @param string $template Absolute path to the page template 
  45. * @return string 
  46. * @since 1.2.0 
  47. */ 
  48. function bp_dtheme_page_on_front_template( $template ) { 
  49. _deprecated_function( __FUNCTION__, '1.5', "No longer required." ); 
  50. return $template; 
  51. endif; 
  52.  
  53. if ( !function_exists( 'bp_dtheme_fix_get_posts_on_activity_front' ) ) : 
  54. /** 
  55. * In BuddyPress 1.2.x, this forced the page ID as a string to stop the get_posts query from kicking up a fuss. 
  56. * As of 1.5.x, it is no longer required. 
  57. * @deprecated 1.5.0 
  58. * @deprecated No longer required. 
  59. * @since 1.2.0 
  60. */ 
  61. function bp_dtheme_fix_get_posts_on_activity_front() { 
  62. _deprecated_function( __FUNCTION__, '1.5', "No longer required." ); 
  63. endif; 
  64.  
  65. if ( !function_exists( 'bp_dtheme_fix_the_posts_on_activity_front' ) ) : 
  66. /** 
  67. * In BuddyPress 1.2.x, this was used as part of the code that set the activity stream to be on the front page. 
  68. * As of 1.5.x, it is no longer required. 
  69. * @deprecated 1.5.0 
  70. * @deprecated No longer required. 
  71. * @param array $posts Posts as retrieved by WP_Query 
  72. * @return array 
  73. * @since 1.2.5 
  74. */ 
  75. function bp_dtheme_fix_the_posts_on_activity_front( $posts ) { 
  76. _deprecated_function( __FUNCTION__, '1.5', "No longer required." ); 
  77. return $posts; 
  78. endif; 
  79.  
  80. if ( !function_exists( 'bp_dtheme_add_blog_comments_js' ) ) : 
  81. /** 
  82. * In BuddyPress 1.2.x, this added the JavaScript needed for blog comment replies. 
  83. * As of 1.5.x, we recommend that you enqueue the comment-reply JavaScript in your theme's header.php. 
  84. * @deprecated 1.5.0 
  85. * @deprecated Enqueue the comment-reply script in your theme's header.php. 
  86. * @since 1.2.0 
  87. */ 
  88. function bp_dtheme_add_blog_comments_js() { 
  89. _deprecated_function( __FUNCTION__, '1.5', "Enqueue the comment-reply script in your theme's header.php." ); 
  90. if ( is_singular() && bp_is_blog_page() && get_option( 'thread_comments' ) ) 
  91. wp_enqueue_script( 'comment-reply' ); 
  92. endif;