Changeset 12738 for sites/trunk/common/includes/slack/announce/lib.php
- Timestamp:
- 07/13/2023 03:45:24 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/common/includes/slack/announce/lib.php
r12722 r12738 140 140 $root = 'core'; 141 141 break; 142 case 'mentorship': // Such as #mentorship-cohort-july-2023142 case 'mentorship': // Such as #mentorship-cohort-july-2023 143 143 $root = 'contributor-mentorship'; 144 144 break; … … 173 173 } 174 174 175 return $parent_channels ?: false; 175 // Recurse, in case the parent channel has a parent channel. 176 // ie. #mentorship-cohort-july-2023 => #contributor-mentorship => #community-team 177 foreach ( $parent_channels as $parent_channel ) { 178 $parent_channels = array_merge( $parent_channels, get_parent_channels( $parent_channel ) ?: [] ); 179 } 180 181 return array_unique( $parent_channels ) ?: false; 176 182 } 177 183
Note: See TracChangeset
for help on using the changeset viewer.