Changeset 2260
- Timestamp:
- 01/08/2016 08:42:19 PM (9 years ago)
- 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 1 1 <?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 3 class Payment_Requests_Dashboard { 13 4 public static $list_table; 14 5 public static $db_version = 6; … … 192 183 */ 193 184 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' ) ); 195 186 add_action( 'load-' . $dashboard, array( __CLASS__, 'pre_render_dashboard' ) ); 196 187 } … … 216 207 217 208 <div class="wrap"> 218 <h1> WordCamp Payments Dashboard</h1>209 <h1>Payment Requests</h1> 219 210 220 211 <?php settings_errors(); ?> … … 458 449 */ 459 450 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(); 463 454 } 464 455 … … 538 529 } 539 530 } 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 1 1 <?php 2 2 3 /** 3 4 * This list table class handles the output of data … … 7 8 * Note: Uses switch_to_blog() excessively. 8 9 */ 9 class WordCamp_Payments_Network_List_Table extends WP_List_Table {10 class Payment_Requests_List_Table extends WP_List_Table { 10 11 11 12 /** … … 65 66 global $wpdb; 66 67 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(); 69 70 $where = ''; 70 71 $orderby = ''; … … 179 180 180 181 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 ); 182 183 if ( $usd_amount ) 183 184 $output .= sprintf( '<br />~ %s USD', esc_html( number_format( $usd_amount, 2 ) ) );
Note: See TracChangeset
for help on using the changeset viewer.