Making WordPress.org


Ignore:
Timestamp:
07/28/2018 12:46:28 AM (8 years ago)
Author:
coreymckrill
Message:

WordCamp Reports: Add WordCamp Details report

This is the first iteration of a report that allows WPCS staff to download a
spreadsheet of WordCamps and related data.

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  
    135135
    136136        /**
    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() {
    144142                $safelist = $this->public_data_fields;
    145143
     
    147145                        $safelist = array_merge( $safelist, $this->private_data_fields );
    148146                }
     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();
    149160
    150161                array_walk( $data, function ( &$row ) use ( $safelist ) {
Note: See TracChangeset for help on using the changeset viewer.