WordPress.org

Make WordPress Core

Changeset 42148


Ignore:
Timestamp:
11/10/17 22:43:30 (2 months ago)
Author:
westonruter
Message:

Customize: Ensure customization drafts are published instead of trashed when scheduled changeset goes live while non-admin user is authenticated (such as during WP Cron).

Props designsimply for testing, dlh for testing, melchoyce for testing.
See #28721, #34923, #42220.
Fixes #42489 for trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-nav-menus.php

    r41995 r42148  
    5050        add_filter( 'customize_dynamic_setting_args', array( $this, 'filter_dynamic_setting_args' ), 10, 2 ); 
    5151        add_filter( 'customize_dynamic_setting_class', array( $this, 'filter_dynamic_setting_class' ), 10, 3 ); 
     52        add_action( 'customize_save_nav_menus_created_posts', array( $this, 'save_nav_menus_created_posts' ) ); 
    5253 
    5354        // Skip remaining hooks when the user can't manage nav menus anyway. 
     
    6566        add_action( 'customize_preview_init', array( $this, 'customize_preview_init' ) ); 
    6667        add_action( 'customize_preview_init', array( $this, 'make_auto_draft_status_previewable' ) ); 
    67         add_action( 'customize_save_nav_menus_created_posts', array( $this, 'save_nav_menus_created_posts' ) ); 
    6868 
    6969        // Selective Refresh partials. 
Note: See TracChangeset for help on using the changeset viewer.