Making WordPress.org


Ignore:
Timestamp:
10/16/2018 05:30:06 PM (8 years ago)
Author:
vedjain
Message:

WordCamp Report: Add reporting for meetup applications.

This commit adds functionality for downloading meetup application reports from admin dashboard. Also refactors WordCamp report classes
to make code DRY.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-reports/classes/report/class-base.php

    r7516 r7734  
    135135
    136136        /**
    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() {
    142                 $safelist = $this->public_data_fields;
    143 
    144                 if ( false === $this->options['public'] ) {
    145                         $safelist = array_merge( $safelist, $this->private_data_fields );
    146                 }
    147 
    148                 return $safelist;
    149         }
    150 
    151         /**
    152137         * Filter the report data prior to caching and compiling.
    153138         *
    … …  
    315300                return new \WP_REST_Response( $response_data );
    316301        }
     302
     303        /**
     304         * Determine the data fields safelist based on the context of the report.
     305         *
     306         * @return array The list of fields that are safe to include.
     307         */
     308        public function get_data_fields_safelist() {
     309                $safelist = $this->public_data_fields;
     310
     311                if ( false === $this->options['public'] ) {
     312                        $safelist = array_merge( $safelist, $this->private_data_fields );
     313                }
     314
     315                return $safelist;
     316        }
    317317}
Note: See TracChangeset for help on using the changeset viewer.