Changeset 7952 for trunk/bp-templates/bp-legacy/buddypress-functions.php
- Timestamp:
- 02/21/2014 02:49:33 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-templates/bp-legacy/buddypress-functions.php
r7949 r7952 226 226 // without it 227 227 if ( isset( $asset['location'], $asset['handle'] ) ) { 228 wp_enqueue_script( $asset['handle'], $asset['location'], array( 'jquery'), $this->version );228 wp_enqueue_script( $asset['handle'], $asset['location'], bp_core_get_js_dependencies(), $this->version ); 229 229 } 230 230 231 231 // Add words that we need to use in JS to the end of the page 232 232 // so they can be translated and still used. 233 $params = a rray(233 $params = apply_filters( 'bp_core_get_js_strings', array( 234 234 'accepted' => __( 'Accepted', 'buddypress' ), 235 235 'close' => __( 'Close', 'buddypress' ), … … 245 245 'unsaved_changes' => __( 'Your profile has unsaved changes. If you leave the page, the changes will be lost.', 'buddypress' ), 246 246 'view' => __( 'View', 'buddypress' ), 247 ) ;247 ) ); 248 248 wp_localize_script( $asset['handle'], 'BP_DTheme', $params ); 249 249 … … 510 510 $just_posted = wp_parse_id_list( $_POST['exclude_just_posted'] ); 511 511 $qs[] = 'exclude=' . implode( ',', $just_posted ); 512 } 513 514 // to get newest activities 515 if ( ! empty( $_POST['offset'] ) ) { 516 $qs[] = 'offset=' . intval( $_POST['offset'] ); 512 517 } 513 518 … … 650 655 */ 651 656 function bp_legacy_theme_post_update() { 657 $bp = buddypress(); 658 652 659 // Bail if not a POST action 653 660 if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) ) … … 678 685 exit( '-1<div id="message" class="error"><p>' . __( 'There was a problem posting your update, please try again.', 'buddypress' ) . '</p></div>' ); 679 686 680 if ( bp_has_activities ( 'include=' . $activity_id ) ) { 687 if ( ! empty( $_POST['offset'] ) && $last_id = absint( $_POST['offset'] ) ) { 688 $activity_args = array( 'offset' => $last_id ); 689 $bp->activity->new_update_id = $activity_id; 690 add_filter( 'bp_get_activity_css_class', 'bp_activity_newest_class', 10, 1 ); 691 } else { 692 $activity_args = array( 'include' => $activity_id ); 693 } 694 695 if ( bp_has_activities ( $activity_args ) ) { 681 696 while ( bp_activities() ) { 682 697 bp_the_activity(); 683 698 bp_get_template_part( 'activity/entry' ); 684 699 } 700 } 701 702 if ( ! empty( $last_id ) ) { 703 remove_filter( 'bp_get_activity_css_class', 'bp_activity_newest_class', 10, 1 ); 685 704 } 686 705
Note: See TracChangeset
for help on using the changeset viewer.