Making WordPress.org


Ignore:
Timestamp:
09/16/2020 10:07:05 PM (5 years ago)
Author:
coreymckrill
Message:

WordPress.org Learn: Sync with GitHub

https://github.com/WordPress/learn/compare/41d65294a2e67cf35a5b799d179f2e6f53b58b48...fb8968a2cbd50fc4c1a8764586731e903577d3f3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/wporg-learn.php

    r10237 r10272  
    2020 */
    2121add_action( 'plugins_loaded', __NAMESPACE__ . '\load_files' );
    22 add_action( 'admin_enqueue_scripts', __NAMESPACE__ . '\register_thirdparty_assets', 9 );
    23 add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\register_thirdparty_assets', 9 );
     22add_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\register_thirdparty_assets', 1 );
     23add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\register_thirdparty_assets', 1 );
    2424
    2525/**
     
    5555        plugins_url( '/3rd-party/selectWoo/js/selectWoo.min.js', __FILE__ ),
    5656        array( 'jquery' ),
    57         '1.0.8',
    58         true
     57        '1.0.8'
    5958    );
    6059
     
    6564        '1.0.8'
    6665    );
     66
     67    if ( 'enqueue_block_editor_assets' === current_action() ) {
     68        global $typenow;
     69        if ( 'wporg_workshop' === $typenow ) {
     70            wp_enqueue_script( 'select2' );
     71            wp_enqueue_style( 'select2' );
     72        }
     73    }
    6774}
Note: See TracChangeset for help on using the changeset viewer.