Making WordPress.org


Ignore:
Timestamp:
01/11/2016 10:15:37 PM (9 years ago)
Author:
iandunn
Message:

WordCamp Budgets: 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/includes
Files:
1 copied
1 moved

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/wordcamp-budgets.php

    r2270 r2272  
    44 * Main class to provide functionality common to all other classes
    55 */
    6 class WordCamp_Payments {
     6class WordCamp_Budgets {
    77    const VERSION = '0.1.1';
    88
     
    2424        // Register our assets
    2525        wp_register_script(
    26             'wordcamp-payments',
    27             plugins_url( 'javascript/wordcamp-payments.js', __DIR__ ),
     26            'wordcamp-budgets',
     27            plugins_url( 'javascript/wordcamp-budgets.js', __DIR__ ),
    2828            array( 'jquery', 'jquery-ui-datepicker', 'media-upload', 'media-views' ),
    2929            self::VERSION,
     
    3434            'wcp-attached-files',
    3535            plugins_url( 'javascript/attached-files.js', __DIR__ ),
    36             array( 'wordcamp-payments', 'backbone', 'wp-util' ),
     36            array( 'wordcamp-budgets', 'backbone', 'wp-util' ),
    3737            self::VERSION,
    3838            true
     
    4646
    4747        wp_register_style(
    48             'wordcamp-payments',
    49             plugins_url( 'css/wordcamp-payments.css', __DIR__ ),
     48            'wordcamp-budgets',
     49            plugins_url( 'css/wordcamp-budgets.css', __DIR__ ),
    5050            $soft_deps,
    5151            self::VERSION
     
    5656
    5757        if ( in_array( $current_screen->id, array( 'edit-wcp_payment_request', 'wcp_payment_request' ) ) ) {
    58             wp_enqueue_script( 'wordcamp-payments' );
    59             wp_enqueue_style( 'wordcamp-payments' );
     58            wp_enqueue_script( 'wordcamp-budgets' );
     59            wp_enqueue_style( 'wordcamp-budgets' );
    6060
    6161            if ( in_array( $current_screen->id, array( 'wcp_payment_request' ) ) && isset( $post->ID ) ) {
     
    6565
    6666            wp_localize_script(
    67                 'wordcamp-payments',
    68                 'wcpLocalizedStrings',      // todo merge into wordcampPayments var
     67                'wordcamp-budgets',
     68                'wcpLocalizedStrings',      // todo merge into wordcampBudgets var
    6969                array(
    7070                    'uploadModalTitle'  => __( 'Attach Supporting Documentation', 'wordcamporg' ),
     
    7676
    7777    /**
    78      * Log something with a payment request.
     78     * Insert an entry into a log for one of the custom post types
    7979     *
    80      * @param int $post_id The payment requset ID.
     80     * @param int    $post_id The post ID.
    8181     * @param string $message A log message.
    82      * @param array $data Optional data.
     82     * @param array  $data    Optional data.
    8383     */
    8484    public static function log( $post_id, $message, $data = array() ) {
Note: See TracChangeset for help on using the changeset viewer.