Avoid a PHP notice in _WP_Editors::wp_fullscreen_html() when no $post global is set.
props marcochiesi. fixes #30071. Built from https://develop.svn.wordpress.org/trunk@31112 git-svn-id: http://core.svn.wordpress.org/trunk@31093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a2f9b410f8
commit
2be2af7789
|
@ -1251,7 +1251,7 @@ final class _WP_Editors {
|
|||
$width = isset( $content_width ) && 800 > $content_width ? $content_width : 800;
|
||||
$width = $width + 22; // compensate for the padding and border
|
||||
$dfw_width = get_user_setting( 'dfw_width', $width );
|
||||
$save = isset( $post->post_status ) && $post->post_status == 'publish' ? __('Update') : __('Save');
|
||||
$save = $post && $post->post_status == 'publish' ? __('Update') : __('Save');
|
||||
|
||||
?>
|
||||
<div id="wp-fullscreen-body" class="wp-core-ui<?php if ( is_rtl() ) echo ' rtl'; ?>" data-theme-width="<?php echo (int) $width; ?>" data-dfw-width="<?php echo (int) $dfw_width; ?>">
|
||||
|
@ -1316,7 +1316,7 @@ final class _WP_Editors {
|
|||
|
||||
<div id="wp-fullscreen-save">
|
||||
<input type="button" class="button button-primary right" value="<?php echo $save; ?>" onclick="wp.editor.fullscreen.save();" />
|
||||
<span class="wp-fullscreen-saved-message"><?php if ( $post->post_status == 'publish' ) _e('Updated.'); else _e('Saved.'); ?></span>
|
||||
<span class="wp-fullscreen-saved-message"><?php if ( $post && $post->post_status == 'publish' ) _e('Updated.'); else _e('Saved.'); ?></span>
|
||||
<span class="wp-fullscreen-error-message"><?php _e('Save failed.'); ?></span>
|
||||
<span class="spinner"></span>
|
||||
</div>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.2-alpha-31111';
|
||||
$wp_version = '4.2-alpha-31112';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue