Making WordPress.org


Ignore:
Timestamp:
02/12/2018 10:23:05 PM (6 years ago)
Author:
iandunn
Message:

WordCamp Helpers: Add helper to generate a Select2 dropdown of WordCamps.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/wcorg-misc.php

    r6576 r6609  
    282282}
    283283add_action( 'login_form_lostpassword', 'wcorg_reset_passwords_at_wporg' );
     284
     285/**
     286 * Register scripts and styles.
     287 */
     288function wcorg_register_scripts() {
     289    /*
     290     * Select2 can be removed if/when it's bundled with Core, see #31696-core.
     291     * If the handle changes, we'll need to update any of our plugins that are using it.
     292     */
     293    wp_register_script(
     294        'select2',
     295        plugins_url( '/includes/select2/js/select2.min.js', __FILE__ ),
     296        array( 'jquery' ),
     297        '4.0.5',
     298        true
     299    );
     300
     301    wp_register_style(
     302        'select2',
     303        plugins_url( '/includes/select2/css/select2.min.css', __FILE__ ),
     304        array(),
     305        '4.0.5'
     306    );
     307}
     308add_action( 'wp_enqueue_scripts',    'wcorg_register_scripts' );
     309add_action( 'admin_enqueue_scripts', 'wcorg_register_scripts' );
Note: See TracChangeset for help on using the changeset viewer.