Editor API enhancement, first run (still needs some work), see #17144
git-svn-id: http://svn.automattic.com/wordpress/trunk@18498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
@ -1110,8 +1110,6 @@ case 'menu-quick-search':
|
||||
exit;
|
||||
break;
|
||||
case 'wp-link-ajax':
|
||||
require_once ABSPATH . 'wp-admin/includes/internal-linking.php';
|
||||
|
||||
check_ajax_referer( 'internal-linking', '_ajax_linking_nonce' );
|
||||
|
||||
$args = array();
|
||||
@ -1120,7 +1118,8 @@ case 'wp-link-ajax':
|
||||
$args['s'] = stripslashes( $_POST['search'] );
|
||||
$args['pagenum'] = ! empty( $_POST['page'] ) ? absint( $_POST['page'] ) : 1;
|
||||
|
||||
$results = wp_link_query( $args );
|
||||
require(ABSPATH . WPINC . '/class-wp-editor.php');
|
||||
$results = WP_Editor::wp_link_query( $args );
|
||||
|
||||
if ( ! isset( $results ) )
|
||||
die( '0' );
|
||||
|
@ -66,10 +66,6 @@ var userSettings = {
|
||||
</script>
|
||||
<?php
|
||||
|
||||
if ( in_array( $pagenow, array('post.php', 'post-new.php') ) ) {
|
||||
wp_enqueue_script('quicktags');
|
||||
}
|
||||
|
||||
do_action('admin_enqueue_scripts', $hook_suffix);
|
||||
do_action("admin_print_styles-$hook_suffix");
|
||||
do_action('admin_print_styles');
|
||||
|
@ -532,8 +532,6 @@ h3.dashboard-widget-title small a:hover {
|
||||
|
||||
a,
|
||||
#adminmenu a,
|
||||
#poststuff #edButtonPreview,
|
||||
#poststuff #edButtonHTML,
|
||||
#the-comment-list p.comment-author strong a,
|
||||
#media-upload a.del-link,
|
||||
#media-items a.delete,
|
||||
@ -586,11 +584,6 @@ input.readonly, textarea.readonly {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#ed_toolbar input,
|
||||
#ed_reply_toolbar input {
|
||||
background: #fff url("../images/fade-butt.png") repeat-x 0 -2px;
|
||||
}
|
||||
|
||||
#editable-post-name {
|
||||
background-color: #fffbcc;
|
||||
}
|
||||
@ -865,334 +858,13 @@ table.widefat .spam a:hover,
|
||||
border-color: #8dff1c !important;
|
||||
}
|
||||
|
||||
/* editors */
|
||||
#quicktags {
|
||||
border-color: #ccc;
|
||||
background-color: #dfdfdf;
|
||||
background-image: url("../images/ed-bg.gif");
|
||||
}
|
||||
|
||||
#ed_toolbar input {
|
||||
border-color: #C3C3C3;
|
||||
}
|
||||
|
||||
#ed_toolbar input:hover {
|
||||
border-color: #aaa;
|
||||
background: #ddd;
|
||||
}
|
||||
|
||||
#poststuff .wp_themeSkin .mceStatusbar {
|
||||
border-color: #dfdfdf;
|
||||
}
|
||||
|
||||
#poststuff .wp_themeSkin .mceStatusbar * {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
#poststuff #edButtonPreview,
|
||||
#poststuff #edButtonHTML {
|
||||
background-color: #f1f1f1;
|
||||
border-color: #dfdfdf #dfdfdf #ccc;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
#poststuff #editor-toolbar .active {
|
||||
border-color: #ccc #ccc #e9e9e9;
|
||||
background-color: #e9e9e9;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
/* TinyMCE */
|
||||
#post-status-info {
|
||||
background-color: #EDEDED;
|
||||
}
|
||||
|
||||
.wp_themeSkin *,
|
||||
.wp_themeSkin a:hover,
|
||||
.wp_themeSkin a:link,
|
||||
.wp_themeSkin a:visited,
|
||||
.wp_themeSkin a:active {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/* Containers */
|
||||
.wp_themeSkin table.mceLayout {
|
||||
border-color: #ccc #ccc #dfdfdf;
|
||||
}
|
||||
|
||||
#editorcontainer #content,
|
||||
#editorcontainer .wp_themeSkin .mceIframeContainer {
|
||||
-moz-box-shadow: inset 1px 1px 2px rgba( 0, 0, 0, 0.1 );
|
||||
-webkit-box-shadow: inset 1px 1px 2px rgba( 0, 0, 0, 0.1 );
|
||||
box-shadow: inset 1px 1px 2px rgba( 0, 0, 0, 0.1 );
|
||||
}
|
||||
.wp_themeSkin iframe {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/* Layout */
|
||||
.wp_themeSkin .mceStatusbar {
|
||||
color: #000;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
/* Button */
|
||||
.wp_themeSkin .mceButton {
|
||||
border-color: #ccc;
|
||||
background-color: #eee; /* Fallback */
|
||||
background-image: -ms-linear-gradient(bottom, #ddd, #fff); /* IE10 */
|
||||
background-image: -moz-linear-gradient(bottom, #ddd, #fff); /* Firefox */
|
||||
background-image: -o-linear-gradient(bottom, #ddd, #fff); /* Opera */
|
||||
background-image: -webkit-gradient(linear, left bottom, left top, from(#ddd), to(#fff)); /* old Webkit */
|
||||
background-image: -webkit-linear-gradient(bottom, #ddd, #fff); /* new Webkit */
|
||||
background-image: linear-gradient(bottom, #ddd, #fff); /* proposed W3C Markup */
|
||||
}
|
||||
|
||||
.wp_themeSkin a.mceButtonEnabled:hover {
|
||||
border-color: #a0a0a0;
|
||||
background: #ddd; /* Fallback */
|
||||
background-image: -ms-linear-gradient(bottom, #ccc, #fff); /* IE10 */
|
||||
background-image: -moz-linear-gradient(bottom, #ccc, #fff); /* Firefox */
|
||||
background-image: -o-linear-gradient(bottom, #ccc, #fff); /* Opera */
|
||||
background-image: -webkit-gradient(linear, left bottom, left top, from(#ccc), to(#fff)); /* old Webkit */
|
||||
background-image: -webkit-linear-gradient(bottom, #ccc, #fff); /* new Webkit */
|
||||
background-image: linear-gradient(bottom, #ccc, #fff); /* proposed W3C Markup */
|
||||
}
|
||||
|
||||
.wp_themeSkin a.mceButton:active,
|
||||
.wp_themeSkin a.mceButtonEnabled:active,
|
||||
.wp_themeSkin a.mceButtonSelected:active,
|
||||
.wp_themeSkin a.mceButtonActive,
|
||||
.wp_themeSkin a.mceButtonActive:active,
|
||||
.wp_themeSkin a.mceButtonActive:hover {
|
||||
background-color: #ddd; /* Fallback */
|
||||
background-image: -ms-linear-gradient(bottom, #eee, #bbb); /* IE10 */
|
||||
background-image: -moz-linear-gradient(bottom, #eee, #bbb); /* Firefox */
|
||||
background-image: -o-linear-gradient(bottom, #eee, #bbb); /* Opera */
|
||||
background-image: -webkit-gradient(linear, left bottom, left top, from(#eee), to(#bbb)); /* old Webkit */
|
||||
background-image: -webkit-linear-gradient(bottom, #eee, #bbb); /* new Webkit */
|
||||
background-image: linear-gradient(bottom, #eee, #bbb); /* proposed W3C Markup */
|
||||
border-color: #909090;
|
||||
}
|
||||
|
||||
.wp_themeSkin .mceButtonDisabled {
|
||||
border-color: #ccc !important;
|
||||
}
|
||||
|
||||
/* ListBox */
|
||||
.wp_themeSkin .mceListBox .mceText,
|
||||
.wp_themeSkin .mceListBox .mceOpen {
|
||||
border-color: #ccc;
|
||||
background-color: #eee; /* Fallback */
|
||||
background-image: -ms-linear-gradient(bottom, #ddd, #fff); /* IE10 */
|
||||
background-image: -moz-linear-gradient(bottom, #ddd, #fff); /* Firefox */
|
||||
background-image: -o-linear-gradient(bottom, #ddd, #fff); /* Opera */
|
||||
background-image: -webkit-gradient(linear, left bottom, left top, from(#ddd), to(#fff)); /* old Webkit */
|
||||
background-image: -webkit-linear-gradient(bottom, #ddd, #fff); /* new Webkit */
|
||||
background-image: linear-gradient(bottom, #ddd, #fff); /* proposed W3C Markup */
|
||||
}
|
||||
|
||||
.wp_themeSkin .mceListBox .mceOpen {
|
||||
border-left: 0 !important;
|
||||
}
|
||||
|
||||
.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen,
|
||||
.wp_themeSkin .mceListBoxHover .mceOpen,
|
||||
.wp_themeSkin .mceListBoxHover:active .mceOpen,
|
||||
.wp_themeSkin .mceListBoxSelected .mceOpen,
|
||||
.wp_themeSkin .mceListBoxSelected .mceText,
|
||||
.wp_themeSkin table.mceListBoxEnabled:active .mceText {
|
||||
background: #ccc;
|
||||
border-color: #999;
|
||||
}
|
||||
|
||||
/* List Box Hover */
|
||||
.wp_themeSkin table.mceListBoxEnabled:hover .mceText,
|
||||
.wp_themeSkin .mceListBoxHover .mceText,
|
||||
.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen,
|
||||
.wp_themeSkin .mceListBoxHover .mceOpen {
|
||||
border-color: #909090;
|
||||
background-color: #eee; /* Fallback */
|
||||
background-image: -ms-linear-gradient(bottom, #ccc, #fff); /* IE10 */
|
||||
background-image: -moz-linear-gradient(bottom, #ccc, #fff); /* Firefox */
|
||||
background-image: -o-linear-gradient(bottom, #ccc, #fff); /* Opera */
|
||||
background-image: -webkit-gradient(linear, left bottom, left top, from(#ccc), to(#fff)); /* old Webkit */
|
||||
background-image: -webkit-linear-gradient(bottom, #ccc, #fff); /* new Webkit */
|
||||
background-image: linear-gradient(bottom, #ccc, #fff); /* proposed W3C Markup */
|
||||
}
|
||||
|
||||
.wp_themeSkin select.mceListBox {
|
||||
border-color: #B2B2B2;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
/* SplitButton */
|
||||
.wp_themeSkin .mceSplitButton a.mceAction,
|
||||
.wp_themeSkin .mceSplitButton a.mceOpen {
|
||||
border-color: #ccc;
|
||||
}
|
||||
|
||||
.wp_themeSkin .mceSplitButton a.mceOpen:hover,
|
||||
.wp_themeSkin .mceSplitButtonSelected a.mceOpen,
|
||||
.wp_themeSkin table.mceSplitButtonEnabled:hover a.mceAction,
|
||||
.wp_themeSkin .mceSplitButton a.mceAction:hover {
|
||||
border-color: #909090;
|
||||
}
|
||||
|
||||
|
||||
.wp_themeSkin table.mceSplitButton td {
|
||||
background-color: #eee; /* Fallback */
|
||||
background-image: -ms-linear-gradient(bottom, #ddd, #fff); /* IE10 */
|
||||
background-image: -moz-linear-gradient(bottom, #ddd, #fff); /* Firefox */
|
||||
background-image: -o-linear-gradient(bottom, #ddd, #fff); /* Opera */
|
||||
background-image: -webkit-gradient(linear, left bottom, left top, from(#ddd), to(#fff)); /* old Webkit */
|
||||
background-image: -webkit-linear-gradient(bottom, #ddd, #fff); /* new Webkit */
|
||||
background-image: linear-gradient(bottom, #ddd, #fff); /* proposed W3C Markup */
|
||||
}
|
||||
|
||||
.wp_themeSkin table.mceSplitButton:hover td {
|
||||
background-image: -ms-linear-gradient(bottom, #ccc, #fff); /* IE10 */
|
||||
background-image: -moz-linear-gradient(bottom, #ccc, #fff); /* Firefox */
|
||||
background-image: -o-linear-gradient(bottom, #ccc, #fff); /* Opera */
|
||||
background-image: -webkit-gradient(linear, left bottom, left top, from(#ccc), to(#fff)); /* old Webkit */
|
||||
background-image: -webkit-linear-gradient(bottom, #ccc, #fff); /* new Webkit */
|
||||
background-image: linear-gradient(bottom, #ccc, #fff); /* proposed W3C Markup */
|
||||
}
|
||||
|
||||
.wp_themeSkin .mceSplitButtonActive {
|
||||
background-color: #B2B2B2;
|
||||
}
|
||||
|
||||
/* ColorSplitButton */
|
||||
.wp_themeSkin div.mceColorSplitMenu table {
|
||||
background-color: #ebebeb;
|
||||
border-color: #B2B2B2;
|
||||
}
|
||||
|
||||
.wp_themeSkin .mceColorSplitMenu a {
|
||||
border-color: #B2B2B2;
|
||||
}
|
||||
|
||||
.wp_themeSkin .mceColorSplitMenu a.mceMoreColors {
|
||||
border-color: #fff;
|
||||
}
|
||||
|
||||
.wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover {
|
||||
border-color: #0A246A;
|
||||
background-color: #B6BDD2;
|
||||
}
|
||||
|
||||
.wp_themeSkin a.mceMoreColors:hover {
|
||||
border-color: #0A246A;
|
||||
}
|
||||
|
||||
/* Menu */
|
||||
.wp_themeSkin .mceMenu {
|
||||
border-color: #ddd;
|
||||
}
|
||||
|
||||
.wp_themeSkin .mceMenu table {
|
||||
background-color: #ebeaeb;
|
||||
}
|
||||
|
||||
.wp_themeSkin .mceMenu .mceText {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover,
|
||||
.wp_themeSkin .mceMenu .mceMenuItemActive {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.wp_themeSkin td.mceMenuItemSeparator {
|
||||
background-color: #aaa;
|
||||
}
|
||||
.wp_themeSkin .mceMenuItemTitle a {
|
||||
background-color: #ccc;
|
||||
border-bottom-color: #aaa;
|
||||
}
|
||||
.wp_themeSkin .mceMenuItemTitle span.mceText {
|
||||
color: #000;
|
||||
}
|
||||
.wp_themeSkin .mceMenuItemDisabled .mceText {
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.wp_themeSkin tr.mceFirst td.mceToolbar {
|
||||
background: #dfdfdf url("../images/ed-bg.gif") repeat-x scroll left top;
|
||||
border-color: #ccc;
|
||||
}
|
||||
|
||||
.wp-admin #mceModalBlocker {
|
||||
background: #000;
|
||||
}
|
||||
|
||||
.wp-admin .clearlooks2 .mceFocus .mceTop .mceLeft {
|
||||
background: #444444;
|
||||
border-left: 1px solid #999;
|
||||
border-top: 1px solid #999;
|
||||
-moz-border-radius: 3px 0 0 0;
|
||||
-webkit-border-top-left-radius: 3px;
|
||||
-khtml-border-top-left-radius: 3px;
|
||||
border-top-left-radius: 3px;
|
||||
}
|
||||
|
||||
.wp-admin .clearlooks2 .mceFocus .mceTop .mceRight {
|
||||
background: #444444;
|
||||
border-right: 1px solid #999;
|
||||
border-top: 1px solid #999;
|
||||
border-top-right-radius: 3px;
|
||||
-khtml-border-top-right-radius: 3px;
|
||||
-webkit-border-top-right-radius: 3px;
|
||||
-moz-border-radius: 0 3px 0 0;
|
||||
}
|
||||
|
||||
.wp-admin .clearlooks2 .mceMiddle .mceLeft {
|
||||
background: #f1f1f1;
|
||||
border-left: 1px solid #999;
|
||||
}
|
||||
|
||||
.wp-admin .clearlooks2 .mceMiddle .mceRight {
|
||||
background: #f1f1f1;
|
||||
border-right: 1px solid #999;
|
||||
}
|
||||
|
||||
.wp-admin .clearlooks2 .mceBottom {
|
||||
background: #f1f1f1;
|
||||
border-bottom: 1px solid #999;
|
||||
}
|
||||
|
||||
.wp-admin .clearlooks2 .mceBottom .mceLeft {
|
||||
background: #f1f1f1;
|
||||
border-bottom: 1px solid #999;
|
||||
border-left: 1px solid #999;
|
||||
}
|
||||
|
||||
.wp-admin .clearlooks2 .mceBottom .mceCenter {
|
||||
background: #f1f1f1;
|
||||
border-bottom: 1px solid #999;
|
||||
}
|
||||
|
||||
.wp-admin .clearlooks2 .mceBottom .mceRight {
|
||||
background: #f1f1f1;
|
||||
border-bottom: 1px solid #999;
|
||||
border-right: 1px solid #999;
|
||||
}
|
||||
|
||||
.wp-admin .clearlooks2 .mceFocus .mceTop span {
|
||||
color: #e5e5e5;
|
||||
}
|
||||
/* end TinyMCE */
|
||||
|
||||
#titlediv #title {
|
||||
border-color: #ccc;
|
||||
}
|
||||
|
||||
#editorcontainer {
|
||||
border-color: #ccc #ccc #dfdfdf;
|
||||
}
|
||||
|
||||
#post-status-info {
|
||||
border-color: #dfdfdf #ccc #ccc;
|
||||
background-color: #eaeaea;
|
||||
}
|
||||
|
||||
.editwidget .widget-inside {
|
||||
|
@ -472,101 +472,6 @@ form.upgrade .hint {
|
||||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
5.0 - TinyMCE
|
||||
------------------------------------------------------------------------------*/
|
||||
|
||||
#editorcontainer #content {
|
||||
font-family: Consolas, Monaco, monospace;
|
||||
padding: 6px;
|
||||
line-height: 150%;
|
||||
border: 0 none;
|
||||
outline: none;
|
||||
resize: vertical;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
-khtml-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#editorcontainer,
|
||||
#quicktags {
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-collapse: separate;
|
||||
-moz-border-radius: 3px 3px 0 0;
|
||||
-webkit-border-top-right-radius: 3px;
|
||||
-webkit-border-top-left-radius: 3px;
|
||||
-khtml-border-top-right-radius: 3px;
|
||||
-khtml-border-top-left-radius: 3px;
|
||||
border-top-right-radius: 3px;
|
||||
border-top-left-radius: 3px;
|
||||
}
|
||||
|
||||
#quicktags {
|
||||
padding: 0;
|
||||
margin-bottom: -3px;
|
||||
border-bottom-width: 3px;
|
||||
background-image: url("../images/ed-bg.gif");
|
||||
background-position: left top;
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
|
||||
#quicktags #ed_toolbar {
|
||||
padding: 2px 4px 0;
|
||||
}
|
||||
|
||||
#ed_toolbar input,
|
||||
#ed_reply_toolbar input {
|
||||
margin: 3px 1px 4px;
|
||||
line-height: 18px;
|
||||
display: inline-block;
|
||||
min-width: 26px;
|
||||
padding: 2px 4px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#ed_reply_toolbar input {
|
||||
margin: 1px 2px 1px 1px;
|
||||
}
|
||||
|
||||
#quicktags #ed_link,
|
||||
#ed_reply_toolbar #ed_reply_link {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#quicktags #ed_del,
|
||||
#ed_reply_toolbar #ed_reply_del {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
#quicktags #ed_em,
|
||||
#ed_reply_toolbar #ed_reply_em {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
#wp_editbtns,
|
||||
#wp_gallerybtns {
|
||||
padding: 2px;
|
||||
position: absolute;
|
||||
display: none;
|
||||
z-index: 999998;
|
||||
}
|
||||
|
||||
#wp_editimgbtn,
|
||||
#wp_delimgbtn,
|
||||
#wp_editgallery,
|
||||
#wp_delgallery {
|
||||
margin: 2px;
|
||||
padding: 2px;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
-moz-border-radius: 3px;
|
||||
-khtml-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
/* Distraction Free Writing mode
|
||||
* =Overlay Styles
|
||||
-------------------------------------------------------------- */
|
||||
@ -2289,52 +2194,7 @@ input#link_url {
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
#poststuff #editor-toolbar {
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.wp_themeSkin tr.mceFirst td.mceToolbar {
|
||||
border-width: 0 0 1px;
|
||||
border-style: none none solid;
|
||||
}
|
||||
|
||||
#edButtonPreview,
|
||||
#edButtonHTML {
|
||||
height: 18px;
|
||||
margin: 5px 5px 0 0;
|
||||
padding: 4px 5px 2px;
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
-moz-border-radius: 3px 3px 0 0;
|
||||
-webkit-border-top-right-radius: 3px;
|
||||
-webkit-border-top-left-radius: 3px;
|
||||
-khtml-border-top-right-radius: 3px;
|
||||
-khtml-border-top-left-radius: 3px;
|
||||
border-top-right-radius: 3px;
|
||||
border-top-left-radius: 3px;
|
||||
}
|
||||
|
||||
.js .theEditor {
|
||||
color: white;
|
||||
}
|
||||
|
||||
#poststuff #edButtonHTML {
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
#media-buttons {
|
||||
cursor: default;
|
||||
padding: 8px 8px 0;
|
||||
}
|
||||
|
||||
#media-buttons a {
|
||||
cursor: pointer;
|
||||
padding: 0 0 5px 10px;
|
||||
}
|
||||
|
||||
#media-buttons img,
|
||||
.wp-media-buttons img,
|
||||
#submitpost #ajax-loading,
|
||||
#submitpost .ajax-loading {
|
||||
vertical-align: middle;
|
||||
@ -3743,7 +3603,7 @@ span.imgedit-scale-warn {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
#replyrow #editorcontainer {
|
||||
#replyrow .wp-editor-container {
|
||||
border: 0 none;
|
||||
}
|
||||
|
||||
|
@ -264,9 +264,9 @@ wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false );
|
||||
<?php } ?>
|
||||
|
||||
<?php if ( post_type_supports($post_type, 'editor') ) { ?>
|
||||
<div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea">
|
||||
<div id="postdivrich" class="postarea">
|
||||
|
||||
<?php the_editor($post->post_content); ?>
|
||||
<?php wp_editor($post->post_content, 'content'); ?>
|
||||
|
||||
<table id="post-status-info" cellspacing="0"><tbody><tr>
|
||||
<td id="wp-word-count"><?php printf( __( 'Word count: %s' ), '<span class="word-count">0</span>' ); ?></td>
|
||||
|
@ -120,8 +120,10 @@ $date = date_i18n( $datef, strtotime( $comment->comment_date ) );
|
||||
</div>
|
||||
|
||||
<div id="postdiv" class="postarea">
|
||||
<?php the_editor($comment->comment_content, 'content', 'newcomment_author_url', false, 4, false); ?>
|
||||
<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
|
||||
<?php
|
||||
$quicktags_settings = array( 'quicktags_buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,spell,close' );
|
||||
wp_editor( $comment->comment_content, 'content', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings ) );
|
||||
wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
@ -15,13 +15,13 @@
|
||||
/**
|
||||
* @since 2.1
|
||||
* @deprecated 2.1
|
||||
* @deprecated Use wp_tiny_mce().
|
||||
* @see wp_tiny_mce()
|
||||
* @deprecated Use wp_editor().
|
||||
* @see wp_editor()
|
||||
*/
|
||||
function tinymce_include() {
|
||||
_deprecated_function( __FUNCTION__, '2.1', 'wp_tiny_mce()' );
|
||||
_deprecated_function( __FUNCTION__, '2.1', 'wp_editor()' );
|
||||
|
||||
wp_tiny_mce();
|
||||
wp_editor('', 'content');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -701,3 +701,33 @@ function wp_dashboard_quick_press_output() {
|
||||
_deprecated_function( __FUNCTION__, '3.2', 'wp_dashboard_quick_press()' );
|
||||
wp_dashboard_quick_press();
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 2.7
|
||||
* @deprecated 3.3
|
||||
* @deprecated Use wp_editor().
|
||||
* @see wp_editor()
|
||||
*/
|
||||
function wp_tiny_mce() {
|
||||
_deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' );
|
||||
|
||||
wp_editor('', 'content');
|
||||
}
|
||||
|
||||
// see WP_Editor for the next 4
|
||||
function wp_preload_dialogs() {
|
||||
_deprecated_function( __FUNCTION__, '3.3' );
|
||||
}
|
||||
|
||||
function wp_print_editor_js() {
|
||||
_deprecated_function( __FUNCTION__, '3.3' );
|
||||
}
|
||||
|
||||
function wp_quicktags() {
|
||||
_deprecated_function( __FUNCTION__, '3.3' );
|
||||
}
|
||||
|
||||
function wp_fullscreen_html() {
|
||||
_deprecated_function( __FUNCTION__, '3.3' );
|
||||
}
|
||||
|
||||
|
@ -1,124 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Internal linking functions.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Administration
|
||||
* @since 3.1.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Performs post queries for internal linking.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @param array $args Optional. Accepts 'pagenum' and 's' (search) arguments.
|
||||
* @return array Results.
|
||||
*/
|
||||
function wp_link_query( $args = array() ) {
|
||||
$pts = get_post_types( array( 'public' => true ), 'objects' );
|
||||
$pt_names = array_keys( $pts );
|
||||
|
||||
$query = array(
|
||||
'post_type' => $pt_names,
|
||||
'suppress_filters' => true,
|
||||
'update_post_term_cache' => false,
|
||||
'update_post_meta_cache' => false,
|
||||
'post_status' => 'publish',
|
||||
'order' => 'DESC',
|
||||
'orderby' => 'post_date',
|
||||
'posts_per_page' => 20,
|
||||
);
|
||||
|
||||
$args['pagenum'] = isset( $args['pagenum'] ) ? absint( $args['pagenum'] ) : 1;
|
||||
|
||||
if ( isset( $args['s'] ) )
|
||||
$query['s'] = $args['s'];
|
||||
|
||||
$query['offset'] = $args['pagenum'] > 1 ? $query['posts_per_page'] * ( $args['pagenum'] - 1 ) : 0;
|
||||
|
||||
// Do main query.
|
||||
$get_posts = new WP_Query;
|
||||
$posts = $get_posts->query( $query );
|
||||
// Check if any posts were found.
|
||||
if ( ! $get_posts->post_count )
|
||||
return false;
|
||||
|
||||
// Build results.
|
||||
$results = array();
|
||||
foreach ( $posts as $post ) {
|
||||
if ( 'post' == $post->post_type )
|
||||
$info = mysql2date( __( 'Y/m/d' ), $post->post_date );
|
||||
else
|
||||
$info = $pts[ $post->post_type ]->labels->singular_name;
|
||||
|
||||
$results[] = array(
|
||||
'ID' => $post->ID,
|
||||
'title' => trim( esc_html( strip_tags( get_the_title( $post ) ) ) ),
|
||||
'permalink' => get_permalink( $post->ID ),
|
||||
'info' => $info,
|
||||
);
|
||||
}
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
/**
|
||||
* Dialog for internal linking.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*/
|
||||
function wp_link_dialog() {
|
||||
?>
|
||||
<form id="wp-link" tabindex="-1">
|
||||
<?php wp_nonce_field( 'internal-linking', '_ajax_linking_nonce', false ); ?>
|
||||
<div id="link-selector">
|
||||
<div id="link-options">
|
||||
<p class="howto"><?php _e( 'Enter the destination URL' ); ?></p>
|
||||
<div>
|
||||
<label><span><?php _e( 'URL' ); ?></span><input id="url-field" type="text" tabindex="10" name="href" /></label>
|
||||
</div>
|
||||
<div>
|
||||
<label><span><?php _e( 'Title' ); ?></span><input id="link-title-field" type="text" tabindex="20" name="linktitle" /></label>
|
||||
</div>
|
||||
<div class="link-target">
|
||||
<label><input type="checkbox" id="link-target-checkbox" tabindex="30" /> <?php _e( 'Open link in a new window/tab' ); ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<?php $show_internal = '1' == get_user_setting( 'wplink', '0' ); ?>
|
||||
<p class="howto toggle-arrow <?php if ( $show_internal ) echo 'toggle-arrow-active'; ?>" id="internal-toggle"><?php _e( 'Or link to existing content' ); ?></p>
|
||||
<div id="search-panel"<?php if ( ! $show_internal ) echo ' style="display:none"'; ?>>
|
||||
<div class="link-search-wrapper">
|
||||
<label>
|
||||
<span><?php _e( 'Search' ); ?></span>
|
||||
<input type="text" id="search-field" class="link-search-field" tabindex="60" autocomplete="off" />
|
||||
<img class="waiting" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" />
|
||||
</label>
|
||||
</div>
|
||||
<div id="search-results" class="query-results">
|
||||
<ul></ul>
|
||||
<div class="river-waiting">
|
||||
<img class="waiting" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
<div id="most-recent-results" class="query-results">
|
||||
<div class="query-notice"><em><?php _e( 'No search term specified. Showing recent items.' ); ?></em></div>
|
||||
<ul></ul>
|
||||
<div class="river-waiting">
|
||||
<img class="waiting" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="submitbox">
|
||||
<div id="wp-link-cancel">
|
||||
<a class="submitdelete deletion" href="#"><?php _e( 'Cancel' ); ?></a>
|
||||
</div>
|
||||
<div id="wp-link-update">
|
||||
<?php submit_button( __('Update'), 'primary', 'wp-link-submit', false, array('tabindex' => 100)); ?>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
?>
|
@ -158,10 +158,9 @@ function &get_manifest() {
|
||||
array('../wp-includes/js/tinymce/themes/advanced/img/fm.gif'),
|
||||
array('../wp-includes/js/tinymce/themes/advanced/img/gotmoxie.png'),
|
||||
array('../wp-includes/js/tinymce/themes/advanced/img/sflogo.png'),
|
||||
array('../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/butt2.png'),
|
||||
array('../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/fade-butt.png'),
|
||||
array('../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/tabs.gif'),
|
||||
array('../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/down_arrow.gif'),
|
||||
array('../wp-includes/images/down_arrow.gif'),
|
||||
array('../wp-includes/js/tinymce/themes/advanced/skins/default/img/progress.gif'),
|
||||
array('../wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_check.gif'),
|
||||
array('../wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_arrow.gif'),
|
||||
|
@ -373,27 +373,22 @@ document.body.className = c;
|
||||
*
|
||||
* @since 2.5.0
|
||||
*/
|
||||
function media_buttons() {
|
||||
$do_image = $do_audio = $do_video = true;
|
||||
if ( is_multisite() ) {
|
||||
$media_buttons = get_site_option( 'mu_media_buttons' );
|
||||
if ( empty($media_buttons['image']) )
|
||||
$do_image = false;
|
||||
if ( empty($media_buttons['audio']) )
|
||||
$do_audio = false;
|
||||
if ( empty($media_buttons['video']) )
|
||||
$do_video = false;
|
||||
}
|
||||
function media_buttons($editor_id = 'content') {
|
||||
$out = '';
|
||||
|
||||
if ( $do_image )
|
||||
$out .= _media_button(__('Add an Image'), 'images/media-button-image.gif?ver=20100531', 'image');
|
||||
if ( $do_video )
|
||||
$out .= _media_button(__('Add Video'), 'images/media-button-video.gif?ver=20100531', 'video');
|
||||
if ( $do_audio )
|
||||
$out .= _media_button(__('Add Audio'), 'images/media-button-music.gif?ver=20100531', 'audio');
|
||||
if ( is_multisite() )
|
||||
$_buttons = get_site_option('mu_media_buttons');
|
||||
else
|
||||
$_buttons = array( 'image' => true, 'video' => true, 'audio' => true );
|
||||
|
||||
$out .= _media_button(__('Add Media'), 'images/media-button-other.gif?ver=20100531', 'media');
|
||||
if ( !empty($_buttons['image']) )
|
||||
$out .= _media_button(__('Add an Image'), 'images/media-button-image.gif?ver=20100531', 'image', $editor_id);
|
||||
if ( !empty($_buttons['video']) )
|
||||
$out .= _media_button(__('Add Video'), 'images/media-button-video.gif?ver=20100531', 'video', $editor_id);
|
||||
if ( !empty($_buttons['audio']) )
|
||||
$out .= _media_button(__('Add Audio'), 'images/media-button-music.gif?ver=20100531', 'audio', $editor_id);
|
||||
|
||||
$out .= _media_button(__('Add Media'), 'images/media-button-other.gif?ver=20100531', 'media', $editor_id);
|
||||
|
||||
$context = apply_filters('media_buttons_context', __('Upload/Insert %s'));
|
||||
|
||||
@ -401,8 +396,8 @@ function media_buttons() {
|
||||
}
|
||||
add_action( 'media_buttons', 'media_buttons' );
|
||||
|
||||
function _media_button($title, $icon, $type) {
|
||||
return "<a href='" . esc_url( get_upload_iframe_src($type) ) . "' id='add_$type' class='thickbox' title='$title'><img src='" . esc_url( admin_url( $icon ) ) . "' alt='$title' onclick='return false;' /></a>";
|
||||
function _media_button($title, $icon, $type, $id) {
|
||||
return "<a href='" . esc_url( get_upload_iframe_src($type) ) . "' id='{$id}-add_{$type}' class='thickbox add_$type' title='$title'><img src='" . esc_url( admin_url( $icon ) ) . "' alt='$title' onclick='return false;' /></a>";
|
||||
}
|
||||
|
||||
function get_upload_iframe_src($type) {
|
||||
|
@ -1405,454 +1405,3 @@ function post_preview() {
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the TinyMCE editor used on the Write and Edit screens.
|
||||
*
|
||||
* @package WordPress
|
||||
* @since 2.7.0
|
||||
*
|
||||
* TinyMCE is loaded separately from other Javascript by using wp-tinymce.php. It outputs concatenated
|
||||
* and optionaly pre-compressed version of the core and all default plugins. Additional plugins are loaded
|
||||
* directly by TinyMCE using non-blocking method. Custom plugins can be refreshed by adding a query string
|
||||
* to the URL when queueing them with the mce_external_plugins filter.
|
||||
*
|
||||
* @param bool $teeny optional Output a trimmed down version used in Press This.
|
||||
* @param mixed $settings optional An array that can add to or overwrite the default TinyMCE settings.
|
||||
*/
|
||||
function wp_tiny_mce( $teeny = false, $settings = false ) {
|
||||
global $concatenate_scripts, $compress_scripts, $tinymce_version, $editor_styles;
|
||||
|
||||
if ( ! user_can_richedit() )
|
||||
return;
|
||||
|
||||
$baseurl = includes_url('js/tinymce');
|
||||
|
||||
$mce_locale = ( '' == get_locale() ) ? 'en' : strtolower( substr(get_locale(), 0, 2) ); // only ISO 639-1
|
||||
|
||||
/*
|
||||
The following filter allows localization scripts to change the languages displayed in the spellchecker's drop-down menu.
|
||||
By default it uses Google's spellchecker API, but can be configured to use PSpell/ASpell if installed on the server.
|
||||
The + sign marks the default language. More information:
|
||||
http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker
|
||||
*/
|
||||
$mce_spellchecker_languages = apply_filters('mce_spellchecker_languages', '+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv');
|
||||
|
||||
if ( $teeny ) {
|
||||
$plugins = apply_filters( 'teeny_mce_plugins', array('inlinepopups', 'fullscreen', 'wordpress', 'wplink', 'wpdialogs') );
|
||||
$ext_plugins = '';
|
||||
} else {
|
||||
$plugins = array( 'inlinepopups', 'spellchecker', 'tabfocus', 'paste', 'media', 'wordpress', 'wpfullscreen', 'wpeditimage', 'wpgallery', 'wplink', 'wpdialogs' );
|
||||
|
||||
/*
|
||||
The following filter takes an associative array of external plugins for TinyMCE in the form 'plugin_name' => 'url'.
|
||||
It adds the plugin's name to TinyMCE's plugins init and the call to PluginManager to load the plugin.
|
||||
The url should be absolute and should include the js file name to be loaded. Example:
|
||||
array( 'myplugin' => 'http://my-site.com/wp-content/plugins/myfolder/mce_plugin.js' )
|
||||
If the plugin uses a button, it should be added with one of the "$mce_buttons" filters.
|
||||
*/
|
||||
$mce_external_plugins = apply_filters('mce_external_plugins', array());
|
||||
|
||||
$ext_plugins = '';
|
||||
if ( ! empty($mce_external_plugins) ) {
|
||||
|
||||
/*
|
||||
The following filter loads external language files for TinyMCE plugins.
|
||||
It takes an associative array 'plugin_name' => 'path', where path is the
|
||||
include path to the file. The language file should follow the same format as
|
||||
/tinymce/langs/wp-langs.php and should define a variable $strings that
|
||||
holds all translated strings.
|
||||
When this filter is not used, the function will try to load {mce_locale}.js.
|
||||
If that is not found, en.js will be tried next.
|
||||
*/
|
||||
$mce_external_languages = apply_filters('mce_external_languages', array());
|
||||
|
||||
$loaded_langs = array();
|
||||
$strings = '';
|
||||
|
||||
if ( ! empty($mce_external_languages) ) {
|
||||
foreach ( $mce_external_languages as $name => $path ) {
|
||||
if ( @is_file($path) && @is_readable($path) ) {
|
||||
include_once($path);
|
||||
$ext_plugins .= $strings . "\n";
|
||||
$loaded_langs[] = $name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ( $mce_external_plugins as $name => $url ) {
|
||||
|
||||
if ( is_ssl() ) $url = str_replace('http://', 'https://', $url);
|
||||
|
||||
$plugins[] = '-' . $name;
|
||||
|
||||
$plugurl = dirname($url);
|
||||
$strings = $str1 = $str2 = '';
|
||||
if ( ! in_array($name, $loaded_langs) ) {
|
||||
$path = str_replace( WP_PLUGIN_URL, '', $plugurl );
|
||||
$path = WP_PLUGIN_DIR . $path . '/langs/';
|
||||
|
||||
if ( function_exists('realpath') )
|
||||
$path = trailingslashit( realpath($path) );
|
||||
|
||||
if ( @is_file($path . $mce_locale . '.js') )
|
||||
$strings .= @file_get_contents($path . $mce_locale . '.js') . "\n";
|
||||
|
||||
if ( @is_file($path . $mce_locale . '_dlg.js') )
|
||||
$strings .= @file_get_contents($path . $mce_locale . '_dlg.js') . "\n";
|
||||
|
||||
if ( 'en' != $mce_locale && empty($strings) ) {
|
||||
if ( @is_file($path . 'en.js') ) {
|
||||
$str1 = @file_get_contents($path . 'en.js');
|
||||
$strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str1, 1 ) . "\n";
|
||||
}
|
||||
|
||||
if ( @is_file($path . 'en_dlg.js') ) {
|
||||
$str2 = @file_get_contents($path . 'en_dlg.js');
|
||||
$strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str2, 1 ) . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! empty($strings) )
|
||||
$ext_plugins .= "\n" . $strings . "\n";
|
||||
}
|
||||
|
||||
$ext_plugins .= 'tinyMCEPreInit.load_ext("' . $plugurl . '", "' . $mce_locale . '");' . "\n";
|
||||
$ext_plugins .= 'tinymce.PluginManager.load("' . $name . '", "' . $url . '");' . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( $teeny ) {
|
||||
$mce_buttons = apply_filters( 'teeny_mce_buttons', array('bold, italic, underline, blockquote, separator, strikethrough, bullist, numlist,justifyleft, justifycenter, justifyright, undo, redo, link, unlink, fullscreen') );
|
||||
$mce_buttons = implode($mce_buttons, ',');
|
||||
$mce_buttons_2 = $mce_buttons_3 = $mce_buttons_4 = '';
|
||||
} else {
|
||||
$mce_buttons = apply_filters('mce_buttons', array('bold', 'italic', 'strikethrough', '|', 'bullist', 'numlist', 'blockquote', '|', 'justifyleft', 'justifycenter', 'justifyright', '|', 'link', 'unlink', 'wp_more', '|', 'spellchecker', 'fullscreen', 'wp_adv' ));
|
||||
$mce_buttons = implode($mce_buttons, ',');
|
||||
|
||||
$mce_buttons_2 = array( 'formatselect', 'underline', 'justifyfull', 'forecolor', '|', 'pastetext', 'pasteword', 'removeformat', '|', 'charmap', '|', 'outdent', 'indent', '|', 'undo', 'redo', 'wp_help' );
|
||||
$mce_buttons_2 = apply_filters('mce_buttons_2', $mce_buttons_2);
|
||||
$mce_buttons_2 = implode($mce_buttons_2, ',');
|
||||
|
||||
$mce_buttons_3 = apply_filters('mce_buttons_3', array());
|
||||
$mce_buttons_3 = implode($mce_buttons_3, ',');
|
||||
|
||||
$mce_buttons_4 = apply_filters('mce_buttons_4', array());
|
||||
$mce_buttons_4 = implode($mce_buttons_4, ',');
|
||||
}
|
||||
$no_captions = (bool) apply_filters( 'disable_captions', '' );
|
||||
|
||||
// TinyMCE init settings
|
||||
$initArray = array (
|
||||
'mode' => 'specific_textareas',
|
||||
'editor_selector' => 'theEditor',
|
||||
'width' => '100%',
|
||||
'theme' => 'advanced',
|
||||
'skin' => 'wp_theme',
|
||||
'theme_advanced_buttons1' => $mce_buttons,
|
||||
'theme_advanced_buttons2' => $mce_buttons_2,
|
||||
'theme_advanced_buttons3' => $mce_buttons_3,
|
||||
'theme_advanced_buttons4' => $mce_buttons_4,
|
||||
'language' => $mce_locale,
|
||||
'spellchecker_languages' => $mce_spellchecker_languages,
|
||||
'theme_advanced_toolbar_location' => 'top',
|
||||
'theme_advanced_toolbar_align' => 'left',
|
||||
'theme_advanced_statusbar_location' => 'bottom',
|
||||
'theme_advanced_resizing' => true,
|
||||
'theme_advanced_resize_horizontal' => false,
|
||||
'dialog_type' => 'modal',
|
||||
'formats' => "{
|
||||
alignleft : [
|
||||
{selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'left'}},
|
||||
{selector : 'img,table', classes : 'alignleft'}
|
||||
],
|
||||
aligncenter : [
|
||||
{selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'center'}},
|
||||
{selector : 'img,table', classes : 'aligncenter'}
|
||||
],
|
||||
alignright : [
|
||||
{selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'right'}},
|
||||
{selector : 'img,table', classes : 'alignright'}
|
||||
],
|
||||
strikethrough : {inline : 'del'}
|
||||
}",
|
||||
'relative_urls' => false,
|
||||
'remove_script_host' => false,
|
||||
'convert_urls' => false,
|
||||
'apply_source_formatting' => false,
|
||||
'remove_linebreaks' => true,
|
||||
'gecko_spellcheck' => true,
|
||||
'keep_styles' => false,
|
||||
'entities' => '38,amp,60,lt,62,gt',
|
||||
'accessibility_focus' => true,
|
||||
'tabfocus_elements' => 'major-publishing-actions',
|
||||
'media_strict' => false,
|
||||
'paste_remove_styles' => true,
|
||||
'paste_remove_spans' => true,
|
||||
'paste_strip_class_attributes' => 'all',
|
||||
'paste_text_use_dialog' => true,
|
||||
'extended_valid_elements' => 'article[*],aside[*],audio[*],canvas[*],command[*],datalist[*],details[*],embed[*],figcaption[*],figure[*],footer[*],header[*],hgroup[*],keygen[*],mark[*],meter[*],nav[*],output[*],progress[*],section[*],source[*],summary,time[*],video[*],wbr',
|
||||
'wpeditimage_disable_captions' => $no_captions,
|
||||
'wp_fullscreen_content_css' => "$baseurl/plugins/wpfullscreen/css/wp-fullscreen.css",
|
||||
'plugins' => implode( ',', $plugins ),
|
||||
);
|
||||
|
||||
if ( ! empty( $editor_styles ) && is_array( $editor_styles ) ) {
|
||||
$mce_css = array();
|
||||
$style_uri = get_stylesheet_directory_uri();
|
||||
if ( ! is_child_theme() ) {
|
||||
foreach ( $editor_styles as $file )
|
||||
$mce_css[] = "$style_uri/$file";
|
||||
} else {
|
||||
$style_dir = get_stylesheet_directory();
|
||||
$template_uri = get_template_directory_uri();
|
||||
$template_dir = get_template_directory();
|
||||
foreach ( $editor_styles as $file ) {
|
||||
if ( file_exists( "$template_dir/$file" ) )
|
||||
$mce_css[] = "$template_uri/$file";
|
||||
if ( file_exists( "$style_dir/$file" ) )
|
||||
$mce_css[] = "$style_uri/$file";
|
||||
}
|
||||
}
|
||||
$mce_css = implode( ',', $mce_css );
|
||||
} else {
|
||||
$mce_css = '';
|
||||
}
|
||||
|
||||
$mce_css = trim( apply_filters( 'mce_css', $mce_css ), ' ,' );
|
||||
|
||||
if ( ! empty($mce_css) )
|
||||
$initArray['content_css'] = $mce_css;
|
||||
|
||||
if ( is_array($settings) )
|
||||
$initArray = array_merge($initArray, $settings);
|
||||
|
||||
// For people who really REALLY know what they're doing with TinyMCE
|
||||
// You can modify initArray to add, remove, change elements of the config before tinyMCE.init
|
||||
// Setting "valid_elements", "invalid_elements" and "extended_valid_elements" can be done through "tiny_mce_before_init".
|
||||
// Best is to use the default cleanup by not specifying valid_elements, as TinyMCE contains full set of XHTML 1.0.
|
||||
if ( $teeny ) {
|
||||
$initArray = apply_filters('teeny_mce_before_init', $initArray);
|
||||
} else {
|
||||
$initArray = apply_filters('tiny_mce_before_init', $initArray);
|
||||
}
|
||||
|
||||
if ( empty($initArray['theme_advanced_buttons3']) && !empty($initArray['theme_advanced_buttons4']) ) {
|
||||
$initArray['theme_advanced_buttons3'] = $initArray['theme_advanced_buttons4'];
|
||||
$initArray['theme_advanced_buttons4'] = '';
|
||||
}
|
||||
|
||||
if ( ! isset($concatenate_scripts) )
|
||||
script_concat_settings();
|
||||
|
||||
$language = $initArray['language'];
|
||||
|
||||
$compressed = $compress_scripts && $concatenate_scripts && isset($_SERVER['HTTP_ACCEPT_ENCODING'])
|
||||
&& false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip');
|
||||
|
||||
/**
|
||||
* Deprecated
|
||||
*
|
||||
* The tiny_mce_version filter is not needed since external plugins are loaded directly by TinyMCE.
|
||||
* These plugins can be refreshed by appending query string to the URL passed to mce_external_plugins filter.
|
||||
* If the plugin has a popup dialog, a query string can be added to the button action that opens it (in the plugin's code).
|
||||
*/
|
||||
$version = apply_filters('tiny_mce_version', '');
|
||||
$version = 'ver=' . $tinymce_version . $version;
|
||||
|
||||
if ( 'en' != $language )
|
||||
include_once(ABSPATH . WPINC . '/js/tinymce/langs/wp-langs.php');
|
||||
|
||||
$mce_options = '';
|
||||
foreach ( $initArray as $k => $v ) {
|
||||
if ( is_bool($v) ) {
|
||||
$val = $v ? 'true' : 'false';
|
||||
$mce_options .= $k . ':' . $val . ', ';
|
||||
continue;
|
||||
} elseif ( !empty($v) && is_string($v) && ( ('{' == $v{0} && '}' == $v{strlen($v) - 1}) || ('[' == $v{0} && ']' == $v{strlen($v) - 1}) || preg_match('/^\(?function ?\(/', $v) ) ) {
|
||||
$mce_options .= $k . ':' . $v . ', ';
|
||||
continue;
|
||||
}
|
||||
|
||||
$mce_options .= $k . ':"' . $v . '", ';
|
||||
}
|
||||
|
||||
$mce_options = rtrim( trim($mce_options), '\n\r,' );
|
||||
|
||||
do_action('before_wp_tiny_mce', $initArray); ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* <![CDATA[ */
|
||||
tinyMCEPreInit = {
|
||||
base : "<?php echo $baseurl; ?>",
|
||||
suffix : "",
|
||||
query : "<?php echo $version; ?>",
|
||||
mceInit : {<?php echo $mce_options; ?>},
|
||||
load_ext : function(url,lang){var sl=tinymce.ScriptLoader;sl.markDone(url+'/langs/'+lang+'.js');sl.markDone(url+'/langs/'+lang+'_dlg.js');}
|
||||
};
|
||||
/* ]]> */
|
||||
</script>
|
||||
|
||||
<?php
|
||||
if ( $compressed )
|
||||
echo "<script type='text/javascript' src='$baseurl/wp-tinymce.php?c=1&$version'></script>\n";
|
||||
else
|
||||
echo "<script type='text/javascript' src='$baseurl/tiny_mce.js?$version'></script>\n";
|
||||
|
||||
if ( 'en' != $language && isset($lang) )
|
||||
echo "<script type='text/javascript'>\n$lang\n</script>\n";
|
||||
else
|
||||
echo "<script type='text/javascript' src='$baseurl/langs/wp-langs-en.js?$version'></script>\n";
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
/* <![CDATA[ */
|
||||
<?php
|
||||
if ( $ext_plugins )
|
||||
echo "$ext_plugins\n";
|
||||
|
||||
if ( ! $compressed ) {
|
||||
?>
|
||||
(function(){var t=tinyMCEPreInit,sl=tinymce.ScriptLoader,ln=t.mceInit.language,th=t.mceInit.theme,pl=t.mceInit.plugins;sl.markDone(t.base+'/langs/'+ln+'.js');sl.markDone(t.base+'/themes/'+th+'/langs/'+ln+'.js');sl.markDone(t.base+'/themes/'+th+'/langs/'+ln+'_dlg.js');tinymce.each(pl.split(','),function(n){if(n&&n.charAt(0)!='-'){sl.markDone(t.base+'/plugins/'+n+'/langs/'+ln+'.js');sl.markDone(t.base+'/plugins/'+n+'/langs/'+ln+'_dlg.js');}});})();
|
||||
<?php } ?>
|
||||
tinyMCE.init(tinyMCEPreInit.mceInit);
|
||||
/* ]]> */
|
||||
</script>
|
||||
<?php
|
||||
|
||||
do_action('after_wp_tiny_mce', $initArray);
|
||||
}
|
||||
|
||||
// Load additional inline scripts based on active plugins.
|
||||
function wp_preload_dialogs($init) {
|
||||
$plugins = preg_split('/[ ,-]+/', $init['plugins']);
|
||||
|
||||
if ( in_array( 'wpdialogs', $plugins, true ) ) {
|
||||
wp_print_scripts('wpdialogs-popup');
|
||||
wp_print_styles('wp-jquery-ui-dialog');
|
||||
}
|
||||
|
||||
if ( in_array( 'wplink', $plugins, true ) ) {
|
||||
require_once ABSPATH . 'wp-admin/includes/internal-linking.php';
|
||||
?><div style="display:none;"><?php wp_link_dialog(); ?></div><?php
|
||||
wp_print_scripts('wplink');
|
||||
wp_print_styles('wplink');
|
||||
}
|
||||
|
||||
// Distraction Free Writing mode
|
||||
if ( in_array( 'wpfullscreen', $plugins, true ) ) {
|
||||
wp_fullscreen_html();
|
||||
wp_print_scripts('wp-fullscreen');
|
||||
}
|
||||
|
||||
wp_print_scripts('word-count');
|
||||
}
|
||||
|
||||
function wp_quicktags() {
|
||||
global $tinymce_version;
|
||||
|
||||
wp_preload_dialogs( array( 'plugins' => 'wpdialogs,wplink,wpfullscreen' ) );
|
||||
|
||||
if ( !user_can_richedit() ) {
|
||||
wp_enqueue_style( 'tinymce-buttons', includes_url('js/tinymce/themes/advanced/skins/wp_theme/ui.css'), array(), $tinymce_version );
|
||||
wp_print_styles('tinymce-buttons');
|
||||
}
|
||||
}
|
||||
|
||||
function wp_print_editor_js() {
|
||||
wp_print_scripts('editor');
|
||||
}
|
||||
|
||||
function wp_fullscreen_html() {
|
||||
global $content_width, $post;
|
||||
|
||||
$width = isset($content_width) && 800 > $content_width ? $content_width : 800;
|
||||
$width = $width + 10; // compensate for the padding
|
||||
$dfw_width = get_user_setting( 'dfw_width', $width );
|
||||
$save = isset($post->post_status) && $post->post_status == 'publish' ? __('Update') : __('Save');
|
||||
?>
|
||||
<div id="wp-fullscreen-body">
|
||||
<div id="fullscreen-topbar">
|
||||
<div id="wp-fullscreen-toolbar">
|
||||
<div id="wp-fullscreen-close"><a href="#" onclick="fullscreen.off();return false;"><?php _e('Exit fullscreen'); ?></a></div>
|
||||
<div id="wp-fullscreen-central-toolbar" style="width:<?php echo $width; ?>px;">
|
||||
|
||||
<div id="wp-fullscreen-mode-bar"><div id="wp-fullscreen-modes">
|
||||
<a href="#" onclick="fullscreen.switchmode('tinymce');return false;"><?php _e('Visual'); ?></a>
|
||||
<a href="#" onclick="fullscreen.switchmode('html');return false;"><?php _e('HTML'); ?></a>
|
||||
</div></div>
|
||||
|
||||
<div id="wp-fullscreen-button-bar"><div id="wp-fullscreen-buttons" class="wp_themeSkin">
|
||||
<?php
|
||||
|
||||
$media_link_type = 'image';
|
||||
if ( is_multisite() && ( ( ! $mu_media_buttons = get_site_option( 'mu_media_buttons' ) ) || empty( $mu_media_buttons['image'] ) ) )
|
||||
$media_link_type = 'media';
|
||||
|
||||
$buttons = array(
|
||||
// format: title, onclick, show in both editors
|
||||
'bold' => array( 'title' => __('Bold (Ctrl + B)'), 'onclick' => 'fullscreen.b();', 'both' => false ),
|
||||
'italic' => array( 'title' => __('Italic (Ctrl + I)'), 'onclick' => 'fullscreen.i();', 'both' => false ),
|
||||
'0' => 'separator',
|
||||
'bullist' => array( 'title' => __('Unordered list (Alt + Shift + U)'), 'onclick' => 'fullscreen.ul();', 'both' => false ),
|
||||
'numlist' => array( 'title' => __('Ordered list (Alt + Shift + O)'), 'onclick' => 'fullscreen.ol();', 'both' => false ),
|
||||
'1' => 'separator',
|
||||
'blockquote' => array( 'title' => __('Blockquote (Alt+Shift+Q)'), 'onclick' => 'fullscreen.blockquote();', 'both' => false ),
|
||||
'image' => array( 'title' => __('Insert/edit image (Alt + Shift + M)'), 'onclick' => "jQuery('#add_{$media_link_type}').click();", 'both' => true ),
|
||||
'2' => 'separator',
|
||||
'link' => array( 'title' => __('Insert/edit link (Alt + Shift + A)'), 'onclick' => 'fullscreen.link();', 'both' => true ),
|
||||
'unlink' => array( 'title' => __('Unlink (Alt + Shift + S)'), 'onclick' => 'fullscreen.unlink();', 'both' => false ),
|
||||
'3' => 'separator',
|
||||
'help' => array( 'title' => __('Help (Alt + Shift + H)'), 'onclick' => 'fullscreen.help();', 'both' => false )
|
||||
);
|
||||
|
||||
$buttons = apply_filters( 'wp_fullscreen_buttons', $buttons );
|
||||
|
||||
foreach ( $buttons as $button => $args ) {
|
||||
if ( 'separator' == $args ) { ?>
|
||||
<div><span aria-orientation="vertical" role="separator" class="mceSeparator"></span></div>
|
||||
<?php continue;
|
||||
} ?>
|
||||
|
||||
<div<?php if ( $args['both'] ) { ?> class="wp-fullscreen-both"<?php } ?>>
|
||||
<a title="<?php echo $args['title']; ?>" onclick="<?php echo $args['onclick']; ?>return false;" class="mceButton mceButtonEnabled mce_<?php echo $button; ?>" href="#" id="wp_fs_<?php echo $button; ?>" role="button" aria-pressed="false">
|
||||
<span class="mceIcon mce_<?php echo $button; ?>"></span>
|
||||
</a>
|
||||
</div>
|
||||
<?php
|
||||
} ?>
|
||||
|
||||
</div></div>
|
||||
|
||||
<div id="wp-fullscreen-save">
|
||||
<span><?php if ( $post->post_status == 'publish' ) _e('Updated.'); else _e('Saved.'); ?></span>
|
||||
<img src="images/wpspin_light.gif" alt="" />
|
||||
<input type="button" class="button-primary" value="<?php echo $save; ?>" onclick="fullscreen.save();" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="wp-fullscreen-wrap" style="width:<?php echo $dfw_width; ?>px;">
|
||||
<label id="wp-fullscreen-title-prompt-text" for="wp-fullscreen-title"><?php echo apply_filters( 'enter_title_here', __( 'Enter title here' ), $post ); ?></label>
|
||||
<input type="text" id="wp-fullscreen-title" value="" autocomplete="off" />
|
||||
|
||||
<div id="wp-fullscreen-container">
|
||||
<textarea id="wp_mce_fullscreen"></textarea>
|
||||
</div>
|
||||
|
||||
<div id="wp-fullscreen-status">
|
||||
<div id="wp-fullscreen-count"><?php printf( __( 'Word count: %s' ), '<span class="word-count">0</span>' ); ?></div>
|
||||
<div id="wp-fullscreen-tagline"><?php _e('Just write.'); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fullscreen-overlay" id="fullscreen-overlay"></div>
|
||||
<div class="fullscreen-overlay fullscreen-fader fade-600" id="fullscreen-fader"></div>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,27 +1,45 @@
|
||||
|
||||
jQuery(document).ready(function($){
|
||||
var h = wpCookies.getHash('TinyMCE_content_size');
|
||||
|
||||
if ( getUserSetting( 'editor' ) == 'html' ) {
|
||||
if ( h )
|
||||
$('#content').css('height', h.ch - 15 + 'px');
|
||||
} else {
|
||||
if ( typeof tinyMCE != 'object' ) {
|
||||
$('#content').css('color', '#000');
|
||||
} else {
|
||||
$('#quicktags').hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var switchEditors = {
|
||||
|
||||
go: function(a) {
|
||||
var t = this, aid = a.id, l = aid.length, id = aid.substr(0, l - 5), mode = aid.substr(l - 4),
|
||||
ed = tinyMCE.get(id), wrap_id = 'wp-'+id+'-wrap', dom = tinymce.DOM, txtarea_el = dom.get(id);
|
||||
|
||||
if ( 'tmce' == mode ) {
|
||||
if ( ed && ! ed.isHidden() )
|
||||
return false;
|
||||
|
||||
mode : '',
|
||||
if ( tinyMCEPreInit.mceInit[id] && tinyMCEPreInit.mceInit[id].wpautop )
|
||||
txtarea_el.value = t.wpautop( txtarea_el.value );
|
||||
|
||||
if ( ed ) {
|
||||
ed.show();
|
||||
} else {
|
||||
ed = new tinymce.Editor(id, tinyMCEPreInit.mceInit[id]);
|
||||
ed.render();
|
||||
}
|
||||
|
||||
I : function(e) {
|
||||
return document.getElementById(e);
|
||||
dom.removeClass(wrap_id, 'html-active');
|
||||
dom.addClass(wrap_id, 'tmce-active');
|
||||
setUserSetting('editor', 'tinymce');
|
||||
|
||||
} else if ( 'html' == mode ) {
|
||||
|
||||
if ( ed && ed.isHidden() )
|
||||
return false;
|
||||
|
||||
if ( ed ) {
|
||||
txtarea_el.style.height = ed.getContentAreaContainer().offsetHeight + 20 + 'px';
|
||||
ed.hide();
|
||||
}
|
||||
|
||||
dom.removeClass(wrap_id, 'tmce-active');
|
||||
dom.addClass(wrap_id, 'html-active');
|
||||
setUserSetting('editor', 'html');
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
|
||||
_wp_Nop : function(content) {
|
||||
var blocklist1, blocklist2;
|
||||
|
||||
@ -85,55 +103,6 @@ var switchEditors = {
|
||||
return content;
|
||||
},
|
||||
|
||||
go : function(id, mode) {
|
||||
id = id || 'content';
|
||||
mode = mode || this.mode || '';
|
||||
|
||||
var ed, qt = this.I('quicktags'), H = this.I('edButtonHTML'), P = this.I('edButtonPreview'), ta = this.I(id);
|
||||
|
||||
try { ed = tinyMCE.get(id); }
|
||||
catch(e) { ed = false; }
|
||||
|
||||
if ( 'tinymce' == mode ) {
|
||||
if ( ed && ! ed.isHidden() )
|
||||
return false;
|
||||
|
||||
setUserSetting( 'editor', 'tinymce' );
|
||||
this.mode = 'html';
|
||||
|
||||
P.className = 'active';
|
||||
H.className = '';
|
||||
edCloseAllTags(); // :-(
|
||||
qt.style.display = 'none';
|
||||
|
||||
ta.style.color = '#FFF';
|
||||
ta.value = this.wpautop(ta.value);
|
||||
|
||||
try {
|
||||
if ( ed )
|
||||
ed.show();
|
||||
else
|
||||
tinyMCE.execCommand("mceAddControl", false, id);
|
||||
} catch(e) {}
|
||||
|
||||
ta.style.color = '#000';
|
||||
} else {
|
||||
setUserSetting( 'editor', 'html' );
|
||||
ta.style.color = '#000';
|
||||
this.mode = 'tinymce';
|
||||
H.className = 'active';
|
||||
P.className = '';
|
||||
|
||||
if ( ed && !ed.isHidden() ) {
|
||||
ta.style.height = ed.getContentAreaContainer().offsetHeight + 24 + 'px';
|
||||
ed.hide();
|
||||
}
|
||||
|
||||
qt.style.display = 'block';
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
_wp_Autop : function(pee) {
|
||||
var blocklist = 'table|thead|tfoot|tbody|tr|td|th|caption|col|colgroup|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6]|fieldset|legend|hr|noscript|menu|samp|header|footer|article|section|hgroup|nav|aside|details|summary';
|
||||
|
||||
@ -188,20 +157,29 @@ var switchEditors = {
|
||||
},
|
||||
|
||||
pre_wpautop : function(content) {
|
||||
var t = this, o = { o: t, data: content, unfiltered: content };
|
||||
var t = this, o = { o: t, data: content, unfiltered: content },
|
||||
q = typeof(jQuery) != 'undefined';
|
||||
|
||||
jQuery('body').trigger('beforePreWpautop', [o]);
|
||||
if ( q )
|
||||
jQuery('body').trigger('beforePreWpautop', [o]);
|
||||
o.data = t._wp_Nop(o.data);
|
||||
jQuery('body').trigger('afterPreWpautop', [o]);
|
||||
if ( q )
|
||||
jQuery('body').trigger('afterPreWpautop', [o]);
|
||||
|
||||
return o.data;
|
||||
},
|
||||
|
||||
wpautop : function(pee) {
|
||||
var t = this, o = { o: t, data: pee, unfiltered: pee };
|
||||
var t = this, o = { o: t, data: pee, unfiltered: pee },
|
||||
q = typeof(jQuery) != 'undefined';
|
||||
|
||||
jQuery('body').trigger('beforeWpautop', [o]);
|
||||
if ( q )
|
||||
jQuery('body').trigger('beforeWpautop', [o]);
|
||||
o.data = t._wp_Autop(o.data);
|
||||
jQuery('body').trigger('afterWpautop', [o]);
|
||||
if ( q )
|
||||
jQuery('body').trigger('afterWpautop', [o]);
|
||||
|
||||
return o.data;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1 +1 @@
|
||||
jQuery(document).ready(function(b){var a=wpCookies.getHash("TinyMCE_content_size");if(getUserSetting("editor")=="html"){if(a){b("#content").css("height",a.ch-15+"px")}}else{if(typeof tinyMCE!="object"){b("#content").css("color","#000")}else{b("#quicktags").hide()}}});var switchEditors={mode:"",I:function(a){return document.getElementById(a)},_wp_Nop:function(b){var c,a;if(b.indexOf("<pre")!=-1||b.indexOf("<script")!=-1){b=b.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g,function(d){d=d.replace(/<br ?\/?>(\r\n|\n)?/g,"<wp_temp>");return d.replace(/<\/?p( [^>]*)?>(\r\n|\n)?/g,"<wp_temp>")})}c="blockquote|ul|ol|li|table|thead|tbody|tfoot|tr|th|td|div|h[1-6]|p|fieldset";b=b.replace(new RegExp("\\s*</("+c+")>\\s*","g"),"</$1>\n");b=b.replace(new RegExp("\\s*<((?:"+c+")(?: [^>]*)?)>","g"),"\n<$1>");b=b.replace(/(<p [^>]+>.*?)<\/p>/g,"$1</p#>");b=b.replace(/<div( [^>]*)?>\s*<p>/gi,"<div$1>\n\n");b=b.replace(/\s*<p>/gi,"");b=b.replace(/\s*<\/p>\s*/gi,"\n\n");b=b.replace(/\n[\s\u00a0]+\n/g,"\n\n");b=b.replace(/\s*<br ?\/?>\s*/gi,"\n");b=b.replace(/\s*<div/g,"\n<div");b=b.replace(/<\/div>\s*/g,"</div>\n");b=b.replace(/\s*\[caption([^\[]+)\[\/caption\]\s*/gi,"\n\n[caption$1[/caption]\n\n");b=b.replace(/caption\]\n\n+\[caption/g,"caption]\n\n[caption");a="blockquote|ul|ol|li|table|thead|tbody|tfoot|tr|th|td|h[1-6]|pre|fieldset";b=b.replace(new RegExp("\\s*<((?:"+a+")(?: [^>]*)?)\\s*>","g"),"\n<$1>");b=b.replace(new RegExp("\\s*</("+a+")>\\s*","g"),"</$1>\n");b=b.replace(/<li([^>]*)>/g,"\t<li$1>");if(b.indexOf("<hr")!=-1){b=b.replace(/\s*<hr( [^>]*)?>\s*/g,"\n\n<hr$1>\n\n")}if(b.indexOf("<object")!=-1){b=b.replace(/<object[\s\S]+?<\/object>/g,function(d){return d.replace(/[\r\n]+/g,"")})}b=b.replace(/<\/p#>/g,"</p>\n");b=b.replace(/\s*(<p [^>]+>[\s\S]*?<\/p>)/g,"\n$1");b=b.replace(/^\s+/,"");b=b.replace(/[\s\u00a0]+$/,"");b=b.replace(/<wp_temp>/g,"\n");return b},go:function(i,g){i=i||"content";g=g||this.mode||"";var b,h=this.I("quicktags"),c=this.I("edButtonHTML"),d=this.I("edButtonPreview"),a=this.I(i);try{b=tinyMCE.get(i)}catch(f){b=false}if("tinymce"==g){if(b&&!b.isHidden()){return false}setUserSetting("editor","tinymce");this.mode="html";d.className="active";c.className="";edCloseAllTags();h.style.display="none";a.style.color="#FFF";a.value=this.wpautop(a.value);try{if(b){b.show()}else{tinyMCE.execCommand("mceAddControl",false,i)}}catch(f){}a.style.color="#000"}else{setUserSetting("editor","html");a.style.color="#000";this.mode="tinymce";c.className="active";d.className="";if(b&&!b.isHidden()){a.style.height=b.getContentAreaContainer().offsetHeight+24+"px";b.hide()}h.style.display="block"}return false},_wp_Autop:function(a){var b="table|thead|tfoot|tbody|tr|td|th|caption|col|colgroup|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6]|fieldset|legend|hr|noscript|menu|samp|header|footer|article|section|hgroup|nav|aside|details|summary";if(a.indexOf("<object")!=-1){a=a.replace(/<object[\s\S]+?<\/object>/g,function(c){return c.replace(/[\r\n]+/g,"")})}a=a.replace(/<[^<>]+>/g,function(c){return c.replace(/[\r\n]+/g," ")});if(a.indexOf("<pre")!=-1||a.indexOf("<script")!=-1){a=a.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g,function(c){return c.replace(/(\r\n|\n)/g,"<wp_temp_br>")})}a=a+"\n\n";a=a.replace(/<br \/>\s*<br \/>/gi,"\n\n");a=a.replace(new RegExp("(<(?:"+b+")(?: [^>]*)?>)","gi"),"\n$1");a=a.replace(new RegExp("(</(?:"+b+")>)","gi"),"$1\n\n");a=a.replace(/<hr( [^>]*)?>/gi,"<hr$1>\n\n");a=a.replace(/\r\n|\r/g,"\n");a=a.replace(/\n\s*\n+/g,"\n\n");a=a.replace(/([\s\S]+?)\n\n/g,"<p>$1</p>\n");a=a.replace(/<p>\s*?<\/p>/gi,"");a=a.replace(new RegExp("<p>\\s*(</?(?:"+b+")(?: [^>]*)?>)\\s*</p>","gi"),"$1");a=a.replace(/<p>(<li.+?)<\/p>/gi,"$1");a=a.replace(/<p>\s*<blockquote([^>]*)>/gi,"<blockquote$1><p>");a=a.replace(/<\/blockquote>\s*<\/p>/gi,"</p></blockquote>");a=a.replace(new RegExp("<p>\\s*(</?(?:"+b+")(?: [^>]*)?>)","gi"),"$1");a=a.replace(new RegExp("(</?(?:"+b+")(?: [^>]*)?>)\\s*</p>","gi"),"$1");a=a.replace(/\s*\n/gi,"<br />\n");a=a.replace(new RegExp("(</?(?:"+b+")[^>]*>)\\s*<br />","gi"),"$1");a=a.replace(/<br \/>(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)/gi,"$1");a=a.replace(/(?:<p>|<br ?\/?>)*\s*\[caption([^\[]+)\[\/caption\]\s*(?:<\/p>|<br ?\/?>)*/gi,"[caption$1[/caption]");a=a.replace(/(<(?:div|th|td|form|fieldset|dd)[^>]*>)(.*?)<\/p>/g,function(e,d,f){if(f.match(/<p( [^>]*)?>/)){return e}return d+"<p>"+f+"</p>"});a=a.replace(/<wp_temp_br>/g,"\n");return a},pre_wpautop:function(b){var a=this,c={o:a,data:b,unfiltered:b};jQuery("body").trigger("beforePreWpautop",[c]);c.data=a._wp_Nop(c.data);jQuery("body").trigger("afterPreWpautop",[c]);return c.data},wpautop:function(b){var a=this,c={o:a,data:b,unfiltered:b};jQuery("body").trigger("beforeWpautop",[c]);c.data=a._wp_Autop(c.data);jQuery("body").trigger("afterWpautop",[c]);return c.data}};
|
||||
var switchEditors={go:function(j){var k=this,d=j.id,e=d.length,b=d.substr(0,e-5),g=d.substr(e-4),h=tinyMCE.get(b),i="wp-"+b+"-wrap",f=tinymce.DOM,c=f.get(b);if("tmce"==g){if(h&&!h.isHidden()){return false}if(tinyMCEPreInit.mceInit[b]&&tinyMCEPreInit.mceInit[b].wpautop){c.value=k.wpautop(c.value)}if(h){h.show()}else{h=new tinymce.Editor(b,tinyMCEPreInit.mceInit[b]);h.render()}f.removeClass(i,"html-active");f.addClass(i,"tmce-active");setUserSetting("editor","tinymce")}else{if("html"==g){if(h&&h.isHidden()){return false}if(h){c.style.height=h.getContentAreaContainer().offsetHeight+20+"px";h.hide()}f.removeClass(i,"tmce-active");f.addClass(i,"html-active");setUserSetting("editor","html")}}return false},_wp_Nop:function(b){var c,a;if(b.indexOf("<pre")!=-1||b.indexOf("<script")!=-1){b=b.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g,function(d){d=d.replace(/<br ?\/?>(\r\n|\n)?/g,"<wp_temp>");return d.replace(/<\/?p( [^>]*)?>(\r\n|\n)?/g,"<wp_temp>")})}c="blockquote|ul|ol|li|table|thead|tbody|tfoot|tr|th|td|div|h[1-6]|p|fieldset";b=b.replace(new RegExp("\\s*</("+c+")>\\s*","g"),"</$1>\n");b=b.replace(new RegExp("\\s*<((?:"+c+")(?: [^>]*)?)>","g"),"\n<$1>");b=b.replace(/(<p [^>]+>.*?)<\/p>/g,"$1</p#>");b=b.replace(/<div( [^>]*)?>\s*<p>/gi,"<div$1>\n\n");b=b.replace(/\s*<p>/gi,"");b=b.replace(/\s*<\/p>\s*/gi,"\n\n");b=b.replace(/\n[\s\u00a0]+\n/g,"\n\n");b=b.replace(/\s*<br ?\/?>\s*/gi,"\n");b=b.replace(/\s*<div/g,"\n<div");b=b.replace(/<\/div>\s*/g,"</div>\n");b=b.replace(/\s*\[caption([^\[]+)\[\/caption\]\s*/gi,"\n\n[caption$1[/caption]\n\n");b=b.replace(/caption\]\n\n+\[caption/g,"caption]\n\n[caption");a="blockquote|ul|ol|li|table|thead|tbody|tfoot|tr|th|td|h[1-6]|pre|fieldset";b=b.replace(new RegExp("\\s*<((?:"+a+")(?: [^>]*)?)\\s*>","g"),"\n<$1>");b=b.replace(new RegExp("\\s*</("+a+")>\\s*","g"),"</$1>\n");b=b.replace(/<li([^>]*)>/g,"\t<li$1>");if(b.indexOf("<hr")!=-1){b=b.replace(/\s*<hr( [^>]*)?>\s*/g,"\n\n<hr$1>\n\n")}if(b.indexOf("<object")!=-1){b=b.replace(/<object[\s\S]+?<\/object>/g,function(d){return d.replace(/[\r\n]+/g,"")})}b=b.replace(/<\/p#>/g,"</p>\n");b=b.replace(/\s*(<p [^>]+>[\s\S]*?<\/p>)/g,"\n$1");b=b.replace(/^\s+/,"");b=b.replace(/[\s\u00a0]+$/,"");b=b.replace(/<wp_temp>/g,"\n");return b},_wp_Autop:function(a){var b="table|thead|tfoot|tbody|tr|td|th|caption|col|colgroup|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6]|fieldset|legend|hr|noscript|menu|samp|header|footer|article|section|hgroup|nav|aside|details|summary";if(a.indexOf("<object")!=-1){a=a.replace(/<object[\s\S]+?<\/object>/g,function(c){return c.replace(/[\r\n]+/g,"")})}a=a.replace(/<[^<>]+>/g,function(c){return c.replace(/[\r\n]+/g," ")});if(a.indexOf("<pre")!=-1||a.indexOf("<script")!=-1){a=a.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g,function(c){return c.replace(/(\r\n|\n)/g,"<wp_temp_br>")})}a=a+"\n\n";a=a.replace(/<br \/>\s*<br \/>/gi,"\n\n");a=a.replace(new RegExp("(<(?:"+b+")(?: [^>]*)?>)","gi"),"\n$1");a=a.replace(new RegExp("(</(?:"+b+")>)","gi"),"$1\n\n");a=a.replace(/<hr( [^>]*)?>/gi,"<hr$1>\n\n");a=a.replace(/\r\n|\r/g,"\n");a=a.replace(/\n\s*\n+/g,"\n\n");a=a.replace(/([\s\S]+?)\n\n/g,"<p>$1</p>\n");a=a.replace(/<p>\s*?<\/p>/gi,"");a=a.replace(new RegExp("<p>\\s*(</?(?:"+b+")(?: [^>]*)?>)\\s*</p>","gi"),"$1");a=a.replace(/<p>(<li.+?)<\/p>/gi,"$1");a=a.replace(/<p>\s*<blockquote([^>]*)>/gi,"<blockquote$1><p>");a=a.replace(/<\/blockquote>\s*<\/p>/gi,"</p></blockquote>");a=a.replace(new RegExp("<p>\\s*(</?(?:"+b+")(?: [^>]*)?>)","gi"),"$1");a=a.replace(new RegExp("(</?(?:"+b+")(?: [^>]*)?>)\\s*</p>","gi"),"$1");a=a.replace(/\s*\n/gi,"<br />\n");a=a.replace(new RegExp("(</?(?:"+b+")[^>]*>)\\s*<br />","gi"),"$1");a=a.replace(/<br \/>(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)/gi,"$1");a=a.replace(/(?:<p>|<br ?\/?>)*\s*\[caption([^\[]+)\[\/caption\]\s*(?:<\/p>|<br ?\/?>)*/gi,"[caption$1[/caption]");a=a.replace(/(<(?:div|th|td|form|fieldset|dd)[^>]*>)(.*?)<\/p>/g,function(e,d,f){if(f.match(/<p( [^>]*)?>/)){return e}return d+"<p>"+f+"</p>"});a=a.replace(/<wp_temp_br>/g,"\n");return a},pre_wpautop:function(b){var a=this,d={o:a,data:b,unfiltered:b},c=typeof(jQuery)!="undefined";if(c){jQuery("body").trigger("beforePreWpautop",[d])}d.data=a._wp_Nop(d.data);if(c){jQuery("body").trigger("afterPreWpautop",[d])}return d.data},wpautop:function(b){var a=this,d={o:a,data:b,unfiltered:b},c=typeof(jQuery)!="undefined";if(c){jQuery("body").trigger("beforeWpautop",[d])}d.data=a._wp_Autop(d.data);if(c){jQuery("body").trigger("afterWpautop",[d])}return d.data}};
|
@ -1,4 +1,5 @@
|
||||
// send html to the post editor
|
||||
/*
|
||||
function send_to_editor(h) {
|
||||
var ed;
|
||||
|
||||
@ -28,6 +29,7 @@ function send_to_editor(h) {
|
||||
|
||||
tb_remove();
|
||||
}
|
||||
*/
|
||||
|
||||
// thickbox settings
|
||||
var tb_position;
|
||||
|
@ -1 +1 @@
|
||||
function send_to_editor(b){var a;if(typeof tinyMCE!="undefined"&&(a=tinyMCE.activeEditor)&&!a.isHidden()){if(tinymce.isIE&&a.windowManager.insertimagebookmark){a.selection.moveToBookmark(a.windowManager.insertimagebookmark)}if(b.indexOf("[caption")===0){if(a.plugins.wpeditimage){b=a.plugins.wpeditimage._do_shcode(b)}}else{if(b.indexOf("[gallery")===0){if(a.plugins.wpgallery){b=a.plugins.wpgallery._do_gallery(b)}}else{if(b.indexOf("[embed")===0){if(a.plugins.wordpress){b=a.plugins.wordpress._setEmbed(b)}}}}a.execCommand("mceInsertContent",false,b)}else{if(typeof edInsertContent=="function"){edInsertContent(edCanvas,b)}else{jQuery(edCanvas).val(jQuery(edCanvas).val()+b)}}tb_remove()}var tb_position;(function(a){tb_position=function(){var f=a("#TB_window"),e=a(window).width(),d=a(window).height(),c=(720<e)?720:e,b=0;if(a("body.admin-bar").length){b=28}if(f.size()){f.width(c-50).height(d-45-b);a("#TB_iframeContent").width(c-50).height(d-75-b);f.css({"margin-left":"-"+parseInt(((c-50)/2),10)+"px"});if(typeof document.body.style.maxWidth!="undefined"){f.css({top:20+b+"px","margin-top":"0"})}}return a("a.thickbox").each(function(){var g=a(this).attr("href");if(!g){return}g=g.replace(/&width=[0-9]+/g,"");g=g.replace(/&height=[0-9]+/g,"");a(this).attr("href",g+"&width="+(c-80)+"&height="+(d-85-b))})};a(window).resize(function(){tb_position()});a(document).ready(function(b){b("a.thickbox").click(function(){var c;if(typeof tinyMCE!="undefined"&&tinymce.isIE&&(c=tinyMCE.activeEditor)&&!c.isHidden()){c.focus();c.windowManager.insertimagebookmark=c.selection.getBookmark()}})})})(jQuery);
|
||||
var tb_position;(function(a){tb_position=function(){var f=a("#TB_window"),e=a(window).width(),d=a(window).height(),c=(720<e)?720:e,b=0;if(a("body.admin-bar").length){b=28}if(f.size()){f.width(c-50).height(d-45-b);a("#TB_iframeContent").width(c-50).height(d-75-b);f.css({"margin-left":"-"+parseInt(((c-50)/2),10)+"px"});if(typeof document.body.style.maxWidth!="undefined"){f.css({top:20+b+"px","margin-top":"0"})}}return a("a.thickbox").each(function(){var g=a(this).attr("href");if(!g){return}g=g.replace(/&width=[0-9]+/g,"");g=g.replace(/&height=[0-9]+/g,"");a(this).attr("href",g+"&width="+(c-80)+"&height="+(d-85-b))})};a(window).resize(function(){tb_position()});a(document).ready(function(b){b("a.thickbox").click(function(){var c;if(typeof tinyMCE!="undefined"&&tinymce.isIE&&(c=tinyMCE.activeEditor)&&!c.isHidden()){c.focus();c.windowManager.insertimagebookmark=c.selection.getBookmark()}})})})(jQuery);
|
@ -77,7 +77,7 @@ PubSub.prototype.publish = function( topic, args ) {
|
||||
visible : false,
|
||||
mode : 'tinymce',
|
||||
editor_id : 'content',
|
||||
title_id : 'title',
|
||||
title_id : '',
|
||||
timer : 0,
|
||||
toolbar_shown : false
|
||||
}
|
||||
@ -137,7 +137,28 @@ PubSub.prototype.publish = function( topic, args ) {
|
||||
if ( s.visible )
|
||||
return;
|
||||
|
||||
// Settings can be added or changed by defining "wp_fullscreen_settings" JS object.
|
||||
// This can be done by defining it as PHP array and passing it to JS with:
|
||||
// wp_add_script_data( 'wp-fullscreen', 'wp_fullscreen_settings', $settings_array )
|
||||
if ( typeof(wp_fullscreen_settings) != 'undefined' )
|
||||
$.extend( s, wp_fullscreen_settings );
|
||||
|
||||
// enable DFW only on the Add/Edit Post screens for now
|
||||
/*
|
||||
s.editor_id = wpActiveEditor || 'content';
|
||||
|
||||
if ( !s.title_id && $('input#title').length && s.editor_id == 'content' )
|
||||
s.title_id = 'title';
|
||||
|
||||
if ( !s.title_id )
|
||||
$('#wp-fullscreen-title').hide();
|
||||
*/
|
||||
|
||||
s.editor_id = 'content';
|
||||
s.title_id = 'title';
|
||||
|
||||
s.mode = $('#' + s.editor_id).is(':hidden') ? 'tinymce' : 'html';
|
||||
s.qt_canvas = $('#' + s.editor_id).get(0);
|
||||
|
||||
if ( ! s.element )
|
||||
api.ui.init();
|
||||
@ -218,7 +239,8 @@ PubSub.prototype.publish = function( topic, args ) {
|
||||
api.savecontent = function() {
|
||||
var ed, content;
|
||||
|
||||
$('#' + s.title_id).val( $('#wp-fullscreen-title').val() );
|
||||
if ( s.title_id )
|
||||
$('#' + s.title_id).val( $('#wp-fullscreen-title').val() );
|
||||
|
||||
if ( s.mode === 'tinymce' && (ed = tinyMCE.get('wp_mce_fullscreen')) ) {
|
||||
content = ed.save();
|
||||
@ -278,19 +300,20 @@ PubSub.prototype.publish = function( topic, args ) {
|
||||
});
|
||||
|
||||
ps.subscribe( 'show', function() { // This event occurs before the overlay blocks the UI.
|
||||
var title = $('#wp-fullscreen-title').val( $('#' + s.title_id).val() );
|
||||
var title;
|
||||
|
||||
if ( s.title_id ) {
|
||||
title = $('#wp-fullscreen-title').val( $('#' + s.title_id).val() );
|
||||
set_title_hint( title );
|
||||
}
|
||||
|
||||
set_title_hint( title );
|
||||
$('#wp-fullscreen-save input').attr( 'title', $('#last-edit').text() );
|
||||
|
||||
s.textarea_obj.value = edCanvas.value;
|
||||
s.textarea_obj.value = s.qt_canvas.value;
|
||||
|
||||
if ( s.has_tinymce && s.mode === 'tinymce' )
|
||||
tinyMCE.execCommand('wpFullScreenInit');
|
||||
|
||||
s._edCanvas = edCanvas;
|
||||
edCanvas = s.textarea_obj;
|
||||
|
||||
s.orig_y = $(window).scrollTop();
|
||||
});
|
||||
|
||||
@ -328,7 +351,7 @@ PubSub.prototype.publish = function( topic, args ) {
|
||||
});
|
||||
}
|
||||
|
||||
tinyMCE.execCommand("mceAddControl", false, s.editor_id);
|
||||
tinyMCE.init(tinyMCEPreInit.mceInit[s.editor_id]);
|
||||
s.is_mce_on = true;
|
||||
}
|
||||
});
|
||||
@ -337,9 +360,9 @@ PubSub.prototype.publish = function( topic, args ) {
|
||||
|
||||
// Make sure the correct editor is displaying.
|
||||
if ( s.has_tinymce && s.mode === 'tinymce' && $('#' + s.editor_id).is(':visible') ) {
|
||||
switchEditors.go( s.editor_id, 'tinymce' );
|
||||
switchEditors.go( $('#'+s.editor_id+'-tmce').get(0) );
|
||||
} else if ( s.mode === 'html' && $('#' + s.editor_id).is(':hidden') ) {
|
||||
switchEditors.go( s.editor_id, 'html' );
|
||||
switchEditors.go( $('#'+s.editor_id+'-html').get(0) );
|
||||
}
|
||||
|
||||
// Save content must be after switchEditors or content will be overwritten. See #17229.
|
||||
@ -351,11 +374,10 @@ PubSub.prototype.publish = function( topic, args ) {
|
||||
if ( s.has_tinymce && s.mode === 'tinymce' )
|
||||
tinyMCE.execCommand('wpFullScreenSave');
|
||||
|
||||
set_title_hint( $('#' + s.title_id) );
|
||||
if ( s.title_id )
|
||||
set_title_hint( $('#' + s.title_id) );
|
||||
|
||||
// Restore and update edCanvas.
|
||||
edCanvas = s._edCanvas;
|
||||
edCanvas.value = s.textarea_obj.value;
|
||||
s.qt_canvas.value = s.textarea_obj.value;
|
||||
});
|
||||
|
||||
ps.subscribe( 'hiding', function() { // This event occurs while the overlay blocks the DFW UI.
|
||||
@ -367,7 +389,7 @@ PubSub.prototype.publish = function( topic, args ) {
|
||||
|
||||
ps.subscribe( 'hidden', function() { // This event occurs after DFW is removed.
|
||||
s.visible = false;
|
||||
$('#wp_mce_fullscreen').removeAttr('style');
|
||||
$('#wp_mce_fullscreen, #wp-fullscreen-title').removeAttr('style');
|
||||
|
||||
if ( s.has_tinymce && s.is_mce_on )
|
||||
tinyMCE.execCommand('wpFullScreenClose');
|
||||
@ -488,10 +510,11 @@ PubSub.prototype.publish = function( topic, args ) {
|
||||
api.ui = {
|
||||
init: function() {
|
||||
var topbar = $('#fullscreen-topbar'), txtarea = $('#wp_mce_fullscreen'), last = 0;
|
||||
|
||||
s.toolbars = topbar.add( $('#wp-fullscreen-status') );
|
||||
s.element = $('#fullscreen-fader');
|
||||
s.textarea_obj = txtarea[0];
|
||||
s.has_tinymce = typeof(tinyMCE) != 'undefined';
|
||||
s.has_tinymce = typeof(tinymce) != 'undefined';
|
||||
|
||||
if ( !s.has_tinymce )
|
||||
$('#wp-fullscreen-mode-bar').hide();
|
||||
|
815
wp-includes/class-wp-editor.php
Normal file
@ -0,0 +1,815 @@
|
||||
<?php
|
||||
/**
|
||||
* Adds the TinyMCE editor used on the Write and Edit screens.
|
||||
*
|
||||
* @package WordPress
|
||||
* @since 3.3
|
||||
*
|
||||
* Outputs the HTML and JavaScript for the WordPress editors, TinyMCE and Quicktags.
|
||||
* TinyMCE is loaded separately from other Javascript by using wp-tinymce.php. It outputs concatenated
|
||||
* pre-compressed version of the core and all default plugins. Additional plugins are loaded directly
|
||||
* by TinyMCE using non-blocking method.
|
||||
*/
|
||||
|
||||
class WP_Editor {
|
||||
|
||||
var $mce_settings = array();
|
||||
var $qt_settings = array();
|
||||
var $plugins = array();
|
||||
var $mce_locale;
|
||||
var $ext_plugins;
|
||||
var $baseurl;
|
||||
var $can_richedit;
|
||||
var $default_editor;
|
||||
var $first_init;
|
||||
var $tinymce = false;
|
||||
var $quicktags = false;
|
||||
|
||||
function __construct() {
|
||||
$this->can_richedit = user_can_richedit();
|
||||
$this->default_editor = $this->wp_default_editor();
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs the HTML and enqueues the JavaScript for a single instance of the editor.
|
||||
*
|
||||
* $param $content The initial content of the editor.
|
||||
* $param $editor_id ID for the textarea and TinyMCE and Quicktags instances (can contain only ASCII letters and numbers).
|
||||
* $param $settings See below for description.
|
||||
*/
|
||||
function editor( $content, $editor_id, $settings = array() ) {
|
||||
|
||||
$set = wp_parse_args( $settings, array(
|
||||
'wpautop' => true, // use wpautop?
|
||||
'media_buttons' => true, // show insert/upload button(s)
|
||||
'textarea_name' => $editor_id, // set the textarea name to something different, square brackets [] can be used here
|
||||
'textarea_rows' => get_option('default_post_edit_rows', 10), // rows="..."
|
||||
'tabindex' => '',
|
||||
'editor_css' => '', // intended for extra styles for both visual and HTML editors buttons, needs to include the <style> tags, can use "scoped".
|
||||
'editor_class' => '', // add extra class(es) to the editor textarea
|
||||
'teeny' => false, // output the minimal editor config used in Press This
|
||||
'tinymce' => true, // load TinyMCE, can be used to pass settings directly to TinyMCE using an array()
|
||||
'quicktags' => true // load Quicktags, can be used to pass settings directly to Quicktags using an array()
|
||||
) );
|
||||
|
||||
$this->tinymce = !empty($set['tinymce']) && $this->can_richedit;
|
||||
$this->quicktags = !empty($set['quicktags']);
|
||||
$editor_class = ' class="' . trim( $set['editor_class'] . ' wp-editor-area' ) . '"';
|
||||
$tabindex = $set['tabindex'] ? ' tabindex="' . (int) $set['tabindex'] . '"' : '';
|
||||
$rows = ' rows="' . (int) $set['textarea_rows'] . '"';
|
||||
$switch_class = 'html-active';
|
||||
$toolbar = $buttons = '';
|
||||
|
||||
if ( !current_user_can( 'upload_files' ) )
|
||||
$set['media_buttons'] = false;
|
||||
|
||||
if ( $this->can_richedit && $this->quicktags && $this->tinymce ) {
|
||||
$switch_class = 'html-active';
|
||||
|
||||
if ( 'html' == $this->default_editor ) {
|
||||
add_filter('the_editor_content', 'wp_htmledit_pre');
|
||||
} else {
|
||||
add_filter('the_editor_content', 'wp_richedit_pre');
|
||||
$switch_class = 'tmce-active';
|
||||
}
|
||||
|
||||
$buttons .= '<a id="' . $editor_id . '-html" class="hide-if-no-js wp-switch-editor switch-html" onclick="switchEditors.go(this);return false;">' . __('HTML') . "</a>\n";
|
||||
$buttons .= '<a id="' . $editor_id . '-tmce" class="hide-if-no-js wp-switch-editor switch-tmce" onclick="switchEditors.go(this);return false;">' . __('Visual') . "</a>\n";
|
||||
}
|
||||
|
||||
echo '<div id="wp-' . $editor_id . '-wrap" class="wp-editor-wrap ' . $switch_class . '">';
|
||||
|
||||
if ( !empty($set['editor_css']) )
|
||||
echo $set['editor_css'] . "\n";
|
||||
|
||||
if ( $this->can_richedit || $set['media_buttons'] ) {
|
||||
echo '<div id="wp-' . $editor_id . '-editor-tools" class="wp-editor-tools">';
|
||||
echo $buttons;
|
||||
|
||||
if ( $set['media_buttons'] ) {
|
||||
if ( !function_exists('media_buttons') )
|
||||
include(ABSPATH . 'wp-admin/includes/media.php');
|
||||
|
||||
echo '<div id="wp-' . $editor_id . '-media-buttons" class="hide-if-no-js wp-media-buttons">';
|
||||
do_action('media_buttons', $editor_id);
|
||||
echo "</div>\n";
|
||||
}
|
||||
echo "</div>\n";
|
||||
}
|
||||
|
||||
$the_editor = apply_filters('the_editor', '<div id="wp-' . $editor_id . '-editor-container" class="wp-editor-container"><textarea' . $editor_class . $rows . $tabindex . '" cols="40" name="' . $set['textarea_name'] . '" id="' . $editor_id . '">%s</textarea></div>');
|
||||
$content = apply_filters('the_editor_content', $content);
|
||||
|
||||
printf($the_editor, $content);
|
||||
echo "\n</div>\n\n";
|
||||
|
||||
if ( empty($this->first_init) ) {
|
||||
add_action( 'admin_print_footer_scripts', array($this, 'editor_js'), 50 );
|
||||
add_action( 'wp_print_footer_scripts', array($this, 'editor_js'), 50 );
|
||||
add_action( 'admin_footer', array($this, 'enqueue_scripts'), 1 );
|
||||
add_action( 'wp_footer', array($this, 'enqueue_scripts'), 1 );
|
||||
}
|
||||
|
||||
$this->editor_settings($editor_id, $set);
|
||||
}
|
||||
|
||||
function editor_settings($editor_id, $settings) {
|
||||
global $editor_styles;
|
||||
$first_run = false;
|
||||
|
||||
if ( $this->quicktags ) {
|
||||
$qtbuttons = apply_filters( 'quicktags_buttons', array(), $editor_id );
|
||||
$qtbuttons_disabled = apply_filters( 'quicktags_disabled_buttons', array(), $editor_id );
|
||||
|
||||
$qtInit = array(
|
||||
'quicktags_id' => $editor_id,
|
||||
'quicktags_buttons' => implode($qtbuttons, ','),
|
||||
'quicktags_disabled_buttons' => implode($qtbuttons_disabled, ',')
|
||||
);
|
||||
|
||||
if ( is_array($settings['quicktags']) )
|
||||
$qtInit = array_merge($qtInit, $settings['quicktags']);
|
||||
|
||||
$this->qt_settings[$editor_id] = $qtInit;
|
||||
}
|
||||
|
||||
if ( $this->tinymce ) {
|
||||
|
||||
if ( empty($this->first_init) ) {
|
||||
$this->baseurl = includes_url('js/tinymce');
|
||||
$this->mce_locale = $mce_locale = ( '' == get_locale() ) ? 'en' : strtolower( substr(get_locale(), 0, 2) ); // only ISO 639-1
|
||||
$no_captions = (bool) apply_filters( 'disable_captions', '' );
|
||||
$plugins = array( 'inlinepopups', 'spellchecker', 'tabfocus', 'paste', 'media', 'fullscreen', 'wordpress', 'wpeditimage', 'wpgallery', 'wplink', 'wpdialogs' );
|
||||
$first_run = true;
|
||||
|
||||
if ( $settings['teeny'] ) {
|
||||
$this->plugins = $plugins = apply_filters( 'teeny_mce_plugins', array('inlinepopups', 'fullscreen', 'wordpress', 'wplink', 'wpdialogs'), $editor_id );
|
||||
$ext_plugins = '';
|
||||
} else {
|
||||
/*
|
||||
The following filter takes an associative array of external plugins for TinyMCE in the form 'plugin_name' => 'url'.
|
||||
It adds the plugin's name to TinyMCE's plugins init and the call to PluginManager to load the plugin.
|
||||
The url should be absolute and should include the js file name to be loaded. Example:
|
||||
array( 'myplugin' => 'http://my-site.com/wp-content/plugins/myfolder/mce_plugin.js' )
|
||||
If the plugin uses a button, it should be added with one of the "$mce_buttons" filters.
|
||||
*/
|
||||
$mce_external_plugins = apply_filters('mce_external_plugins', array());
|
||||
|
||||
$ext_plugins = '';
|
||||
if ( ! empty($mce_external_plugins) ) {
|
||||
|
||||
/*
|
||||
The following filter loads external language files for TinyMCE plugins.
|
||||
It takes an associative array 'plugin_name' => 'path', where path is the
|
||||
include path to the file. The language file should follow the same format as
|
||||
/tinymce/langs/wp-langs.php and should define a variable $strings that
|
||||
holds all translated strings.
|
||||
When this filter is not used, the function will try to load {mce_locale}.js.
|
||||
If that is not found, en.js will be tried next.
|
||||
*/
|
||||
$mce_external_languages = apply_filters('mce_external_languages', array());
|
||||
|
||||
$loaded_langs = array();
|
||||
$strings = '';
|
||||
|
||||
if ( ! empty($mce_external_languages) ) {
|
||||
foreach ( $mce_external_languages as $name => $path ) {
|
||||
if ( @is_file($path) && @is_readable($path) ) {
|
||||
include_once($path);
|
||||
$ext_plugins .= $strings . "\n";
|
||||
$loaded_langs[] = $name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ( $mce_external_plugins as $name => $url ) {
|
||||
|
||||
if ( is_ssl() ) $url = str_replace('http://', 'https://', $url);
|
||||
|
||||
$plugins[] = '-' . $name;
|
||||
|
||||
$plugurl = dirname($url);
|
||||
$strings = $str1 = $str2 = '';
|
||||
if ( ! in_array($name, $loaded_langs) ) {
|
||||
$path = str_replace( WP_CONTENT_URL, '', $plugurl );
|
||||
$path = WP_CONTENT_DIR . $path . '/langs/';
|
||||
|
||||
if ( function_exists('realpath') )
|
||||
$path = trailingslashit( realpath($path) );
|
||||
|
||||
if ( @is_file($path . $mce_locale . '.js') )
|
||||
$strings .= @file_get_contents($path . $mce_locale . '.js') . "\n";
|
||||
|
||||
if ( @is_file($path . $mce_locale . '_dlg.js') )
|
||||
$strings .= @file_get_contents($path . $mce_locale . '_dlg.js') . "\n";
|
||||
|
||||
if ( 'en' != $mce_locale && empty($strings) ) {
|
||||
if ( @is_file($path . 'en.js') ) {
|
||||
$str1 = @file_get_contents($path . 'en.js');
|
||||
$strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str1, 1 ) . "\n";
|
||||
}
|
||||
|
||||
if ( @is_file($path . 'en_dlg.js') ) {
|
||||
$str2 = @file_get_contents($path . 'en_dlg.js');
|
||||
$strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str2, 1 ) . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! empty($strings) )
|
||||
$ext_plugins .= "\n" . $strings . "\n";
|
||||
}
|
||||
|
||||
$ext_plugins .= 'tinyMCEPreInit.load_ext("' . $plugurl . '", "' . $mce_locale . '");' . "\n";
|
||||
$ext_plugins .= 'tinymce.PluginManager.load("' . $name . '", "' . $url . '");' . "\n";
|
||||
|
||||
$this->ext_plugins .= $ext_plugins;
|
||||
}
|
||||
}
|
||||
|
||||
$plugins = array_unique( apply_filters('tiny_mce_plugins', $plugins) );
|
||||
|
||||
if ( 'content' == $editor_id ) // enable DFW only on Add/Edit Post screens for now
|
||||
$plugins[] = 'wpfullscreen';
|
||||
|
||||
$this->plugins = $plugins;
|
||||
|
||||
/*
|
||||
The following filter allows localization scripts to change the languages displayed in the spellchecker's drop-down menu.
|
||||
By default it uses Google's spellchecker API, but can be configured to use PSpell/ASpell if installed on the server.
|
||||
The + sign marks the default language. More information:
|
||||
http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker
|
||||
*/
|
||||
$mce_spellchecker_languages = apply_filters('mce_spellchecker_languages', '+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv');
|
||||
|
||||
$this->first_init = array(
|
||||
'mode' => 'exact',
|
||||
'width' => '100%',
|
||||
'theme' => 'advanced',
|
||||
'skin' => 'wp_theme',
|
||||
'language' => $this->mce_locale,
|
||||
'spellchecker_languages' => $mce_spellchecker_languages,
|
||||
'theme_advanced_toolbar_location' => 'top',
|
||||
'theme_advanced_toolbar_align' => 'left',
|
||||
'theme_advanced_statusbar_location' => 'bottom',
|
||||
'theme_advanced_resizing' => true,
|
||||
'theme_advanced_resize_horizontal' => false,
|
||||
'dialog_type' => 'modal',
|
||||
'formats' => "{
|
||||
alignleft : [
|
||||
{selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'left'}},
|
||||
{selector : 'img,table', classes : 'alignleft'}
|
||||
],
|
||||
aligncenter : [
|
||||
{selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'center'}},
|
||||
{selector : 'img,table', classes : 'aligncenter'}
|
||||
],
|
||||
alignright : [
|
||||
{selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'right'}},
|
||||
{selector : 'img,table', classes : 'alignright'}
|
||||
],
|
||||
strikethrough : {inline : 'del'}
|
||||
}",
|
||||
'relative_urls' => false,
|
||||
'remove_script_host' => false,
|
||||
'convert_urls' => false,
|
||||
'remove_linebreaks' => true,
|
||||
'gecko_spellcheck' => true,
|
||||
'keep_styles' => false,
|
||||
'entities' => '38,amp,60,lt,62,gt',
|
||||
'accessibility_focus' => true,
|
||||
'tabfocus_elements' => 'major-publishing-actions',
|
||||
'media_strict' => false,
|
||||
'paste_remove_styles' => true,
|
||||
'paste_remove_spans' => true,
|
||||
'paste_strip_class_attributes' => 'all',
|
||||
'paste_text_use_dialog' => true,
|
||||
'extended_valid_elements' => 'article[*],aside[*],audio[*],canvas[*],command[*],datalist[*],details[*],embed[*],figcaption[*],figure[*],footer[*],header[*],hgroup[*],keygen[*],mark[*],meter[*],nav[*],output[*],progress[*],section[*],source[*],summary,time[*],video[*],wbr',
|
||||
'wpeditimage_disable_captions' => $no_captions,
|
||||
'wp_fullscreen_content_css' => "$this->baseurl/plugins/wpfullscreen/css/wp-fullscreen.css",
|
||||
'plugins' => implode( ',', $plugins )
|
||||
);
|
||||
|
||||
// load editor_style.css if the current theme supports it
|
||||
if ( ! empty( $editor_styles ) && is_array( $editor_styles ) ) {
|
||||
$mce_css = array();
|
||||
$style_uri = get_stylesheet_directory_uri();
|
||||
if ( ! is_child_theme() ) {
|
||||
foreach ( $editor_styles as $file )
|
||||
$mce_css[] = "$style_uri/$file";
|
||||
} else {
|
||||
$style_dir = get_stylesheet_directory();
|
||||
$template_uri = get_template_directory_uri();
|
||||
$template_dir = get_template_directory();
|
||||
foreach ( $editor_styles as $file ) {
|
||||
if ( file_exists( "$template_dir/$file" ) )
|
||||
$mce_css[] = "$template_uri/$file";
|
||||
if ( file_exists( "$style_dir/$file" ) )
|
||||
$mce_css[] = "$style_uri/$file";
|
||||
}
|
||||
}
|
||||
$mce_css = implode( ',', $mce_css );
|
||||
} else {
|
||||
$mce_css = '';
|
||||
}
|
||||
|
||||
$mce_css = trim( apply_filters( 'mce_css', $mce_css ), ' ,' );
|
||||
|
||||
if ( ! empty($mce_css) )
|
||||
$this->first_init['content_css'] = $mce_css;
|
||||
}
|
||||
}
|
||||
|
||||
if ( $settings['teeny'] ) {
|
||||
$mce_buttons = apply_filters( 'teeny_mce_buttons', array('bold, italic, underline, blockquote, separator, strikethrough, bullist, numlist,justifyleft, justifycenter, justifyright, undo, redo, link, unlink, fullscreen'), $editor_id );
|
||||
$mce_buttons_2 = $mce_buttons_3 = $mce_buttons_4 = array();
|
||||
} else {
|
||||
$mce_buttons = apply_filters('mce_buttons', array('bold', 'italic', 'strikethrough', '|', 'bullist', 'numlist', 'blockquote', '|', 'justifyleft', 'justifycenter', 'justifyright', '|', 'link', 'unlink', 'wp_more', '|', 'spellchecker', 'fullscreen', 'wp_fullscreen', 'wp_adv' ), $editor_id);
|
||||
$mce_buttons_2 = apply_filters('mce_buttons_2', array( 'formatselect', 'underline', 'justifyfull', 'forecolor', '|', 'pastetext', 'pasteword', 'removeformat', '|', 'charmap', '|', 'outdent', 'indent', '|', 'undo', 'redo', 'wp_help' ), $editor_id);
|
||||
$mce_buttons_3 = apply_filters('mce_buttons_3', array(), $editor_id);
|
||||
$mce_buttons_4 = apply_filters('mce_buttons_4', array(), $editor_id);
|
||||
}
|
||||
|
||||
if ( 'content' == $editor_id )
|
||||
$arg = array('fullscreen');
|
||||
else
|
||||
$arg = array('wp_fullscreen');
|
||||
|
||||
$_buttons = compact('mce_buttons', 'mce_buttons_2', 'mce_buttons_3', 'mce_buttons_4');
|
||||
foreach ( $_buttons as $key => $val ) {
|
||||
$_buttons[$key] = array_diff( $val, $arg );
|
||||
}
|
||||
|
||||
extract($_buttons, EXTR_OVERWRITE);
|
||||
|
||||
$mceInit = array (
|
||||
'elements' => $editor_id,
|
||||
'wpautop' => (bool) $settings['wpautop'],
|
||||
'remove_linebreaks' => (bool) $settings['wpautop'],
|
||||
'apply_source_formatting' => (bool) !$settings['wpautop'],
|
||||
'theme_advanced_buttons1' => implode($mce_buttons, ','),
|
||||
'theme_advanced_buttons2' => implode($mce_buttons_2, ','),
|
||||
'theme_advanced_buttons3' => implode($mce_buttons_3, ','),
|
||||
'theme_advanced_buttons4' => implode($mce_buttons_4, ',')
|
||||
);
|
||||
|
||||
if ( $first_run )
|
||||
$mceInit = array_merge($this->first_init, $mceInit);
|
||||
|
||||
if ( is_array($settings['tinymce']) )
|
||||
$mceInit = array_merge($mceInit, $settings['tinymce']);
|
||||
|
||||
// For people who really REALLY know what they're doing with TinyMCE
|
||||
// You can modify initArray to add, remove, change elements of the config before tinyMCE.init
|
||||
// Setting "valid_elements", "invalid_elements" and "extended_valid_elements" can be done through this filter.
|
||||
// Best is to use the default cleanup by not specifying valid_elements, as TinyMCE contains full set of XHTML 1.0.
|
||||
if ( $settings['teeny'] ) {
|
||||
$mceInit = apply_filters('teeny_mce_before_init', $mceInit, $editor_id);
|
||||
} else {
|
||||
$mceInit = apply_filters('tiny_mce_before_init', $mceInit, $editor_id);
|
||||
}
|
||||
|
||||
if ( empty($mceInit['theme_advanced_buttons3']) && !empty($mceInit['theme_advanced_buttons4']) ) {
|
||||
$mceInit['theme_advanced_buttons3'] = $mceInit['theme_advanced_buttons4'];
|
||||
$mceInit['theme_advanced_buttons4'] = '';
|
||||
}
|
||||
|
||||
$this->mce_settings[$editor_id] = $mceInit;
|
||||
$first_run = false;
|
||||
} // end if $this->tinymce
|
||||
}
|
||||
|
||||
function _parse_init($init) {
|
||||
$options = '';
|
||||
|
||||
foreach ( $init as $k => $v ) {
|
||||
if ( is_bool($v) ) {
|
||||
$val = $v ? 'true' : 'false';
|
||||
$options .= $k . ':' . $val . ',';
|
||||
continue;
|
||||
} elseif ( !empty($v) && is_string($v) && ( ('{' == $v{0} && '}' == $v{strlen($v) - 1}) || ('[' == $v{0} && ']' == $v{strlen($v) - 1}) || preg_match('/^\(?function ?\(/', $v) ) ) {
|
||||
$options .= $k . ':' . $v . ',';
|
||||
continue;
|
||||
}
|
||||
$options .= $k . ':"' . $v . '",';
|
||||
}
|
||||
|
||||
return '{' . trim( $options, ' ,' ) . '}';
|
||||
}
|
||||
|
||||
/**
|
||||
* Find out which editor should be displayed by default.
|
||||
*
|
||||
* Works out which of the two editors to display as the current editor for a
|
||||
* user.
|
||||
*
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @return string Either 'tinymce', or 'html', or 'test'
|
||||
*/
|
||||
function wp_default_editor() {
|
||||
$r = user_can_richedit() ? 'tinymce' : 'html'; // defaults
|
||||
if ( $user = wp_get_current_user() ) { // look for cookie
|
||||
$ed = get_user_setting('editor', 'tinymce');
|
||||
$r = ( in_array($ed, array('tinymce', 'html', 'test') ) ) ? $ed : $r;
|
||||
}
|
||||
return apply_filters( 'wp_default_editor', $r ); // filter
|
||||
}
|
||||
|
||||
function enqueue_scripts() {
|
||||
wp_enqueue_script('quicktags');
|
||||
wp_enqueue_script('word-count');
|
||||
wp_enqueue_script('wplink');
|
||||
wp_enqueue_style('editor-buttons');
|
||||
|
||||
wp_enqueue_script('wpdialogs-popup');
|
||||
wp_enqueue_style('wp-jquery-ui-dialog');
|
||||
|
||||
if ( $this->tinymce )
|
||||
wp_enqueue_script('editor');
|
||||
else
|
||||
wp_enqueue_script('utils');
|
||||
|
||||
if ( in_array('wpfullscreen', $this->plugins, true) )
|
||||
wp_enqueue_script('wp-fullscreen');
|
||||
|
||||
if ( !is_admin() )
|
||||
add_thickbox();
|
||||
}
|
||||
|
||||
function editor_js() {
|
||||
global $tinymce_version, $concatenate_scripts, $compress_scripts;
|
||||
|
||||
/**
|
||||
* Filter "tiny_mce_version" is deprecated
|
||||
*
|
||||
* The tiny_mce_version filter is not needed since external plugins are loaded directly by TinyMCE.
|
||||
* These plugins can be refreshed by appending query string to the URL passed to "mce_external_plugins" filter.
|
||||
* If the plugin has a popup dialog, a query string can be added to the button action that opens it (in the plugin's code).
|
||||
*/
|
||||
$version = 'ver=' . $tinymce_version;
|
||||
|
||||
if ( ! isset($concatenate_scripts) )
|
||||
script_concat_settings();
|
||||
|
||||
$compressed = $compress_scripts && $concatenate_scripts && isset($_SERVER['HTTP_ACCEPT_ENCODING'])
|
||||
&& false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip');
|
||||
|
||||
if ( $this->tinymce && 'en' != $this->mce_locale )
|
||||
include_once(ABSPATH . WPINC . '/js/tinymce/langs/wp-langs.php');
|
||||
|
||||
$mceInit = $qtInit = '';
|
||||
if ( !empty($this->mce_settings) ) {
|
||||
foreach ( $this->mce_settings as $editor_id => $init ) {
|
||||
$options = $this->_parse_init( $init );
|
||||
$mceInit .= "'$editor_id':{$options},\n";
|
||||
}
|
||||
$mceInit = '{' . trim($mceInit, '\n,') . '}';
|
||||
} else {
|
||||
$mceInit = '{}';
|
||||
}
|
||||
|
||||
if ( !empty($this->qt_settings) ) {
|
||||
foreach ( $this->qt_settings as $editor_id => $init ) {
|
||||
$options = $this->_parse_init( $init );
|
||||
$qtInit .= "'$editor_id':{$options},\n";
|
||||
}
|
||||
$qtInit = '{' . trim($qtInit, '\n,') . '}';
|
||||
} else {
|
||||
$qtInit = '{}';
|
||||
}
|
||||
|
||||
// reset($this->mce_settings);
|
||||
// $key = key($this->mce_settings);
|
||||
|
||||
$ref = array(
|
||||
'plugins' => implode( ',', $this->plugins ),
|
||||
'theme' => 'advanced',
|
||||
'language' => $this->mce_locale
|
||||
);
|
||||
|
||||
do_action('before_wp_tiny_mce', $this->mce_settings);
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
tinyMCEPreInit = {
|
||||
base : "<?php echo $this->baseurl; ?>",
|
||||
suffix : "",
|
||||
query : "<?php echo $version; ?>",
|
||||
mceInit : <?php echo $mceInit; ?>,
|
||||
qtInit : <?php echo $qtInit; ?>,
|
||||
ref : <?php echo $this->_parse_init( $ref ); ?>,
|
||||
load_ext : function(url,lang){var sl=tinymce.ScriptLoader;sl.markDone(url+'/langs/'+lang+'.js');sl.markDone(url+'/langs/'+lang+'_dlg.js');}
|
||||
};
|
||||
</script>
|
||||
<?php
|
||||
|
||||
if ( $this->tinymce ) {
|
||||
if ( $compressed )
|
||||
echo "<script type='text/javascript' src='$this->baseurl/wp-tinymce.php?c=1&$version'></script>\n";
|
||||
else
|
||||
echo "<script type='text/javascript' src='$this->baseurl/tiny_mce.js?$version'></script>\n";
|
||||
|
||||
if ( 'en' != $this->mce_locale && isset($lang) )
|
||||
echo "<script type='text/javascript'>\n$lang\n</script>\n";
|
||||
else
|
||||
echo "<script type='text/javascript' src='$this->baseurl/langs/wp-langs-en.js?$version'></script>\n";
|
||||
}
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var init, ed, qt, first_init, mce = <?php echo $this->default_editor == 'tinymce' ? 'true' : 'false'; ?>;
|
||||
|
||||
if ( typeof(tinymce) == 'object' ) {
|
||||
for ( ed in tinyMCEPreInit.mceInit ) {
|
||||
if ( first_init ) {
|
||||
init = tinyMCEPreInit.mceInit[ed] = tinymce.extend( {}, first_init, tinyMCEPreInit.mceInit[ed] );
|
||||
} else {
|
||||
init = first_init = tinyMCEPreInit.mceInit[ed];
|
||||
}
|
||||
|
||||
if ( mce )
|
||||
try{tinymce.init(init);}catch(e){}
|
||||
}
|
||||
}
|
||||
|
||||
if ( typeof(QTags) == 'function' ) {
|
||||
for ( qt in tinyMCEPreInit.qtInit ) {
|
||||
try{quicktags(tinyMCEPreInit.qtInit[qt]);}catch(e){}
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
||||
var wpActiveEditor;
|
||||
|
||||
jQuery('.wp-editor-wrap').click(function(e){
|
||||
wpActiveEditor = this.id.slice(3, -5);
|
||||
});
|
||||
|
||||
function send_to_editor(h) {
|
||||
var ed;
|
||||
|
||||
if ( typeof(tinymce) != 'undefined' && wpActiveEditor )
|
||||
ed = tinymce.get(wpActiveEditor);
|
||||
|
||||
if ( ed && !ed.isHidden() ) {
|
||||
// restore caret position on IE
|
||||
if ( tinymce.isIE && ed.windowManager.insertimagebookmark )
|
||||
ed.selection.moveToBookmark(ed.windowManager.insertimagebookmark);
|
||||
|
||||
if ( h.indexOf('[caption') === 0 ) {
|
||||
if ( ed.plugins.wpeditimage )
|
||||
h = ed.plugins.wpeditimage._do_shcode(h);
|
||||
} else if ( h.indexOf('[gallery') === 0 ) {
|
||||
if ( ed.plugins.wpgallery )
|
||||
h = ed.plugins.wpgallery._do_gallery(h);
|
||||
} else if ( h.indexOf('[embed') === 0 ) {
|
||||
if ( ed.plugins.wordpress )
|
||||
h = ed.plugins.wordpress._setEmbed(h);
|
||||
}
|
||||
|
||||
ed.execCommand('mceInsertContent', false, h);
|
||||
} else if ( typeof quicktags != 'undefined' ) {
|
||||
quicktags.insertContent(wpActiveEditor, h);
|
||||
} else {
|
||||
jQuery('#'+wpActiveEditor).val( jQuery('#'+wpActiveEditor).val() + h );
|
||||
}
|
||||
|
||||
tb_remove();
|
||||
}
|
||||
<?php
|
||||
|
||||
if ( $this->ext_plugins )
|
||||
echo "$this->ext_plugins\n";
|
||||
|
||||
if ( ! $compressed && $this->tinymce ) {
|
||||
?>
|
||||
(function(){var t=tinyMCEPreInit,sl=tinymce.ScriptLoader,ln=t.ref.language,th=t.ref.theme,pl=t.ref.plugins;sl.markDone(t.base+'/langs/'+ln+'.js');sl.markDone(t.base+'/themes/'+th+'/langs/'+ln+'.js');sl.markDone(t.base+'/themes/'+th+'/langs/'+ln+'_dlg.js');sl.markDone(t.base+'/themes/advanced/skins/wp_theme/ui.css');tinymce.each(pl.split(','),function(n){if(n&&n.charAt(0)!='-'){sl.markDone(t.base+'/plugins/'+n+'/langs/'+ln+'.js');sl.markDone(t.base+'/plugins/'+n+'/langs/'+ln+'_dlg.js');}});})();
|
||||
<?php
|
||||
}
|
||||
|
||||
if ( !is_admin() )
|
||||
echo 'var ajaxurl = "' . admin_url('admin-ajax.php') . '";';
|
||||
?>
|
||||
</script>
|
||||
<?php
|
||||
|
||||
if ( in_array( 'wplink', $this->plugins, true ) )
|
||||
$this->wp_link_dialog();
|
||||
|
||||
if ( in_array( 'wpfullscreen', $this->plugins, true ) )
|
||||
$this->wp_fullscreen_html();
|
||||
|
||||
do_action('after_wp_tiny_mce', $this->mce_settings);
|
||||
}
|
||||
|
||||
function wp_fullscreen_html() {
|
||||
global $content_width, $post;
|
||||
|
||||
$width = isset($content_width) && 800 > $content_width ? $content_width : 800;
|
||||
$width = $width + 10; // compensate for the padding
|
||||
$dfw_width = get_user_setting( 'dfw_width', $width );
|
||||
$save = isset($post->post_status) && $post->post_status == 'publish' ? __('Update') : __('Save');
|
||||
?>
|
||||
<div id="wp-fullscreen-body">
|
||||
<div id="fullscreen-topbar">
|
||||
<div id="wp-fullscreen-toolbar">
|
||||
<div id="wp-fullscreen-close"><a href="#" onclick="fullscreen.off();return false;"><?php _e('Exit fullscreen'); ?></a></div>
|
||||
<div id="wp-fullscreen-central-toolbar" style="width:<?php echo $width; ?>px;">
|
||||
|
||||
<div id="wp-fullscreen-mode-bar"><div id="wp-fullscreen-modes">
|
||||
<a href="#" onclick="fullscreen.switchmode('tinymce');return false;"><?php _e('Visual'); ?></a>
|
||||
<a href="#" onclick="fullscreen.switchmode('html');return false;"><?php _e('HTML'); ?></a>
|
||||
</div></div>
|
||||
|
||||
<div id="wp-fullscreen-button-bar"><div id="wp-fullscreen-buttons" class="wp_themeSkin">
|
||||
<?php
|
||||
|
||||
$media_link_type = 'image';
|
||||
if ( is_multisite() && ( ( ! $mu_media_buttons = get_site_option( 'mu_media_buttons' ) ) || empty( $mu_media_buttons['image'] ) ) )
|
||||
$media_link_type = 'media';
|
||||
|
||||
$buttons = array(
|
||||
// format: title, onclick, show in both editors
|
||||
'bold' => array( 'title' => __('Bold (Ctrl + B)'), 'onclick' => 'fullscreen.b();', 'both' => false ),
|
||||
'italic' => array( 'title' => __('Italic (Ctrl + I)'), 'onclick' => 'fullscreen.i();', 'both' => false ),
|
||||
'0' => 'separator',
|
||||
'bullist' => array( 'title' => __('Unordered list (Alt + Shift + U)'), 'onclick' => 'fullscreen.ul();', 'both' => false ),
|
||||
'numlist' => array( 'title' => __('Ordered list (Alt + Shift + O)'), 'onclick' => 'fullscreen.ol();', 'both' => false ),
|
||||
'1' => 'separator',
|
||||
'blockquote' => array( 'title' => __('Blockquote (Alt+Shift+Q)'), 'onclick' => 'fullscreen.blockquote();', 'both' => false ),
|
||||
'image' => array( 'title' => __('Insert/edit image (Alt + Shift + M)'), 'onclick' => "jQuery('#add_{$media_link_type}').click();", 'both' => true ),
|
||||
'2' => 'separator',
|
||||
'link' => array( 'title' => __('Insert/edit link (Alt + Shift + A)'), 'onclick' => 'fullscreen.link();', 'both' => true ),
|
||||
'unlink' => array( 'title' => __('Unlink (Alt + Shift + S)'), 'onclick' => 'fullscreen.unlink();', 'both' => false ),
|
||||
'3' => 'separator',
|
||||
'help' => array( 'title' => __('Help (Alt + Shift + H)'), 'onclick' => 'fullscreen.help();', 'both' => false )
|
||||
);
|
||||
|
||||
$buttons = apply_filters( 'wp_fullscreen_buttons', $buttons );
|
||||
|
||||
foreach ( $buttons as $button => $args ) {
|
||||
if ( 'separator' == $args ) { ?>
|
||||
<div><span aria-orientation="vertical" role="separator" class="mceSeparator"></span></div>
|
||||
<?php continue;
|
||||
} ?>
|
||||
|
||||
<div<?php if ( $args['both'] ) { ?> class="wp-fullscreen-both"<?php } ?>>
|
||||
<a title="<?php echo $args['title']; ?>" onclick="<?php echo $args['onclick']; ?>return false;" class="mceButton mceButtonEnabled mce_<?php echo $button; ?>" href="#" id="wp_fs_<?php echo $button; ?>" role="button" aria-pressed="false">
|
||||
<span class="mceIcon mce_<?php echo $button; ?>"></span>
|
||||
</a>
|
||||
</div>
|
||||
<?php
|
||||
} ?>
|
||||
|
||||
</div></div>
|
||||
|
||||
<div id="wp-fullscreen-save">
|
||||
<span><?php if ( $post->post_status == 'publish' ) _e('Updated.'); else _e('Saved.'); ?></span>
|
||||
<img src="images/wpspin_light.gif" alt="" />
|
||||
<input type="button" class="button-primary" value="<?php echo $save; ?>" onclick="fullscreen.save();" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="wp-fullscreen-wrap" style="width:<?php echo $dfw_width; ?>px;">
|
||||
<label id="wp-fullscreen-title-prompt-text" for="wp-fullscreen-title"><?php echo apply_filters( 'enter_title_here', __( 'Enter title here' ), $post ); ?></label>
|
||||
<input type="text" id="wp-fullscreen-title" value="" autocomplete="off" />
|
||||
|
||||
<div id="wp-fullscreen-container">
|
||||
<textarea id="wp_mce_fullscreen"></textarea>
|
||||
</div>
|
||||
|
||||
<div id="wp-fullscreen-status">
|
||||
<div id="wp-fullscreen-count"><?php printf( __( 'Word count: %s' ), '<span class="word-count">0</span>' ); ?></div>
|
||||
<div id="wp-fullscreen-tagline"><?php _e('Just write.'); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fullscreen-overlay" id="fullscreen-overlay"></div>
|
||||
<div class="fullscreen-overlay fullscreen-fader fade-600" id="fullscreen-fader"></div>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs post queries for internal linking.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @param array $args Optional. Accepts 'pagenum' and 's' (search) arguments.
|
||||
* @return array Results.
|
||||
*/
|
||||
function wp_link_query( $args = array() ) {
|
||||
$pts = get_post_types( array( 'public' => true ), 'objects' );
|
||||
$pt_names = array_keys( $pts );
|
||||
|
||||
$query = array(
|
||||
'post_type' => $pt_names,
|
||||
'suppress_filters' => true,
|
||||
'update_post_term_cache' => false,
|
||||
'update_post_meta_cache' => false,
|
||||
'post_status' => 'publish',
|
||||
'order' => 'DESC',
|
||||
'orderby' => 'post_date',
|
||||
'posts_per_page' => 20,
|
||||
);
|
||||
|
||||
$args['pagenum'] = isset( $args['pagenum'] ) ? absint( $args['pagenum'] ) : 1;
|
||||
|
||||
if ( isset( $args['s'] ) )
|
||||
$query['s'] = $args['s'];
|
||||
|
||||
$query['offset'] = $args['pagenum'] > 1 ? $query['posts_per_page'] * ( $args['pagenum'] - 1 ) : 0;
|
||||
|
||||
// Do main query.
|
||||
$get_posts = new WP_Query;
|
||||
$posts = $get_posts->query( $query );
|
||||
// Check if any posts were found.
|
||||
if ( ! $get_posts->post_count )
|
||||
return false;
|
||||
|
||||
// Build results.
|
||||
$results = array();
|
||||
foreach ( $posts as $post ) {
|
||||
if ( 'post' == $post->post_type )
|
||||
$info = mysql2date( __( 'Y/m/d' ), $post->post_date );
|
||||
else
|
||||
$info = $pts[ $post->post_type ]->labels->singular_name;
|
||||
|
||||
$results[] = array(
|
||||
'ID' => $post->ID,
|
||||
'title' => trim( esc_html( strip_tags( get_the_title( $post ) ) ) ),
|
||||
'permalink' => get_permalink( $post->ID ),
|
||||
'info' => $info,
|
||||
);
|
||||
}
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
/**
|
||||
* Dialog for internal linking.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*/
|
||||
function wp_link_dialog() {
|
||||
?>
|
||||
<div style="display:none;">
|
||||
<form id="wp-link" tabindex="-1">
|
||||
<?php wp_nonce_field( 'internal-linking', '_ajax_linking_nonce', false ); ?>
|
||||
<div id="link-selector">
|
||||
<div id="link-options">
|
||||
<p class="howto"><?php _e( 'Enter the destination URL' ); ?></p>
|
||||
<div>
|
||||
<label><span><?php _e( 'URL' ); ?></span><input id="url-field" type="text" tabindex="10" name="href" /></label>
|
||||
</div>
|
||||
<div>
|
||||
<label><span><?php _e( 'Title' ); ?></span><input id="link-title-field" type="text" tabindex="20" name="linktitle" /></label>
|
||||
</div>
|
||||
<div class="link-target">
|
||||
<label><input type="checkbox" id="link-target-checkbox" tabindex="30" /> <?php _e( 'Open link in a new window/tab' ); ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<?php $show_internal = '1' == get_user_setting( 'wplink', '0' ); ?>
|
||||
<p class="howto toggle-arrow <?php if ( $show_internal ) echo 'toggle-arrow-active'; ?>" id="internal-toggle"><?php _e( 'Or link to existing content' ); ?></p>
|
||||
<div id="search-panel"<?php if ( ! $show_internal ) echo ' style="display:none"'; ?>>
|
||||
<div class="link-search-wrapper">
|
||||
<label>
|
||||
<span><?php _e( 'Search' ); ?></span>
|
||||
<input type="text" id="search-field" class="link-search-field" tabindex="60" autocomplete="off" />
|
||||
<img class="waiting" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" />
|
||||
</label>
|
||||
</div>
|
||||
<div id="search-results" class="query-results">
|
||||
<ul></ul>
|
||||
<div class="river-waiting">
|
||||
<img class="waiting" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
<div id="most-recent-results" class="query-results">
|
||||
<div class="query-notice"><em><?php _e( 'No search term specified. Showing recent items.' ); ?></em></div>
|
||||
<ul></ul>
|
||||
<div class="river-waiting">
|
||||
<img class="waiting" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="submitbox">
|
||||
<div id="wp-link-cancel">
|
||||
<a class="submitdelete deletion" href="#"><?php _e( 'Cancel' ); ?></a>
|
||||
</div>
|
||||
<div id="wp-link-update">
|
||||
<input type="submit" tabindex="100" value="<?php _e( 'Add Link' ); ?>" class="button-primary" id="wp-link-submit" name="wp-link-submit">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -78,10 +78,10 @@ class WP_Scripts extends WP_Dependencies {
|
||||
return $output;
|
||||
|
||||
echo "<script type='text/javascript'>\n";
|
||||
echo "/* <![CDATA[ */\n"; // not needed in HTML 5
|
||||
echo "/* <![CDATA[ */\n"; // CDATA is not needed for HTML 5
|
||||
echo $output;
|
||||
echo "\n/* ]]> */";
|
||||
echo "\n</script>\n";
|
||||
echo "/* ]]> */\n";
|
||||
echo "</script>\n";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
1
wp-includes/css/editor-buttons.css
Normal file
1625
wp-includes/css/editor-buttons.dev.css
Normal file
@ -1 +1 @@
|
||||
.ui-helper-hidden{display:none;}.ui-helper-hidden-accessible{position:absolute;left:-99999999px;}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none;}.ui-helper-clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden;}.ui-helper-clearfix{display:inline-block;}/* required comment for clearfix to work in Opera \*/ * html .ui-helper-clearfix{height:1%;}.ui-helper-clearfix{display:block;}/* end clearfix */ .ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0);}.ui-state-disabled{cursor:default!important;}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;}.ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%;}.ui-resizable{position:relative;}.ui-resizable-handle{position:absolute;font-size:.1px;z-index:99999;display:block;}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none;}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0;}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0;}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%;}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%;}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px;}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px;}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px;}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px;}.wp-dialog{position:absolute;width:300px;overflow:hidden;}.wp-dialog .ui-dialog-titlebar{position:relative;}.wp-dialog .ui-dialog-titlebar-close span{display:block;margin:1px;}.wp-dialog .ui-dialog-content{position:relative;border:0;padding:0;background:none;overflow:auto;zoom:1;}.wp-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em 1em .5em .4em;}.wp-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right;}.wp-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer;}.wp-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px;}.ui-draggable .ui-dialog-titlebar{cursor:move;}.wp-dialog{border:1px solid #999;-moz-box-shadow:0 0 16px rgba(0,0,0,0.3);-webkit-box-shadow:0 0 16px rgba(0,0,0,0.3);box-shadow:0 0 16px rgba(0,0,0,0.3);}.wp-dialog .ui-dialog-title{display:block;text-align:center;padding:1px 0 2px;}.wp-dialog .ui-dialog-titlebar{padding:0 1em;background-color:#444;font-weight:bold;font-size:11px;line-height:18px;color:#e5e5e5;}.wp-dialog{-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;-khtml-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;-khtml-border-top-right-radius:4px;border-top-right-radius:4px;}.wp-dialog .ui-dialog-titlebar{-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;-khtml-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-topright:3px;-webkit-border-top-right-radius:3px;-khtml-border-top-right-radius:3px;border-top-right-radius:3px;}.wp-dialog .ui-dialog-titlebar-close{position:absolute;width:29px;height:16px;top:2px;right:6px;background:url('../js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif') no-repeat -87px -16px;padding:0;}.wp-dialog .ui-dialog-titlebar-close:hover,.wp-dialog .ui-dialog-titlebar-close:focus{background-position:-87px -32px;}.ui-widget-overlay{background-color:#000;opacity:.6;filter:alpha(opacity=60);}
|
||||
.ui-helper-hidden{display:none;}.ui-helper-hidden-accessible{position:absolute;left:-99999999px;}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none;}.ui-helper-clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden;}.ui-helper-clearfix{display:inline-block;}/* required comment for clearfix to work in Opera \*/ * html .ui-helper-clearfix{height:1%;}.ui-helper-clearfix{display:block;}/* end clearfix */ .ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0);}.ui-state-disabled{cursor:default!important;}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;}.ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%;}.ui-resizable{position:relative;}.ui-resizable-handle{position:absolute;font-size:.1px;z-index:99999;display:block;}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none;}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0;}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0;}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%;}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%;}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px;}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px;}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px;}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px;}.wp-dialog{position:absolute;width:300px;overflow:hidden;}.wp-dialog .ui-dialog-titlebar{position:relative;}.wp-dialog .ui-dialog-titlebar-close span{display:block;margin:1px;}.wp-dialog .ui-dialog-content{position:relative;border:0;padding:0;background:none;overflow:auto;zoom:1;}.wp-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em 1em .5em .4em;}.wp-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right;}.wp-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer;}.wp-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px;}.ui-draggable .ui-dialog-titlebar{cursor:move;}.wp-dialog{border:1px solid #999;-moz-box-shadow:0 0 16px rgba(0,0,0,0.3);-webkit-box-shadow:0 0 16px rgba(0,0,0,0.3);box-shadow:0 0 16px rgba(0,0,0,0.3);}.wp-dialog .ui-dialog-title{display:block;text-align:center;padding:1px 0 2px;}.wp-dialog .ui-dialog-titlebar{padding:0 1em;background-color:#444;font-weight:bold;font-size:11px;line-height:18px;color:#e5e5e5;}.wp-dialog{background-color:#f5f5f5;-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;-khtml-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;-khtml-border-top-right-radius:4px;border-top-right-radius:4px;}.wp-dialog .ui-dialog-titlebar{-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;-khtml-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-topright:3px;-webkit-border-top-right-radius:3px;-khtml-border-top-right-radius:3px;border-top-right-radius:3px;}.wp-dialog .ui-dialog-titlebar-close{position:absolute;width:29px;height:16px;top:2px;right:6px;background:url('../js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif') no-repeat -87px -16px;padding:0;}.wp-dialog .ui-dialog-titlebar-close:hover,.wp-dialog .ui-dialog-titlebar-close:focus{background-position:-87px -32px;}.ui-widget-overlay{background-color:#000;opacity:.6;filter:alpha(opacity=60);}
|
@ -89,11 +89,13 @@
|
||||
-webkit-box-shadow: 0px 0px 16px rgba( 0,0,0,0.3 );
|
||||
box-shadow: 0px 0px 16px rgba( 0,0,0,0.3 );
|
||||
}
|
||||
|
||||
.wp-dialog .ui-dialog-title {
|
||||
display: block;
|
||||
text-align: center;
|
||||
padding: 1px 0 2px;
|
||||
}
|
||||
|
||||
.wp-dialog .ui-dialog-titlebar {
|
||||
padding: 0 1em;
|
||||
background-color: #444;
|
||||
@ -102,7 +104,9 @@
|
||||
line-height: 18px;
|
||||
color: #e5e5e5;
|
||||
}
|
||||
|
||||
.wp-dialog {
|
||||
background-color: #f5f5f5;
|
||||
-moz-border-radius-topleft: 4px;
|
||||
-webkit-border-top-left-radius: 4px;
|
||||
-khtml-border-top-left-radius: 4px;
|
||||
@ -112,6 +116,7 @@
|
||||
-khtml-border-top-right-radius: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
}
|
||||
|
||||
.wp-dialog .ui-dialog-titlebar {
|
||||
-moz-border-radius-topleft: 3px;
|
||||
-webkit-border-top-left-radius: 3px;
|
||||
@ -132,12 +137,14 @@
|
||||
background: url('../js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif') no-repeat -87px -16px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.wp-dialog .ui-dialog-titlebar-close:hover,
|
||||
.wp-dialog .ui-dialog-titlebar-close:focus {
|
||||
background-position: -87px -32px;
|
||||
}
|
||||
|
||||
.ui-widget-overlay {
|
||||
background-color: #000;
|
||||
opacity: 0.6;
|
||||
filter: alpha(opacity=60);
|
||||
}
|
||||
}
|
||||
|
@ -254,8 +254,6 @@ add_action( 'save_post', '_save_post_hook', 5, 2 );
|
||||
add_action( 'transition_post_status', '_transition_post_status', 5, 3 );
|
||||
add_action( 'comment_form', 'wp_comment_form_unfiltered_html_nonce' );
|
||||
add_action( 'wp_scheduled_delete', 'wp_scheduled_delete' );
|
||||
add_action( 'before_wp_tiny_mce', 'wp_print_editor_js' );
|
||||
add_action( 'after_wp_tiny_mce', 'wp_preload_dialogs', 10, 1 );
|
||||
add_action( 'admin_init', 'send_frame_options_header', 10, 0 );
|
||||
add_action( 'importer_scheduled_cleanup', 'wp_delete_attachment' );
|
||||
|
||||
|
@ -2616,3 +2616,42 @@ function wp_timezone_supported() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find out which editor should be displayed
|
||||
*
|
||||
* @see WP_Editor::wp_default_editor()
|
||||
* @since 2.5.0
|
||||
* @deprecated 3.5
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function wp_default_editor() {
|
||||
_deprecated_function( __FUNCTION__, '3.3' );
|
||||
|
||||
global $wp_editor;
|
||||
if ( !is_a($wp_editor, 'WP_Editor') ) {
|
||||
require_once( ABSPATH . WPINC . '/class-wp-editor.php' );
|
||||
$wp_editor = new WP_Editor;
|
||||
}
|
||||
|
||||
return $wp_editor->wp_default_editor();
|
||||
}
|
||||
|
||||
/**
|
||||
* Display editor: TinyMCE, HTML, or both.
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @deprecated 3.3
|
||||
*
|
||||
* @param string $content Textarea content.
|
||||
* @param string $id Optional, default is 'content'. HTML ID attribute value.
|
||||
* @param string $prev_id Optional, not used
|
||||
* @param bool $media_buttons Optional, default is true. Whether to display media buttons.
|
||||
* @param int $tab_index Optional, not used
|
||||
*/
|
||||
function the_editor($content, $id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2, $extended = true) {
|
||||
|
||||
wp_editor( $content, $id, array( 'media_buttons' => $media_buttons ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1750,104 +1750,24 @@ function user_can_richedit() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Find out which editor should be displayed by default.
|
||||
* Loads and initializes WP_Editor class if needed, passes the settings for an instance of the editor
|
||||
*
|
||||
* Works out which of the two editors to display as the current editor for a
|
||||
* user.
|
||||
* @see wp-includes/class-wp-editor.php
|
||||
* @since 3.3
|
||||
*
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @return string Either 'tinymce', or 'html', or 'test'
|
||||
* @param string $content Initial content for the editor.
|
||||
* @param string $editor_id HTML ID attribute value for the textarea and TinyMCE.
|
||||
* @param array $settings See WP_Editor::editor().
|
||||
*/
|
||||
function wp_default_editor() {
|
||||
$r = user_can_richedit() ? 'tinymce' : 'html'; // defaults
|
||||
if ( $user = wp_get_current_user() ) { // look for cookie
|
||||
$ed = get_user_setting('editor', 'tinymce');
|
||||
$r = ( in_array($ed, array('tinymce', 'html', 'test') ) ) ? $ed : $r;
|
||||
}
|
||||
return apply_filters( 'wp_default_editor', $r ); // filter
|
||||
}
|
||||
function wp_editor( $content, $editor_id, $settings = array() ) {
|
||||
global $wp_editor;
|
||||
|
||||
/**
|
||||
* Display visual editor forms: TinyMCE, or HTML, or both.
|
||||
*
|
||||
* The amount of rows the text area will have for the content has to be between
|
||||
* 3 and 100 or will default at 12. There is only one option used for all users,
|
||||
* named 'default_post_edit_rows'.
|
||||
*
|
||||
* If the user can not use the rich editor (TinyMCE), then the switch button
|
||||
* will not be displayed.
|
||||
*
|
||||
* @since 2.1.0
|
||||
*
|
||||
* @param string $content Textarea content.
|
||||
* @param string $id Optional, default is 'content'. HTML ID attribute value.
|
||||
* @param string $prev_id Optional, default is 'title'. HTML ID name for switching back and forth between visual editors.
|
||||
* @param bool $media_buttons Optional, default is true. Whether to display media buttons.
|
||||
* @param int $tab_index Optional, default is 2. Tabindex for textarea element.
|
||||
*/
|
||||
function the_editor($content, $id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2, $extended = true) {
|
||||
$rows = get_option('default_post_edit_rows');
|
||||
if (($rows < 3) || ($rows > 100))
|
||||
$rows = 12;
|
||||
|
||||
if ( !current_user_can( 'upload_files' ) )
|
||||
$media_buttons = false;
|
||||
|
||||
$richedit = user_can_richedit();
|
||||
$class = '';
|
||||
|
||||
if ( $richedit || $media_buttons ) { ?>
|
||||
<div id="editor-toolbar">
|
||||
<?php
|
||||
if ( $richedit ) {
|
||||
$wp_default_editor = wp_default_editor(); ?>
|
||||
<div class="zerosize"><input accesskey="e" type="button" onclick="switchEditors.go('<?php echo $id; ?>')" /></div>
|
||||
<?php if ( 'html' == $wp_default_editor ) {
|
||||
add_filter('the_editor_content', 'wp_htmledit_pre'); ?>
|
||||
<a id="edButtonHTML" class="active hide-if-no-js" onclick="switchEditors.go('<?php echo $id; ?>', 'html');"><?php _e('HTML'); ?></a>
|
||||
<a id="edButtonPreview" class="hide-if-no-js" onclick="switchEditors.go('<?php echo $id; ?>', 'tinymce');"><?php _e('Visual'); ?></a>
|
||||
<?php } else {
|
||||
$class = " class='theEditor'";
|
||||
add_filter('the_editor_content', 'wp_richedit_pre'); ?>
|
||||
<a id="edButtonHTML" class="hide-if-no-js" onclick="switchEditors.go('<?php echo $id; ?>', 'html');"><?php _e('HTML'); ?></a>
|
||||
<a id="edButtonPreview" class="active hide-if-no-js" onclick="switchEditors.go('<?php echo $id; ?>', 'tinymce');"><?php _e('Visual'); ?></a>
|
||||
<?php }
|
||||
if ( !is_a($wp_editor, 'WP_Editor') ) {
|
||||
require( ABSPATH . WPINC . '/class-wp-editor.php' );
|
||||
$wp_editor = new WP_Editor;
|
||||
}
|
||||
|
||||
if ( $media_buttons ) { ?>
|
||||
<div id="media-buttons" class="hide-if-no-js">
|
||||
<?php do_action( 'media_buttons' ); ?>
|
||||
</div>
|
||||
<?php
|
||||
} ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div id="quicktags"><?php
|
||||
wp_print_scripts( 'quicktags' ); ?>
|
||||
<script type="text/javascript">edToolbar()</script>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$the_editor = apply_filters('the_editor', "<div id='editorcontainer'><textarea rows='$rows'$class cols='40' name='$id' tabindex='$tab_index' id='$id'>%s</textarea></div>\n");
|
||||
$the_editor_content = apply_filters('the_editor_content', $content);
|
||||
|
||||
printf($the_editor, $the_editor_content);
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
edCanvas = document.getElementById('<?php echo $id; ?>');
|
||||
<?php if ( ! $extended ) { ?> jQuery('#ed_fullscreen, #ed_more').hide();<?php } ?>
|
||||
</script>
|
||||
<?php
|
||||
// queue scripts
|
||||
if ( $richedit )
|
||||
add_action( 'admin_print_footer_scripts', 'wp_tiny_mce', 25 );
|
||||
elseif ( $extended )
|
||||
add_action( 'admin_print_footer_scripts', 'wp_quicktags', 25 );
|
||||
|
||||
$wp_editor->editor($content, $editor_id, $settings);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Before Width: | Height: | Size: 60 B After Width: | Height: | Size: 60 B |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
@ -219,7 +219,7 @@
|
||||
});
|
||||
|
||||
ed.onSaveContent.add(function(ed, o) {
|
||||
if ( typeof(switchEditors) == 'object' ) {
|
||||
if ( ed.getParam('wpautop', true) && typeof(switchEditors) == 'object' ) {
|
||||
if ( ed.isHidden() )
|
||||
o.content = o.element.value;
|
||||
else
|
||||
@ -421,3 +421,4 @@
|
||||
// Register plugin
|
||||
tinymce.PluginManager.add('wordpress', tinymce.plugins.WordPress);
|
||||
})();
|
||||
|
||||
|
@ -32,11 +32,11 @@
|
||||
});
|
||||
|
||||
ed.addCommand('wpFullScreenInit', function() {
|
||||
var d = ed.getDoc(), b = d.body, fsed;
|
||||
var d, b, fsed;
|
||||
|
||||
// Only init the editor if necessary.
|
||||
if ( ed.id == 'wp_mce_fullscreen' )
|
||||
return;
|
||||
ed = tinymce.get('content');
|
||||
d = ed.getDoc();
|
||||
b = d.body;
|
||||
|
||||
tinyMCE.oldSettings = tinyMCE.settings; // Store old settings
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
|
||||
// Register buttons
|
||||
if ( 'undefined' != fullscreen ) {
|
||||
ed.addButton('fullscreen', {
|
||||
ed.addButton('wp_fullscreen', {
|
||||
title : 'fullscreen.desc',
|
||||
onclick : function(){ fullscreen.on(); }
|
||||
});
|
||||
|
@ -1 +1 @@
|
||||
(function(){tinymce.create("tinymce.plugins.wpFullscreenPlugin",{init:function(b,d){var e=this,h=0,f={},g=tinymce.DOM,a=false;b.addCommand("wpFullScreenClose",function(){if(b.getParam("wp_fullscreen_is_enabled")){g.win.setTimeout(function(){tinyMCE.remove(b);g.remove("wp_mce_fullscreen_parent");tinyMCE.settings=tinyMCE.oldSettings},10)}});b.addCommand("wpFullScreenSave",function(){var i=tinyMCE.get("wp_mce_fullscreen"),j;i.focus();j=tinyMCE.get(i.getParam("wp_fullscreen_editor_id"));j.setContent(i.getContent({format:"raw"}),{format:"raw"})});b.addCommand("wpFullScreenInit",function(){var k=b.getDoc(),i=k.body,j;if(b.id=="wp_mce_fullscreen"){return}tinyMCE.oldSettings=tinyMCE.settings;tinymce.each(b.settings,function(l,m){f[m]=l});f.id="wp_mce_fullscreen";f.wp_fullscreen_is_enabled=true;f.wp_fullscreen_editor_id=b.id;f.theme_advanced_resizing=false;f.theme_advanced_statusbar_location="none";f.content_css=f.content_css?f.content_css+","+f.wp_fullscreen_content_css:f.wp_fullscreen_content_css;f.height=tinymce.isIE?i.scrollHeight:i.offsetHeight;tinymce.each(b.getParam("wp_fullscreen_settings"),function(m,l){f[l]=m});j=new tinymce.Editor("wp_mce_fullscreen",f);j.onInit.add(function(l){var n=tinymce.DOM,m=n.select("a.mceButton",n.get("wp-fullscreen-buttons"));if(!b.isHidden()){l.setContent(b.getContent())}else{l.setContent(switchEditors.wpautop(l.getElement().value))}setTimeout(function(){l.onNodeChange.add(function(p,o,q){tinymce.each(m,function(t){var s,r;if(s=n.get("wp_mce_fullscreen_"+t.id.substr(6))){r=s.className;if(r){t.className=r}}})})},1000);l.dom.addClass(l.getBody(),"wp-fullscreen-editor");l.focus()});j.render();if("undefined"!=fullscreen){j.dom.bind(j.dom.doc,"mousemove",function(l){fullscreen.bounder("showToolbar","hideToolbar",2000,l)})}});if("undefined"!=fullscreen){b.addButton("fullscreen",{title:"fullscreen.desc",onclick:function(){fullscreen.on()}})}if(b.getParam("fullscreen_is_enabled")||!b.getParam("wp_fullscreen_is_enabled")){return}function c(){if(a){return}var k=b.getDoc(),j=tinymce.DOM,l,i;if(tinymce.isIE){i=k.body.scrollHeight}else{i=k.documentElement.offsetHeight}l=(i>300)?i:300;if(h!=l){h=l;a=true;setTimeout(function(){a=false},100);j.setStyle(j.get(b.id+"_ifr"),"height",l+"px")}}b.onInit.add(function(j,i){j.onChange.add(c);j.onSetContent.add(c);j.onPaste.add(c);j.onKeyUp.add(c);j.onPostRender.add(c);j.getBody().style.overflowY="hidden"});if(b.getParam("autoresize_on_init",true)){b.onLoadContent.add(function(j,i){setTimeout(function(){c()},1200)})}b.addCommand("wpAutoResize",c)},getInfo:function(){return{longname:"WP Fullscreen",author:"WordPress",authorurl:"http://wordpress.org",infourl:"",version:"1.0"}}});tinymce.PluginManager.add("wpfullscreen",tinymce.plugins.wpFullscreenPlugin)})();
|
||||
(function(){tinymce.create("tinymce.plugins.wpFullscreenPlugin",{init:function(b,d){var e=this,h=0,f={},g=tinymce.DOM,a=false;b.addCommand("wpFullScreenClose",function(){if(b.getParam("wp_fullscreen_is_enabled")){g.win.setTimeout(function(){tinyMCE.remove(b);g.remove("wp_mce_fullscreen_parent");tinyMCE.settings=tinyMCE.oldSettings},10)}});b.addCommand("wpFullScreenSave",function(){var i=tinyMCE.get("wp_mce_fullscreen"),j;i.focus();j=tinyMCE.get(i.getParam("wp_fullscreen_editor_id"));j.setContent(i.getContent({format:"raw"}),{format:"raw"})});b.addCommand("wpFullScreenInit",function(){var k,i,j;b=tinymce.get("content");k=b.getDoc();i=k.body;tinyMCE.oldSettings=tinyMCE.settings;tinymce.each(b.settings,function(l,m){f[m]=l});f.id="wp_mce_fullscreen";f.wp_fullscreen_is_enabled=true;f.wp_fullscreen_editor_id=b.id;f.theme_advanced_resizing=false;f.theme_advanced_statusbar_location="none";f.content_css=f.content_css?f.content_css+","+f.wp_fullscreen_content_css:f.wp_fullscreen_content_css;f.height=tinymce.isIE?i.scrollHeight:i.offsetHeight;tinymce.each(b.getParam("wp_fullscreen_settings"),function(m,l){f[l]=m});j=new tinymce.Editor("wp_mce_fullscreen",f);j.onInit.add(function(l){var n=tinymce.DOM,m=n.select("a.mceButton",n.get("wp-fullscreen-buttons"));if(!b.isHidden()){l.setContent(b.getContent())}else{l.setContent(switchEditors.wpautop(l.getElement().value))}setTimeout(function(){l.onNodeChange.add(function(p,o,q){tinymce.each(m,function(t){var s,r;if(s=n.get("wp_mce_fullscreen_"+t.id.substr(6))){r=s.className;if(r){t.className=r}}})})},1000);l.dom.addClass(l.getBody(),"wp-fullscreen-editor");l.focus()});j.render();if("undefined"!=fullscreen){j.dom.bind(j.dom.doc,"mousemove",function(l){fullscreen.bounder("showToolbar","hideToolbar",2000,l)})}});if("undefined"!=fullscreen){b.addButton("wp_fullscreen",{title:"fullscreen.desc",onclick:function(){fullscreen.on()}})}if(b.getParam("fullscreen_is_enabled")||!b.getParam("wp_fullscreen_is_enabled")){return}function c(){if(a){return}var k=b.getDoc(),j=tinymce.DOM,l,i;if(tinymce.isIE){i=k.body.scrollHeight}else{i=k.documentElement.offsetHeight}l=(i>300)?i:300;if(h!=l){h=l;a=true;setTimeout(function(){a=false},100);j.setStyle(j.get(b.id+"_ifr"),"height",l+"px")}}b.onInit.add(function(j,i){j.onChange.add(c);j.onSetContent.add(c);j.onPaste.add(c);j.onKeyUp.add(c);j.onPostRender.add(c);j.getBody().style.overflowY="hidden"});if(b.getParam("autoresize_on_init",true)){b.onLoadContent.add(function(j,i){setTimeout(function(){c()},1200)})}b.addCommand("wpAutoResize",c)},getInfo:function(){return{longname:"WP Fullscreen",author:"WordPress",authorurl:"http://wordpress.org",infourl:"",version:"1.0"}}});tinymce.PluginManager.add("wpfullscreen",tinymce.plugins.wpFullscreenPlugin)})();
|
@ -1 +0,0 @@
|
||||
#wp-link #internal-toggle{padding-right:18px;padding-left:0;}#wp-link label span{text-align:left;padding-left:5px;padding-right:0;}#wp-link .link-search-wrapper span{float:right;}#wp-link .link-search-wrapper input[type="text"]{float:right;}#wp-link .link-search-wrapper img.waiting{margin:8px 4px 0 1px;float:right;}#wp-link .link-target{margin:0 87px 0 0;}#wp-link .item-info{left:5px;right:auto;top:4px;bottom:0;}#wp-link #search-panel{float:right;}#wp-link-cancel{float:right;}#wp-link-update{float:left;}#wp-link .toggle-arrow{background-position:bottom right;}#wp-link .toggle-arrow-active{background-position:center right;}
|
@ -1,54 +0,0 @@
|
||||
#wp-link #internal-toggle {
|
||||
padding-right: 18px;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
#wp-link label span {
|
||||
text-align: left;
|
||||
padding-left: 5px;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
#wp-link .link-search-wrapper span {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#wp-link .link-search-wrapper input[type="text"] {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#wp-link .link-search-wrapper img.waiting {
|
||||
margin: 8px 4px 0 1px;
|
||||
float: right;
|
||||
}
|
||||
|
||||
#wp-link .link-target {
|
||||
margin: 0 87px 0 0;
|
||||
}
|
||||
|
||||
#wp-link .item-info {
|
||||
left: 5px;
|
||||
right: auto;
|
||||
top: 4px;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
#wp-link #search-panel {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#wp-link-cancel {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#wp-link-update {
|
||||
float: left;
|
||||
}
|
||||
|
||||
#wp-link .toggle-arrow {
|
||||
background-position: bottom right;
|
||||
}
|
||||
|
||||
#wp-link .toggle-arrow-active {
|
||||
background-position: center right;
|
||||
}
|
@ -1 +0,0 @@
|
||||
#wp-link{line-height:1.4em;font-size:12px;}#wp-link ol,#wp-link ul{list-style:none;margin:0;padding:0;}#wp-link input[type="text"]{-webkit-box-sizing:border-box;}#wp-link input[type="text"],#wp-link textarea{border-width:1px;border-style:solid;-moz-border-radius:4px;-khtml-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;font-size:12px;margin:1px;padding:3px;}#wp-link #link-options{padding:10px 0 14px;border-bottom:1px solid #dfdfdf;margin:0 6px 14px;}#wp-link p.howto{margin:3px;}#wp-link #internal-toggle{display:inline-block;cursor:pointer;padding-left:18px;}#wp-link .toggle-arrow{background:transparent url('../img/toggle-arrow.png') top left no-repeat;height:23px;line-height:23px;}#wp-link .toggle-arrow-active{background-position:center left;}#wp-link label input[type="text"]{width:360px;margin-top:5px;}#wp-link label span{display:inline-block;width:80px;text-align:right;padding-right:5px;}#wp-link .link-search-wrapper{margin:5px 6px 9px;display:block;overflow:hidden;}#wp-link .link-search-wrapper span{float:left;margin-top:6px;}#wp-link .link-search-wrapper input[type="text"]{float:left;width:220px;}#wp-link .link-search-wrapper img.waiting{margin:8px 1px 0 4px;float:left;display:none;}#wp-link .link-target{width:auto;padding:3px 0 0;margin:0 0 0 87px;font-size:11px;}#wp-link .query-results{border:1px #dfdfdf solid;margin:0 5px 5px;background:#fff;height:185px;overflow:auto;position:relative;}#wp-link li,#wp-link .query-notice{clear:both;margin-bottom:0;border-bottom:1px solid #f1f1f1;color:#333;padding:4px 6px;cursor:pointer;position:relative;}#wp-link li:hover{background:#eaf2fa;color:#151515;}#wp-link li.unselectable{border-bottom:1px solid #dfdfdf;}#wp-link li.unselectable:hover{background:#fff;cursor:auto;color:#333;}#wp-link li.selected{background:#ddd;color:#333;}#wp-link li.selected .item-title{font-weight:bold;}#wp-link .item-title{display:inline-block;width:80%;}#wp-link .item-info{text-transform:uppercase;color:#666;font-size:11px;position:absolute;right:5px;top:4px;bottom:0;}#wp-link #search-results{display:none;}#wp-link #search-panel{float:left;width:100%;}#wp-link .river-waiting{display:none;padding:10px 0;}#wp-link .river-waiting img.waiting{margin:0 auto;display:block;}#wp-link .submitbox{padding:5px 10px;font-size:11px;overflow:auto;height:29px;}#wp-link-cancel{line-height:25px;float:left;}#wp-link-update{line-height:23px;float:right;}
|
@ -1,163 +0,0 @@
|
||||
#wp-link {
|
||||
line-height: 1.4em;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#wp-link ol,
|
||||
#wp-link ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#wp-link input[type="text"] {
|
||||
-webkit-box-sizing: border-box;
|
||||
}
|
||||
|
||||
#wp-link input[type="text"],
|
||||
#wp-link textarea {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
-moz-border-radius: 4px;
|
||||
-khtml-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
font-size: 12px;
|
||||
margin: 1px;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
#wp-link #link-options {
|
||||
padding: 10px 0 14px;
|
||||
border-bottom: 1px solid #dfdfdf;
|
||||
margin: 0 6px 14px;
|
||||
}
|
||||
#wp-link p.howto {
|
||||
margin: 3px;
|
||||
}
|
||||
#wp-link #internal-toggle {
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
padding-left: 18px;
|
||||
}
|
||||
#wp-link .toggle-arrow {
|
||||
background: transparent url( '../img/toggle-arrow.png' ) top left no-repeat;
|
||||
height: 23px;
|
||||
line-height: 23px;
|
||||
}
|
||||
#wp-link .toggle-arrow-active {
|
||||
background-position: center left;
|
||||
}
|
||||
#wp-link label input[type="text"] {
|
||||
width: 360px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
#wp-link label span {
|
||||
display: inline-block;
|
||||
width: 80px;
|
||||
text-align: right;
|
||||
padding-right: 5px;
|
||||
}
|
||||
#wp-link .link-search-wrapper {
|
||||
margin: 5px 6px 9px;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
}
|
||||
#wp-link .link-search-wrapper span {
|
||||
float: left;
|
||||
margin-top: 6px;
|
||||
}
|
||||
#wp-link .link-search-wrapper input[type="text"] {
|
||||
float: left;
|
||||
width: 220px;
|
||||
}
|
||||
#wp-link .link-search-wrapper img.waiting {
|
||||
margin: 8px 1px 0 4px;
|
||||
float: left;
|
||||
display: none;
|
||||
}
|
||||
#wp-link .link-target {
|
||||
width: auto;
|
||||
padding: 3px 0 0;
|
||||
margin: 0 0 0 87px;
|
||||
font-size: 11px;
|
||||
}
|
||||
#wp-link .query-results {
|
||||
border: 1px #dfdfdf solid;
|
||||
margin: 0 5px 5px;
|
||||
background: #fff;
|
||||
height: 185px;
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
}
|
||||
#wp-link li,
|
||||
#wp-link .query-notice {
|
||||
clear: both;
|
||||
margin-bottom: 0;
|
||||
border-bottom: 1px solid #f1f1f1;
|
||||
color: #333;
|
||||
padding: 4px 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
}
|
||||
#wp-link li:hover {
|
||||
background: #eaf2fa;
|
||||
color: #151515;
|
||||
}
|
||||
#wp-link li.unselectable {
|
||||
border-bottom: 1px solid #dfdfdf;
|
||||
}
|
||||
#wp-link li.unselectable:hover {
|
||||
background: #fff;
|
||||
cursor: auto;
|
||||
color: #333;
|
||||
}
|
||||
#wp-link li.selected {
|
||||
background: #ddd;
|
||||
color: #333;
|
||||
}
|
||||
#wp-link li.selected .item-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
#wp-link .item-title {
|
||||
display: inline-block;
|
||||
width: 80%;
|
||||
}
|
||||
#wp-link .item-info {
|
||||
text-transform: uppercase;
|
||||
color: #666;
|
||||
font-size: 11px;
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
top: 4px;
|
||||
bottom: 0;
|
||||
}
|
||||
#wp-link #search-results {
|
||||
display: none;
|
||||
}
|
||||
#wp-link #search-panel {
|
||||
float: left;
|
||||
width: 100%;
|
||||
}
|
||||
#wp-link .river-waiting {
|
||||
display: none;
|
||||
padding: 10px 0;
|
||||
}
|
||||
#wp-link .river-waiting img.waiting {
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
}
|
||||
#wp-link .submitbox {
|
||||
padding: 5px 10px;
|
||||
font-size: 11px;
|
||||
overflow: auto;
|
||||
height: 29px;
|
||||
}
|
||||
#wp-link-cancel {
|
||||
line-height: 25px;
|
||||
float: left;
|
||||
}
|
||||
#wp-link-update {
|
||||
line-height: 23px;
|
||||
float: right;
|
||||
}
|
Before Width: | Height: | Size: 212 B |
Before Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 57 B |
@ -1,560 +1 @@
|
||||
/* Reset */
|
||||
.wp_themeSkin table, .wp_themeSkin tbody, .wp_themeSkin a, .wp_themeSkin img, .wp_themeSkin tr, .wp_themeSkin div, .wp_themeSkin td, .wp_themeSkin iframe, .wp_themeSkin span, .wp_themeSkin *, .wp_themeSkin .mceText {
|
||||
border:0; margin:0; padding:0; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; vertical-align:baseline; width:auto; border-collapse:separate;
|
||||
}
|
||||
.wp_themeSkin a:hover, .wp_themeSkin a:link, .wp_themeSkin a:visited, .wp_themeSkin a:active {text-decoration:none; font-weight:normal; cursor:default;}
|
||||
.wp_themeSkin table td {vertical-align:middle}
|
||||
|
||||
/* Containers */
|
||||
.wp_themeSkin table {}
|
||||
.wp_themeSkin iframe {display:block;}
|
||||
.wp_themeSkin .mceToolbar {padding: 2px;}
|
||||
|
||||
/* External */
|
||||
.wp_themeSkin .mceExternalToolbar {position:absolute; border-bottom:0; display:none}
|
||||
.wp_themeSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
|
||||
.wp_themeSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0}
|
||||
|
||||
/* Layout */
|
||||
.wp_themeSkin table.mceToolbar, .wp_themeSkin tr.mceFirst .mceToolbar tr td, .wp_themeSkin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0}
|
||||
.wp_themeSkin table.mceLayout {border:0;}
|
||||
.wp_themeSkin .mceIframeContainer {}
|
||||
.wp_themeSkin .mceStatusbar {
|
||||
display: block;
|
||||
font-family: Arial, "Bitstream Vera Sans", Helvetica, Verdana, sans-serif;
|
||||
font-size: 12px;
|
||||
line-height: 16px;
|
||||
padding-left: 5px;
|
||||
overflow: visible;
|
||||
height: 20px;
|
||||
border-top-width: 1px;
|
||||
border-top-style: solid;
|
||||
}
|
||||
.wp_themeSkin .mceStatusbar div {float:left; padding:2px;}
|
||||
.wp_themeSkin .mceStatusbar a.mceResize {
|
||||
display: block;
|
||||
float: right;
|
||||
background: url(../../img/icons.gif) -800px 0;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
cursor: se-resize
|
||||
}
|
||||
.wp_themeSkin .mceStatusbar a:hover {text-decoration:underline}
|
||||
.wp_themeSkin table.mceToolbar {margin: 0 2px 2px;}
|
||||
.wp_themeSkin #content_toolbar1 {margin-top: 2px;}
|
||||
.wp_themeSkin .mceToolbar .mceToolbarEndListBox span {display:none}
|
||||
.wp_themeSkin span.mceIcon, .wp_themeSkin img.mceIcon {display:block; width:20px; height:20px}
|
||||
.wp_themeSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px}
|
||||
|
||||
/* Button */
|
||||
.wp_themeSkin .mceButton {
|
||||
display:block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
cursor: default;
|
||||
padding: 1px 2px;
|
||||
margin: 1px;
|
||||
-moz-border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
-khtml-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
-webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15), inset 0 0 2px 1px #fff;
|
||||
-moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15), inset 0 0 2px 1px #fff;
|
||||
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15), inset 0 0 2px 1px #fff;
|
||||
}
|
||||
|
||||
.wp_themeSkin a.mceButtonEnabled:hover {
|
||||
background-image: inherit 0 -10px;
|
||||
}
|
||||
|
||||
.wp_themeSkin .mceOldBoxModel a.mceButton span, .wp_themeSkin .mceOldBoxModel a.mceButton img {margin:0 0 0 1px}
|
||||
|
||||
.wp_themeSkin a.mceButton:active,
|
||||
.wp_themeSkin a.mceButtonActive,
|
||||
.wp_themeSkin a.mceButtonActive:hover,
|
||||
.wp_themeSkin a.mceButtonSelected {
|
||||
-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15), inset 0 0 2px 1px #fff;
|
||||
-moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15), inset 0 0 2px 1px #fff;
|
||||
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15), inset 0 0 2px 1px #fff;
|
||||
}
|
||||
.wp_themeSkin .mceButtonDisabled .mceIcon {opacity:0.4; filter:alpha(opacity=40);}
|
||||
|
||||
/* Separator */
|
||||
.wp_themeSkin .mceSeparator {
|
||||
height: 24px;
|
||||
width: 1px;
|
||||
display: block;
|
||||
background: transparent;
|
||||
overflow: hidden;
|
||||
margin: 0 2px;
|
||||
}
|
||||
|
||||
/* ListBox */
|
||||
.wp_themeSkin .mceListBox, .wp_themeSkin .mceListBox a {display:block}
|
||||
.wp_themeSkin .mceListBox .mceText {
|
||||
padding: 1px 2px 1px 5px;
|
||||
text-align:left;
|
||||
text-decoration: none;
|
||||
width:70px;
|
||||
-moz-border-bottom-left-radius: 2px;
|
||||
-webkit-border-bottom-left-radius: 2px;
|
||||
-khtml-border-bottom-left-radius: 2px;
|
||||
border-bottom-left-radius: 2px;
|
||||
-moz-border-top-left-radius: 2px;
|
||||
-webkit-border-top-left-radius: 2px;
|
||||
-khtml-border-top-left-radius: 2px;
|
||||
border-top-left-radius: 2px;
|
||||
-webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15), inset 0 0 2px 1px #fff;
|
||||
-moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15), inset 0 0 2px 1px #fff;
|
||||
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15), inset 0 0 2px 1px #fff;
|
||||
font-family: Arial, "Bitstream Vera Sans", Helvetica, Verdana, sans-serif;
|
||||
font-size: 12px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.wp_themeSkin .mceListBox {
|
||||
margin: 1px;
|
||||
direction: ltr;
|
||||
}
|
||||
.wp_themeSkin .mceListBox .mceOpen {
|
||||
width: 14px;
|
||||
height: 20px;
|
||||
border-collapse: separate;
|
||||
padding: 1px;
|
||||
-moz-border-bottom-left-radius: 0;
|
||||
-webkit-border-bottom-left-radius: 0;
|
||||
-khtml-border-bottom-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
-moz-border-top-left-radius: 0;
|
||||
-webkit-border-top-left-radius: 0;
|
||||
-khtml-border-top-left-radius: 0;
|
||||
border-top-left-radius: 0;
|
||||
-webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15), inset 0 0 2px 1px #fff;
|
||||
-moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15), inset 0 0 2px 1px #fff;
|
||||
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15), inset 0 0 2px 1px #fff;
|
||||
}
|
||||
.wp_themeSkin .mceListBox .mceOpen span {
|
||||
display: block;
|
||||
width:14px;
|
||||
height:20px;
|
||||
background-image: url(img/down_arrow.gif);
|
||||
background-position: 2px 1px;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.wp_themeSkin table.mceListBoxEnabled:hover .mceText,
|
||||
.wp_themeSkin .mceListBoxHover .mceText,
|
||||
.wp_themeSkin .mceListBoxSelected .mceText,
|
||||
.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen,
|
||||
.wp_themeSkin .mceListBoxHover .mceOpen,
|
||||
.wp_themeSkin .mceListBoxSelected .mceOpen {
|
||||
background-image: none;
|
||||
}
|
||||
.wp_themeSkin .mceListBoxDisabled .mceText {color:gray}
|
||||
.wp_themeSkin .mceListBoxMenu {overflow:auto; overflow-x:hidden}
|
||||
.wp_themeSkin .mceOldBoxModel .mceListBox .mceText {height:22px}
|
||||
.wp_themeSkin select.mceListBox {
|
||||
font-family: Arial, "Bitstream Vera Sans", Helvetica, Verdana, sans-serif;
|
||||
font-size:12px;
|
||||
}
|
||||
|
||||
/* SplitButton */
|
||||
.wp_themeSkin .mceSplitButton a, .wp_themeSkin .mceSplitButton span {display:block; height:20px}
|
||||
.wp_themeSkin .mceSplitButton {
|
||||
display:block;
|
||||
margin: 1px;
|
||||
direction: ltr;
|
||||
}
|
||||
.wp_themeSkin table.mceSplitButton td {
|
||||
padding: 2px;
|
||||
-moz-border-bottom-left-radius: 0;
|
||||
-webkit-border-bottom-left-radius: 0;
|
||||
-khtml-border-bottom-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
-moz-border-top-left-radius: 0;
|
||||
-webkit-border-top-left-radius: 0;
|
||||
-khtml-border-top-left-radius: 0;
|
||||
border-top-left-radius: 0;
|
||||
}
|
||||
|
||||
.wp_themeSkin table.mceSplitButton td a {
|
||||
-webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15), inset 0 0 2px 1px #fff;
|
||||
-moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15), inset 0 0 2px 1px #fff;
|
||||
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15), inset 0 0 2px 1px #fff;
|
||||
}
|
||||
|
||||
.wp_themeSkin table.mceSplitButton:hover td {
|
||||
background-image: inherit 0 -10px;
|
||||
}
|
||||
|
||||
.wp_themeSkin .mceSplitButton a.mceAction {
|
||||
height:20px;
|
||||
width:20px;
|
||||
padding: 1px 2px;
|
||||
}
|
||||
.wp_themeSkin .mceSplitButton span.mceAction {
|
||||
background-image: url(../../img/icons.gif);
|
||||
background-repeat: no-repeat;
|
||||
background-color: transparent;
|
||||
width:20px;
|
||||
}
|
||||
.wp_themeSkin .mceSplitButton a.mceOpen {
|
||||
width:10px;
|
||||
height:20px;
|
||||
background-image: url(img/down_arrow.gif);
|
||||
background-position: 1px 2px;
|
||||
background-repeat: no-repeat;
|
||||
padding: 1px;
|
||||
border-left: 0 none !important;
|
||||
}
|
||||
.wp_themeSkin .mceSplitButton span.mceOpen {display:none}
|
||||
.wp_themeSkin .mceSplitButtonDisabled .mceAction {
|
||||
opacity:0.3; filter:alpha(opacity=30);
|
||||
}
|
||||
.wp_themeSkin .mceListBox a.mceText, .wp_themeSkin .mceSplitButton a.mceAction {
|
||||
-moz-border-radius-bottomleft: 3px;
|
||||
-webkit-border-bottom-left-radius: 3px;
|
||||
-khtml-border-bottom-left-radius: 3px;
|
||||
border-bottom-left-radius: 3px;
|
||||
-moz-border-radius-topleft: 3px;
|
||||
-webkit-border-top-left-radius: 3px;
|
||||
-khtml-border-top-left-radius: 3px;
|
||||
border-top-left-radius: 3px;
|
||||
}
|
||||
.wp_themeSkin .mceSplitButton a.mceOpen, .wp_themeSkin .mceListBox a.mceOpen {
|
||||
-moz-border-radius-bottomright: 3px;
|
||||
-webkit-border-bottom-right-radius: 3px;
|
||||
-khtml-border-bottom-right-radius: 3px;
|
||||
border-bottom-right-radius: 3px;
|
||||
-moz-border-radius-topright: 3px;
|
||||
-webkit-border-top-right-radius: 3px;
|
||||
-khtml-border-top-right-radius: 3px;
|
||||
border-top-right-radius: 3px;
|
||||
}
|
||||
|
||||
.wp_themeSkin span.mce_undo,
|
||||
.wp_themeSkin span.mce_redo,
|
||||
.wp_themeSkin span.mce_bullist,
|
||||
.wp_themeSkin span.mce_numlist,
|
||||
.wp_themeSkin span.mce_blockquote,
|
||||
.wp_themeSkin span.mce_charmap,
|
||||
.wp_themeSkin span.mce_bold,
|
||||
.wp_themeSkin span.mce_italic,
|
||||
.wp_themeSkin span.mce_underline,
|
||||
.wp_themeSkin span.mce_justifyleft,
|
||||
.wp_themeSkin span.mce_justifyright,
|
||||
.wp_themeSkin span.mce_justifycenter,
|
||||
.wp_themeSkin span.mce_justifyfull,
|
||||
.wp_themeSkin span.mce_indent,
|
||||
.wp_themeSkin span.mce_outdent,
|
||||
.wp_themeSkin span.mce_link,
|
||||
.wp_themeSkin span.mce_unlink,
|
||||
.wp_themeSkin span.mce_help,
|
||||
.wp_themeSkin span.mce_removeformat,
|
||||
.wp_themeSkin span.mce_fullscreen,
|
||||
.wp_themeSkin span.mce_media,
|
||||
.wp_themeSkin span.mce_pastetext,
|
||||
.wp_themeSkin span.mce_pasteword,
|
||||
.wp_themeSkin span.mce_wp_help,
|
||||
.wp_themeSkin span.mce_wp_adv,
|
||||
.wp_themeSkin span.mce_wp_more,
|
||||
.wp_themeSkin span.mce_strikethrough,
|
||||
.wp_themeSkin span.mce_spellchecker,
|
||||
.wp_themeSkin span.mce_forecolor,
|
||||
.wp_themeSkin .mce_forecolorpicker,
|
||||
.wp_themeSkin .mceSplitButton .mce_spellchecker span.mce_spellchecker,
|
||||
.wp_themeSkin .mceSplitButton .mce_forecolor span.mce_forecolor,
|
||||
.wp_themeSkin .mceSplitButton span.mce_numlist,
|
||||
.wp_themeSkin .mceSplitButton span.mce_bullist {
|
||||
background-image: url(../../img/wpicons.png);
|
||||
}
|
||||
|
||||
/* ColorSplitButton */
|
||||
.wp_themeSkin div.mceColorSplitMenu table {}
|
||||
.wp_themeSkin .mceColorSplitMenu td {padding:2px}
|
||||
.wp_themeSkin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden;}
|
||||
.wp_themeSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px}
|
||||
.wp_themeSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px;}
|
||||
.wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover {}
|
||||
.wp_themeSkin a.mceMoreColors:hover {}
|
||||
.wp_themeSkin .mceColorPreview {margin: -5px 0 0 2px; width:16px; height:4px; overflow:hidden}
|
||||
|
||||
/* Menu */
|
||||
.wp_themeSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000;}
|
||||
.wp_themeSkin .mceNoIcons span.mceIcon {width:0;}
|
||||
.wp_themeSkin .mceNoIcons a .mceText {padding-left:10px}
|
||||
.wp_themeSkin .mceMenu table {}
|
||||
.wp_themeSkin .mceMenu a, .wp_themeSkin .mceMenu span, .wp_themeSkin .mceMenu {display:block}
|
||||
.wp_themeSkin .mceMenu td {height:20px;overflow:hidden;}
|
||||
.wp_themeSkin .mceMenu a {
|
||||
position:relative;
|
||||
padding:3px 0 4px 0;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
.wp_themeSkin .mceMenu .mceText {
|
||||
position:relative;
|
||||
display:block;
|
||||
font-family:Tahoma,Verdana,Arial,Helvetica;
|
||||
cursor:default;
|
||||
margin:0;
|
||||
padding:0 25px;
|
||||
}
|
||||
.wp_themeSkin .mceMenu span.mceText, .wp_themeSkin .mceMenu .mcePreview {
|
||||
font-size: 12px;
|
||||
}
|
||||
.wp_themeSkin .mceMenu pre.mceText {font-family:Monospace}
|
||||
.wp_themeSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;}
|
||||
.wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover,
|
||||
.wp_themeSkin .mceMenu .mceMenuItemActive {}
|
||||
.wp_themeSkin td.mceMenuItemSeparator {height:1px}
|
||||
.wp_themeSkin .mceMenuItemTitle a {
|
||||
border-top: 0;
|
||||
border-right: 0;
|
||||
border-left: 0;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-width: 1px;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
.wp_themeSkin .mceMenuItemTitle span.mceText {font-weight:bold; padding-left:4px}
|
||||
.wp_themeSkin .mceMenuItemDisabled .mceText {}
|
||||
.wp_themeSkin .mceMenuItemSelected .mceIcon {background:url(../default/img/menu_check.gif)}
|
||||
.wp_themeSkin .mceNoIcons .mceMenuItemSelected a {background:url(../default/img/menu_arrow.gif) no-repeat -6px center}
|
||||
.wp_themeSkin .mceMenu span.mceMenuLine {display:none}
|
||||
.wp_themeSkin .mceMenuItemSub a {background:url(../default/img/menu_arrow.gif) no-repeat top right;}
|
||||
|
||||
/* Progress,Resize */
|
||||
.wp_themeSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; filter:alpha(opacity=50); background:#FFF}
|
||||
.wp_themeSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
|
||||
.wp_themeSkin .mcePlaceHolder {border:1px dotted gray}
|
||||
|
||||
/* Formats */
|
||||
.wp_themeSkin .mce_p span.mceText {}
|
||||
.wp_themeSkin .mce_address span.mceText {font-style:italic}
|
||||
.wp_themeSkin .mce_pre span.mceText {font-family:monospace}
|
||||
.wp_themeSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 17px}
|
||||
.wp_themeSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 16px}
|
||||
.wp_themeSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 15px}
|
||||
.wp_themeSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 14px}
|
||||
.wp_themeSkin .mce_h5 span.mceText {font-weight:bolder; font-size: 13px}
|
||||
.wp_themeSkin .mce_h6 span.mceText {font-weight:bolder; font-size: 12px}
|
||||
|
||||
/* Theme */
|
||||
.wp_themeSkin span.mce_undo {background-position: -500px -20px}
|
||||
.wp_themeSkin .mceButtonEnabled:hover span.mce_undo,
|
||||
.wp_themeSkin .mceButtonActive span.mce_undo {background-position:-500px 0}
|
||||
|
||||
.wp_themeSkin span.mce_redo {background-position:-480px -20px}
|
||||
.wp_themeSkin .mceButtonEnabled:hover span.mce_redo,
|
||||
.wp_themeSkin .mceButtonActive span.mce_redo {background-position:-480px 0}
|
||||
|
||||
.wp_themeSkin span.mce_bullist {background-position:-40px -20px}
|
||||
.wp_themeSkin .mceButtonEnabled:hover span.mce_bullist,
|
||||
.wp_themeSkin .mceButtonActive span.mce_bullist,
|
||||
.wp_themeSkin .mceSplitButton:hover span.mce_bullist {background-position:-40px 0}
|
||||
|
||||
.wp_themeSkin span.mce_numlist {background-position:-61px -20px}
|
||||
.wp_themeSkin .mceButtonEnabled:hover span.mce_numlist,
|
||||
.wp_themeSkin .mceButtonActive span.mce_numlist,
|
||||
.wp_themeSkin .mceSplitButton:hover span.mce_numlist {background-position:-61px 0}
|
||||
|
||||
.wp_themeSkin span.mce_blockquote {background-position:-80px -20px}
|
||||
.wp_themeSkin .mceButtonEnabled:hover span.mce_blockquote,
|
||||
.wp_themeSkin .mceButtonActive span.mce_blockquote {background-position:-80px 0}
|
||||
|
||||
.wp_themeSkin span.mce_charmap {background-position:-420px -20px}
|
||||
.wp_themeSkin .mceButtonEnabled:hover span.mce_charmap,
|
||||
.wp_themeSkin .mceButtonActive span.mce_charmap {background-position:-420px 0}
|
||||
|
||||
.wp_themeSkin span.mce_bold {background-position:-1px -20px}
|
||||
.wp_themeSkin .mceButtonEnabled:hover span.mce_bold,
|
||||
.wp_themeSkin .mceButtonActive span.mce_bold {background-position:-1px 0}
|
||||
|
||||
.wp_themeSkin span.mce_italic {background-position:-21px -20px}
|
||||
.wp_themeSkin .mceButtonEnabled:hover span.mce_italic,
|
||||
.wp_themeSkin .mceButtonActive span.mce_italic {background-position:-21px 0}
|
||||
|
||||
.wp_themeSkin span.mce_underline {background-position:-280px -19px}
|
||||
.wp_themeSkin .mceButtonEnabled:hover span.mce_underline,
|
||||
.wp_themeSkin .mceButtonActive span.mce_underline {background-position:-280px 1px}
|
||||
|
||||
.wp_themeSkin span.mce_justifyleft {background-position:-100px -19px}
|
||||
.wp_themeSkin .mceButtonEnabled:hover span.mce_justifyleft,
|
||||
.wp_themeSkin .mceButtonActive span.mce_justifyleft {background-position:-100px 1px}
|
||||
|
||||
.wp_themeSkin span.mce_justifyright {background-position:-141px -19px}
|
||||
.wp_themeSkin .mceButtonEnabled:hover span.mce_justifyright,
|
||||
.wp_themeSkin .mceButtonActive span.mce_justifyright {background-position:-141px 1px}
|
||||
|
||||
.wp_themeSkin span.mce_justifycenter {background-position:-120px -19px}
|
||||
.wp_themeSkin .mceButtonEnabled:hover span.mce_justifycenter,
|
||||
.wp_themeSkin .mceButtonActive span.mce_justifycenter {background-position:-120px 1px}
|
||||
|
||||
.wp_themeSkin span.mce_justifyfull {background-position:-300px -19px}
|
||||
.wp_themeSkin .mceButtonEnabled:hover span.mce_justifyfull,
|
||||
.wp_themeSkin .mceButtonActive span.mce_justifyfull {background-position:-300px 1px}
|
||||
|
||||
.wp_themeSkin span.mce_indent {background-position:-461px -19px}
|
||||
.wp_themeSkin .mceButtonEnabled:hover span.mce_indent,
|
||||
.wp_themeSkin .mceButtonActive span.mce_indent {background-position:-461px 1px}
|
||||
|
||||
.wp_themeSkin span.mce_outdent {background-position:-440px -19px}
|
||||
.wp_themeSkin .mceButtonEnabled:hover span.mce_outdent,
|
||||
.wp_themeSkin .mceButtonActive span.mce_outdent {background-position:-440px 1px}
|
||||
|
||||
.wp_themeSkin span.mce_link {background-position:-161px -20px}
|
||||
.wp_themeSkin .mceButtonEnabled:hover span.mce_link,
|
||||
.wp_themeSkin .mceButtonActive span.mce_link {background-position:-161px 0}
|
||||
|
||||
.wp_themeSkin span.mce_unlink {background-position:-180px -20px}
|
||||
.wp_themeSkin .mceButtonEnabled:hover span.mce_unlink,
|
||||
.wp_themeSkin .mceButtonActive span.mce_unlink {background-position:-180px 0}
|
||||
|
||||
.wp_themeSkin span.mce_help {background-position:-521px -20px}
|
||||
.wp_themeSkin .mceButtonEnabled:hover span.mce_help,
|
||||
.wp_themeSkin .mceButtonActive span.mce_help {background-position:-521px 0}
|
||||
|
||||
.wp_themeSkin span.mce_removeformat {background-position:-381px -20px}
|
||||
.wp_themeSkin .mceButtonEnabled:hover span.mce_removeformat,
|
||||
.wp_themeSkin .mceButtonActive span.mce_removeformat {background-position:-381px 0}
|
||||
|
||||
.wp_themeSkin span.mce_strikethrough {background-position:-540px -18px;}
|
||||
.wp_themeSkin .mceButtonEnabled:hover span.mce_strikethrough,
|
||||
.wp_themeSkin .mceButtonActive span.mce_strikethrough {background-position:-540px 0}
|
||||
|
||||
.wp_themeSkin .mceSplitButton .mce_forecolor span.mce_forecolor {background-position:-321px -22px}
|
||||
.wp_themeSkin .mceSplitButtonEnabled:hover span.mce_forecolor,
|
||||
.wp_themeSkin .mceSplitButtonActive span.mce_forecolor {background-position:-321px -2px}
|
||||
|
||||
.wp_themeSkin .mce_forecolorpicker {background-position:-320px -20px}
|
||||
|
||||
/* Plugins in WP */
|
||||
.wp_themeSkin span.mce_fullscreen {background-position:-240px -20px}
|
||||
.wp_themeSkin .mceButtonEnabled:hover span.mce_fullscreen,
|
||||
.wp_themeSkin .mceButtonActive span.mce_fullscreen {background-position:-240px 0}
|
||||
|
||||
.wp_themeSkin span.mce_media {background-position:-401px -20px}
|
||||
.wp_themeSkin .mceButtonEnabled:hover span.mce_media,
|
||||
.wp_themeSkin .mceButtonActive span.mce_media {background-position:-401px 0}
|
||||
|
||||
.wp_themeSkin span.mce_pastetext {background-position:-340px -20px}
|
||||
.wp_themeSkin .mceButtonEnabled:hover span.mce_pastetext,
|
||||
.wp_themeSkin .mceButtonActive span.mce_pastetext {background-position:-340px 0}
|
||||
|
||||
.wp_themeSkin span.mce_pasteword {background-position:-360px -20px}
|
||||
.wp_themeSkin .mceButtonEnabled:hover span.mce_pasteword,
|
||||
.wp_themeSkin .mceButtonActive span.mce_pasteword {background-position:-360px 0}
|
||||
|
||||
.wp_themeSkin span.mce_spellchecker {background-position:-220px -19px}
|
||||
.wp_themeSkin .mceButtonEnabled:hover span.mce_spellchecker,
|
||||
.wp_themeSkin .mceSplitButtonEnabled:hover span.mce_spellchecker,
|
||||
.wp_themeSkin .mceButtonActive span.mce_spellchecker,
|
||||
.wp_themeSkin .mceSplitButtonActive span.mce_spellchecker {background-position:-220px 1px}
|
||||
|
||||
.wp_themeSkin span.mce_wp_help {background-position:-521px -20px}
|
||||
.wp_themeSkin .mceButtonEnabled:hover span.mce_wp_help,
|
||||
.wp_themeSkin .mceButtonActive span.mce_wp_help {background-position:-521px 0}
|
||||
|
||||
.wp_themeSkin span.mce_wp_adv {background-position:-260px -20px}
|
||||
.wp_themeSkin .mceButtonEnabled:hover span.mce_wp_adv,
|
||||
.wp_themeSkin .mceButtonActive span.mce_wp_adv {background-position:-260px 0}
|
||||
|
||||
.wp_themeSkin span.mce_wp_more {background-position:-201px -20px}
|
||||
.wp_themeSkin .mceButtonEnabled:hover span.mce_wp_more,
|
||||
.wp_themeSkin .mceButtonActive span.mce_wp_more {background-position:-201px 0}
|
||||
|
||||
/* Default icons */
|
||||
.wp_themeSkin span.mce_cleanup {background-position:-380px -20px}
|
||||
.wp_themeSkin span.mce_anchor {background-position:-200px 0}
|
||||
.wp_themeSkin span.mce_sub {background-position:-600px 0}
|
||||
.wp_themeSkin span.mce_sup {background-position:-620px 0}
|
||||
.wp_themeSkin span.mce_newdocument {background-position:-520px 0}
|
||||
.wp_themeSkin span.mce_image {background-position:-380px 0}
|
||||
.wp_themeSkin span.mce_code {background-position:-260px 0}
|
||||
.wp_themeSkin span.mce_hr {background-position:-360px 0}
|
||||
.wp_themeSkin span.mce_visualaid {background-position:-660px 0}
|
||||
.wp_themeSkin span.mce_paste {background-position:-560px 0}
|
||||
.wp_themeSkin span.mce_copy {background-position:-700px 0}
|
||||
.wp_themeSkin span.mce_cut {background-position:-680px 0}
|
||||
.wp_themeSkin .mce_backcolor span.mceAction {background-position:-760px 0}
|
||||
.wp_themeSkin .mce_backcolorpicker {background-position:-760px 0}
|
||||
|
||||
|
||||
/* Plugins */
|
||||
.wp_themeSkin span.mce_advhr {background-position:-0px -20px}
|
||||
.wp_themeSkin span.mce_ltr {background-position:-20px -20px}
|
||||
.wp_themeSkin span.mce_rtl {background-position:-40px -20px}
|
||||
.wp_themeSkin span.mce_emotions {background-position:-60px -20px}
|
||||
.wp_themeSkin span.mce_fullpage {background-position:-80px -20px}
|
||||
.wp_themeSkin span.mce_iespell {background-position:-120px -20px}
|
||||
.wp_themeSkin span.mce_insertdate {background-position:-140px -20px}
|
||||
.wp_themeSkin span.mce_inserttime {background-position:-160px -20px}
|
||||
.wp_themeSkin span.mce_absolute {background-position:-180px -20px}
|
||||
.wp_themeSkin span.mce_backward {background-position:-200px -20px}
|
||||
.wp_themeSkin span.mce_forward {background-position:-220px -20px}
|
||||
.wp_themeSkin span.mce_insert_layer {background-position:-240px -20px}
|
||||
.wp_themeSkin span.mce_insertlayer {background-position:-260px -20px}
|
||||
.wp_themeSkin span.mce_movebackward {background-position:-280px -20px}
|
||||
.wp_themeSkin span.mce_moveforward {background-position:-300px -20px}
|
||||
.wp_themeSkin span.mce_nonbreaking {background-position:-340px -20px}
|
||||
.wp_themeSkin span.mce_selectall {background-position:-400px -20px}
|
||||
.wp_themeSkin span.mce_preview {background-position:-420px -20px}
|
||||
.wp_themeSkin span.mce_print {background-position:-440px -20px}
|
||||
.wp_themeSkin span.mce_cancel {background-position:-460px -20px}
|
||||
.wp_themeSkin span.mce_save {background-position:-480px -20px}
|
||||
.wp_themeSkin span.mce_replace {background-position:-500px -20px}
|
||||
.wp_themeSkin span.mce_search {background-position:-520px -20px}
|
||||
.wp_themeSkin span.mce_styleprops {background-position:-560px -20px}
|
||||
.wp_themeSkin span.mce_table {background-position:-580px -20px}
|
||||
.wp_themeSkin span.mce_cell_props {background-position:-600px -20px}
|
||||
.wp_themeSkin span.mce_delete_table {background-position:-620px -20px}
|
||||
.wp_themeSkin span.mce_delete_col {background-position:-640px -20px}
|
||||
.wp_themeSkin span.mce_delete_row {background-position:-660px -20px}
|
||||
.wp_themeSkin span.mce_col_after {background-position:-680px -20px}
|
||||
.wp_themeSkin span.mce_col_before {background-position:-700px -20px}
|
||||
.wp_themeSkin span.mce_row_after {background-position:-720px -20px}
|
||||
.wp_themeSkin span.mce_row_before {background-position:-740px -20px}
|
||||
.wp_themeSkin span.mce_merge_cells {background-position:-760px -20px}
|
||||
.wp_themeSkin span.mce_table_props {background-position:-980px -20px}
|
||||
.wp_themeSkin span.mce_row_props {background-position:-780px -20px}
|
||||
.wp_themeSkin span.mce_split_cells {background-position:-800px -20px}
|
||||
.wp_themeSkin span.mce_template {background-position:-820px -20px}
|
||||
.wp_themeSkin span.mce_visualchars {background-position:-840px -20px}
|
||||
.wp_themeSkin span.mce_abbr {background-position:-860px -20px}
|
||||
.wp_themeSkin span.mce_acronym {background-position:-880px -20px}
|
||||
.wp_themeSkin span.mce_attribs {background-position:-900px -20px}
|
||||
.wp_themeSkin span.mce_cite {background-position:-920px -20px}
|
||||
.wp_themeSkin span.mce_del {background-position:-940px -20px}
|
||||
.wp_themeSkin span.mce_ins {background-position:-960px -20px}
|
||||
.wp_themeSkin span.mce_pagebreak {background-position:0 -40px}
|
||||
|
||||
|
||||
/* border */
|
||||
.wp_themeSkin .mceExternalToolbar,
|
||||
.wp_themeSkin .mceButton,
|
||||
.wp_themeSkin a.mceButtonEnabled:hover,
|
||||
.wp_themeSkin a.mceButtonActive,
|
||||
.wp_themeSkin a.mceButtonSelected,
|
||||
.wp_themeSkin .mceListBox .mceText,
|
||||
.wp_themeSkin .mceListBox .mceOpen,
|
||||
.wp_themeSkin table.mceListBoxEnabled:hover .mceText,
|
||||
.wp_themeSkin .mceListBoxHover .mceText,
|
||||
.wp_themeSkin .mceListBoxSelected .mceText,
|
||||
.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen,
|
||||
.wp_themeSkin .mceListBoxHover .mceOpen,
|
||||
.wp_themeSkin .mceListBoxSelected .mceOpen,
|
||||
.wp_themeSkin select.mceListBox,
|
||||
.wp_themeSkin .mceSplitButton a.mceAction,
|
||||
.wp_themeSkin .mceSplitButton a.mceOpen,
|
||||
.wp_themeSkin .mceSplitButton a.mceOpen:hover,
|
||||
.wp_themeSkin .mceSplitButtonSelected a.mceOpen,
|
||||
.wp_themeSkin table.mceSplitButtonEnabled:hover a.mceAction,
|
||||
.wp_themeSkin .mceSplitButton a.mceAction:hover,
|
||||
.wp_themeSkin div.mceColorSplitMenu table,
|
||||
.wp_themeSkin .mceColorSplitMenu a,
|
||||
.wp_themeSkin .mceColorSplitMenu a.mceMoreColors,
|
||||
.wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover,
|
||||
.wp_themeSkin a.mceMoreColors:hover,
|
||||
.wp_themeSkin .mceMenu {
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
}
|
||||
/* not used but cannot prevent TinyMCE of loading it (for now) */
|
||||
|
@ -9,7 +9,7 @@ var wpLink;
|
||||
riverBottomThreshold: 5,
|
||||
keySensitivity: 100,
|
||||
lastSearch: '',
|
||||
textarea: function() { return edCanvas; },
|
||||
textarea: '',
|
||||
|
||||
init : function() {
|
||||
inputs.dialog = $('#wp-link');
|
||||
@ -49,12 +49,17 @@ var wpLink;
|
||||
wpLink.range = null;
|
||||
|
||||
if ( ! wpLink.isMCE() && document.selection ) {
|
||||
wpLink.textarea().focus();
|
||||
wpLink.textarea.focus();
|
||||
wpLink.range = document.selection.createRange();
|
||||
}
|
||||
},
|
||||
|
||||
open : function() {
|
||||
if ( !wpActiveEditor )
|
||||
return;
|
||||
|
||||
this.textarea = $('#'+wpActiveEditor).get(0);
|
||||
|
||||
// Initialize the dialog if necessary (html mode).
|
||||
if ( ! inputs.dialog.data('wpdialog') ) {
|
||||
inputs.dialog.wpdialog({
|
||||
@ -127,7 +132,7 @@ var wpLink;
|
||||
|
||||
onClose: function() {
|
||||
if ( ! wpLink.isMCE() ) {
|
||||
wpLink.textarea().focus();
|
||||
wpLink.textarea.focus();
|
||||
if ( wpLink.range ) {
|
||||
wpLink.range.moveToBookmark( wpLink.range.getBookmark() );
|
||||
wpLink.range.select();
|
||||
@ -152,7 +157,7 @@ var wpLink;
|
||||
|
||||
htmlUpdate : function() {
|
||||
var attrs, html, start, end, cursor,
|
||||
textarea = wpLink.textarea();
|
||||
textarea = wpLink.textarea;
|
||||
|
||||
if ( ! textarea )
|
||||
return;
|
1
wp-includes/js/wplink.js
Normal file
@ -37,10 +37,11 @@ require( ABSPATH . WPINC . '/class.wp-styles.php' );
|
||||
require( ABSPATH . WPINC . '/functions.wp-styles.php' );
|
||||
|
||||
/**
|
||||
* Set up WordPress scripts to load by default for Administration Screen.
|
||||
* Register all WordPress scripts.
|
||||
*
|
||||
* Localizes a few of the scripts.
|
||||
* $scripts->add_data( 'script-handle', 'group', 1 ); queues the script for the footer
|
||||
* Localizes some of them.
|
||||
* args order: $scripts->add( 'handle', 'url', 'dependencies', 'query-string', 1 );
|
||||
* when last arg === 1 queues the script for the footer
|
||||
*
|
||||
* @since 2.6.0
|
||||
*
|
||||
@ -83,9 +84,9 @@ function wp_default_scripts( &$scripts ) {
|
||||
|
||||
$scripts->add( 'colorpicker', "/wp-includes/js/colorpicker$suffix.js", array('prototype'), '3517m' );
|
||||
|
||||
$scripts->add( 'editor', "/wp-admin/js/editor$suffix.js", array('utils','jquery'), '20110411', 1 );
|
||||
$scripts->add( 'editor', "/wp-admin/js/editor$suffix.js", array('utils','jquery'), '20110802', 1 );
|
||||
|
||||
$scripts->add( 'wp-fullscreen', "/wp-admin/js/wp-fullscreen$suffix.js", array('jquery'), '20110704', 1 );
|
||||
$scripts->add( 'wp-fullscreen', "/wp-admin/js/wp-fullscreen$suffix.js", array('jquery'), '20110802', 1 );
|
||||
|
||||
$scripts->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6.1');
|
||||
|
||||
@ -233,7 +234,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
$scripts->add( 'admin-bar', "/wp-includes/js/admin-bar$suffix.js", false, '20110801' );
|
||||
$scripts->add_data( 'admin-bar', 'group', 1 );
|
||||
|
||||
$scripts->add( 'wplink', "/wp-includes/js/tinymce/plugins/wplink/js/wplink$suffix.js", array( 'jquery', 'wpdialogs' ), '20110727', 1 );
|
||||
$scripts->add( 'wplink', "/wp-includes/js/wplink$suffix.js", array( 'jquery', 'wpdialogs' ), '20110802', 1 );
|
||||
$scripts->add_script_data( 'wplink', 'wpLinkL10n', array(
|
||||
'title' => __('Insert/edit link'),
|
||||
'update' => __('Update'),
|
||||
@ -246,6 +247,10 @@ function wp_default_scripts( &$scripts ) {
|
||||
|
||||
$scripts->add( 'wpdialogs-popup', "/wp-includes/js/tinymce/plugins/wpdialogs/js/popup$suffix.js", array( 'wpdialogs' ), '20110421', 1 );
|
||||
|
||||
$scripts->add( 'word-count', "/wp-admin/js/word-count$suffix.js", array( 'jquery' ), '20110515', 1 );
|
||||
|
||||
$scripts->add( 'media-upload', "/wp-admin/js/media-upload$suffix.js", array( 'thickbox' ), '20110425', 1 );
|
||||
|
||||
if ( is_admin() ) {
|
||||
$scripts->add( 'ajaxcat', "/wp-admin/js/cat$suffix.js", array( 'wp-lists' ), '20090102' );
|
||||
$scripts->add_data( 'ajaxcat', 'group', 1 );
|
||||
@ -308,12 +313,8 @@ function wp_default_scripts( &$scripts ) {
|
||||
|
||||
$scripts->add( 'admin-gallery', "/wp-admin/js/gallery$suffix.js", array( 'jquery-ui-sortable' ), '20110414' );
|
||||
|
||||
$scripts->add( 'media-upload', "/wp-admin/js/media-upload$suffix.js", array( 'thickbox' ), '20110425', 1 );
|
||||
|
||||
$scripts->add( 'admin-widgets', "/wp-admin/js/widgets$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable' ), '20110601', 1 );
|
||||
|
||||
$scripts->add( 'word-count', "/wp-admin/js/word-count$suffix.js", array( 'jquery' ), '20110515', 1 );
|
||||
|
||||
$scripts->add( 'theme', "/wp-admin/js/theme$suffix.js", array( 'thickbox' ), '20110118', 1 );
|
||||
|
||||
$scripts->add( 'theme-preview', "/wp-admin/js/theme-preview$suffix.js", array( 'thickbox', 'jquery' ), '20100407', 1 );
|
||||
@ -434,7 +435,7 @@ function wp_default_styles( &$styles ) {
|
||||
$styles->add( 'nav-menu', "/wp-admin/css/nav-menu$suffix.css", array(), '20110611' );
|
||||
$styles->add( 'admin-bar', "/wp-includes/css/admin-bar$suffix.css", array(), '20110622' );
|
||||
$styles->add( 'wp-jquery-ui-dialog', "/wp-includes/css/jquery-ui-dialog$suffix.css", array(), '20101224' );
|
||||
$styles->add( 'wplink', "/wp-includes/js/tinymce/plugins/wplink/css/wplink$suffix.css", array(), '20101224' );
|
||||
$styles->add( 'editor-buttons', "/wp-includes/css/editor-buttons$suffix.css", array(), '20110802' );
|
||||
|
||||
foreach ( $rtl_styles as $rtl_style ) {
|
||||
$styles->add_data( $rtl_style, 'rtl', true );
|
||||
|