Make WordPress Core

Changeset 42149 for branches/4.9


Ignore:
Timestamp:
11/10/2017 10:44:30 PM (7 years 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 4.9.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-includes/class-wp-customize-nav-menus.php

    r41995 r42149  
    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.