Changeset 7516 for sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-base.php
- Timestamp:
- 07/28/2018 12:46:28 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-base.php
r6662 r7516 135 135 136 136 /** 137 * Filter the report data prior to caching and compiling. 138 * 139 * @param array $data The data to filter. 140 * 141 * @return array 142 */ 143 protected function filter_data_fields( array $data ) { 137 * Determine the data fields safelist based on the context of the report. 138 * 139 * @return array The list of fields that are safe to include. 140 */ 141 protected function get_data_fields_safelist() { 144 142 $safelist = $this->public_data_fields; 145 143 … … 147 145 $safelist = array_merge( $safelist, $this->private_data_fields ); 148 146 } 147 148 return $safelist; 149 } 150 151 /** 152 * Filter the report data prior to caching and compiling. 153 * 154 * @param array $data The data to filter. 155 * 156 * @return array 157 */ 158 protected function filter_data_fields( array $data ) { 159 $safelist = $this->get_data_fields_safelist(); 149 160 150 161 array_walk( $data, function ( &$row ) use ( $safelist ) {
Note: See TracChangeset
for help on using the changeset viewer.