Changeset 876405
- Timestamp:
- 03/17/2014 02:45:34 AM (12 years ago)
- Location:
- bp-group-hierarchy/trunk
- Files:
-
- 6 edited
-
bp-group-hierarchy-classes.php (modified) (5 diffs)
-
bp-group-hierarchy-filters.php (modified) (1 diff)
-
bp-group-hierarchy-loader.php (modified) (5 diffs)
-
bp-group-hierarchy-template.php (modified) (1 diff)
-
extension.php (modified) (4 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
bp-group-hierarchy/trunk/bp-group-hierarchy-classes.php
r830940 r876405 19 19 20 20 var $vars = null; 21 22 function bp_groups_hierarchy( $id, $parent_id = 0 ) { 23 return $this->__construct( $id, $parent_id ); 24 } 25 26 function __construct( $id, $parent_id = 0 ) { 21 22 function __construct( $id, $parent_id = 0, $args = array() ) { 27 23 28 24 global $bp, $wpdb; … … 38 34 } 39 35 36 $this->args = wp_parse_args( $args, array( 37 'populate_extras' => false, 38 ) ); 39 40 40 if( ! is_numeric( $id ) ) { 41 41 $id = $this->group_exists( $id, $parent_id ); … … 147 147 } 148 148 149 function get_total_subgroup_count( $group_id = null ) {149 public static function get_total_subgroup_count( $group_id = null ) { 150 150 global $wpdb, $bp; 151 151 … … 247 247 * Get the full path for a group 248 248 */ 249 function get_path( $group_id ) {249 public static function get_path( $group_id ) { 250 250 $group = new BP_Groups_Hierarchy( $group_id ); 251 251 if($group) { … … 340 340 * Declared static since BP 1.9 341 341 */ 342 public static function get_group_extras( $paged_groups,$group_ids, $type = false ) {342 public static function get_group_extras( &$paged_groups, &$group_ids, $type = false ) { 343 343 344 344 foreach($paged_groups as $key => $group) { -
bp-group-hierarchy/trunk/bp-group-hierarchy-filters.php
r817011 r876405 110 110 foreach($groups_hierarchy_template->groups as $key => $group) { 111 111 if(isset($group->id)) { 112 $groups_hierarchy_template->groups[$key] = new BP_Groups_Hierarchy($group->id );112 $groups_hierarchy_template->groups[$key] = new BP_Groups_Hierarchy($group->id, 0, array( 'populate_extras' => true ) ); 113 113 } 114 114 } -
bp-group-hierarchy/trunk/bp-group-hierarchy-loader.php
r721886 r876405 18 18 * In BP 1.6, call it since we've suppressed the parent invocation 19 19 */ 20 function includes( ) {20 function includes( $includes = array() ) { 21 21 22 22 if( floatval( bp_get_version() ) >= 1.6 ) { … … 45 45 * A hierarchy-aware copy of the setup_globals function from BP_Groups_Component 46 46 */ 47 function setup_globals( ) {47 function setup_globals( $args = array() ) { 48 48 global $bp; 49 49 … … 57 57 'table_name_members' => $bp->table_prefix . 'bp_groups_members', 58 58 'table_name_groupmeta' => $bp->table_prefix . 'bp_groups_groupmeta' 59 ); 60 61 // Metadata tables for groups component 62 $meta_tables = array( 63 'group' => $bp->table_prefix . 'bp_groups_groupmeta', 59 64 ); 60 65 … … 68 73 'notification_callback' => 'groups_format_notifications', 69 74 'search_string' => __( 'Search Groups...', 'buddypress' ), 70 'global_tables' => $global_tables 75 'global_tables' => $global_tables, 76 'meta_tables' => $meta_tables, 71 77 ); 72 78 … … 80 86 $bp->is_single_item = true; 81 87 $current_group_class = apply_filters( 'bp_groups_current_group_class', 'BP_Groups_Hierarchy' ); 82 $this->current_group = apply_filters( 'bp_groups_current_group_object', new $current_group_class( $group_id ) ); 88 89 if ( 'BP_Groups_Hierarchy' == $current_group_class ) { 90 $this->current_group = new BP_Groups_Hierarchy( $group_id, 0, array( 'populate_extras' => true ) ); 91 } else { 92 $this->current_group = apply_filters( 'bp_groups_current_group_object', new $current_group_class( $group_id ) ); 93 } 83 94 84 95 // When in a single group, the first action is bumped down one because of the -
bp-group-hierarchy/trunk/bp-group-hierarchy-template.php
r830940 r876405 109 109 110 110 if ( $this->single_group ) 111 $this->group = new BP_Groups_Hierarchy( $this->group->group_id);111 $this->group = groups_get_current_group(); 112 112 else { 113 113 if ( $this->group ) -
bp-group-hierarchy/trunk/extension.php
r772757 r876405 132 132 } 133 133 134 function create_screen( ) {134 function create_screen( $group_id = null ) { 135 135 136 136 global $bp; … … 195 195 } 196 196 197 function create_screen_save( ) {197 function create_screen_save( $group_id = null ) { 198 198 global $bp; 199 199 … … 224 224 } 225 225 226 function edit_screen( ) {226 function edit_screen( $group_id = null ) { 227 227 228 228 global $bp; … … 306 306 } 307 307 308 function edit_screen_save( ) {308 function edit_screen_save( $group_id = null ) { 309 309 global $bp; 310 310 -
bp-group-hierarchy/trunk/readme.txt
r830940 r876405 60 60 61 61 == Changelog == 62 63 = 1.4.3 = 64 * Added: preliminary support for BP 2.0 - contributed by r-a-y 65 * Fixed: strict standards warnings - contributed by r-a-y 62 66 63 67 = 1.4.2 =
Note: See TracChangeset
for help on using the changeset viewer.