Making WordPress.org

Changeset 13062


Ignore:
Timestamp:
12/15/2023 02:06:16 PM (5 months ago)
Author:
spiraltee
Message:

Tour: update from upstream

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/tour
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/css/style.css

    r12982 r13062  
    4444    cursor: pointer;
    4545}
     46.dismiss-tour {
     47    background: none;
     48    border: none;
     49    color: #1067a9;
     50    text-decoration: underline;
     51    cursor: pointer;
     52}
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/js/tour-step-editor.js

    r12982 r13062  
    7676    }
    7777}
    78 enableTourCreation();
     78document.addEventListener( 'DOMContentLoaded', function () {
     79    document
     80        .getElementById( 'tour-launcher' )
     81        .addEventListener( 'click', toggleTourSelector );
     82    enableTourCreation();
     83} );
    7984
    8085function reportMissingSelector( tourTitle, step, selector ) {
     
    108113}
    109114
    110 document
    111     .getElementById( 'tour-launcher' )
    112     .addEventListener( 'click', toggleTourSelector );
    113115const clearHighlight = function ( event ) {
    114116    if ( typeof tour_plugin.tours[ tourId ] !== 'undefined' ) {
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/js/tour.js

    r12982 r13062  
    4444            onHighlightStarted( element, step ) {
    4545                step.popover.description +=
    46                     '<br><a href="" class="dismiss-tour">Dismiss the tour';
     46                    '<br><button class="dismiss-tour">Dismiss the tour';
    4747            },
    4848            onHighlighted( element, step, options ) {
     
    209209                    style.cssRules.length
    210210                );
     211
     212                style.insertRule(
     213                    '@media (prefers-reduced-motion: reduce) {' +
     214                        '.tour-' +
     215                        tourId +
     216                        '{' +
     217                        'box-shadow: none !important;' +
     218                        '}' +
     219                        '}',
     220                    style.cssRules.length
     221                );
    211222            }
    212223            startStep = 0;
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/class-tour.php

    r12982 r13062  
    1515        add_action( 'admin_enqueue_scripts', array( $class, 'enqueue_scripts' ) );
    1616        add_action( 'wp_enqueue_scripts', array( $class, 'enqueue_scripts' ) );
    17         add_action( 'gp_head', array( $class, 'enqueue_scripts' ) );
    1817        add_action( 'init', array( $class, 'register_post_type' ) );
    1918        add_action( 'init', array( $class, 'register_block_type' ) );
     
    2726        add_action( 'edit_form_after_editor', array( $class, 'edit_form_after_editor' ) );
    2827        add_filter( 'tour_list', array( $class, 'tour_list' ) );
    29         add_shortcode( 'tour_button', array( $class, 'show_tour_list' ) );
     28        add_shortcode( 'tour_list', array( $class, 'show_tour_list' ) );
    3029        add_action( 'admin_menu', array( $class, 'add_admin_menu' ) );
    3130        add_action( 'wp_footer', array( $class, 'output_tour_button' ) );
    3231        add_action( 'admin_footer', array( $class, 'output_tour_button' ) );
     32        add_action( 'gp_footer', array( $class, 'output_tour_button' ) );
    3333        add_action( 'show_user_profile', array( $class, 'show_user_profile' ) );
    3434        add_action( 'wp_before_admin_bar_render', array( $class, 'add_tours_menu_to_masterbar' ) );
Note: See TracChangeset for help on using the changeset viewer.