Making WordPress.org


Ignore:
Timestamp:
07/28/2018 12:46:28 AM (7 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/index.php

    r7465 r7516  
    3232
    3333/**
     34 * Get the path for the includes directory.
     35 *
     36 * @return string Path with trailing slash.
     37 */
     38function get_includes_dir_path() {
     39    return trailingslashit( PLUGIN_DIR ) . 'includes/';
     40}
     41
     42/**
    3443 * Get the path for the views directory.
    3544 *
     
    5766    return trailingslashit( PLUGIN_URL ) . 'assets/';
    5867}
     68
     69/**
     70 * Autoload all the files in the includes directory.
     71 *
     72 * @return void
     73 */
     74function load_includes() {
     75    foreach ( glob( get_includes_dir_path() . '*.php' ) as $filename ) {
     76        if ( is_readable( $filename ) ) {
     77            include_once ( $filename );
     78        }
     79    }
     80}
     81
     82add_action( 'plugins_loaded', __NAMESPACE__ . '\load_includes' );
    5983
    6084/**
     
    110134        __NAMESPACE__ . '\Report\Payment_Activity',
    111135        __NAMESPACE__ . '\Report\Sponsorship_Grants',
     136        __NAMESPACE__ . '\Report\WordCamp_Details',
    112137        __NAMESPACE__ . '\Report\WordCamp_Status',
    113138        __NAMESPACE__ . '\Report\Meetup_Groups',
Note: See TracChangeset for help on using the changeset viewer.