Making WordPress.org


Ignore:
Timestamp:
01/02/2019 07:14:31 PM (7 years ago)
Author:
vedjain
Message:

WCPT: Trigger click on Save Draft when Update button is clicked in WCPT

With block editor, Save Draft looks like has same functionality as Update button used to have. We should eventually remove the Update button in favor of already present Save Draft, but keeping it for now would make sense so as to give time to people to get used to the new editor. Update button is way more prominent then the Save Draft button, which is another reason to keep it for now.

Also linking Update to Save Draft may make it more clear that they have the same functionality.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-event/class-event-admin.php

    r7733 r8027  
    293293            true
    294294        );
     295
     296        $gutenberg_enabled = false;
     297        $current_screen = get_current_screen();
     298        if ( method_exists( $current_screen, 'is_block_editor' ) && $current_screen->is_block_editor() ) {
     299            $gutenberg_enabled = true;
     300        }
     301
     302        wp_localize_script( 'wcpt-admin', 'wcpt_admin', array(
     303            'gutenberg_enabled' => $gutenberg_enabled,
     304        ) );
    295305
    296306        wp_enqueue_script( 'wcpt-admin' );
Note: See TracChangeset for help on using the changeset viewer.