Changeset 3748
- Timestamp:
- 01/19/2011 11:15:29 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
bp-core/bp-core-deprecated.php (modified) (1 diff)
-
bp-themes/bp-default/functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-deprecated.php
r3742 r3748 58 58 } 59 59 60 /** 61 * Contains functions which were moved out of BP-Default's functions.php in BuddyPress 1.3. 62 * 63 * @since 1.3 64 */ 65 function bp_dtheme_deprecated() { 66 if ( !function_exists( 'bp_dtheme_wp_pages_filter' ) ) : 67 /** 68 * In BuddyPress 1.2.x, this function filtered the dropdown on the Settings > Reading screen for selecting 69 * the page to show on front to include "Activity Stream." 70 * As of 1.3.x, it is no longer required. 71 * 72 * @deprecated 1.3 73 * @deprecated No longer required. 74 * @param string $page_html A list of pages as a dropdown (select list) 75 * @return string 76 * @see wp_dropdown_pages() 77 * @since 1.2 78 */ 79 function bp_dtheme_wp_pages_filter( $page_html ) { 80 _deprecated_function( __FUNCTION__, '1.3', "No longer required." ); 81 return $page_html; 82 } 83 endif; 60 84 85 if ( !function_exists( 'bp_dtheme_page_on_front_update' ) ) : 86 /** 87 * In BuddyPress 1.2.x, this function hijacked the saving of page on front setting to save the activity stream setting. 88 * As of 1.3.x, it is no longer required. 89 * 90 * @deprecated 1.3 91 * @deprecated No longer required. 92 * @param $string $oldvalue Previous value of get_option( 'page_on_front' ) 93 * @param $string $oldvalue New value of get_option( 'page_on_front' ) 94 * @return string 95 * @since 1.2 96 */ 97 function bp_dtheme_page_on_front_update( $oldvalue, $newvalue ) { 98 _deprecated_function( __FUNCTION__, '1.3', "No longer required." ); 99 if ( !is_admin() || !is_super_admin() ) 100 return false; 101 102 return $oldvalue; 103 } 104 endif; 105 106 if ( !function_exists( 'bp_dtheme_page_on_front_template' ) ) : 107 /** 108 * In BuddyPress 1.2.x, this function loaded the activity stream template if the front page display settings allow. 109 * As of 1.3.x, it is no longer required. 110 * 111 * @deprecated 1.3 112 * @deprecated No longer required. 113 * @param string $template Absolute path to the page template 114 * @return string 115 * @since 1.2 116 */ 117 function bp_dtheme_page_on_front_template( $template ) { 118 _deprecated_function( __FUNCTION__, '1.3', "No longer required." ); 119 return $template; 120 } 121 endif; 122 123 if ( !function_exists( 'bp_dtheme_fix_get_posts_on_activity_front' ) ) : 124 /** 125 * In BuddyPress 1.2.x, this forced the page ID as a string to stop the get_posts query from kicking up a fuss. 126 * As of 1.3.x, it is no longer required. 127 * 128 * @deprecated 1.3 129 * @deprecated No longer required. 130 * @since 1.2 131 */ 132 function bp_dtheme_fix_get_posts_on_activity_front() { 133 _deprecated_function( __FUNCTION__, '1.3', "No longer required." ); 134 } 135 endif; 136 137 if ( !function_exists( 'bp_dtheme_fix_the_posts_on_activity_front' ) ) : 138 /** 139 * In BuddyPress 1.2.x, this was used as part of the code that set the activity stream to be on the front page. 140 * As of 1.3.x, it is no longer required. 141 * 142 * @deprecated 1.3 143 * @deprecated No longer required. 144 * @param array $posts Posts as retrieved by WP_Query 145 * @return array 146 * @since 1.2.5 147 */ 148 function bp_dtheme_fix_the_posts_on_activity_front( $posts ) { 149 _deprecated_function( __FUNCTION__, '1.3', "No longer required." ); 150 return $posts; 151 } 152 endif; 153 154 if ( !function_exists( 'bp_dtheme_add_blog_comments_js' ) ) : 155 /** 156 * In BuddyPress 1.2.x, this added the javascript needed for blog comment replies. 157 * As of 1.3.x, we recommend that you enqueue the comment-reply javascript in your theme's header.php. 158 * 159 * @deprecated 1.3 160 * @deprecated Enqueue the comment-reply script in your theme's header.php. 161 * @since 1.2 162 */ 163 function bp_dtheme_add_blog_comments_js() { 164 _deprecated_function( __FUNCTION__, '1.3', "Enqueue the comment-reply script in your theme's header.php." ); 165 if ( is_singular() && bp_is_blog_page() && get_option( 'thread_comments' ) ) 166 wp_enqueue_script( 'comment-reply' ); 167 } 168 endif; 169 } 170 add_action( 'after_setup_theme', 'bp_dtheme_deprecated', 15 ); 61 171 ?> -
trunk/bp-themes/bp-default/functions.php
r3745 r3748 626 626 add_action( 'comment_form', 'bp_dtheme_after_comment_form' ); 627 627 endif; 628 629 // Everything beyond this point is deprecated as of BuddyPress 1.3. This will be removed in a future version.630 631 if ( BP_VERSION < 1.3 ) :632 633 /**634 * In BuddyPress 1.2.x, this function filtered the dropdown on the Settings > Reading screen for selecting635 * the page to show on front to include "Activity Stream."636 * As of 1.3.x, it is no longer required.637 *638 * @deprecated 1.3639 * @deprecated No longer required.640 * @param string $page_html A list of pages as a dropdown (select list)641 * @return string642 * @see wp_dropdown_pages()643 * @since 1.2644 */645 function bp_dtheme_wp_pages_filter( $page_html ) {646 _deprecated_function( __FUNCTION__, '1.3', "No longer required." );647 return $page_html;648 }649 650 /**651 * In BuddyPress 1.2.x, this function hijacked the saving of page on front setting to save the activity stream setting.652 * As of 1.3.x, it is no longer required.653 *654 * @deprecated 1.3655 * @deprecated No longer required.656 * @param $string $oldvalue Previous value of get_option( 'page_on_front' )657 * @param $string $oldvalue New value of get_option( 'page_on_front' )658 * @return string659 * @since 1.2660 */661 function bp_dtheme_page_on_front_update( $oldvalue, $newvalue ) {662 _deprecated_function( __FUNCTION__, '1.3', "No longer required." );663 if ( !is_admin() || !is_super_admin() )664 return false;665 666 return $oldvalue;667 }668 669 /**670 * In BuddyPress 1.2.x, this function loaded the activity stream template if the front page display settings allow.671 * As of 1.3.x, it is no longer required.672 *673 * @deprecated 1.3674 * @deprecated No longer required.675 * @param string $template Absolute path to the page template676 * @return string677 * @since 1.2678 */679 function bp_dtheme_page_on_front_template( $template ) {680 _deprecated_function( __FUNCTION__, '1.3', "No longer required." );681 return $template;682 }683 684 /**685 * In BuddyPress 1.2.x, this forced the page ID as a string to stop the get_posts query from kicking up a fuss.686 * As of 1.3.x, it is no longer required.687 *688 * @deprecated 1.3689 * @deprecated No longer required.690 * @since 1.2691 */692 function bp_dtheme_fix_get_posts_on_activity_front() {693 _deprecated_function( __FUNCTION__, '1.3', "No longer required." );694 }695 696 /**697 * In BuddyPress 1.2.x, this was used as part of the code that set the activity stream to be on the front page.698 * As of 1.3.x, it is no longer required.699 *700 * @deprecated 1.3701 * @deprecated No longer required.702 * @param array $posts Posts as retrieved by WP_Query703 * @return array704 * @since 1.2.5705 */706 function bp_dtheme_fix_the_posts_on_activity_front( $posts ) {707 _deprecated_function( __FUNCTION__, '1.3', "No longer required." );708 return $posts;709 }710 711 /**712 * In BuddyPress 1.2.x, this added the javascript needed for blog comment replies.713 * As of 1.3.x, we recommend that you enqueue the comment-reply javascript in your theme's header.php.714 *715 * @deprecated 1.3716 * @deprecated Enqueue the comment-reply script in your theme's header.php.717 * @since 1.2718 */719 function bp_dtheme_add_blog_comments_js() {720 _deprecated_function( __FUNCTION__, '1.3', "Enqueue the comment-reply script in your theme's header.php." );721 if ( is_singular() && bp_is_blog_page() && get_option( 'thread_comments' ) )722 wp_enqueue_script( 'comment-reply' );723 }724 endif;725 726 628 ?>
Note: See TracChangeset
for help on using the changeset viewer.