Making WordPress.org


Ignore:
Timestamp:
01/19/2016 08:44:53 PM (11 years ago)
Author:
iandunn
Message:

WordCamp Budgets: Centralize common JavaScript functions.

File:
1 edited

Legend:

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

    r2309 r2327  
    182182                        'payment-requests',
    183183                        plugins_url( 'javascript/payment-requests.js', __DIR__ ),
    184                         array( 'jquery', 'jquery-ui-datepicker', 'media-upload', 'media-views' ),
     184                        array( 'wordcamp-budgets', 'wcb-attached-files', 'jquery' ),
    185185                        WordCamp_Budgets::VERSION,
    186186                        true
    187187                );
    188188
    189                 wp_register_script(
    190                         'wcp-attached-files',
    191                         plugins_url( 'javascript/attached-files.js', __DIR__ ),
    192                         array( 'payment-requests', 'backbone', 'wp-util' ),
    193                         WordCamp_Budgets::VERSION,
    194                         true
    195                 );
    196 
    197189                // Enqueue our assets if they're needed on the current screen
    198190                $current_screen = get_current_screen();
    … …  
    206198                if ( isset( $post->ID ) ) {
    207199                        wp_enqueue_media( array( 'post' => $post->ID ) );
    208                         wp_enqueue_script( 'wcp-attached-files' );
     200                        wp_enqueue_script( 'wcb-attached-files' );
    209201                }
    210202
    211203                wp_localize_script(
    212204                        'payment-requests',
    213                         'wcpLocalizedStrings',          // todo merge into paymentRequests var
     205                        'wcpLocalizedStrings',          // todo merge into WordCampBudgets var
    214206                        array(
    215207                                'uploadModalTitle'  => __( 'Attach Supporting Documentation', 'wordcamporg' ),
    216                                 'uploadModalButton' => __( 'Attach Files', 'wordcamporg' ),
    217208                        )
    218209                );
Note: See TracChangeset for help on using the changeset viewer.