Making WordPress.org

Changeset 2260


Ignore:
Timestamp:
01/08/2016 08:42:19 PM (9 years ago)
Author:
iandunn
Message:

WordCamp Budgets Dashboard: Reorganize to make room for additional modules.

Soon we'll be adding modules for Budgets and Sponsor Invoices, in addition to the existing one for Payment Requests.

Location:
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network
Files:
1 added
2 moved

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/includes/payment-requests-dashboard.php

    r2255 r2260  
    11<?php
    2 /*
    3 * Plugin Name: WordCamp Payments Network Dashboard
    4 * Plugin URI: http://wordcamp.org
    5 * Version: 1.0
    6 * Author: Automattic
    7 * Author URI: http://wordcamp.org
    8 * License: GPLv2 or later
    9 * Network: true
    10 */
    11 
    12 class WordCamp_Payments_Network_Tools {
     2
     3class Payment_Requests_Dashboard {
    134    public static $list_table;
    145    public static $db_version = 6;
     
    192183     */
    193184    public static function network_admin_menu() {
    194         $dashboard = add_dashboard_page( 'WordCamp Payments Dashboard', 'Payments', 'manage_network', 'wcp-dashboard', array( __CLASS__, 'render_dashboard' ) );
     185        $dashboard = add_dashboard_page( 'WordCamp Payments Requests', 'Payments Requests', 'manage_network', 'wcp-dashboard', array( __CLASS__, 'render_dashboard' ) );
    195186        add_action( 'load-' . $dashboard, array( __CLASS__, 'pre_render_dashboard' ) );
    196187    }
     
    216207
    217208        <div class="wrap">
    218             <h1>WordCamp Payments Dashboard</h1>
     209            <h1>Payment Requests</h1>
    219210
    220211            <?php settings_errors(); ?>
     
    458449     */
    459450    public static function pre_render_dashboard() {
    460         require_once( __DIR__ . '/includes/class-list-table.php' );
    461 
    462         self::$list_table = new WordCamp_Payments_Network_List_Table;
     451        require_once( __DIR__ . '/payment-requests-list-table.php' );
     452
     453        self::$list_table = new Payment_Requests_List_Table();
    463454    }
    464455
     
    538529    }
    539530}
    540 
    541 // Initialize the plugin.
    542 add_action( 'plugins_loaded', array( 'WordCamp_Payments_Network_Tools', 'plugins_loaded' ) );
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/includes/payment-requests-list-table.php

    r2255 r2260  
    11<?php
     2
    23/**
    34 * This list table class handles the output of data
     
    78 * Note: Uses switch_to_blog() excessively.
    89 */
    9 class WordCamp_Payments_Network_List_Table extends WP_List_Table {
     10class Payment_Requests_List_Table extends WP_List_Table {
    1011
    1112    /**
     
    6566        global $wpdb;
    6667
    67         $sql = sprintf( "SELECT SQL_CALC_FOUND_ROWS blog_id, post_id FROM `%s` WHERE 1=1 ", WordCamp_Payments_Network_Tools::get_table_name() );
    68         $view = WordCamp_Payments_Network_Tools::get_current_tab();
     68        $sql = sprintf( "SELECT SQL_CALC_FOUND_ROWS blog_id, post_id FROM `%s` WHERE 1=1 ", Payment_Requests_Dashboard::get_table_name() );
     69        $view = Payment_Requests_Dashboard::get_current_tab();
    6970        $where = '';
    7071        $orderby = '';
     
    179180
    180181            if ( $currency != 'USD' ) {
    181                 $usd_amount = WordCamp_Payments_Network_Tools::convert_currency( $currency, 'usd', $amount );
     182                $usd_amount = Payment_Requests_Dashboard::convert_currency( $currency, 'usd', $amount );
    182183                if ( $usd_amount )
    183184                    $output .= sprintf( '<br />~&nbsp;%s&nbsp;USD', esc_html( number_format( $usd_amount, 2 ) ) );
Note: See TracChangeset for help on using the changeset viewer.