Changeset 4549
- Timestamp:
- 12/16/2016 06:54:45 PM (9 years ago)
- Location:
- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/mentors/dashboard.php
r4548 r4549 138 138 139 139 /** 140 * Count the total number of camps without mentors, with and without a start date. 141 * 142 * @param array $unmentored_camps 143 * 144 * @return int 145 */ 146 function count_camps_without_mentors( $unmentored_camps ) { 147 $camps = 0; 148 149 if ( isset( $unmentored_camps['yesdate'] ) ) { 150 $camps += count( $unmentored_camps['yesdate'] ); 151 } 152 153 if ( isset( $unmentored_camps['nodate'] ) ) { 154 $camps += count( $unmentored_camps['nodate'] ); 155 } 156 157 return $camps; 158 } 159 160 /** 140 161 * Get active camps that haven't been assigned a mentor 141 162 * -
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/views/mentors/dashboard.php
r4545 r4549 15 15 <li>Number of mentors: <strong><?php echo count( $mentors ); ?></strong></li> 16 16 <li>Active camps being mentored: <strong><?php echo absint( count_camps_being_mentored( $mentors ) ); ?></strong></li> 17 <li>Active camps without a mentor: <strong><?php echo count( $unmentored_camps); ?></strong></li>17 <li>Active camps without a mentor: <strong><?php echo absint( count_camps_without_mentors( $unmentored_camps ) ); ?></strong></li> 18 18 </ul> 19 19
Note: See TracChangeset
for help on using the changeset viewer.