Skip to content

Commit 156df52

Browse files
committed
Editor:
- Remove the old DFW. - Add back-compat stub for wp-fullscreen.js. - Keep wp_ajax_wp_fullscreen_save_post() for now. See #30949. git-svn-id: https://develop.svn.wordpress.org/trunk@32677 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 9940e8c commit 156df52

15 files changed

Lines changed: 61 additions & 1495 deletions

File tree

src/wp-admin/admin-ajax.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
'hidden-columns', 'update-welcome-panel', 'menu-get-metabox', 'wp-link-ajax',
5757
'menu-locations-save', 'menu-quick-search', 'meta-box-order', 'get-permalink',
5858
'sample-permalink', 'inline-save', 'inline-save-tax', 'find_posts', 'widgets-order',
59-
'save-widget', 'set-post-thumbnail', 'date_format', 'time_format', 'wp-fullscreen-save-post',
59+
'save-widget', 'set-post-thumbnail', 'date_format', 'time_format',
6060
'wp-remove-post-lock', 'dismiss-wp-pointer', 'upload-attachment', 'get-attachment',
6161
'query-attachments', 'save-attachment', 'save-attachment-compat', 'send-link-to-editor',
6262
'send-attachment-to-editor', 'save-attachment-order', 'heartbeat', 'get-revision-diffs',
@@ -65,6 +65,9 @@
6565
'press-this-add-category',
6666
);
6767

68+
// Deprecated
69+
$core_actions_post[] = 'wp-fullscreen-save-post';
70+
6871
// Register core Ajax calls.
6972
if ( ! empty( $_GET['action'] ) && in_array( $_GET['action'], $core_actions_get ) )
7073
add_action( 'wp_ajax_' . $_GET['action'], 'wp_ajax_' . str_replace( '-', '_', $_GET['action'] ), 1 );

src/wp-admin/css/edit.css

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,6 @@
7070
padding: 11px 10px;
7171
}
7272

73-
#wp-fullscreen-save .fs-saved {
74-
color: #999;
75-
float: right;
76-
margin-top: 4px;
77-
}
78-
7973
#poststuff .inside-submitbox,
8074
#side-sortables .inside-submitbox {
8175
margin: 0 3px;
@@ -390,24 +384,6 @@ td.plugin-title p {
390384
border: 1px solid transparent;
391385
}
392386

393-
.wp-fullscreen-wrap #content-textarea-clone {
394-
display: none;
395-
}
396-
397-
/* editor-expand.js override */
398-
.wp-fullscreen-wrap {
399-
padding-top: 0 !important;
400-
}
401-
402-
.wp-fullscreen-wrap .wp-editor-area {
403-
margin-top: 0 !important;
404-
}
405-
406-
.wp-fullscreen-wrap .mce-edit-area {
407-
padding-top: 0 !important;
408-
}
409-
/* end editor-expand.js override */
410-
411387
.wp-editor-expand #wp-content-editor-tools {
412388
z-index: 1000;
413389
border-bottom: 1px solid #e5e5e5;

src/wp-admin/css/ie.css

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,6 @@
5050
width: 35%;
5151
}
5252

53-
.wp-fullscreen-title {
54-
width: 97%;
55-
}
56-
57-
#wp_mce_fullscreen_ifr {
58-
background-color: #f9f9f9;
59-
}
60-
61-
#wp-fullscreen-tagline {
62-
color: #82878c;
63-
font-size: 14px;
64-
}
65-
6653
#adminmenuback {
6754
left: 0;
6855
background-image: none;

src/wp-admin/css/l10n.css

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,6 @@ body.locale-he-il .press-this a.wp-switch-editor {
5454
/* zn_CH: Enlarge font size, set font-size: normal */
5555
.locale-zh-cn form.upgrade .hint { font-style: normal; font-size: 100%; }
5656

57-
/* Zn_CH: Distraction-free writing.
58-
* More beautiful font for "Just write."
59-
* Larger text for HTML/Visual mode.
60-
*/
61-
.locale-zh-cn #wp-fullscreen-tagline { font-family: KaiTi, "楷体", sans-serif; }
62-
.locale-zh-cn #wp-fullscreen-modes a { font-size: 12px; }
63-
6457
/* zh_CN: Enlarge font-size. */
6558
.locale-zh-cn #sort-buttons { font-size: 1em !important; }
6659

src/wp-admin/includes/ajax-actions.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2102,6 +2102,7 @@ function wp_ajax_time_format() {
21022102
* Ajax handler for saving posts from the fullscreen editor.
21032103
*
21042104
* @since 3.1.0
2105+
* @deprecated 4.3.0
21052106
*/
21062107
function wp_ajax_wp_fullscreen_save_post() {
21072108
$post_id = isset( $_POST['post_ID'] ) ? (int) $_POST['post_ID'] : 0;
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/**
2+
* Distraction-Free Writing (wp-fullscreen) backwards compatibility stub.
3+
* Todo: remove at the end of 2016.
4+
*
5+
* Original was deprecated in 4.1, removed in 4.3.
6+
*/
7+
( function() {
8+
var noop = function(){};
9+
10+
window.wp = window.wp || {};
11+
window.wp.editor = window.wp.editor || {};
12+
window.wp.editor.fullscreen = {
13+
bind_resize: noop,
14+
dfwWidth: noop,
15+
off: noop,
16+
on: noop,
17+
refreshButtons: noop,
18+
resizeTextarea: noop,
19+
save: noop,
20+
switchmode: noop,
21+
toggleUI: noop,
22+
23+
settings: {},
24+
pubsub: {
25+
publish: noop,
26+
subscribe: noop,
27+
unsubscribe: noop,
28+
topics: {}
29+
},
30+
fade: {
31+
In: noop,
32+
Out: noop
33+
},
34+
ui: {
35+
fade: noop,
36+
init: noop
37+
}
38+
};
39+
}());

0 commit comments

Comments
 (0)