You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 27, 2022. It is now read-only.
// Add workaround for failure to save changes to option settings when publishing changeset outside of customizer. See https://core.trac.wordpress.org/ticket/39221#comment:14
94
95
if ( function_exists( '_wp_customize_publish_changeset' ) && function_exists( 'wp_doing_ajax' ) ) { // Workaround only works in WP 4.7.
@@ -1060,4 +1061,25 @@ public function display_post_states( $states, $post ) {
1060
1061
}
1061
1062
return$states;
1062
1063
}
1064
+
1065
+
/**
1066
+
* Show an admin notice when publishing fails and the post gets kicked back to pending.
1067
+
*/
1068
+
publicfunctionshow_publish_error_admin_notice() {
1069
+
if ( ! function_exists( 'get_current_screen' ) ) {
if ( ! isset( $_REQUEST['snapshot_error_on_publish'] ) ) { // WPCS: input var ok. CSRF ok.
1077
+
return;
1078
+
}
1079
+
?>
1080
+
<div class="notice notice-error is-dismissible">
1081
+
<p><?phpesc_html_e( 'Failed to publish snapshot due to an error with saving one of its settings. This may be due to a theme or plugin having been changed since the snapshot was created. See below.', 'customize-snapshots' ); ?></p>
0 commit comments