Making WordPress.org


Ignore:
Timestamp:
01/19/2016 08:44:53 PM (9 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/wordcamp-budgets.php

    r2309 r2327  
    3838     */
    3939    public function enqueue_common_assets() {
    40         // todo setup grunt to concat/minify js and css?
     40        // todo setup grunt to concat/minify js
     41
     42        wp_enqueue_script(
     43            'wordcamp-budgets',
     44            plugins_url( 'javascript/wordcamp-budgets.js', __DIR__ ),
     45            array( 'jquery', 'jquery-ui-datepicker', 'media-upload', 'media-views' ),
     46            self::VERSION,
     47            true
     48        );
     49
     50        wp_register_script(
     51            'wcb-attached-files',
     52            plugins_url( 'javascript/attached-files.js', __DIR__ ),
     53            array( 'wordcamp-budgets', 'backbone', 'wp-util' ),
     54            WordCamp_Budgets::VERSION,
     55            true
     56        );
     57
     58        wp_localize_script(
     59            'wordcamp-budgets',
     60            'wcbLocalizedStrings',      // todo merge into WordCampBudgets var
     61            array(
     62                'uploadModalButton' => __( 'Attach Files', 'wordcamporg' ),
     63            )
     64        );
    4165
    4266        // Let's still include our .css file even if these are unavailable.
Note: See TracChangeset for help on using the changeset viewer.