Collapse crazyhorse to trunk. Incoming! see #7552
git-svn-id: http://svn.automattic.com/wordpress/trunk@8691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
|
@ -182,7 +182,7 @@ case 'dim-comment' :
|
|||
if ( $_POST['new'] == $current )
|
||||
die('1');
|
||||
|
||||
if ( 'unapproved' == $current ) {
|
||||
if ( in_array( $current, array( 'unapproved', 'spam' ) ) ) {
|
||||
check_ajax_referer( "approve-comment_$id" );
|
||||
if ( wp_set_comment_status( $comment->comment_ID, 'approve' ) )
|
||||
die('1');
|
||||
|
@ -648,6 +648,11 @@ case 'sample-permalink':
|
|||
$slug = isset($_POST['new_slug'])? $_POST['new_slug'] : '';
|
||||
die(get_sample_permalink_html($post_id, $title, $slug));
|
||||
break;
|
||||
case 'meta-box-order':
|
||||
check_ajax_referer( 'meta-box-order' );
|
||||
update_user_option( $GLOBALS['current_user']->ID, "meta-box-order_$_POST[page]", $_POST['order'] );
|
||||
die('1');
|
||||
break;
|
||||
default :
|
||||
do_action( 'wp_ajax_' . $_POST['action'] );
|
||||
die('0');
|
||||
|
|
|
@ -5,7 +5,11 @@
|
|||
* @package WordPress
|
||||
* @subpackage Administration
|
||||
*/
|
||||
?>
|
||||
|
||||
if ( ! $fixed_bar ) { ?>
|
||||
<br class="clear" /></div><!-- wpbody-content -->
|
||||
<?php } ?>
|
||||
|
||||
</div><!-- wpbody -->
|
||||
</div><!-- wpcontent -->
|
||||
</div><!-- wpwrap -->
|
||||
|
|
|
@ -8,10 +8,6 @@
|
|||
|
||||
@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
|
||||
if (!isset($_GET["page"])) require_once('admin.php');
|
||||
if ( $editing ) {
|
||||
if ( user_can_richedit() )
|
||||
wp_enqueue_script( 'wp_tiny_mce' );
|
||||
}
|
||||
wp_enqueue_script( 'wp-gears' );
|
||||
|
||||
$min_width_pages = array( 'post.php', 'post-new.php', 'page.php', 'page-new.php', 'widgets.php', 'comment.php', 'link.php' );
|
||||
|
@ -33,6 +29,9 @@ if ( in_array( $the_current_page, $min_width_pages ) ) {
|
|||
add_filter( 'admin_body_class', 'add_minwidth' );
|
||||
}
|
||||
|
||||
$fixed_bar_pages = array( 'post.php', 'post-new.php', 'page.php', 'page-new.php' );
|
||||
if ( ! isset($fixed_bar) ) $fixed_bar = in_array( $the_current_page, $fixed_bar_pages ) ? true : false;
|
||||
|
||||
get_admin_page_title();
|
||||
|
||||
?>
|
||||
|
@ -143,3 +142,7 @@ if ( $parent_file == 'options-general.php' ) {
|
|||
}
|
||||
?>
|
||||
<div id="wpbody">
|
||||
|
||||
<?php if ( ! $fixed_bar ) { ?>
|
||||
<div id="wpbody-content">
|
||||
<?php } ?>
|
||||
|
|
|
@ -105,7 +105,7 @@ if (isset($plugin_page)) {
|
|||
include(ABSPATH . "wp-admin/import/$importer.php");
|
||||
}
|
||||
|
||||
$parent_file = 'edit.php';
|
||||
$parent_file = 'users.php';
|
||||
$submenu_file = 'import.php';
|
||||
$title = __('Import');
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ case 'editcomment' :
|
|||
$title = __('Edit Comment');
|
||||
|
||||
wp_enqueue_script('comment');
|
||||
$fixed_bar = true;
|
||||
|
||||
require_once('admin-header.php');
|
||||
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
#wpcontent, #wpbody {
|
||||
background-color: #14568A;
|
||||
}
|
||||
#wpbody-content {
|
||||
background-color: #fff;
|
||||
}
|
||||
a.page-numbers:hover {
|
||||
border-color: #999;
|
||||
}
|
||||
|
@ -11,7 +17,9 @@ body > #upload-menu {
|
|||
border-bottom-color: #fff;
|
||||
}
|
||||
|
||||
div#current-widgets, #postcustomstuff table, #your-profile fieldset, a.page-numbers, #rightnow, div.dashboard-widget, .widefat {
|
||||
div#current-widgets, #postcustomstuff table, #your-profile fieldset,
|
||||
a.page-numbers, #rightnow, div.dashboard-widget,
|
||||
#dashboard-widgets p.dashboard-widget-links, .widefat {
|
||||
border-color: #ccc;
|
||||
}
|
||||
|
||||
|
@ -27,25 +35,30 @@ div.dashboard-widget-submit, ul.widget-control-list div.widget-control-actions {
|
|||
border-top-color: #ccc;
|
||||
}
|
||||
|
||||
div.ui-tabs-panel {
|
||||
border-color: #F0F6FB;
|
||||
}
|
||||
|
||||
input.disabled, textarea.disabled {
|
||||
background-color: #ccc;
|
||||
}
|
||||
|
||||
#user_info a:hover, li.widget-list-control-item h4.widget-title a:hover, .submit a, #dashmenu a:hover, #footer a, #upload-menu li a.upload-tab-link, li.widget-list-control-item h4.widget-title a,
|
||||
#user_info a:hover, li.widget-list-control-item h4.widget-title a:hover,
|
||||
#dashmenu a:hover, #footer a, #upload-menu li a.upload-tab-link,
|
||||
li.widget-list-control-item h4.widget-title a,
|
||||
#dragHelper li.widget-list-control-item h4.widget-title a,
|
||||
#draghelper li.widget-list-control-item h4.widget-title a:visited, .login #backtoblog a:hover,
|
||||
#plugin-information .action-button a, #plugin-information .action-button a:hover, #plugin-information .action-button a:visited {
|
||||
#draghelper li.widget-list-control-item h4.widget-title a:visited,
|
||||
.login #backtoblog a:hover, #plugin-information .action-button a,
|
||||
#plugin-information .action-button a:hover, #plugin-information .action-button a:visited {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
ul#category-tabs li.ui-tabs-selected, li.widget-list-control-item, div.nav, .tablenav, .submitbox, h3.dashboard-widget-title, h3.dashboard-widget-title span, h3.dashboard-widget-title small, ul.view-switch li.current, .form-table tr, #poststuff h3, .login form, h3.info-box-title {
|
||||
li.widget-list-control-item, div.nav, .tablenav, #dashboard-widgets p.dashboard-widget-links,
|
||||
ul.view-switch li.current, .form-table tr, #poststuff h3,
|
||||
.login form, h3.info-box-title, #post-status-info {
|
||||
background-color: #cfebf7;
|
||||
}
|
||||
|
||||
div.ui-tabs-panel {
|
||||
border-color: #cfebf7;
|
||||
}
|
||||
|
||||
select {
|
||||
background-color: #fff;
|
||||
border-color: #ddd;
|
||||
|
@ -55,7 +68,9 @@ strong .post-com-count span {
|
|||
background-color: #2583ad;
|
||||
}
|
||||
|
||||
.button-secondary, #login form .submit input {
|
||||
#post-body ul#category-tabs li.ui-tabs-selected, .button-secondary,
|
||||
#quicktags, #login form .submit input, #post-search .button,
|
||||
#post-search-prep .button {
|
||||
background-color: #8ebddc !important;
|
||||
}
|
||||
|
||||
|
@ -133,14 +148,10 @@ ul#widget-list li.widget-list-item h4.widget-title {
|
|||
color: #d54e21;
|
||||
}
|
||||
|
||||
.howto, .nonessential, #sidemenu, #edit-slug-box, .form-input-tip, #dashboard_primary span.rss-date, .subsubsub, #dashboard_secondary div.dashboard-widget-content ul li a cite {
|
||||
.howto, .nonessential, #edit-slug-box, .form-input-tip, #dashboard_primary span.rss-date, .subsubsub, #dashboard_secondary div.dashboard-widget-content ul li a cite {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
#dashmenu a, #user_info a {
|
||||
color: #88b4d7;
|
||||
}
|
||||
|
||||
.media-item {
|
||||
border-bottom-color: #d0d0d0;
|
||||
}
|
||||
|
@ -197,22 +208,19 @@ ul#widget-list li.widget-list-item h4.widget-title {
|
|||
background-color: #999;
|
||||
}
|
||||
|
||||
.tablenav .button-secondary {
|
||||
border-color: #5396c5;
|
||||
}
|
||||
|
||||
.submit input:hover, .button:hover, #edit-slug-buttons a.save:hover {
|
||||
border-color: #535353;
|
||||
}
|
||||
|
||||
.submit input:hover, .button:hover, .button-secondary:hover, #wphead #viewsite a:hover, #submenu a.current, #submenu a:hover, .submitbox #previewview a:hover, #the-comment-list .comment a:hover, #rightnow a:hover, a:hover, .subsubsub a:hover, .subsubsub a.current:hover, #login form .submit input:hover, div.dashboard-widget-submit input:hover, #edit-slug-buttons a.save:hover, #media-upload a.del-link:hover {
|
||||
.submit input:hover, .button:hover, .button-secondary:hover, #wphead #viewsite a:hover,
|
||||
#adminmenu a:hover, #adminmenu ul.wp-submenu a:hover, #the-comment-list .comment a:hover,
|
||||
#rightnow a:hover, a:hover, .subsubsub a:hover, .subsubsub a.current:hover,
|
||||
#login form .submit input:hover, div.dashboard-widget-submit input:hover,
|
||||
#edit-slug-buttons a.save:hover, #media-upload a.delete:hover,
|
||||
#media-upload a.del-link:hover, .ui-tabs-nav a:hover {
|
||||
color: #d54e21;
|
||||
}
|
||||
|
||||
#adminmenu a:hover, #sidemenu a:hover, .ui-tabs-nav a:hover {
|
||||
color: #97c4d8;
|
||||
}
|
||||
|
||||
.button-secondary:hover, #login form .submit input:hover {
|
||||
border-color: #328ab2;
|
||||
background-color: #a6d2e5 !important;
|
||||
|
@ -283,6 +291,14 @@ ul#widget-list li.widget-list-item h4.widget-title {
|
|||
color: #d7d7d7;
|
||||
}
|
||||
|
||||
h3.dashboard-widget-title small a {
|
||||
color: #d7d7d7;
|
||||
}
|
||||
|
||||
h3.dashboard-widget-title small a:hover {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.widget-control-save, .widget-control-remove {
|
||||
background-color: #83b4d5;
|
||||
color: #246;
|
||||
|
@ -301,11 +317,8 @@ ul#widget-list li.widget-list-item h4.widget-title {
|
|||
color: #cfebf6;
|
||||
}
|
||||
|
||||
#submenu a {
|
||||
color: #2782af
|
||||
}
|
||||
/* Because we don't want visited on these links */
|
||||
#adminmenu a.current, #sidemenu a.current, body.press-this .ui-tabs-selected a, body.press-this .ui-tabs-selected a:hover {
|
||||
#adminmenu li.current a, #sidemenu a.current, body.press-this .ui-tabs-selected a, body.press-this .ui-tabs-selected a:hover {
|
||||
background-color: #fff;
|
||||
border-color: #07273e;
|
||||
border-bottom-color: #fff;
|
||||
|
@ -313,7 +326,12 @@ ul#widget-list li.widget-list-item h4.widget-title {
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
#adminmenu li a #awaiting-mod, #sidemenu li a #update-plugins {
|
||||
#adminmenu li.current {
|
||||
background-color: #fff;
|
||||
border-right-color: #fff;
|
||||
}
|
||||
|
||||
#adminmenu li a #awaiting-mod {
|
||||
background-image: url(../images/comment-stalk-classic.gif);
|
||||
}
|
||||
|
||||
|
@ -332,7 +350,7 @@ ul#widget-list li.widget-list-item h4.widget-title {
|
|||
background-color: #07273E;
|
||||
}
|
||||
|
||||
#adminmenu, div#media-upload-header, div#plugin-information-header {
|
||||
div#media-upload-header, div#plugin-information-header {
|
||||
background-color: #14568a;
|
||||
border-bottom-color: #07273e;
|
||||
}
|
||||
|
@ -353,11 +371,6 @@ input.readonly {
|
|||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#dashmenu a.current {
|
||||
background-color: #14568a;
|
||||
color: #cfebf6;
|
||||
}
|
||||
|
||||
#dragHelper h4.widget-title, li.widget-list-control-item h4, #dragHelper li.widget-list-control-item h4 {
|
||||
background-color: #2683ae;
|
||||
color: #fff;
|
||||
|
@ -432,8 +445,12 @@ input.readonly {
|
|||
background-color: #fff;
|
||||
}
|
||||
|
||||
#poststuff #editor-toolbar .active {
|
||||
#poststuff #editor-toolbar {
|
||||
background-color: #83b4d5;
|
||||
}
|
||||
|
||||
#poststuff #editor-toolbar .active {
|
||||
background-color: #CFEBF7;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
|
@ -465,13 +482,6 @@ input.readonly {
|
|||
color: #448abd;
|
||||
}
|
||||
|
||||
#sidemenu a {
|
||||
background-color: #14568a;
|
||||
border-bottom-color: #07273e;
|
||||
border-top-color: #14568a;
|
||||
color: #cfebf6;
|
||||
}
|
||||
|
||||
#tagchecklist span a {
|
||||
background: url(../images/xit.gif) no-repeat;
|
||||
}
|
||||
|
@ -544,10 +554,18 @@ input.readonly {
|
|||
color: #07273e;
|
||||
}
|
||||
|
||||
#wphead h1, #dashmenu a.current:hover {
|
||||
#wphead h1, #wphead h1 a, #login form input {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
#wphead h1 {
|
||||
color: #cfebf6;
|
||||
}
|
||||
|
||||
#media-upload a.delete {
|
||||
color: #888;
|
||||
}
|
||||
|
||||
div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover, .delete:hover {
|
||||
color: #f00;
|
||||
}
|
||||
|
@ -715,6 +733,10 @@ div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover
|
|||
color: #333;
|
||||
}
|
||||
|
||||
#att-info {
|
||||
background-color: #E4F2FD;
|
||||
}
|
||||
|
||||
/* Diff */
|
||||
|
||||
table.diff .diff-deletedline {
|
||||
|
@ -729,3 +751,15 @@ table.diff .diff-addedline {
|
|||
table.diff .diff-addedline ins {
|
||||
background-color: #99ff99;
|
||||
}
|
||||
|
||||
/* media popup 0819 */
|
||||
#sidemenu a {
|
||||
background-color: #14568a;
|
||||
border-bottom-color: #07273e;
|
||||
border-top-color: #14568a;
|
||||
color: #CFEBF6;
|
||||
}
|
||||
|
||||
.submitbox .submitdelete {
|
||||
color: #fff;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
#wpcontent, #wpbody {
|
||||
background-color: #e4f2fd;
|
||||
}
|
||||
#wpbody-content {
|
||||
background-color: #fff;
|
||||
}
|
||||
a.page-numbers:hover {
|
||||
border-color: #999;
|
||||
}
|
||||
|
@ -11,7 +17,9 @@ body > #upload-menu {
|
|||
border-bottom-color: #fff;
|
||||
}
|
||||
|
||||
div#current-widgets, #postcustomstuff table, #your-profile fieldset, a.page-numbers, #rightnow, div.dashboard-widget, .widefat {
|
||||
div#current-widgets, #postcustomstuff table, #your-profile fieldset,
|
||||
a.page-numbers, #rightnow, div.dashboard-widget,
|
||||
#dashboard-widgets p.dashboard-widget-links, .widefat {
|
||||
border-color: #ccc;
|
||||
}
|
||||
|
||||
|
@ -35,14 +43,19 @@ input.disabled, textarea.disabled {
|
|||
background-color: #ccc;
|
||||
}
|
||||
|
||||
#user_info a:hover, li.widget-list-control-item h4.widget-title a:hover, .submit a, #dashmenu a:hover, #footer a, #upload-menu li a.upload-tab-link, li.widget-list-control-item h4.widget-title a,
|
||||
#user_info a:hover, li.widget-list-control-item h4.widget-title a:hover,
|
||||
#dashmenu a:hover, #footer a, #upload-menu li a.upload-tab-link,
|
||||
li.widget-list-control-item h4.widget-title a,
|
||||
#dragHelper li.widget-list-control-item h4.widget-title a,
|
||||
#draghelper li.widget-list-control-item h4.widget-title a:visited, .login #backtoblog a:hover,
|
||||
#plugin-information .action-button a, #plugin-information .action-button a:hover, #plugin-information .action-button a:visited {
|
||||
#draghelper li.widget-list-control-item h4.widget-title a:visited,
|
||||
.login #backtoblog a:hover, #plugin-information .action-button a,
|
||||
#plugin-information .action-button a:hover, #plugin-information .action-button a:visited {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
li.widget-list-control-item, div.nav, .tablenav, .submitbox, h3.dashboard-widget-title, h3.dashboard-widget-title span, h3.dashboard-widget-title small, ul.view-switch li.current, .form-table tr, #poststuff h3, .login form, h3.info-box-title {
|
||||
li.widget-list-control-item, div.nav, .tablenav, #dashboard-widgets p.dashboard-widget-links,
|
||||
ul.view-switch li.current, .form-table tr, #poststuff h3,
|
||||
.login form, h3.info-box-title, #post-status-info {
|
||||
background-color: #eaf3fa;
|
||||
}
|
||||
|
||||
|
@ -55,7 +68,9 @@ strong .post-com-count span {
|
|||
background-color: #2583ad;
|
||||
}
|
||||
|
||||
ul#category-tabs li.ui-tabs-selected, .button-secondary, #quicktags, #login form .submit input {
|
||||
#post-body ul#category-tabs li.ui-tabs-selected, .button-secondary,
|
||||
#quicktags, #login form .submit input, #post-search .button,
|
||||
#post-search-prep .button {
|
||||
background-color: #cee1ef !important;
|
||||
}
|
||||
|
||||
|
@ -120,7 +135,7 @@ ul#widget-list li.widget-list-item h4.widget-title {
|
|||
border-color: #c00 !important;
|
||||
}
|
||||
|
||||
.form-table input, .form-table textarea {
|
||||
.form-table input, .form-table textarea, #post-search-input {
|
||||
border-color: #c6d9e9;
|
||||
}
|
||||
|
||||
|
@ -133,7 +148,7 @@ ul#widget-list li.widget-list-item h4.widget-title {
|
|||
color: #d54e21;
|
||||
}
|
||||
|
||||
#user_info, .howto, .nonessential, #dashmenu a, #sidemenu, #edit-slug-box, .form-input-tip, #dashboard_primary span.rss-date, .subsubsub, #dashboard_secondary div.dashboard-widget-content ul li a cite {
|
||||
#user_info, .howto, .nonessential, #dashmenu a, #edit-slug-box, .form-input-tip, #dashboard_primary span.rss-date, .subsubsub, #dashboard_secondary div.dashboard-widget-content ul li a cite {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
|
@ -197,7 +212,12 @@ ul#widget-list li.widget-list-item h4.widget-title {
|
|||
border-color: #535353;
|
||||
}
|
||||
|
||||
.submit input:hover, .button:hover, .button-secondary:hover, #wphead #viewsite a:hover, #adminmenu a:hover, #sidemenu a:hover, #submenu a.current, #submenu a:hover, .submitbox #previewview a:hover, #the-comment-list .comment a:hover, #rightnow a:hover, a:hover, .subsubsub a:hover, .subsubsub a.current:hover, #login form .submit input:hover, div.dashboard-widget-submit input:hover, #edit-slug-buttons a.save:hover, #media-upload a.delete:hover, #media-upload a.del-link:hover, .ui-tabs-nav a:hover {
|
||||
.submit input:hover, .button:hover, .button-secondary:hover, #wphead #viewsite a:hover,
|
||||
#adminmenu a:hover, #adminmenu ul.wp-submenu a:hover, #the-comment-list .comment a:hover,
|
||||
#rightnow a:hover, a:hover, .subsubsub a:hover, .subsubsub a.current:hover,
|
||||
#login form .submit input:hover, div.dashboard-widget-submit input:hover,
|
||||
#edit-slug-buttons a.save:hover, #media-upload a.delete:hover,
|
||||
#media-upload a.del-link:hover, .ui-tabs-nav a:hover {
|
||||
color: #d54e21;
|
||||
}
|
||||
|
||||
|
@ -205,15 +225,11 @@ ul#widget-list li.widget-list-item h4.widget-title {
|
|||
border-color: #328ab2;
|
||||
}
|
||||
|
||||
.submitbox #autosave .error, ul.view-switch li.current a {
|
||||
ul.view-switch li.current a {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.submitbox #previewview {
|
||||
background-color: #2683ae;
|
||||
}
|
||||
|
||||
.submitbox #previewview a, #rightnow .rbutton {
|
||||
#rightnow .rbutton {
|
||||
background-color: #ebebeb;
|
||||
color: #264761;
|
||||
}
|
||||
|
@ -265,11 +281,19 @@ ul#widget-list li.widget-list-item h4.widget-title {
|
|||
border-bottom-color: #ccc;
|
||||
}
|
||||
|
||||
.widefat thead, .thead {
|
||||
.widefat thead, .thead, h3.dashboard-widget-title, h3.dashboard-widget-title span, h3.dashboard-widget-title small {
|
||||
background-color: #464646;
|
||||
color: #d7d7d7;
|
||||
}
|
||||
|
||||
h3.dashboard-widget-title small a {
|
||||
color: #d7d7d7;
|
||||
}
|
||||
|
||||
h3.dashboard-widget-title small a:hover {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.widget-control-save, .widget-control-remove {
|
||||
background-color: #cee1ef;
|
||||
color: #246;
|
||||
|
@ -280,19 +304,29 @@ ul#widget-list li.widget-list-item h4.widget-title {
|
|||
color: #666;
|
||||
}
|
||||
|
||||
#adminmenu a, #submenu a, #poststuff #edButtonPreview, #poststuff #edButtonHTML, #the-comment-list p.comment-author strong a, #media-upload a.del-link, #media-upload a.delete, .ui-tabs-nav a, a {
|
||||
#adminmenu li.wp-has-submenu a {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#adminmenu a, #adminmenu ul.wp-submenu a, #poststuff #edButtonPreview, #poststuff #edButtonHTML, #the-comment-list p.comment-author strong a, #media-upload a.del-link, #media-upload a.delete, .ui-tabs-nav a, a {
|
||||
color: #2583ad;
|
||||
}
|
||||
|
||||
/* Because we don't want visited on these links */
|
||||
#adminmenu a.current, #sidemenu a.current, body.press-this .ui-tabs-selected a, body.press-this .ui-tabs-selected a:hover {
|
||||
#adminmenu li.current a, #sidemenu a.current, body.press-this .ui-tabs-selected a, body.press-this .ui-tabs-selected a:hover {
|
||||
background-color: #fff;
|
||||
border-color: #c6d9e9;
|
||||
border-bottom-color: #fff;
|
||||
color: #d54e21;
|
||||
}
|
||||
|
||||
#adminmenu li a #awaiting-mod, #sidemenu li a #update-plugins {
|
||||
#adminmenu li.current {
|
||||
background-color: #fff;
|
||||
border-color: #c6d9e9;
|
||||
border-right-color: #fff;
|
||||
}
|
||||
|
||||
#adminmenu li a #awaiting-mod {
|
||||
background-image: url(../images/comment-stalk-fresh.gif);
|
||||
}
|
||||
|
||||
|
@ -305,7 +339,7 @@ ul#widget-list li.widget-list-item h4.widget-title {
|
|||
background-color: #264761;
|
||||
}
|
||||
|
||||
#adminmenu, div#media-upload-header, div#plugin-information-header {
|
||||
div#media-upload-header, div#plugin-information-header {
|
||||
background-color: #e4f2fd;
|
||||
border-bottom-color: #c6d9e9;
|
||||
}
|
||||
|
@ -326,11 +360,6 @@ input.readonly {
|
|||
background-color: #ddd;
|
||||
}
|
||||
|
||||
#dashmenu a.current {
|
||||
background-color: #e4f2fd;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
#dragHelper h4.widget-title, li.widget-list-control-item h4, #dragHelper li.widget-list-control-item h4 {
|
||||
background-color: #2683ae;
|
||||
color: #fff;
|
||||
|
@ -401,8 +430,12 @@ input.readonly {
|
|||
background-color: #fff;
|
||||
}
|
||||
|
||||
#poststuff #editor-toolbar .active {
|
||||
#poststuff #editor-toolbar {
|
||||
background-color: #cee1ef;
|
||||
}
|
||||
|
||||
#poststuff #editor-toolbar .active {
|
||||
background-color: #EAF3FA;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
|
@ -434,12 +467,6 @@ input.readonly {
|
|||
color: #448abd;
|
||||
}
|
||||
|
||||
#sidemenu a {
|
||||
background-color: #e4f2fd;
|
||||
border-bottom-color: #c6d9e9;
|
||||
border-top-color: #e4f2fd;
|
||||
}
|
||||
|
||||
#tagchecklist span a {
|
||||
background: url(../images/xit.gif) no-repeat;
|
||||
}
|
||||
|
@ -490,7 +517,7 @@ input.readonly {
|
|||
border-top-color: #247fab;
|
||||
}
|
||||
|
||||
.login #backtoblog a, .curtime, #user_info a {
|
||||
.login #backtoblog a, #curtime, #user_info a, #dashmenu a {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
|
@ -512,10 +539,14 @@ input.readonly {
|
|||
border-color: #328ab2;
|
||||
}
|
||||
|
||||
#wphead h1, #dashmenu a.current:hover, #login form input {
|
||||
#wphead h1, #wphead h1 a, #login form input {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
#wphead h1 a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover, .delete:hover {
|
||||
color: #f00;
|
||||
}
|
||||
|
@ -674,7 +705,7 @@ div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover
|
|||
border-color: #464646;
|
||||
}
|
||||
|
||||
#editorcontainer {
|
||||
#editorcontainer, #post-status-info {
|
||||
border-color: #ccc;
|
||||
}
|
||||
|
||||
|
@ -682,7 +713,7 @@ div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover
|
|||
border-color: #ccc;
|
||||
}
|
||||
|
||||
.curtime {
|
||||
#curtime {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
|
@ -705,3 +736,55 @@ table.diff .diff-addedline {
|
|||
table.diff .diff-addedline ins {
|
||||
background-color: #99ff99;
|
||||
}
|
||||
|
||||
#adminmenu,
|
||||
#att-info {
|
||||
background-color: #E4F2FD;
|
||||
}
|
||||
|
||||
|
||||
/* fixed tool bar */
|
||||
#fixedbar {
|
||||
background-color:#464646;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
#html-upload-help {
|
||||
color: #328AB2;
|
||||
}
|
||||
|
||||
#fixedbar #last-edit {
|
||||
|
||||
}
|
||||
|
||||
#fixedbar a,
|
||||
#fixedbar #curtime {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
#fixedbar a:hover {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#fixedbar a.button {
|
||||
color: #246;
|
||||
}
|
||||
|
||||
#fixedbar a.button:hover {
|
||||
color: #d54e21;
|
||||
}
|
||||
|
||||
#timestampdiv {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
/* media popup 0819 */
|
||||
#sidemenu a {
|
||||
background-color: #e4f2fd;
|
||||
border-bottom-color: #c6d9e9;
|
||||
border-top-color: #e4f2fd;
|
||||
}
|
||||
|
||||
.submitbox .submitdelete {
|
||||
color: #fff;
|
||||
}
|
||||
|
|
|
@ -1,64 +1,38 @@
|
|||
/* Right Now */
|
||||
|
||||
#rightnow {
|
||||
border-width: 1px;
|
||||
form .input-text-wrap {
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
padding: 2px 3px;
|
||||
border-color: #CCCCCC;
|
||||
}
|
||||
|
||||
form .input-text-wrap input {
|
||||
border: 0pt none;
|
||||
outline-color: -moz-use-text-color;
|
||||
outline-style: none;
|
||||
outline-width: medium;
|
||||
padding: 0pt;
|
||||
width: 99%;
|
||||
border-style: solid;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
form .textarea-wrap {
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
padding: 2px;
|
||||
margin-top: 10px;
|
||||
margin-right: 7px;
|
||||
border-color: #CCCCCC;
|
||||
}
|
||||
|
||||
#rightnow .reallynow {
|
||||
padding: 6px;
|
||||
font-size: 15px;
|
||||
line-height: 2;
|
||||
margin: 0;
|
||||
form .textarea-wrap textarea {
|
||||
border: 0pt none;
|
||||
padding: 0;
|
||||
width: 99%;
|
||||
}
|
||||
|
||||
#rightnow .rbutton {
|
||||
font-weight: normal;
|
||||
padding: 6px;
|
||||
border-bottom: none;
|
||||
-moz-border-radius: 2px;
|
||||
-khtml-border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#rightnow .reallynow span {
|
||||
display: block;
|
||||
text-align: left;
|
||||
float: left;
|
||||
padding: 0 6px;
|
||||
}
|
||||
|
||||
#rightnow .reallynow a {
|
||||
display: block;
|
||||
text-align: right;
|
||||
float: right;
|
||||
padding: 0 6px;
|
||||
font-size: 14px;
|
||||
margin: 1px 6px 0 0;
|
||||
}
|
||||
|
||||
#rightnow .youhave {
|
||||
font-size: 14px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
#rightnow h3, #rightnow p {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
#rightnow a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Widgets */
|
||||
|
||||
div#dashboard-widgets-wrap {
|
||||
margin-top: -20px;
|
||||
margin-right: -13px; /* 20 (div.dashboard-widget margin-right) - 7 (#rightnow margin-right) */
|
||||
}
|
||||
|
||||
|
@ -86,7 +60,7 @@ div.dashboard-widget-holder.full {
|
|||
|
||||
div.dashboard-widget-holder.double div.dashboard-widget {
|
||||
height: 54em;
|
||||
padding-bottom: 28px /* lame */
|
||||
padding-bottom: 28px /* lame */
|
||||
}
|
||||
|
||||
div.dashboard-widget {
|
||||
|
@ -94,14 +68,24 @@ div.dashboard-widget {
|
|||
margin-right: 20px;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
padding: 2px;
|
||||
height: 27em;
|
||||
overflow: auto;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#dashboard-widgets p.dashboard-widget-links {
|
||||
padding: 2px;
|
||||
font-size: 11px;
|
||||
line-height: 2;
|
||||
border-width: 1px;
|
||||
margin: 0 20px 0 0;
|
||||
padding: 0 7px;
|
||||
border: 1px solid;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
h3.dashboard-widget-title {
|
||||
margin: 0;
|
||||
margin: 2px;
|
||||
padding: 0 7px;
|
||||
font-size: 14px;
|
||||
line-height: 2;
|
||||
|
@ -121,9 +105,8 @@ h3.dashboard-widget-title small {
|
|||
line-height: 2.67; /* math: it works, bitches */
|
||||
}
|
||||
|
||||
h3.dashboard-widget-title img.rss-icon {
|
||||
p.dashboard-widget-links img.rss-icon {
|
||||
vertical-align: middle;
|
||||
margin: .5em 0;
|
||||
}
|
||||
|
||||
div.dashboard-widget-notice {
|
||||
|
@ -278,5 +261,40 @@ div.dashboard-widget-content p.comment-meta {
|
|||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
.widget-loading {
|
||||
#dashboard_inbox div.dashboard-widget, #dashboard_quick_press div.dashboard-widget {
|
||||
height: 35em;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
#dashboard_quick_press div.dashboard-widget-content {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
#dashboard_inbox p.actions {
|
||||
margin-bottom:0pt;
|
||||
margin-top: 0;
|
||||
float:left;
|
||||
}
|
||||
|
||||
#dashboard_quick_press h3 {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
#dashboard_quick_press h3#quick-post-title {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
#dashboard_quick_press p.field-tip {
|
||||
margin-top: 0;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
#dashboard_quick_press .submit {
|
||||
padding: 0 0 1em 0;
|
||||
border-top: none;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
#dashboard_quick_press p#recent-drafts {
|
||||
margin: 0;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,48 @@
|
|||
/* styles for use by people extending the WordPress interface */
|
||||
/* 2 column liquid layout */
|
||||
div#wpbody {
|
||||
float: right;
|
||||
clear: right;
|
||||
width: 100%;
|
||||
margin-left: -185px;
|
||||
}
|
||||
|
||||
div#wpbody-content {
|
||||
margin-left: 175px;
|
||||
border-width: 1px 0 0 1px;
|
||||
border-style: solid;
|
||||
border-color: #c6d9e9;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
ul#adminmenu {
|
||||
float: left;
|
||||
clear: left;
|
||||
width: 165px; /* + 10 padding */
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* inner 2 column liquid layout */
|
||||
|
||||
.inner-sidebar {
|
||||
float: right;
|
||||
clear: right;
|
||||
width: 220px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.has-sidebar {
|
||||
float: left;
|
||||
clear: left;
|
||||
width: 100%;
|
||||
margin-right: -240px;
|
||||
}
|
||||
|
||||
.has-sidebar .has-sidebar-content {
|
||||
margin-right: 245px;
|
||||
}
|
||||
|
||||
|
||||
/* styles for use by people extending the WordPress interface */
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
|
@ -91,6 +134,11 @@ h6 {
|
|||
|
||||
.subsubsub li { display: inline; margin: 0; padding: 0; }
|
||||
|
||||
/* make it small? */
|
||||
.subsubsub li.spam {
|
||||
font-size: .9em;
|
||||
}
|
||||
|
||||
.widefat {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
|
@ -151,19 +199,19 @@ th.check-column + th, th.check-column + td {
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
#wpbody .wrap {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.wrap, .updated, .error {
|
||||
margin: 0;
|
||||
margin-left: 15px;
|
||||
margin-right: 15px;
|
||||
margin: 0 15px;
|
||||
padding: 0;
|
||||
max-width: 980px;
|
||||
}
|
||||
|
||||
.updated, .error {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
padding: 0 0.6em;
|
||||
max-width: 950px;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
|
@ -189,7 +237,7 @@ th.check-column + th, th.check-column + td {
|
|||
border-bottom-style: solid;
|
||||
clear: both;
|
||||
font: 24px Georgia, "Times New Roman", Times, serif;
|
||||
margin: 5px 0 0 -4px;
|
||||
margin: 5px 0 10px -4px;
|
||||
padding: 0;
|
||||
padding-bottom: 7px;
|
||||
padding-right: 280px;
|
||||
|
|
|
@ -21,6 +21,8 @@ $messages[1] = sprintf( __( 'Post updated. Continue editing below or <a href="%s
|
|||
$messages[2] = __('Custom field updated.');
|
||||
$messages[3] = __('Custom field deleted.');
|
||||
$messages[4] = __('Post updated.');
|
||||
$messages[6] = __('Post published.');
|
||||
$messages[7] = __('Post saved.');
|
||||
|
||||
if ( isset($_GET['revision']) )
|
||||
$messages[5] = sprintf( __('Post restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) );
|
||||
|
@ -52,59 +54,23 @@ if ( 0 == $post_ID ) {
|
|||
}
|
||||
|
||||
?>
|
||||
<?php if ( $notice ) : ?>
|
||||
<div id="notice" class="error"><p><?php echo $notice ?></p></div>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($_GET['message'])) : ?>
|
||||
<div id="message" class="updated fade"><p><?php echo $messages[$_GET['message']]; ?></p></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form name="post" action="post.php" method="post" id="post">
|
||||
<?php if ( (isset($mode) && 'bookmarklet' == $mode) || isset($_GET['popupurl']) ): ?>
|
||||
<input type="hidden" name="mode" value="bookmarklet" />
|
||||
<?php endif; ?>
|
||||
<div id="wpbody-content">
|
||||
|
||||
|
||||
<div class="wrap">
|
||||
<h2><?php _e('Write Post') ?></h2>
|
||||
<?php
|
||||
|
||||
if ( 0 == $post_ID)
|
||||
wp_nonce_field('add-post');
|
||||
else
|
||||
wp_nonce_field('update-post_' . $post_ID);
|
||||
|
||||
$form_pingback = '<input type="hidden" name="post_pingback" value="' . (int) get_option('default_pingback_flag') . '" id="post_pingback" />';
|
||||
|
||||
$form_prevstatus = '<input type="hidden" name="prev_status" value="' . attribute_escape( $post->post_status ) . '" />';
|
||||
|
||||
$saveasdraft = '<input name="save" type="submit" id="save" class="button" tabindex="3" value="' . attribute_escape( __('Save and Continue Editing') ) . '" />';
|
||||
// All meta boxes should be defined and added before the first do_meta_boxes() call (or potentially during the do_meta_boxes action).
|
||||
|
||||
function post_submit_meta_box($post) {
|
||||
global $action;
|
||||
?>
|
||||
|
||||
<input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_ID ?>" />
|
||||
<input type="hidden" id="hiddenaction" name="action" value="<?php echo $form_action ?>" />
|
||||
<input type="hidden" id="originalaction" name="originalaction" value="<?php echo $form_action ?>" />
|
||||
<input type="hidden" id="post_author" name="post_author" value="<?php echo attribute_escape( $post->post_author ); ?>" />
|
||||
<input type="hidden" id="post_type" name="post_type" value="<?php echo $post->post_type ?>" />
|
||||
<input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo $post->post_status ?>" />
|
||||
<input name="referredby" type="hidden" id="referredby" value="<?php echo clean_url(stripslashes(wp_get_referer())); ?>" />
|
||||
<?php if ( 'draft' != $post->post_status ) wp_original_referer_field(true, 'previous'); ?>
|
||||
|
||||
<?php echo $form_extra ?>
|
||||
|
||||
<div id="poststuff">
|
||||
|
||||
<div class="submitbox" id="submitpost">
|
||||
|
||||
<div id="previewview">
|
||||
<?php if ( 'publish' == $post->post_status ) { ?>
|
||||
<a href="<?php echo clean_url(get_permalink($post->ID)); ?>" target="_blank" tabindex="4"><?php _e('View this Post'); ?></a>
|
||||
<?php } elseif ( 'edit' == $action ) { ?>
|
||||
<a href="<?php echo clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" target="_blank" tabindex="4"><?php _e('Preview this Post'); ?></a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div class="inside">
|
||||
|
||||
<div class="inside-submitbox">
|
||||
|
||||
<p><strong><label for='post_status'><?php _e('Publish Status') ?></label></strong></p>
|
||||
<p>
|
||||
|
@ -130,7 +96,7 @@ if ( current_user_can('publish_posts') OR ( $post->post_status == 'publish' AND
|
|||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
if ( 0 != $post_ID ) {
|
||||
if ( 0 != $post->ID ) {
|
||||
if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date
|
||||
$stamp = __('Scheduled for:<br />%1$s at %2$s');
|
||||
} else if ( 'publish' == $post->post_status ) { // already published
|
||||
|
@ -161,7 +127,7 @@ if ( 0 != $post_ID ) {
|
|||
<?php do_action('post_submitbox_start'); ?>
|
||||
<input type="submit" name="save" id="save-post" value="<?php _e('Save'); ?>" tabindex="4" class="button button-highlighted" />
|
||||
<?php
|
||||
if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post_ID ) {
|
||||
if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post->ID ) {
|
||||
?>
|
||||
<?php if ( current_user_can('publish_posts') ) : ?>
|
||||
<input name="publish" type="submit" class="button" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" />
|
||||
|
@ -171,12 +137,14 @@ if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post_I
|
|||
<?php
|
||||
}
|
||||
|
||||
if ( ( 'edit' == $action) && current_user_can('delete_post', $post_ID) )
|
||||
echo "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&post=$post_ID", 'delete-post_' . $post_ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this post '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete post') . "</a>";
|
||||
if ( ( 'edit' == $action) && current_user_can('delete_post', $post->ID) )
|
||||
echo "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&post=$post->ID", 'delete-post_' . $post->ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this post '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete post') . "</a>";
|
||||
?>
|
||||
<br class="clear" />
|
||||
<?php if ( 0 != $post_ID ): ?>
|
||||
<?php if ( $last_id = get_post_meta($post_ID, '_edit_last', true) ) {
|
||||
|
||||
<!-- moved under the editor
|
||||
<?php if ( 0 != $post->ID ): ?>
|
||||
<?php if ( $last_id = get_post_meta($post->ID, '_edit_last', true) ) {
|
||||
$last_user = get_userdata($last_id);
|
||||
printf(__('Last edited by %1$s on %2$s at %3$s'), wp_specialchars( $last_user->display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified));
|
||||
} else {
|
||||
|
@ -185,82 +153,61 @@ if ( ( 'edit' == $action) && current_user_can('delete_post', $post_ID) )
|
|||
?>
|
||||
<br class="clear" />
|
||||
<?php endif; ?>
|
||||
<span id="autosave"></span>
|
||||
<span id="wp-word-count"></span>
|
||||
-->
|
||||
|
||||
</p>
|
||||
|
||||
<div class="side-info">
|
||||
<h5><?php _e('Related') ?></h5>
|
||||
|
||||
<ul>
|
||||
<?php if ( 0 != $post_ID ): ?>
|
||||
<li><a href="edit.php?p=<?php echo $post_ID ?>"><?php _e('See Comments on this Post') ?></a></li>
|
||||
<?php endif; ?>
|
||||
<li><a href="edit-comments.php"><?php _e('Manage All Comments') ?></a></li>
|
||||
<li><a href="edit.php"><?php _e('Manage All Posts') ?></a></li>
|
||||
<li><a href="categories.php"><?php _e('Manage All Categories') ?></a></li>
|
||||
<li><a href="edit-tags.php"><?php _e('Manage All Tags') ?></a></li>
|
||||
<li><a href="edit.php?post_status=draft"><?php _e('View Drafts'); ?></a></li>
|
||||
<?php do_action('post_relatedlinks_list'); ?>
|
||||
</ul>
|
||||
|
||||
<h5><?php _e('Shortcuts') ?></h5>
|
||||
<p><?php _e('Drag-and-drop the following link to your bookmarks bar or right click it and add it to your favorites for a posting shortcut.') ?> <a href="<?php echo get_shortcut_link(); ?>" title="<?php echo attribute_escape(__('Press This')) ?>"><?php _e('Press This') ?></a></p>
|
||||
</div>
|
||||
|
||||
<?php do_action('submitpost_box'); ?>
|
||||
</div>
|
||||
|
||||
<div id="post-body">
|
||||
<div id="titlediv">
|
||||
<h3><label for="title"><?php _e('Title') ?></label></h3>
|
||||
<div id="titlewrap">
|
||||
<input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape($post->post_title); ?>" id="title" autocomplete="off" />
|
||||
</div>
|
||||
<div class="inside">
|
||||
<?php $sample_permalink_html = get_sample_permalink_html($post->ID); ?>
|
||||
<div id="edit-slug-box">
|
||||
<?php if ( ! empty($post->ID) && ! empty($sample_permalink_html) ) :
|
||||
echo $sample_permalink_html;
|
||||
endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea">
|
||||
<h3><label for="content"><?php _e('Post') ?></label></h3>
|
||||
<?php the_editor($post->post_content); ?>
|
||||
<?php wp_nonce_field( 'autosave', 'autosavenonce', false ); ?>
|
||||
<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
|
||||
<?php wp_nonce_field( 'getpermalink', 'getpermalinknonce', false ); ?>
|
||||
<?php wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false ); ?>
|
||||
</div>
|
||||
|
||||
<?php echo $form_pingback ?>
|
||||
<?php echo $form_prevstatus ?>
|
||||
|
||||
<?php
|
||||
}
|
||||
add_meta_box('submitdiv', __('Publish'), 'post_submit_meta_box', 'post', 'side', 'core');
|
||||
|
||||
function post_tags_meta_box($post) {
|
||||
?>
|
||||
<p id="jaxtag"><label class="hidden" for="newtag"><?php _e('Tags'); ?></label><input type="text" name="tags_input" class="tags-input" id="tags-input" size="40" tabindex="3" value="<?php echo get_tags_to_edit( $post->ID ); ?>" /></p>
|
||||
<div id="tagchecklist"></div>
|
||||
<p><a href='#'><?php _e( 'Choose from tags' ); ?></a></p>
|
||||
<?php
|
||||
}
|
||||
add_meta_box('tagsdiv', __('Tags'), 'post_tags_meta_box', 'post', 'normal', 'core');
|
||||
add_meta_box('tagsdiv', __('Tags'), 'post_tags_meta_box', 'post', 'side', 'core');
|
||||
|
||||
function post_media_meta_box($post) {
|
||||
echo "<p><small><em>This feature isn't fully functional in this prototype.</em></small></p>";
|
||||
|
||||
if ( empty( $post->ID ) )
|
||||
return;
|
||||
|
||||
$atts = get_children( array(
|
||||
'post_parent' => $post->ID,
|
||||
'post_type' => 'attachment'
|
||||
) );
|
||||
|
||||
if ( !$atts ) {
|
||||
_e( 'No media.' );
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ( $atts as $att ) {
|
||||
if ( $thumb = wp_get_attachment_image( $att->ID, array(60, 45), true ) ) {
|
||||
?>
|
||||
<a href="media.php?action=edit&attachment_id=<?php echo $att->ID ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $att->post_title)); ?>">
|
||||
<?php echo $thumb; ?>
|
||||
</a>
|
||||
|
||||
<?php
|
||||
}
|
||||
echo "<h4>$att->post_title</h4>";
|
||||
|
||||
echo "<a href='#' class='no-crazy'>Remove</a> | ";
|
||||
echo "<a href='media.php?action=edit&attachment_id=$att->ID'>Edit</a>";
|
||||
|
||||
echo "<br class='clear' />";
|
||||
}
|
||||
|
||||
}
|
||||
add_meta_box( 'mediadiv', __('Media added to this Post' ), 'post_media_meta_box', 'post', 'side', 'core' );
|
||||
|
||||
function post_categories_meta_box($post) {
|
||||
?>
|
||||
<div id="category-adder" class="wp-hidden-children">
|
||||
<h4><a id="category-add-toggle" href="#category-add" class="hide-if-no-js" tabindex="3"><?php _e( '+ Add New Category' ); ?></a></h4>
|
||||
<p id="category-add" class="wp-hidden-child">
|
||||
<label class="hidden" for="newcat"><?php _e( 'Add New Category' ); ?></label><input type="text" name="newcat" id="newcat" class="form-required form-input-tip" value="<?php _e( 'New category name' ); ?>" tabindex="3" aria-required="true"/>
|
||||
<label class="hidden" for="newcat_parent"><?php _e('Parent category'); ?>:</label><?php wp_dropdown_categories( array( 'hide_empty' => 0, 'name' => 'newcat_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category'), 'tab_index' => 3 ) ); ?>
|
||||
<input type="button" id="category-add-sumbit" class="add:categorychecklist:category-add button" value="<?php _e( 'Add' ); ?>" tabindex="3" />
|
||||
<?php wp_nonce_field( 'add-category', '_ajax_nonce', false ); ?>
|
||||
<span id="category-ajax-response"></span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<ul id="category-tabs">
|
||||
<li class="ui-tabs-selected"><a href="#categories-all" tabindex="3"><?php _e( 'All Categories' ); ?></a></li>
|
||||
<li class="wp-no-js-hidden"><a href="#categories-pop" tabindex="3"><?php _e( 'Most Used' ); ?></a></li>
|
||||
|
@ -277,25 +224,29 @@ function post_categories_meta_box($post) {
|
|||
<?php wp_category_checklist($post->ID, false, false, $popular_ids) ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="category-adder" class="wp-hidden-children">
|
||||
<h4><a id="category-add-toggle" href="#category-add" class="hide-if-no-js" tabindex="3"><?php _e( '+ Add New Category' ); ?></a></h4>
|
||||
<p id="category-add" class="wp-hidden-child">
|
||||
<label class="hidden" for="newcat"><?php _e( 'Add New Category' ); ?></label><input type="text" name="newcat" id="newcat" class="form-required form-input-tip" value="<?php _e( 'New category name' ); ?>" tabindex="3" aria-required="true"/>
|
||||
<label class="hidden" for="newcat_parent"><?php _e('Parent category'); ?>:</label><?php wp_dropdown_categories( array( 'hide_empty' => 0, 'name' => 'newcat_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category'), 'tab_index' => 3 ) ); ?>
|
||||
<input type="button" id="category-add-sumbit" class="add:categorychecklist:category-add button" value="<?php _e( 'Add' ); ?>" tabindex="3" />
|
||||
<?php wp_nonce_field( 'add-category', '_ajax_nonce', false ); ?>
|
||||
<span id="category-ajax-response"></span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
add_meta_box('categorydiv', __('Categories'), 'post_categories_meta_box', 'post', 'normal', 'core');
|
||||
?>
|
||||
add_meta_box('categorydiv', __('Categories'), 'post_categories_meta_box', 'post', 'side', 'core');
|
||||
|
||||
<?php do_meta_boxes('post', 'normal', $post); ?>
|
||||
|
||||
<?php do_action('edit_form_advanced'); ?>
|
||||
|
||||
<h2><?php _e('Advanced Options'); ?></h2>
|
||||
|
||||
<?php
|
||||
function post_excerpt_meta_box($post) {
|
||||
?>
|
||||
<label class="hidden" for="excerpt"><?php _e('Excerpt') ?></label><textarea rows="1" cols="40" name="excerpt" tabindex="6" id="excerpt"><?php echo $post->post_excerpt ?></textarea>
|
||||
<p><?php _e('Excerpts are optional hand-crafted summaries of your content. You can <a href="http://codex.wordpress.org/Template_Tags/the_excerpt" target="_blank">use them in your template</a>'); ?></p>
|
||||
<?php
|
||||
}
|
||||
add_meta_box('postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', 'post', 'advanced', 'core');
|
||||
add_meta_box('postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', 'post', 'normal', 'core');
|
||||
|
||||
function post_trackback_meta_box($post) {
|
||||
$form_trackback = '<input type="text" name="trackback_url" style="width: 415px" id="trackback" tabindex="7" value="'. attribute_escape( str_replace("\n", ' ', $post->to_ping) ) .'" />';
|
||||
|
@ -309,13 +260,16 @@ function post_trackback_meta_box($post) {
|
|||
}
|
||||
|
||||
?>
|
||||
<p class="meta-options">
|
||||
<label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($post->ping_status, 'open'); ?> /> <?php _e('Allow <a href="http://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments" target="_blank">trackbacks and pingbacks</a> on this post') ?></label>
|
||||
</p>
|
||||
<p><label for="trackback"><?php _e('Send trackbacks to:'); ?></label> <?php echo $form_trackback; ?><br /> (<?php _e('Separate multiple URLs with spaces'); ?>)</p>
|
||||
<p><?php _e('Trackbacks are a way to notify legacy blog systems that you’ve linked to them. If you link other WordPress blogs they’ll be notified automatically using <a href="http://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments" target="_blank">pingbacks</a>, no other action necessary.'); ?></p>
|
||||
<?php
|
||||
if ( ! empty($pings) )
|
||||
echo $pings;
|
||||
}
|
||||
add_meta_box('trackbacksdiv', __('Trackbacks'), 'post_trackback_meta_box', 'post', 'advanced', 'core');
|
||||
add_meta_box('trackbacksdiv', __('Trackbacks and Pings'), 'post_trackback_meta_box', 'post', 'normal', 'core');
|
||||
|
||||
function post_custom_meta_box($post) {
|
||||
?>
|
||||
|
@ -335,36 +289,71 @@ list_meta($metadata);
|
|||
<p><?php _e('Custom fields can be used to add extra metadata to a post that you can <a href="http://codex.wordpress.org/Using_Custom_Fields" target="_blank">use in your theme</a>.'); ?></p>
|
||||
<?php
|
||||
}
|
||||
add_meta_box('postcustom', __('Custom Fields'), 'post_custom_meta_box', 'post', 'advanced', 'core');
|
||||
add_meta_box('postcustom', __('Custom Fields'), 'post_custom_meta_box', 'post', 'normal', 'core');
|
||||
|
||||
do_action('dbx_post_advanced');
|
||||
|
||||
function post_comment_status_meta_box($post) {
|
||||
global $wpdb, $post_ID;
|
||||
?>
|
||||
<input name="advanced_view" type="hidden" value="1" />
|
||||
<p><label for="comment_status" class="selectit">
|
||||
<input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($post->comment_status, 'open'); ?> />
|
||||
<?php _e('Allow Comments') ?></label></p>
|
||||
<p><label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($post->ping_status, 'open'); ?> /> <?php _e('Allow Pings') ?></label></p>
|
||||
<p><?php _e('These settings apply to this post only. “Pings” are <a href="http://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments" target="_blank">trackbacks and pingbacks</a>.'); ?></p>
|
||||
<p class="meta-options">
|
||||
<label for="comment_status" class="selectit"> <input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($post->comment_status, 'open'); ?> /><?php _e('Allow comments on this post') ?></label>
|
||||
</p>
|
||||
<?php
|
||||
|
||||
|
||||
if ( !$post_ID || $post_ID < 0 )
|
||||
return;
|
||||
|
||||
if ( !$comments = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved != 'spam' ORDER BY comment_date", $post_ID) ) )
|
||||
return;
|
||||
|
||||
// Make sure comments, post, and post_author are cached
|
||||
// update_comment_cache($comments);
|
||||
?>
|
||||
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><?php _e('Comments') ?></th>
|
||||
<th scope="col"><?php _e('Submitted') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="the-comment-list" class="list:comment">
|
||||
<?php
|
||||
foreach ($comments as $comment)
|
||||
_wp_comment_row( $comment, 'single', false, false );
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
}
|
||||
add_meta_box('commentstatusdiv', __('Comments & Pings'), 'post_comment_status_meta_box', 'post', 'advanced', 'core');
|
||||
add_meta_box('commentstatusdiv', __('Comments on this Post'), 'post_comment_status_meta_box', 'post', 'normal', 'core');
|
||||
|
||||
function post_password_meta_box($post) {
|
||||
?>
|
||||
<p><label class="hidden" for="post_password"><?php _e('Password Protect This Post') ?></label><input name="post_password" type="text" size="25" id="post_password" value="<?php if ( isset( $post->post_password ) ) : echo attribute_escape( $post->post_password ); endif; ?>" /></p>
|
||||
<p>
|
||||
<input id="post_status_private" name="post_status" type="checkbox" value="private" <?php checked($post->post_status, 'private'); ?> tabindex="4" /> <?php _e('Keep this post private') ?></label>
|
||||
</p>
|
||||
<h4><?php _e( 'Post Password' ); ?></h4>
|
||||
<p><label class="hidden" for="post_password"><?php _e('Password Protect This Post') ?></label><input name="post_password" type="text" size="25" id="post_password" value="<?php echo attribute_escape( $post->post_password ); ?>" /></p>
|
||||
<p><?php _e('Setting a password will require people who visit your blog to enter the above password to view this post and its comments.'); ?></p>
|
||||
<?php
|
||||
}
|
||||
add_meta_box('passworddiv', __('Password Protect This Post'), 'post_password_meta_box', 'post', 'advanced', 'core');
|
||||
add_meta_box('passworddiv', __('Privacy Options'), 'post_password_meta_box', 'post', 'normal', 'core');
|
||||
|
||||
function post_slug_meta_box($post) {
|
||||
?>
|
||||
<label class="hidden" for="post_name"><?php _e('Post Slug') ?></label><input name="post_name" type="text" size="13" id="post_name" value="<?php echo attribute_escape( $post->post_name ); ?>" />
|
||||
<?php
|
||||
}
|
||||
add_meta_box('slugdiv', __('Post Slug'), 'post_slug_meta_box', 'post', 'advanced', 'core');
|
||||
add_meta_box('slugdiv', __('Post Slug'), 'post_slug_meta_box', 'post', 'normal', 'core');
|
||||
|
||||
$authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM
|
||||
if ( $post->post_author && !in_array($post->post_author, $authors) )
|
||||
|
@ -379,23 +368,174 @@ function post_author_meta_box($post) {
|
|||
<label class="hidden" for="post_author_override"><?php _e('Post Author'); ?></label><?php wp_dropdown_users( array('include' => $authors, 'name' => 'post_author_override', 'selected' => empty($post->ID) ? $user_ID : $post->post_author) ); ?>
|
||||
<?php
|
||||
}
|
||||
add_meta_box('authordiv', __('Post Author'), 'post_author_meta_box', 'post', 'advanced', 'core');
|
||||
add_meta_box('authordiv', __('Post Author'), 'post_author_meta_box', 'post', 'normal', 'core');
|
||||
endif;
|
||||
|
||||
if ( 0 < $post_ID && wp_get_post_revisions( $post_ID ) ) :
|
||||
function post_revisions_meta_box($post) {
|
||||
wp_list_post_revisions();
|
||||
}
|
||||
add_meta_box('revisionsdiv', __('Post Revisions'), 'post_revisions_meta_box', 'post', 'advanced', 'core');
|
||||
add_meta_box('revisionsdiv', __('Post Revisions'), 'post_revisions_meta_box', 'post', 'normal', 'core');
|
||||
endif;
|
||||
|
||||
?>
|
||||
|
||||
<?php if ( $notice ) : ?>
|
||||
<div id="notice" class="error"><p><?php echo $notice ?></p></div>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($_GET['message'])) : ?>
|
||||
<div id="message" class="updated fade"><p><?php echo $messages[$_GET['message']]; ?></p></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( (isset($mode) && 'bookmarklet' == $mode) || isset($_GET['popupurl']) ): ?>
|
||||
<input type="hidden" name="mode" value="bookmarklet" />
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="wrap">
|
||||
<h2><?php
|
||||
if ( !isset($post_ID) || 0 == $post_ID)
|
||||
printf( __( '<a href="%s">Posts</a> / Write New Post' ), 'edit.php' );
|
||||
else
|
||||
printf( __( '<a href="%s">Posts</a> / Edit Post' ), 'edit.php' );
|
||||
?></h2>
|
||||
|
||||
<div id="previewview">
|
||||
<?php if ( 'publish' == $post->post_status ) { ?>
|
||||
<a class="button" href="<?php echo clean_url(get_permalink($post->ID)); ?>" target="_blank" tabindex="4"><?php _e('View this Post'); ?></a>
|
||||
<?php } elseif ( 'edit' == $action ) { ?>
|
||||
<a class="button" href="<?php echo clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" target="_blank" tabindex="4"><?php _e('Preview this Post'); ?></a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
if ( 0 == $post_ID)
|
||||
wp_nonce_field('add-post');
|
||||
else
|
||||
wp_nonce_field('update-post_' . $post_ID);
|
||||
|
||||
$form_pingback = '<input type="hidden" name="post_pingback" value="' . (int) get_option('default_pingback_flag') . '" id="post_pingback" />';
|
||||
|
||||
$form_prevstatus = '<input type="hidden" name="prev_status" value="' . attribute_escape( $post->post_status ) . '" />';
|
||||
|
||||
$saveasdraft = '<input name="save" type="submit" id="save" class="button" tabindex="3" value="' . attribute_escape( __('Save and Continue Editing') ) . '" />';
|
||||
|
||||
?>
|
||||
|
||||
<input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_ID ?>" />
|
||||
<input type="hidden" id="hiddenaction" name="action" value="<?php echo $form_action ?>" />
|
||||
<input type="hidden" id="originalaction" name="originalaction" value="<?php echo $form_action ?>" />
|
||||
<input type="hidden" id="post_author" name="post_author" value="<?php echo attribute_escape( $post->post_author ); ?>" />
|
||||
<input type="hidden" id="post_type" name="post_type" value="<?php echo $post->post_type ?>" />
|
||||
<input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo $post->post_status ?>" />
|
||||
<input name="referredby" type="hidden" id="referredby" value="<?php echo clean_url(stripslashes(wp_get_referer())); ?>" />
|
||||
<?php if ( 'draft' != $post->post_status ) wp_original_referer_field(true, 'previous'); ?>
|
||||
|
||||
<?php echo $form_extra ?>
|
||||
|
||||
<div id="poststuff">
|
||||
|
||||
<div id="side-info" style="display: none;"><?php // TODO ?>
|
||||
|
||||
<h5><?php _e('Related') ?></h5>
|
||||
<ul>
|
||||
<?php if ($post_ID): ?>
|
||||
<li><a href="edit.php?p=<?php echo $post_ID ?>"><?php _e('See Comments on this Post') ?></a></li>
|
||||
<?php endif; ?>
|
||||
<li><a href="edit-comments.php"><?php _e('Manage All Comments') ?></a></li>
|
||||
<li><a href="edit.php"><?php _e('Manage All Posts') ?></a></li>
|
||||
<li><a href="categories.php"><?php _e('Manage All Categories') ?></a></li>
|
||||
<li><a href="edit-tags.php"><?php _e('Manage All Tags') ?></a></li>
|
||||
<li><a href="edit.php?post_status=draft"><?php _e('View Drafts'); ?></a></li>
|
||||
<?php do_action('post_relatedlinks_list'); ?>
|
||||
</ul>
|
||||
|
||||
<h5><?php _e('Shortcuts') ?></h5>
|
||||
<p><?php _e('Drag-and-drop the following link to your bookmarks bar or right click it and add it to your favorites for a posting shortcut.') ?> <a href="<?php echo get_shortcut_link(); ?>" title="<?php echo attribute_escape(__('Press This')) ?>"><?php _e('Press This') ?></a></p>
|
||||
</div>
|
||||
|
||||
<div id="side-info-column" class="inner-sidebar">
|
||||
|
||||
<?php do_action('submitpost_box'); ?>
|
||||
|
||||
<?php $side_meta_boxes = do_meta_boxes('post', 'side', $post); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="post-body" class="<?php echo $side_meta_boxes ? 'has-sidebar' : ''; ?>">
|
||||
<div id="post-body-content" class="has-sidebar-content">
|
||||
<div id="titlediv">
|
||||
<h3><label for="title"><?php _e('Title') ?></label></h3>
|
||||
<div id="titlewrap">
|
||||
<input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape($post->post_title); ?>" id="title" autocomplete="off" />
|
||||
</div>
|
||||
<div class="inside">
|
||||
<?php $sample_permalink_html = get_sample_permalink_html($post->ID); ?>
|
||||
<div id="edit-slug-box">
|
||||
<?php if ( ! empty($post->ID) && ! empty($sample_permalink_html) ) :
|
||||
echo $sample_permalink_html;
|
||||
endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea">
|
||||
|
||||
<div id="add-media-button"><a href="<?php echo clean_url( admin_url( 'media-upload.php?post_id=' . ( $post_ID ? $post_ID : $temp_ID ) . '&type=image&TB_iframe=true' ) ); ?>" class="thickbox button"><?php _e( 'Add Media' ); ?></a></div>
|
||||
|
||||
<h3><?php _e('Post') ?></h3>
|
||||
|
||||
<?php the_editor($post->post_content); ?>
|
||||
|
||||
<div id="post-status-info">
|
||||
<span id="wp-word-count" class="alignleft"></span>
|
||||
<span class="alignright">
|
||||
<span id="autosave"> </span>
|
||||
<?php
|
||||
if ( $post_ID ) {
|
||||
echo '<span id="last-edit">';
|
||||
if ( $last_id = get_post_meta($post_ID, '_edit_last', true) ) {
|
||||
$last_user = get_userdata($last_id);
|
||||
printf(__('Last edited by %1$s on %2$s at %3$s'), wp_specialchars( $last_user->display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified));
|
||||
} else {
|
||||
printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified));
|
||||
}
|
||||
echo '</span>';
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
<br class="clear" />
|
||||
</div>
|
||||
|
||||
|
||||
<?php wp_nonce_field( 'autosave', 'autosavenonce', false ); ?>
|
||||
<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
|
||||
<?php wp_nonce_field( 'getpermalink', 'getpermalinknonce', false ); ?>
|
||||
<?php wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false ); ?>
|
||||
<?php wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
echo $form_pingback;
|
||||
echo $form_prevstatus;
|
||||
|
||||
do_meta_boxes('post', 'normal', $post);
|
||||
|
||||
do_action('edit_form_advanced');
|
||||
|
||||
do_meta_boxes('post', 'advanced', $post);
|
||||
|
||||
do_action('dbx_post_sidebar');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /poststuff -->
|
||||
|
||||
</div>
|
||||
<br class="clear" />
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
|
|
@ -16,21 +16,25 @@ $form_extra = "' />\n<input type='hidden' name='comment_ID' value='" . $comment-
|
|||
?>
|
||||
|
||||
<form name="post" action="comment.php" method="post" id="post">
|
||||
<div id="wpbody-content">
|
||||
|
||||
<?php wp_nonce_field('update-comment_' . $comment->comment_ID) ?>
|
||||
<div class="wrap">
|
||||
<h2><?php echo $toprow_title; ?></h2>
|
||||
<input type="hidden" name="user_ID" value="<?php echo (int) $user_ID ?>" />
|
||||
<input type="hidden" name="action" value='<?php echo $form_action . $form_extra ?>' />
|
||||
|
||||
<div id="poststuff">
|
||||
|
||||
<div class="submitbox" id="submitcomment">
|
||||
|
||||
<div id="previewview">
|
||||
<a href="<?php echo get_comment_link(); ?>" target="_blank"><?php _e('View this Comment'); ?></a>
|
||||
<a class="button" href="<?php echo get_comment_link(); ?>" target="_blank"><?php _e('View this Comment'); ?></a>
|
||||
</div>
|
||||
|
||||
<div class="inside">
|
||||
<input type="hidden" name="user_ID" value="<?php echo (int) $user_ID ?>" />
|
||||
<input type="hidden" name="action" value='<?php echo $form_action . $form_extra ?>' />
|
||||
<?php
|
||||
// All meta boxes should be defined and added before the first do_meta_boxes() call (or potentially during the do_meta_boxes action).
|
||||
|
||||
function comment_submit_meta_box($comment) {
|
||||
?>
|
||||
<div class="submitbox" id="submitcomment">
|
||||
<div class="inside-submitbox">
|
||||
|
||||
<p><strong><label for='comment_status'><?php _e('Approval Status') ?></label></strong></p>
|
||||
<p>
|
||||
|
@ -59,20 +63,21 @@ $time = mysql2date(get_option('time_format'), $comment->comment_date);
|
|||
echo "<a class='submitdelete' href='" . wp_nonce_url("comment.php?action=deletecomment&c=$comment->comment_ID&_wp_original_http_referer=" . wp_get_referer(), 'delete-comment_' . $comment->comment_ID) . "' onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n 'Cancel' to stop, 'OK' to delete.")) . "') ) { return true;}return false;\">" . __('Delete comment') . "</a>";
|
||||
?>
|
||||
</p>
|
||||
|
||||
<div class="side-info">
|
||||
<h5><?php _e('Related') ?></h5>
|
||||
|
||||
<ul>
|
||||
<li><a href="edit-comments.php"><?php _e('Manage All Comments') ?></a></li>
|
||||
<li><a href="edit-comments.php?comment_status=moderated"><?php _e('Moderate Comments') ?></a></li>
|
||||
<?php do_action('comment_relatedlinks_list'); ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php do_action('submitcomment_box'); ?>
|
||||
<?php
|
||||
}
|
||||
add_meta_box('submitdiv', __('Save'), 'comment_submit_meta_box', 'comment', 'side', 'core');
|
||||
?>
|
||||
|
||||
<div id="side-info-column" class="inner-sidebar">
|
||||
|
||||
<?php $side_meta_boxes = do_meta_boxes('comment', 'side', $comment); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="post-body">
|
||||
<div id="post-body" class="<?php echo $side_meta_boxes ? 'has-sidebar' : ''; ?>">
|
||||
<div id="post-body-content" class="has-sidebar-content">
|
||||
|
||||
<div id="namediv" class="stuffbox">
|
||||
<h3><label for="name"><?php _e('Name') ?></label></h3>
|
||||
<div class="inside">
|
||||
|
@ -80,6 +85,12 @@ echo "<a class='submitdelete' href='" . wp_nonce_url("comment.php?action=deletec
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div id="postdiv" class="postarea">
|
||||
<h3><?php _e('Comment') ?></h3>
|
||||
<?php the_editor($comment->comment_content, 'content', 'newcomment_author_url', false, 4); ?>
|
||||
<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
|
||||
</div>
|
||||
|
||||
<div id="emaildiv" class="stuffbox">
|
||||
<h3><label for="email"><?php _e('E-mail') ?></label></h3>
|
||||
<div class="inside">
|
||||
|
@ -94,12 +105,6 @@ echo "<a class='submitdelete' href='" . wp_nonce_url("comment.php?action=deletec
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div id="postdiv" class="postarea">
|
||||
<h3><label for="content"><?php _e('Comment') ?></label></h3>
|
||||
<?php the_editor($comment->comment_content, 'content', 'newcomment_author_url', false, 4); ?>
|
||||
<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
|
||||
</div>
|
||||
|
||||
<?php do_meta_boxes('comment', 'normal', $comment); ?>
|
||||
|
||||
<input type="hidden" name="c" value="<?php echo $comment->comment_ID ?>" />
|
||||
|
@ -107,6 +112,9 @@ echo "<a class='submitdelete' href='" . wp_nonce_url("comment.php?action=deletec
|
|||
<input name="referredby" type="hidden" id="referredby" value="<?php echo wp_get_referer(); ?>" />
|
||||
<?php wp_original_referer_field(true, 'previous'); ?>
|
||||
<input type="hidden" name="noredir" value="1" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -7,15 +7,12 @@
|
|||
*/
|
||||
|
||||
if ( ! empty($link_id) ) {
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
$heading = __('Edit Link');
|
||||
$heading = sprintf( __( '<a href="%s">Links</a> / Edit Link' ), 'link-manager.php' );
|
||||
$submit_text = __('Save Changes');
|
||||
$form = '<form name="editlink" id="editlink" method="post" action="link.php">';
|
||||
$nonce_action = 'update-bookmark_' . $link_id;
|
||||
} else {
|
||||
$heading = __('Add Link');
|
||||
$heading = sprintf( __( '<a href="%s">Links</a> / Add New Link' ), 'link-manager.php' );
|
||||
$submit_text = __('Add Link');
|
||||
$form = '<form name="addlink" id="addlink" method="post" action="link.php">';
|
||||
$nonce_action = 'add-bookmark';
|
||||
|
@ -40,24 +37,10 @@ function xfn_check($class, $value = '', $deprecated = '') {
|
|||
}
|
||||
?>
|
||||
|
||||
<?php echo $form ?>
|
||||
<?php wp_nonce_field($nonce_action); ?>
|
||||
<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
|
||||
|
||||
<div class="wrap">
|
||||
<h2><?php echo $heading; ?></h2>
|
||||
|
||||
<div id="poststuff">
|
||||
|
||||
<?php function link_submit_meta_box($link) { ?>
|
||||
<div class="submitbox" id="submitlink">
|
||||
|
||||
<div id="previewview">
|
||||
<?php if ( !empty($link_id) ) { ?>
|
||||
<a href="<?php echo $link->link_url; ?>" target="_blank"><?php _e('Visit Link'); ?></a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div class="inside">
|
||||
<div class="inside-submitbox">
|
||||
<p><label for="link_private" class="selectit"><input id="link_private" name="link_visible" type="checkbox" value="N" <?php checked($link->link_visible, 'N'); ?> /> <?php _e('Keep this link private') ?></label></p>
|
||||
</div>
|
||||
|
||||
|
@ -65,49 +48,16 @@ function xfn_check($class, $value = '', $deprecated = '') {
|
|||
<input type="submit" class="button button-highlighted" name="save" value="<?php _e('Save'); ?>" tabindex="4" />
|
||||
<?php
|
||||
if ( ( 'edit' == $action) && current_user_can('manage_links') )
|
||||
echo "<a class='submitdelete' href='" . wp_nonce_url("link.php?action=delete&link_id=$link_id", 'delete-bookmark_' . $link_id) . "' onclick=\"if ( confirm('" . js_escape( sprintf( __("You are about to delete this link '%s'\n'Cancel' to stop, 'OK' to delete."), $link->link_name )) . "') ) { return true;}return false;\">" . __('Delete link') . "</a>";
|
||||
echo "<a class='submitdelete' href='" . wp_nonce_url("link.php?action=delete&link_id=$link->link_id", 'delete-bookmark_' . $link->link_id) . "' onclick=\"if ( confirm('" . js_escape( sprintf( __("You are about to delete this link '%s'\n'Cancel' to stop, 'OK' to delete."), $link->link_name )) . "') ) { return true;}return false;\">" . __('Delete link') . "</a>";
|
||||
?>
|
||||
</p>
|
||||
|
||||
<div class="side-info">
|
||||
<h5><?php _e('Related') ?></h5>
|
||||
|
||||
<ul>
|
||||
<li><a href="link-manager.php"><?php _e('Manage All Links') ?></a></li>
|
||||
<li><a href="edit-link-categories.php"><?php _e('Manage All Link Categories') ?></a></li>
|
||||
<li><a href="link-import.php"><?php _e('Import Links') ?></a></li>
|
||||
<?php do_action('link_relatedlinks_list'); ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php do_action('submitlink_box'); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
add_meta_box('linksubmitdiv', __('Save'), 'link_submit_meta_box', 'link', 'side', 'core');
|
||||
|
||||
<div id="post-body">
|
||||
<div id="namediv" class="stuffbox">
|
||||
<h3><label for="link_name"><?php _e('Name') ?></label></h3>
|
||||
<div class="inside">
|
||||
<input type="text" name="link_name" size="30" tabindex="1" value="<?php echo $link->link_name; ?>" id="link_name" /><br />
|
||||
<?php _e('Example: Nifty blogging software'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="addressdiv" class="stuffbox">
|
||||
<h3><label for="link_url"><?php _e('Web Address') ?></label></h3>
|
||||
<div class="inside">
|
||||
<input type="text" name="link_url" size="30" tabindex="1" value="<?php echo $link->link_url; ?>" id="link_url" /><br />
|
||||
<?php _e('Example: <code>http://wordpress.org/</code> — don’t forget the <code>http://</code>'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="descriptiondiv" class="stuffbox">
|
||||
<h3><label for="link_description"><?php _e('Description') ?></label></h3>
|
||||
<div class="inside">
|
||||
<input type="text" name="link_description" size="30" tabindex="1" value="<?php echo ( isset( $link->link_description ) ? $link->link_description : ''); ?>" id="link_description" /><br />
|
||||
<?php _e('This will be shown when someone hovers over the link in the blogroll, or optionally below the link.'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php function link_categories_meta_box($link) { ?>
|
||||
function link_categories_meta_box($link) { ?>
|
||||
<div id="category-adder" class="wp-hidden-children">
|
||||
<h4><a id="category-add-toggle" href="#category-add"><?php _e( '+ Add New Category' ); ?></a></h4>
|
||||
<p id="link-category-add" class="wp-hidden-child">
|
||||
|
@ -143,13 +93,8 @@ if ( ( 'edit' == $action) && current_user_can('manage_links') )
|
|||
<?php
|
||||
}
|
||||
add_meta_box('linkcategorydiv', __('Categories'), 'link_categories_meta_box', 'link', 'normal', 'core');
|
||||
?>
|
||||
|
||||
<?php do_meta_boxes('link', 'normal', $link); ?>
|
||||
|
||||
<h2><?php _e('Advanced Options'); ?></h2>
|
||||
|
||||
<?php function link_target_meta_box($link) { ?>
|
||||
function link_target_meta_box($link) { ?>
|
||||
<fieldset><legend class="hidden"><?php _e('Target') ?></legend>
|
||||
<label for="link_target_blank" class="selectit">
|
||||
<input id="link_target_blank" type="radio" name="link_target" value="_blank" <?php echo ( isset( $link->link_target ) && ($link->link_target == '_blank') ? 'checked="checked"' : ''); ?> />
|
||||
|
@ -164,7 +109,7 @@ add_meta_box('linkcategorydiv', __('Categories'), 'link_categories_meta_box', 'l
|
|||
<p><?php _e('Choose the frame your link targets. Essentially this means if you choose <code>_blank</code> your link will open in a new window.'); ?></p>
|
||||
<?php
|
||||
}
|
||||
add_meta_box('linktargetdiv', __('Target'), 'link_target_meta_box', 'link', 'advanced', 'core');
|
||||
add_meta_box('linktargetdiv', __('Target'), 'link_target_meta_box', 'link', 'normal', 'core');
|
||||
|
||||
function link_xfn_meta_box($link) {
|
||||
?>
|
||||
|
@ -277,7 +222,7 @@ function link_xfn_meta_box($link) {
|
|||
<p><?php _e('If the link is to a person, you can specify your relationship with them using the above form. If you would like to learn more about the idea check out <a href="http://gmpg.org/xfn/">XFN</a>.'); ?></p>
|
||||
<?php
|
||||
}
|
||||
add_meta_box('linkxfndiv', __('Link Relationship (XFN)'), 'link_xfn_meta_box', 'link', 'advanced', 'core');
|
||||
add_meta_box('linkxfndiv', __('Link Relationship (XFN)'), 'link_xfn_meta_box', 'link', 'normal', 'core');
|
||||
|
||||
function link_advanced_meta_box($link) {
|
||||
?>
|
||||
|
@ -310,7 +255,95 @@ function link_advanced_meta_box($link) {
|
|||
</table>
|
||||
<?php
|
||||
}
|
||||
add_meta_box('linkadvanceddiv', __('Advanced'), 'link_advanced_meta_box', 'link', 'advanced', 'core');
|
||||
add_meta_box('linkadvanceddiv', __('Advanced'), 'link_advanced_meta_box', 'link', 'normal', 'core');
|
||||
|
||||
?>
|
||||
|
||||
<?php echo $form ?>
|
||||
<div id="wpbody-content">
|
||||
|
||||
<?php echo $link_added; ?>
|
||||
|
||||
<?php wp_nonce_field($nonce_action); ?>
|
||||
<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
|
||||
<?php wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
|
||||
|
||||
<div class="wrap">
|
||||
<h2><?php echo $heading; ?></h2>
|
||||
|
||||
<?php if ( !empty($link->link_id) ) { ?>
|
||||
<div id="previewview">
|
||||
<a class="button" href="<?php echo $link->link_url; ?>" target="_blank"><?php _e('Visit Link'); ?></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<!--
|
||||
<p id="big-add-button">
|
||||
<span id="previewview">
|
||||
<?php if ( !empty($link_id) ) { ?>
|
||||
<a class="button" href="<?php echo $link->link_url; ?>" target="_blank"><?php _e('Visit Link'); ?></a>
|
||||
<?php } ?>
|
||||
</span>
|
||||
</p>
|
||||
-->
|
||||
|
||||
<!-- TODO
|
||||
<div class="inside">
|
||||
<p><label for="link_private" class="selectit"><input id="link_private" name="link_visible" type="checkbox" value="N" <?php checked($link->link_visible, 'N'); ?> /> <?php _e('Keep this link private') ?></label></p>
|
||||
</div>
|
||||
|
||||
<div class="side-info">
|
||||
<h5><?php _e('Related') ?></h5>
|
||||
|
||||
<ul>
|
||||
<li><a href="link-manager.php"><?php _e('Manage All Links') ?></a></li>
|
||||
<li><a href="edit-link-categories.php"><?php _e('Manage All Link Categories') ?></a></li>
|
||||
<li><a href="link-import.php"><?php _e('Import Links') ?></a></li>
|
||||
<?php do_action('link_relatedlinks_list'); ?>
|
||||
</ul>
|
||||
</div>
|
||||
-->
|
||||
|
||||
<div id="poststuff">
|
||||
|
||||
<div id="side-info-column" class="inner-sidebar">
|
||||
<?php
|
||||
|
||||
do_action('submitlink_box');
|
||||
$side_meta_boxes = do_meta_boxes( 'link', 'side', $link );
|
||||
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div id="post-body" class="<?php echo $side_meta_boxes ? 'has-sidebar' : ''; ?>">
|
||||
<div id="post-body-content" class="has-sidebar-content">
|
||||
<div id="namediv" class="stuffbox">
|
||||
<h3><label for="link_name"><?php _e('Name') ?></label></h3>
|
||||
<div class="inside">
|
||||
<input type="text" name="link_name" size="30" tabindex="1" value="<?php echo $link->link_name; ?>" id="link_name" /><br />
|
||||
<?php _e('Example: Nifty blogging software'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="addressdiv" class="stuffbox">
|
||||
<h3><label for="link_url"><?php _e('Web Address') ?></label></h3>
|
||||
<div class="inside">
|
||||
<input type="text" name="link_url" size="30" tabindex="1" value="<?php echo $link->link_url; ?>" id="link_url" /><br />
|
||||
<?php _e('Example: <code>http://wordpress.org/</code> — don’t forget the <code>http://</code>'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="descriptiondiv" class="stuffbox">
|
||||
<h3><label for="link_description"><?php _e('Description') ?></label></h3>
|
||||
<div class="inside">
|
||||
<input type="text" name="link_description" size="30" tabindex="1" value="<?php echo $link->link_description; ?>" id="link_description" /><br />
|
||||
<?php _e('This will be shown when someone hovers over the link in the blogroll, or optionally below the link.'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
do_meta_boxes('link', 'normal', $link);
|
||||
|
||||
do_meta_boxes('link', 'advanced', $link);
|
||||
|
||||
|
@ -323,9 +356,13 @@ if ( $link_id ) : ?>
|
|||
<input type="hidden" name="action" value="add" />
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<br class="clear" />
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
|
|
@ -44,9 +44,11 @@ if ( 0 == $post_ID) {
|
|||
|
||||
$temp_ID = (int) $temp_ID;
|
||||
$user_ID = (int) $user_ID;
|
||||
|
||||
?>
|
||||
|
||||
<form name="post" action="page.php" method="post" id="post">
|
||||
<div id="wpbody-content">
|
||||
|
||||
<?php if ( $notice ) : ?>
|
||||
<div id="notice" class="error"><p><?php echo $notice ?></p></div>
|
||||
<?php endif; ?>
|
||||
|
@ -54,39 +56,13 @@ $user_ID = (int) $user_ID;
|
|||
<div id="message" class="updated fade"><p><?php echo $messages[$_GET['message']]; ?></p></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form name="post" action="page.php" method="post" id="post">
|
||||
<div class="wrap">
|
||||
<h2><?php _e('Write Page') ?></h2>
|
||||
|
||||
<?php
|
||||
wp_nonce_field($nonce_action);
|
||||
|
||||
if (isset($mode) && 'bookmarklet' == $mode)
|
||||
echo '<input type="hidden" name="mode" value="bookmarklet" />';
|
||||
function page_submit_meta_box($post) {
|
||||
global $action;
|
||||
?>
|
||||
<input type="hidden" id="user-id" name="user_ID" value="<?php echo $user_ID ?>" />
|
||||
<input type="hidden" id="hiddenaction" name="action" value='<?php echo $form_action ?>' />
|
||||
<input type="hidden" id="originalaction" name="originalaction" value="<?php echo $form_action ?>" />
|
||||
<input type="hidden" id="post_author" name="post_author" value="<?php echo attribute_escape( $post->post_author ); ?>" />
|
||||
<?php echo $form_extra ?>
|
||||
<input type="hidden" id="post_type" name="post_type" value="<?php echo $post->post_type ?>" />
|
||||
<input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo $post->post_status ?>" />
|
||||
<input name="referredby" type="hidden" id="referredby" value="<?php echo clean_url(stripslashes(wp_get_referer())); ?>" />
|
||||
<?php if ( 'draft' != $post->post_status ) wp_original_referer_field(true, 'previous'); ?>
|
||||
|
||||
<div id="poststuff">
|
||||
|
||||
<div class="submitbox" id="submitpage">
|
||||
|
||||
<div id="previewview">
|
||||
<?php if ( 'publish' == $post->post_status ) { ?>
|
||||
<a href="<?php echo clean_url(get_permalink($post->ID)); ?>" target="_blank" tabindex="4"><?php _e('View this Page'); ?></a>
|
||||
<?php } elseif ( 'edit' == $action ) { ?>
|
||||
<a href="<?php echo clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" target="_blank" tabindex="4"><?php _e('Preview this Page'); ?></a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div class="inside">
|
||||
<div class="inside-submitbox">
|
||||
<p><strong><label for='post_status'><?php _e('Publish Status') ?></label></strong></p>
|
||||
<p>
|
||||
<select name='post_status' tabindex='4' id='post_status'>
|
||||
|
@ -108,7 +84,7 @@ if ( current_user_can('publish_pages') OR ( $post->post_status == 'publish' AND
|
|||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
if ( 0 != $post_ID ) {
|
||||
if ( 0 != $post->ID ) {
|
||||
if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date
|
||||
$stamp = __('Scheduled for:<br />%1$s at %2$s');
|
||||
} else if ( 'publish' == $post->post_status ) { // already published
|
||||
|
@ -137,7 +113,7 @@ if ( 0 != $post_ID ) {
|
|||
<?php do_action('page_submitbox_start'); ?>
|
||||
<input type="submit" name="save" class="button button-highlighted" value="<?php _e('Save'); ?>" tabindex="4" />
|
||||
<?php
|
||||
if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post_ID ) {
|
||||
if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post->ID ) {
|
||||
?>
|
||||
<?php if ( current_user_can('publish_pages') ) : ?>
|
||||
<input name="publish" type="submit" class="button" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" />
|
||||
|
@ -147,12 +123,14 @@ if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post_I
|
|||
<?php
|
||||
}
|
||||
|
||||
if ( ('edit' == $action) && current_user_can('delete_page', $post_ID) )
|
||||
echo "<a class='submitdelete' href='" . wp_nonce_url("page.php?action=delete&post=$post_ID", 'delete-page_' . $post_ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this page '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete page') . "</a>";
|
||||
if ( ('edit' == $action) && current_user_can('delete_page', $post->ID) )
|
||||
echo "<a class='submitdelete' href='" . wp_nonce_url("page.php?action=delete&post=$post->ID", 'delete-page_' . $post->ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this page '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete page') . "</a>";
|
||||
?>
|
||||
<br class="clear" />
|
||||
<?php if ( 0 != $post_ID ) : ?>
|
||||
<?php if ( $last_id = get_post_meta($post_ID, '_edit_last', true) ) {
|
||||
|
||||
<!-- moved under the editor
|
||||
<?php if ( 0 != $post->ID ) : ?>
|
||||
<?php if ( $last_id = get_post_meta($post->ID, '_edit_last', true) ) {
|
||||
$last_user = get_userdata($last_id);
|
||||
printf(__('Last edited by %1$s on %2$s at %3$s'), wp_specialchars( $last_user->display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified));
|
||||
} else {
|
||||
|
@ -161,58 +139,14 @@ if ( ('edit' == $action) && current_user_can('delete_page', $post_ID) )
|
|||
?>
|
||||
<br class="clear" />
|
||||
<?php endif; ?>
|
||||
<span id="autosave"></span>
|
||||
<span id="wp-word-count"></span>
|
||||
-->
|
||||
|
||||
</p>
|
||||
|
||||
<div class="side-info">
|
||||
<h5><?php _e('Related') ?></h5>
|
||||
|
||||
<ul>
|
||||
<?php if ( 0 != $post_ID ) : ?>
|
||||
<li><a href="edit-pages.php?page_id=<?php echo $post_ID ?>"><?php _e('See Comments on this Page') ?></a></li>
|
||||
<?php endif; ?>
|
||||
<li><a href="edit-comments.php"><?php _e('Manage All Comments') ?></a></li>
|
||||
<li><a href="edit-pages.php"><?php _e('Manage All Pages') ?></a></li>
|
||||
<?php do_action('page_relatedlinks_list'); ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php do_action('submitpage_box'); ?>
|
||||
</div>
|
||||
|
||||
<div id="post-body">
|
||||
<div id="titlediv">
|
||||
<h3><label for="title"><?php _e('Title') ?></label></h3>
|
||||
<div id="titlewrap">
|
||||
<input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape( $post->post_title ); ?>" id="title" autocomplete="off" />
|
||||
</div>
|
||||
<div class="inside">
|
||||
<?php $sample_permalink_html = get_sample_permalink_html($post->ID); ?>
|
||||
<div id="edit-slug-box">
|
||||
<?php if ( ! empty($post->ID) && ! empty($sample_permalink_html) ) :
|
||||
echo $sample_permalink_html;
|
||||
endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea">
|
||||
<h3><label for="content"><?php _e('Page') ?></label></h3>
|
||||
<?php the_editor($post->post_content); ?>
|
||||
<?php wp_nonce_field( 'autosave', 'autosavenonce', false ); ?>
|
||||
<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
|
||||
<?php wp_nonce_field( 'getpermalink', 'getpermalinknonce', false ); ?>
|
||||
<?php wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false ); ?>
|
||||
</div>
|
||||
|
||||
<?php do_meta_boxes('page', 'normal', $post); ?>
|
||||
|
||||
<?php do_action('edit_page_form'); ?>
|
||||
|
||||
<h2><?php _e('Advanced Options'); ?></h2>
|
||||
|
||||
|
||||
<?php
|
||||
}
|
||||
add_meta_box('pagesubmitdiv', __('Publish'), 'page_submit_meta_box', 'page', 'side', 'core');
|
||||
|
||||
function page_custom_meta_box($post){
|
||||
?>
|
||||
<div id="postcustomstuff">
|
||||
|
@ -231,7 +165,7 @@ list_meta($metadata);
|
|||
<p><?php _e('Custom fields can be used to add extra metadata to a post that you can <a href="http://codex.wordpress.org/Using_Custom_Fields" target="_blank">use in your theme</a>.'); ?></p>
|
||||
<?php
|
||||
}
|
||||
add_meta_box('pagecustomdiv', __('Custom Fields'), 'page_custom_meta_box', 'page', 'advanced', 'core');
|
||||
add_meta_box('pagecustomdiv', __('Custom Fields'), 'page_custom_meta_box', 'page', 'normal', 'core');
|
||||
|
||||
function page_comments_status_meta_box($post){
|
||||
?>
|
||||
|
@ -243,7 +177,7 @@ function page_comments_status_meta_box($post){
|
|||
<p><?php _e('These settings apply to this page only. “Pings” are <a href="http://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments" target="_blank">trackbacks and pingbacks</a>.'); ?></p>
|
||||
<?php
|
||||
}
|
||||
add_meta_box('pagecommentstatusdiv', __('Comments & Pings'), 'page_comments_status_meta_box', 'page', 'advanced', 'core');
|
||||
add_meta_box('pagecommentstatusdiv', __('Comments & Pings'), 'page_comments_status_meta_box', 'page', 'normal', 'core');
|
||||
|
||||
function page_password_meta_box($post){
|
||||
?>
|
||||
|
@ -251,14 +185,14 @@ function page_password_meta_box($post){
|
|||
<p><?php _e('Setting a password will require people who visit your blog to enter the above password to view this page and its comments.'); ?></p>
|
||||
<?php
|
||||
}
|
||||
add_meta_box('pagepassworddiv', __('Password Protect This Page'), 'page_password_meta_box', 'page', 'advanced', 'core');
|
||||
add_meta_box('pagepassworddiv', __('Password Protect This Page'), 'page_password_meta_box', 'page', 'normal', 'core');
|
||||
|
||||
function page_slug_meta_box($post){
|
||||
?>
|
||||
<label class="hidden" for="post_name"><?php _e('Page Slug') ?></label><input name="post_name" type="text" size="13" id="post_name" value="<?php echo attribute_escape( $post->post_name ); ?>" />
|
||||
<?php
|
||||
}
|
||||
add_meta_box('pageslugdiv', __('Page Slug'), 'page_slug_meta_box', 'page', 'advanced', 'core');
|
||||
add_meta_box('pageslugdiv', __('Page Slug'), 'page_slug_meta_box', 'page', 'normal', 'core');
|
||||
|
||||
function page_parent_meta_box($post){
|
||||
?>
|
||||
|
@ -270,7 +204,7 @@ function page_parent_meta_box($post){
|
|||
<p><?php _e('You can arrange your pages in hierarchies, for example you could have an “About” page that has “Life Story” and “My Dog” pages under it. There are no limits to how deeply nested you can make pages.'); ?></p>
|
||||
<?php
|
||||
}
|
||||
add_meta_box('pageparentdiv', __('Page Parent'), 'page_parent_meta_box', 'page', 'advanced', 'core');
|
||||
add_meta_box('pageparentdiv', __('Page Parent'), 'page_parent_meta_box', 'page', 'normal', 'core');
|
||||
|
||||
if ( 0 != count( get_page_templates() ) ) {
|
||||
function page_template_meta_box($post){
|
||||
|
@ -282,7 +216,7 @@ if ( 0 != count( get_page_templates() ) ) {
|
|||
<p><?php _e('Some themes have custom templates you can use for certain pages that might have additional features or custom layouts. If so, you’ll see them above.'); ?></p>
|
||||
<?php
|
||||
}
|
||||
add_meta_box('pagetemplatediv', __('Page Template'), 'page_template_meta_box', 'page', 'advanced', 'core');
|
||||
add_meta_box('pagetemplatediv', __('Page Template'), 'page_template_meta_box', 'page', 'normal', 'core');
|
||||
}
|
||||
|
||||
function page_order_meta_box($post){
|
||||
|
@ -291,7 +225,7 @@ function page_order_meta_box($post){
|
|||
<p><?php _e('Pages are usually ordered alphabetically, but you can put a number above to change the order pages appear in. (We know this is a little janky, it’ll be better in future releases.)'); ?></p>
|
||||
<?php
|
||||
}
|
||||
add_meta_box('pageorderdiv', __('Page Order'), 'page_order_meta_box', 'page', 'advanced', 'core');
|
||||
add_meta_box('pageorderdiv', __('Page Order'), 'page_order_meta_box', 'page', 'normal', 'core');
|
||||
|
||||
|
||||
$authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM
|
||||
|
@ -307,7 +241,7 @@ if ( $authors && count( $authors ) > 1 ) {
|
|||
<label class="hidden" for="post_author_override"><?php _e('Page Author'); ?></label><?php wp_dropdown_users( array('include' => $authors, 'name' => 'post_author_override', 'selected' => empty($post->ID) ? $user_ID : $post->post_author) ); ?>
|
||||
<?php
|
||||
}
|
||||
add_meta_box('pageauthordiv', __('Page Author'), 'page_author_meta_box', 'page', 'advanced', 'core');
|
||||
add_meta_box('pageauthordiv', __('Page Author'), 'page_author_meta_box', 'page', 'normal', 'core');
|
||||
}
|
||||
|
||||
|
||||
|
@ -315,17 +249,155 @@ if ( 0 < $post_ID && wp_get_post_revisions( $post_ID ) ) :
|
|||
function page_revisions_meta_box($post) {
|
||||
wp_list_post_revisions();
|
||||
}
|
||||
add_meta_box('revisionsdiv', __('Page Revisions'), 'page_revisions_meta_box', 'page', 'advanced', 'core');
|
||||
add_meta_box('revisionsdiv', __('Page Revisions'), 'page_revisions_meta_box', 'page', 'normal', 'core');
|
||||
endif;
|
||||
?>
|
||||
|
||||
<div class="wrap">
|
||||
<h2><?php
|
||||
if ( !isset($post_ID) || 0 == $post_ID )
|
||||
printf( __( '<a href="%s">Pages</a> / Write New Page' ), 'edit-pages.php' );
|
||||
else
|
||||
printf( __( '<a href="%s">Pages</a> / Edit Page' ), 'edit-pages.php' );
|
||||
?></h2>
|
||||
|
||||
<div id="previewview">
|
||||
<?php if ( 'publish' == $post->post_status ) { ?>
|
||||
<a class="button" href="<?php echo clean_url(get_permalink($post->ID)); ?>" target="_blank" tabindex="4"><?php _e('View this Page'); ?></a>
|
||||
<?php } elseif ( 'edit' == $action ) { ?>
|
||||
<a class="button" href="<?php echo clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" target="_blank" tabindex="4"><?php _e('Preview this Page'); ?></a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
wp_nonce_field($nonce_action);
|
||||
|
||||
if (isset($mode) && 'bookmarklet' == $mode)
|
||||
echo '<input type="hidden" name="mode" value="bookmarklet" />';
|
||||
?>
|
||||
<input type="hidden" id="user-id" name="user_ID" value="<?php echo $user_ID ?>" />
|
||||
<input type="hidden" id="hiddenaction" name="action" value='<?php echo $form_action ?>' />
|
||||
<input type="hidden" id="originalaction" name="originalaction" value="<?php echo $form_action ?>" />
|
||||
<input type="hidden" id="post_author" name="post_author" value="<?php echo attribute_escape( $post->post_author ); ?>" />
|
||||
<?php echo $form_extra ?>
|
||||
<input type="hidden" id="post_type" name="post_type" value="<?php echo $post->post_type ?>" />
|
||||
<input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo $post->post_status ?>" />
|
||||
<input name="referredby" type="hidden" id="referredby" value="<?php echo clean_url(stripslashes(wp_get_referer())); ?>" />
|
||||
<?php if ( 'draft' != $post->post_status ) wp_original_referer_field(true, 'previous'); ?>
|
||||
|
||||
<!-- TODO
|
||||
<div class="inside">
|
||||
<p><strong><label for='post_status'><?php _e('Publish Status') ?></label></strong></p>
|
||||
<p>
|
||||
<select name='post_status' tabindex='4' id='post_status'>
|
||||
<?php // Show publish in dropdown if user can publish or if they can re-publish this page ('edit_published_pages')
|
||||
// 'publish' option will be selected for published AND private posts (checkbox overrides dropdown)
|
||||
if ( current_user_can('publish_pages') OR ( $post->post_status == 'publish' AND current_user_can('edit_page', $post->ID) ) ) :
|
||||
?>
|
||||
<option<?php selected( $post->post_status, 'publish' ); selected( $post->post_status, 'private' );?> value='publish'><?php _e('Published') ?></option>
|
||||
<?php endif; ?>
|
||||
<?php if ( 'future' == $post->post_status ) : ?>
|
||||
<option<?php selected( $post->post_status, 'future' ); ?> value='future'><?php _e('Pending') ?></option>
|
||||
<?php endif; ?>
|
||||
<option<?php selected( $post->post_status, 'pending' ); ?> value='pending'><?php _e('Pending Review') ?></option>
|
||||
<option<?php selected( $post->post_status, 'draft' ); ?> value='draft'><?php _e('Unpublished') ?></option>
|
||||
</select>
|
||||
</p>
|
||||
<?php if ( current_user_can( 'publish_posts' ) ) : ?>
|
||||
<p><label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="checkbox" value="private" <?php checked($post->post_status, 'private'); ?> tabindex='4' /> <?php _e('Keep this page private') ?></label></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<h5><?php _e('Related') ?></h5>
|
||||
<ul>
|
||||
<?php if ($post_ID): ?>
|
||||
<li><a href="edit-pages.php?page_id=<?php echo $post_ID ?>"><?php _e('See Comments on this Page') ?></a></li>
|
||||
<?php endif; ?>
|
||||
<li><a href="edit-comments.php"><?php _e('Manage All Comments') ?></a></li>
|
||||
<li><a href="edit-pages.php"><?php _e('Manage All Pages') ?></a></li>
|
||||
<?php do_action('page_relatedlinks_list'); ?>
|
||||
</ul>
|
||||
|
||||
-->
|
||||
|
||||
<div id="poststuff">
|
||||
|
||||
<div id="side-info-column" class="inner-sidebar">
|
||||
|
||||
<?php
|
||||
|
||||
do_action('submitpage_box');
|
||||
$side_meta_boxes = do_meta_boxes('page', 'side', $page);
|
||||
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div id="post-body" class="<?php echo $side_meta_boxes ? 'has-sidebar' : ''; ?>">
|
||||
<div id="post-body-content" class="has-sidebar-content">
|
||||
|
||||
<div id="titlediv">
|
||||
<h3><label for="title"><?php _e('Title') ?></label></h3>
|
||||
<div id="titlewrap">
|
||||
<input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape( $post->post_title ); ?>" id="title" autocomplete="off" />
|
||||
</div>
|
||||
<div class="inside">
|
||||
<?php $sample_permalink_html = get_sample_permalink_html($post->ID); ?>
|
||||
<div id="edit-slug-box">
|
||||
<?php if ( ! empty($post->ID) && ! empty($sample_permalink_html) ) :
|
||||
echo $sample_permalink_html;
|
||||
endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea">
|
||||
|
||||
<div id="add-media-button"><a href="<?php echo clean_url( admin_url( 'media-upload.php?post_id=' . ( $post_ID ? $post_ID : $temp_ID ) . '&type=image&TB_iframe=true' ) ); ?>" class="thickbox button"><?php _e( 'Add Media' ); ?></a></div>
|
||||
|
||||
<h3><?php _e('Page') ?></h3>
|
||||
<?php the_editor($post->post_content); ?>
|
||||
<div id="post-status-info">
|
||||
<span id="wp-word-count" class="alignleft"></span>
|
||||
<span class="alignright">
|
||||
<span id="autosave"> </span>
|
||||
|
||||
<?php
|
||||
if ($post_ID) {
|
||||
if ( $last_id = get_post_meta($post_ID, '_edit_last', true) ) {
|
||||
$last_user = get_userdata($last_id);
|
||||
printf(__('Last edited by %1$s on %2$s at %3$s'), wp_specialchars( $last_user->display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified));
|
||||
} else {
|
||||
printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified));
|
||||
}
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
<br class="clear" />
|
||||
</div>
|
||||
|
||||
|
||||
<?php wp_nonce_field( 'autosave', 'autosavenonce', false ); ?>
|
||||
<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
|
||||
<?php wp_nonce_field( 'getpermalink', 'getpermalinknonce', false ); ?>
|
||||
<?php wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false ); ?>
|
||||
<?php wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
do_meta_boxes('page', 'normal', $post);
|
||||
do_action('edit_page_form');
|
||||
do_meta_boxes('page', 'advanced', $post);
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<br class="clear" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -12,7 +12,6 @@ require_once ('admin.php');
|
|||
/** Load WordPress export API */
|
||||
require_once('includes/export.php');
|
||||
$title = __('Export');
|
||||
$parent_file = 'edit.php';
|
||||
|
||||
if ( isset( $_GET['download'] ) ) {
|
||||
export_wp( $_GET['author'] );
|
||||
|
|
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 133 B |
Before Width: | Height: | Size: 880 B After Width: | Height: | Size: 559 B |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 2.9 KiB |
|
@ -9,7 +9,6 @@
|
|||
/** Load WordPress Bootstrap */
|
||||
require_once ('admin.php');
|
||||
$title = __('Import');
|
||||
$parent_file = 'edit.php';
|
||||
require_once ('admin-header.php');
|
||||
?>
|
||||
|
||||
|
|
|
@ -0,0 +1,79 @@
|
|||
<?php
|
||||
require_once('admin.php');
|
||||
|
||||
$title = __('Inbox');
|
||||
$parent_file = 'inbox.php';
|
||||
|
||||
require_once('admin-header.php');
|
||||
|
||||
if ( !empty($_GET['doaction']) ) :
|
||||
|
||||
?>
|
||||
|
||||
<div class="updated">
|
||||
<p>This feature isn't enabled in this prototype.</p>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
endif;
|
||||
|
||||
?>
|
||||
<div class="wrap">
|
||||
<form id="inbox-filter" action="" method="get">
|
||||
<h2><?php _e('Inbox'); ?></h2>
|
||||
<ul class="subsubsub">
|
||||
<li><a href="#" class="current"><?php _e('Messages') ?></a></li> | <li><a href="#"><?php echo sprintf(__('Archived') . ' (%s)', '42'); ?></a></li>
|
||||
</ul>
|
||||
<div class="tablenav">
|
||||
<div class="alignleft">
|
||||
<select name="action">
|
||||
<option value="" selected><?php _e('Actions'); ?></option>
|
||||
<option value="archive"><?php _e('Archive'); ?></option>
|
||||
</select>
|
||||
<input type="submit" value="<?php _e('Apply'); ?>" name="doaction" class="button-secondary action" />
|
||||
</div>
|
||||
<br class="clear" />
|
||||
</div>
|
||||
<br class="clear" />
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="check-column"><input type="checkbox"/></th>
|
||||
<th scope="col"><?php _e('Message'); ?></th>
|
||||
<th scope="col"><?php _e('Date'); ?></th>
|
||||
<th scope="col"><?php _e('From'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php $crazy_posts = array( '', 'some post', 'a post', 'my cool post' ); foreach ( wp_get_inbox_items() as $k => $item ) : // crazyhorse ?>
|
||||
|
||||
<tr id="message-<?php echo $k; ?>">
|
||||
<th scope="col" class="check-column"><input type="checkbox" name="messages[]" value="<?php echo $k; ?>" /></td>
|
||||
<td><?php
|
||||
if ( $item->href )
|
||||
echo "<a href='$item->href' class='no-crazy'>";
|
||||
echo wp_specialchars( $item->text );
|
||||
if ( strlen( $item->text ) > 180 ) // crazyhorse
|
||||
echo '<br/><span class="inbox-more">more…</span>';
|
||||
if ( $item->href )
|
||||
echo '</a>';
|
||||
?></td>
|
||||
<td><a href="#link-to-comment" class="no-crazy"><abbr title="<?php echo "$item->date at $item->time"; ?>"><?php echo $item->date; ?></abbr></a></td>
|
||||
<td><?php
|
||||
echo $item->from;
|
||||
if ( 'comment' == $item->type ) // crazyhorse
|
||||
echo "<br/>on "<a href='#' class='no-crazy'>{$crazy_posts[$item->parent]}</a>"";
|
||||
?></td>
|
||||
</tr>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<div class="tablenav"></div>
|
||||
<br class="clear"/>
|
||||
</div>
|
||||
<?php include('admin-footer.php'); ?>
|
|
@ -126,4 +126,49 @@ if ( is_admin() && ('edit-comments.php' == $pagenow || 'edit.php' == $pagenow) )
|
|||
add_filter( 'comment_author', 'floated_admin_avatar' );
|
||||
}
|
||||
|
||||
function wp_get_inbox_items() {
|
||||
$r = array();
|
||||
$r[] = (object) array(
|
||||
'text' => 'Your take on the evolution of Dr. Who is ridiculous. The fact that the actors are getting younger has nothing to do with Gallifrey lore, and everything to do with celebrity culture.',
|
||||
'date' => '2008/09/07',
|
||||
'time' => '4:19pm',
|
||||
'from' => 'I. monroe',
|
||||
'type' => 'comment',
|
||||
'parent' => '1',
|
||||
'href' => '#'
|
||||
);
|
||||
|
||||
$r[] = (object) array(
|
||||
'text' => 'Announcement: WordPress introduces new features for mobile blogging.',
|
||||
'date' => '2008/09/06',
|
||||
'time' => '3:24pm',
|
||||
'from' => 'WordPress.org',
|
||||
'type' => 'announcement',
|
||||
'parent' => '0',
|
||||
'href' => '#'
|
||||
);
|
||||
|
||||
$r[] = (object) array(
|
||||
'text' => 'Great review. You left out a few things, but maybe you were trying to avoid spoilers? Will check back later in a week.',
|
||||
'date' => '2008/09/06',
|
||||
'time' => '2:46pm',
|
||||
'from' => 'matt',
|
||||
'type' => 'comment',
|
||||
'parent' => '2',
|
||||
'href' => '#'
|
||||
);
|
||||
|
||||
$r[] = (object) array(
|
||||
'text' => 'nice picture!',
|
||||
'date' => '2008/08/05',
|
||||
'time' => '9:17am',
|
||||
'from' => 'caped crusader',
|
||||
'type' => 'comment',
|
||||
'parent' => '3',
|
||||
'href' => '#'
|
||||
);
|
||||
|
||||
return $r;
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -691,3 +691,80 @@ function wp_create_post_autosave( $post_id ) {
|
|||
// Otherwise create the new autosave as a special post revision
|
||||
return _wp_put_post_revision( $_POST, true );
|
||||
}
|
||||
|
||||
/**
|
||||
* wp_teeny_mce() - adds a trimmed down version of the tinyMCE editor used on the Write -> Post screen.
|
||||
*
|
||||
* @package WordPress
|
||||
* @since 2.6
|
||||
*/
|
||||
function wp_teeny_mce( $args = null ) {
|
||||
if ( !user_can_richedit() )
|
||||
return;
|
||||
|
||||
$defaults = array(
|
||||
'buttons1' => 'bold,italic,underline,blockquote,separator,strikethrough,bullist,numlist,undo,redo,link,unlink'
|
||||
);
|
||||
$args = wp_parse_args( $args, $defaults );
|
||||
if ( is_array( $args['buttons1'] ) )
|
||||
$args['buttons1'] = join( ',', $args['buttons1'] );
|
||||
|
||||
$language = ( '' == get_locale() ) ? 'en' : strtolower( substr(get_locale(), 0, 2) );
|
||||
|
||||
?>
|
||||
|
||||
<script type="text/javascript" src="<?php echo clean_url( site_url( 'wp-includes/js/tinymce/tiny_mce.js' ) ); ?>"></script>
|
||||
<script type="text/javascript">
|
||||
/* <![CDATA[ */
|
||||
<?php
|
||||
// Add TinyMCE languages
|
||||
@include_once( ABSPATH . WPINC . '/js/tinymce/langs/wp-langs.php' );
|
||||
|
||||
if ( isset($strings) )
|
||||
echo $strings;
|
||||
|
||||
?>
|
||||
(function() {
|
||||
var base = tinymce.baseURL, sl = tinymce.ScriptLoader, ln = "<?php echo $language; ?>";
|
||||
|
||||
sl.markDone(base + '/langs/' + ln + '.js');
|
||||
sl.markDone(base + '/themes/advanced/langs/' + ln + '.js');
|
||||
sl.markDone(base + '/themes/advanced/langs/' + ln + '_dlg.js');
|
||||
})();
|
||||
|
||||
var wpTeenyMCEInit = function() {
|
||||
tinyMCE.init({
|
||||
mode: "textareas",
|
||||
editor_selector: "mceEditor",
|
||||
language : "<?php echo $language; ?>",
|
||||
width: "100%",
|
||||
theme : "advanced",
|
||||
theme_advanced_buttons1 : "<?php echo $args['buttons1']; ?>",
|
||||
theme_advanced_buttons2 : "",
|
||||
theme_advanced_buttons3 : "",
|
||||
theme_advanced_toolbar_location : "top",
|
||||
theme_advanced_toolbar_align : "left",
|
||||
theme_advanced_statusbar_location : "bottom",
|
||||
theme_advanced_resizing : true,
|
||||
theme_advanced_resize_horizontal : false,
|
||||
skin : "wp_theme",
|
||||
dialog_type : "modal",
|
||||
relative_urls : false,
|
||||
remove_script_host : false,
|
||||
convert_urls : false,
|
||||
apply_source_formatting : false,
|
||||
remove_linebreaks : true,
|
||||
accessibility_focus : false,
|
||||
tab_focus : ":next",
|
||||
plugins : "safari,inlinepopups",
|
||||
entities : "38,amp,60,lt,62,gt",
|
||||
force_p_newlines : true,
|
||||
save_callback : 'switchEditors.saveCallback'
|
||||
});
|
||||
};
|
||||
wpTeenyMCEInit();
|
||||
/* ]]> */
|
||||
</script>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ function update_nag() {
|
|||
|
||||
echo "<div id='update-nag'>$msg</div>";
|
||||
}
|
||||
add_action( 'admin_notices', 'update_nag', 3 );
|
||||
//add_action( 'admin_notices', 'update_nag', 3 ); // crazyhorse
|
||||
|
||||
// Called directly from dashboard
|
||||
function update_right_now_message() {
|
||||
|
|
|
@ -53,102 +53,6 @@ $today = current_time('mysql', 1);
|
|||
?>
|
||||
|
||||
<div class="wrap">
|
||||
|
||||
<h2><?php _e('Dashboard'); ?></h2>
|
||||
|
||||
<div id="rightnow">
|
||||
<h3 class="reallynow">
|
||||
<span><?php _e('Right Now'); ?></span>
|
||||
|
||||
<?php if ( $can_edit_posts = current_user_can( 'edit_posts' ) ) : ?>
|
||||
<a href="post-new.php" class="rbutton"><strong><?php _e('Write a New Post'); ?></strong></a>
|
||||
<?php endif; if ( $can_edit_pages = current_user_can( 'edit_pages' ) ) : ?>
|
||||
<a href="page-new.php" class="rbutton"><?php _e('Write a New Page'); ?></a>
|
||||
<?php endif; ?>
|
||||
<br class="clear" />
|
||||
</h3>
|
||||
|
||||
<?php
|
||||
$num_posts = wp_count_posts( 'post' );
|
||||
$num_pages = wp_count_posts( 'page' );
|
||||
|
||||
$num_cats = wp_count_terms('category');
|
||||
|
||||
$num_tags = wp_count_terms('post_tag');
|
||||
|
||||
$num_comm = get_comment_count( );
|
||||
|
||||
$post_type_texts = array();
|
||||
|
||||
if ( !empty($num_posts->publish) ) { // with feeds, anyone can tell how many posts there are. Just unlink if !current_user_can
|
||||
$post_text = sprintf( __ngettext( '%s post', '%s posts', $num_posts->publish ), number_format_i18n( $num_posts->publish ) );
|
||||
$post_type_texts[] = $can_edit_posts ? "<a href='edit.php'>$post_text</a>" : $post_text;
|
||||
}
|
||||
if ( $can_edit_pages && !empty($num_pages->publish) ) { // how many pages is not exposed in feeds. Don't show if !current_user_can
|
||||
$post_type_texts[] = '<a href="edit-pages.php">'.sprintf( __ngettext( '%s page', '%s pages', $num_pages->publish ), number_format_i18n( $num_pages->publish ) ).'</a>';
|
||||
}
|
||||
if ( $can_edit_posts && !empty($num_posts->draft) ) {
|
||||
$post_type_texts[] = '<a href="edit.php?post_status=draft">'.sprintf( __ngettext( '%s draft', '%s drafts', $num_posts->draft ), number_format_i18n( $num_posts->draft ) ).'</a>';
|
||||
}
|
||||
if ( $can_edit_posts && !empty($num_posts->future) ) {
|
||||
$post_type_texts[] = '<a href="edit.php?post_status=future">'.sprintf( __ngettext( '%s scheduled post', '%s scheduled posts', $num_posts->future ), number_format_i18n( $num_posts->future ) ).'</a>';
|
||||
}
|
||||
|
||||
if ( current_user_can('publish_posts') && !empty($num_posts->pending) ) {
|
||||
$pending_text = sprintf( __ngettext( 'There is <a href="%1$s">%2$s post</a> pending your review.', 'There are <a href="%1$s">%2$s posts</a> pending your review.', $num_posts->pending ), 'edit.php?post_status=pending', number_format_i18n( $num_posts->pending ) );
|
||||
} else {
|
||||
$pending_text = '';
|
||||
}
|
||||
|
||||
$cats_text = sprintf( __ngettext( '%s category', '%s categories', $num_cats ), number_format_i18n( $num_cats ) );
|
||||
$tags_text = sprintf( __ngettext( '%s tag', '%s tags', $num_tags ), number_format_i18n( $num_tags ) );
|
||||
if ( current_user_can( 'manage_categories' ) ) {
|
||||
$cats_text = "<a href='categories.php'>$cats_text</a>";
|
||||
$tags_text = "<a href='edit-tags.php'>$tags_text</a>";
|
||||
}
|
||||
|
||||
$total_comments = sprintf( __ngettext( '%1$s total', '%1$s total', $num_comm['total_comments'] ), number_format_i18n($num_comm['total_comments']) );
|
||||
$approved_comments = sprintf( __ngettext( '%1$s approved', '%1$s approved', $num_comm['approved'] ), number_format_i18n($num_comm['approved']) );
|
||||
$spam_comments = sprintf( __ngettext( '%1$s spam', '%1$s spam', $num_comm['spam'] ), number_format_i18n($num_comm['spam']) );
|
||||
$moderated_comments = sprintf( __ngettext( '%1$s awaiting moderation', '%1$s awaiting moderation', $num_comm['awaiting_moderation'] ), number_format_i18n($num_comm['awaiting_moderation']) );
|
||||
|
||||
if( current_user_can( 'moderate_comments' ) ) {
|
||||
$total_comments = "<a href='edit-comments.php'>{$total_comments}</a>";
|
||||
$approved_comments = "<a href='edit-comments.php?comment_status=approved'>{$approved_comments}</a>";
|
||||
$moderated_comments = "<a href='edit-comments.php?comment_status=moderated'>{$moderated_comments}</a>";
|
||||
}
|
||||
|
||||
$comm_text = sprintf( __ngettext( 'You have %1$s comment, %2$s, %3$s and %4$s.', 'You have %1$s comments, %2$s, %3$s and %4$s.', $num_comm['total_comments'] ), $total_comments, $approved_comments, $spam_comments, $moderated_comments );
|
||||
|
||||
$post_type_text = implode(', ', $post_type_texts);
|
||||
|
||||
// There is always a category
|
||||
$sentence = sprintf( __( 'You have %1$s, contained within %2$s and %3$s. %4$s %5$s' ), $post_type_text, $cats_text, $tags_text, $pending_text, $comm_text );
|
||||
$sentence = apply_filters( 'dashboard_count_sentence', $sentence, $post_type_text, $cats_text, $tags_text, $pending_text, $comm_text );
|
||||
|
||||
?>
|
||||
<p class="youhave"><?php echo $sentence; ?></p>
|
||||
<?php
|
||||
$ct = current_theme_info();
|
||||
$sidebars_widgets = wp_get_sidebars_widgets();
|
||||
$num_widgets = array_reduce( $sidebars_widgets, create_function( '$prev, $curr', 'return $prev+count($curr);' ), 0 );
|
||||
$widgets_text = sprintf( __ngettext( '%d widget', '%d widgets', $num_widgets ), $num_widgets );
|
||||
if ( $can_switch_themes = current_user_can( 'switch_themes' ) )
|
||||
$widgets_text = "<a href='widgets.php'>$widgets_text</a>";
|
||||
?>
|
||||
<p class="youare">
|
||||
<?php printf( __( 'You are using the %1$s theme with %2$s.' ), $ct->title, $widgets_text ); ?>
|
||||
<?php if ( $can_switch_themes ) : ?>
|
||||
<a href="themes.php" class="rbutton"><?php _e('Change Theme'); ?></a>
|
||||
<?php endif; ?>
|
||||
<?php update_right_now_message(); ?>
|
||||
</p>
|
||||
<?php do_action( 'rightnow_end' ); ?>
|
||||
<?php do_action( 'activity_box_end' ); ?>
|
||||
</div><!-- rightnow -->
|
||||
|
||||
<br class="clear" />
|
||||
|
||||
<div id="dashboard-widgets-wrap">
|
||||
|
||||
<?php wp_dashboard(); ?>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
jQuery(document).ready( function() {
|
||||
add_postbox_toggles('comment');
|
||||
postboxes.add_postbox_toggles('comment');
|
||||
|
||||
// close postboxes that should be closed
|
||||
jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed');
|
||||
|
@ -10,17 +10,31 @@ jQuery(document).ready( function() {
|
|||
|
||||
jQuery('.edit-timestamp').click(function () {
|
||||
if (jQuery('#timestampdiv').is(":hidden")) {
|
||||
jQuery('#curtime').slideUp("normal");
|
||||
jQuery('#timestampdiv').slideDown("normal");
|
||||
jQuery('.edit-timestamp').text(commentL10n.cancel);
|
||||
} else {
|
||||
jQuery('#timestampdiv').hide();
|
||||
jQuery('#timestampdiv').slideUp("normal");
|
||||
jQuery('#mm').val(jQuery('#hidden_mm').val());
|
||||
jQuery('#jj').val(jQuery('#hidden_jj').val());
|
||||
jQuery('#aa').val(jQuery('#hidden_aa').val());
|
||||
jQuery('#hh').val(jQuery('#hidden_hh').val());
|
||||
jQuery('#mn').val(jQuery('#hidden_mn').val());
|
||||
jQuery('.edit-timestamp').text(commentL10n.edit);
|
||||
jQuery('#curtime').slideDown("normal");
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
jQuery('.save-timestamp').click(function () { // crazyhorse - multiple ok cancels
|
||||
jQuery('#timestampdiv').hide();
|
||||
var link = jQuery('.timestamp a').clone( true );
|
||||
jQuery('.timestamp').show().html(
|
||||
jQuery( '#mm option[value=' + jQuery('#mm').val() + ']' ).text() + ' ' +
|
||||
jQuery('#jj').val() + ',' +
|
||||
jQuery('#aa').val() + '@' +
|
||||
jQuery('#hh').val() + ':' +
|
||||
jQuery('#mn').val() + ' '
|
||||
).append( link );
|
||||
jQuery('#curtime').slideDown("normal");
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
|
|
@ -4,11 +4,20 @@ jQuery(document).ready( function() {
|
|||
|
||||
// Reveal
|
||||
jQuery('.wp-no-js-hidden').removeClass( 'wp-no-js-hidden' );
|
||||
|
||||
// show things that should be visible, hide what should be hidden
|
||||
jQuery('.hide-if-no-js').show();
|
||||
jQuery('.hide-if-js').hide();
|
||||
|
||||
// Basic form validation
|
||||
if ( ( 'undefined' != typeof wpAjax ) && jQuery.isFunction( wpAjax.validateForm ) ) {
|
||||
jQuery('form.validate').submit( function() { return wpAjax.validateForm( jQuery(this) ); } );
|
||||
}
|
||||
|
||||
jQuery('a.no-crazy').click( function() {
|
||||
alert( "This feature isn't enabled in this prototype." );
|
||||
return false;
|
||||
} );
|
||||
});
|
||||
|
||||
(function(JQ) {
|
||||
|
@ -25,7 +34,7 @@ jQuery(document).ready( function() {
|
|||
el.find('img').removeAttr('alt');
|
||||
|
||||
el.mouseover(function(e) {
|
||||
txt = el.attr('tip'), o = el.offset();;
|
||||
txt = el.attr('tip'), o = el.offset();
|
||||
|
||||
clearTimeout(TT.sD);
|
||||
TT.find('p').html(txt);
|
||||
|
@ -42,4 +51,28 @@ jQuery(document).ready( function() {
|
|||
}
|
||||
}(jQuery));
|
||||
|
||||
jQuery( function($) {
|
||||
var menuToggle = function(ul, effect) {
|
||||
if ( !effect ) {
|
||||
effect = 'slideToggle';
|
||||
}
|
||||
ul[effect]().parent().toggleClass( 'wp-menu-open' );
|
||||
return false;
|
||||
};
|
||||
|
||||
jQuery('#adminmenu li.wp-has-submenu > a').click( function() { return menuToggle( jQuery(this).siblings('ul') ); } );
|
||||
|
||||
jQuery('#dashmenu li.wp-has-submenu').bind( 'mouseenter mouseleave', function() { return menuToggle( jQuery(this).children('ul'), 'toggle' ); } );
|
||||
|
||||
// Temp
|
||||
if ( !$('#post-search, #widget-search').size() ) {
|
||||
$('#wphead').append( '<p id="post-search-prep"><input id="post-search-input" type="text" /><input class="button" type="button" value="Search" /></p>' );
|
||||
}
|
||||
|
||||
// Temp 2
|
||||
var minH = $(window).height()-185+"px"
|
||||
$('#wpbody-content').css("min-height", minH);
|
||||
|
||||
} );
|
||||
|
||||
jQuery(function(){jQuery('#media-buttons a').tTips();});
|
||||
|
|
|
@ -55,6 +55,17 @@ var delAfter = function( r, settings ) {
|
|||
var n = parseInt(a.html(),10) - 1;
|
||||
a.html( n.toString() );
|
||||
});
|
||||
$('li span.spam-comment-count' ).each( function() {
|
||||
var a = $(this);
|
||||
var n = parseInt(a.html(),10);
|
||||
if ( $(settings.target).parents( 'span.spam' ).size() ) { // we marked a comment as spam
|
||||
n = n + 1;
|
||||
} else if ( $('#' + settings.element).is('.spam') ) { // we approved or deleted a comment marked as spam
|
||||
n = n - 1;
|
||||
}
|
||||
if ( n < 0 ) { n = 0; }
|
||||
a.html( n.toString() );
|
||||
});
|
||||
|
||||
if ( theExtraList.size() == 0 || theExtraList.children().size() == 0 ) {
|
||||
return;
|
||||
|
|
|
@ -4,7 +4,7 @@ jQuery(document).ready( function() {
|
|||
|
||||
jQuery('#link_name').focus();
|
||||
// postboxes
|
||||
add_postbox_toggles('link');
|
||||
postboxes.add_postbox_toggles('link');
|
||||
|
||||
// category tabs
|
||||
var categoryTabs = jQuery('#category-tabs').tabs();
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
jQuery(document).ready( function() {
|
||||
add_postbox_toggles('page');
|
||||
postboxes.add_postbox_toggles('page');
|
||||
make_slugedit_clickable();
|
||||
|
||||
// close postboxes that should be closed
|
||||
jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed');
|
||||
|
||||
// show things that should be visible, hide what should be hidden
|
||||
jQuery('.hide-if-no-js').show();
|
||||
jQuery('.hide-if-js').hide();
|
||||
|
||||
jQuery('#title').blur( function() { if ( (jQuery("#post_ID").val() > 0) || (jQuery("#title").val().length == 0) ) return; autosave(); } );
|
||||
|
||||
// hide advanced slug field
|
||||
|
@ -16,17 +12,31 @@ jQuery(document).ready( function() {
|
|||
|
||||
jQuery('.edit-timestamp').click(function () {
|
||||
if (jQuery('#timestampdiv').is(":hidden")) {
|
||||
jQuery('#curtime').slideUp("normal");
|
||||
jQuery('#timestampdiv').slideDown("normal");
|
||||
jQuery('.edit-timestamp').text(postL10n.cancel);
|
||||
} else {
|
||||
jQuery('#timestampdiv').hide();
|
||||
jQuery('#timestampdiv').slideUp("normal");
|
||||
jQuery('#mm').val(jQuery('#hidden_mm').val());
|
||||
jQuery('#jj').val(jQuery('#hidden_jj').val());
|
||||
jQuery('#aa').val(jQuery('#hidden_aa').val());
|
||||
jQuery('#hh').val(jQuery('#hidden_hh').val());
|
||||
jQuery('#mn').val(jQuery('#hidden_mn').val());
|
||||
jQuery('.edit-timestamp').text(postL10n.edit);
|
||||
jQuery('#curtime').slideDown("normal");
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
jQuery('.save-timestamp').click(function () { // crazyhorse - multiple ok cancels
|
||||
jQuery('#timestampdiv').hide();
|
||||
var link = jQuery('.timestamp a').clone( true );
|
||||
jQuery('.timestamp').show().html(
|
||||
jQuery( '#mm option[value=' + jQuery('#mm').val() + ']' ).text() + ' ' +
|
||||
jQuery('#jj').val() + ',' +
|
||||
jQuery('#aa').val() + '@' +
|
||||
jQuery('#hh').val() + ':' +
|
||||
jQuery('#mn').val() + ' '
|
||||
).append( link );
|
||||
jQuery('#curtime').slideDown("normal");
|
||||
return false;
|
||||
});
|
||||
});
|
|
@ -64,12 +64,8 @@ jQuery(document).ready( function() {
|
|||
// close postboxes that should be closed
|
||||
jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed');
|
||||
|
||||
// show things that should be visible, hide what should be hidden
|
||||
jQuery('.hide-if-no-js').show();
|
||||
jQuery('.hide-if-js').hide();
|
||||
|
||||
// postboxes
|
||||
add_postbox_toggles('post');
|
||||
postboxes.add_postbox_toggles('post');
|
||||
|
||||
// Editable slugs
|
||||
make_slugedit_clickable();
|
||||
|
@ -161,19 +157,32 @@ jQuery(document).ready( function() {
|
|||
|
||||
jQuery('.edit-timestamp').click(function () {
|
||||
if (jQuery('#timestampdiv').is(":hidden")) {
|
||||
jQuery('#curtime').slideUp("normal");
|
||||
jQuery('#timestampdiv').slideDown("normal");
|
||||
jQuery('.edit-timestamp').text(postL10n.cancel);
|
||||
} else {
|
||||
jQuery('#timestampdiv').hide();
|
||||
jQuery('#timestampdiv').slideUp("normal");
|
||||
jQuery('#mm').val(jQuery('#hidden_mm').val());
|
||||
jQuery('#jj').val(jQuery('#hidden_jj').val());
|
||||
jQuery('#aa').val(jQuery('#hidden_aa').val());
|
||||
jQuery('#hh').val(jQuery('#hidden_hh').val());
|
||||
jQuery('#mn').val(jQuery('#hidden_mn').val());
|
||||
jQuery('.edit-timestamp').text(postL10n.edit);
|
||||
jQuery('#curtime').slideDown("normal");
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
jQuery('.save-timestamp').click(function () { // crazyhorse - multiple ok cancels
|
||||
jQuery('#timestampdiv').hide();
|
||||
var link = jQuery('.timestamp a').clone( true );
|
||||
jQuery('.timestamp').show().html(
|
||||
jQuery( '#mm option[value=' + jQuery('#mm').val() + ']' ).text() + ' ' +
|
||||
jQuery('#jj').val() + ',' +
|
||||
jQuery('#aa').val() + '@' +
|
||||
jQuery('#hh').val() + ':' +
|
||||
jQuery('#mn').val() + ' '
|
||||
).append( link );
|
||||
jQuery('#curtime').slideDown("normal");
|
||||
return false;
|
||||
});
|
||||
|
||||
// Custom Fields
|
||||
|
|
|
@ -1,7 +1,66 @@
|
|||
function add_postbox_toggles(page) {
|
||||
jQuery('.postbox h3').prepend('<a class="togbox">+</a> ');
|
||||
jQuery('.postbox h3').click( function() { jQuery(jQuery(this).parent().get(0)).toggleClass('closed'); save_postboxes_state(page); } );
|
||||
}
|
||||
|
||||
(function($) {
|
||||
postboxes = {
|
||||
add_postbox_toggles : function(page) {
|
||||
$('.postbox h3').before('<a class="togbox">+</a> ');
|
||||
$('.postbox a.togbox').click( function() { $($(this).parent().get(0)).toggleClass('closed'); save_postboxes_state(page); } );
|
||||
|
||||
if ( $.browser.msie ) {
|
||||
$('#side-sortables').append( '<div id="make-it-tall"></div>' );
|
||||
} else {
|
||||
$('#side-sortables').append( '<div id="make-it-tall" style="margin-bottom: -2000px; padding-bottom: 2001px"></div>' );
|
||||
}
|
||||
$('#wpbody-content').css( 'overflow', 'hidden' );
|
||||
|
||||
this.init(page);
|
||||
},
|
||||
|
||||
expandSidebar : function( doIt ) {
|
||||
if ( doIt || $.trim( $( '#side-info-column' ).text() ) ) {
|
||||
$( '#post-body' ).addClass( 'has-sidebar' );
|
||||
$( '#side-sortables' ).css('z-index','0');
|
||||
} else {
|
||||
$( '#post-body' ).removeClass( 'has-sidebar' );
|
||||
$( '#side-sortables' ).css('z-index','-1');
|
||||
}
|
||||
},
|
||||
|
||||
init : function(page) {
|
||||
jQuery('.meta-box-sortables').sortable( {
|
||||
connectWith: [ '.meta-box-sortables' ],
|
||||
items: '> .postbox',
|
||||
handle: 'h3',
|
||||
stop: function() {
|
||||
if ( 'side-sortables' == this.id ) { // doing this with jQuery doesn't work for some reason: make-it-tall gets duplicated
|
||||
var makeItTall = document.getElementById( 'make-it-tall' );
|
||||
var sideSort = makeItTall.parentNode;
|
||||
sideSort.removeChild( makeItTall );
|
||||
sideSort.appendChild( makeItTall );
|
||||
|
||||
}
|
||||
var postVars = {
|
||||
action: 'meta-box-order',
|
||||
_ajax_nonce: jQuery('#meta-box-order-nonce').val(),
|
||||
page: page
|
||||
}
|
||||
jQuery('.meta-box-sortables').each( function() {
|
||||
postVars["order[" + this.id.split('-')[0] + "]"] = jQuery(this).sortable( 'toArray' ).join(',');
|
||||
} );
|
||||
jQuery.post( postboxL10n.requestFile, postVars, function() {
|
||||
postboxes.expandSidebar();
|
||||
} );
|
||||
},
|
||||
over: function(e, ui) {
|
||||
if ( !ui.element.is( '#side-sortables' ) )
|
||||
return;
|
||||
postboxes.expandSidebar( true );
|
||||
}
|
||||
} );
|
||||
}
|
||||
}
|
||||
}(jQuery));
|
||||
|
||||
jQuery(document).ready(function(){postboxes.expandSidebar();});
|
||||
|
||||
function save_postboxes_state(page) {
|
||||
var closed = jQuery('.postbox').filter('.closed').map(function() { return this.id; }).get().join(',');
|
||||
|
|
|
@ -11,7 +11,8 @@ require_once('admin.php');
|
|||
|
||||
$title = __('Add Link');
|
||||
$this_file = 'link-manager.php';
|
||||
$parent_file = 'post-new.php';
|
||||
$parent_file = 'edit.php';
|
||||
$submenu_file = 'link-manager.php';
|
||||
|
||||
|
||||
wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image',
|
||||
|
@ -22,6 +23,10 @@ wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image',
|
|||
wp_enqueue_script('link');
|
||||
wp_enqueue_script('xfn');
|
||||
|
||||
$link_added = ( isset($_GET['added']) && '' != $_POST['link_name'] ) ?
|
||||
'<div id="message" class="updated fade"><p>' . __('Link added.') . '</p></div>' : '';
|
||||
|
||||
$fixed_bar = true;
|
||||
require('admin-header.php');
|
||||
?>
|
||||
|
||||
|
|
|
@ -106,6 +106,7 @@ switch ($action) {
|
|||
if (!$link = get_link_to_edit($link_id))
|
||||
wp_die(__('Link not found.'));
|
||||
|
||||
$fixed_bar = true;
|
||||
include_once ('admin-header.php');
|
||||
include ('edit-link-form.php');
|
||||
include ('admin-footer.php');
|
||||
|
|
|
@ -20,165 +20,118 @@ global $menu, $submenu, $parent_file; //For when admin-header is included from w
|
|||
|
||||
get_admin_page_parent();
|
||||
|
||||
// We're going to do this loop three times
|
||||
?>
|
||||
function _wp_menu_output( &$menu, &$submenu, $submenu_as_parent = true ) {
|
||||
global $self, $parent_file, $submenu_file, $plugin_page;
|
||||
|
||||
<ul id="dashmenu">
|
||||
<?php
|
||||
foreach ( $menu as $key => $item ) {
|
||||
if ( 3 < $key ) // get each menu item before 3
|
||||
continue;
|
||||
$class = '';
|
||||
// 0 = name, 1 = capability, 2 = file
|
||||
if (( strcmp($self, $item[2]) == 0 && empty($parent_file)) || ($parent_file && ($item[2] == $parent_file))) $class = ' class="current"';
|
||||
$first = true;
|
||||
// 0 = name, 1 = capability, 2 = file, 3 = class
|
||||
foreach ( $menu as $key => $item ) {
|
||||
$class = array();
|
||||
if ( $first ) {
|
||||
$class[] = 'wp-first-item';
|
||||
$first = false;
|
||||
}
|
||||
if ( !empty($submenu[$item[2]]) )
|
||||
$class[] = 'wp-has-submenu';
|
||||
|
||||
if ( !empty($submenu[$item[2]]) ) {
|
||||
$submenu[$item[2]] = array_values($submenu[$item[2]]); // Re-index.
|
||||
$menu_hook = get_plugin_page_hook($submenu[$item[2]][0][2], $item[2]);
|
||||
if ( file_exists(WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook))
|
||||
echo "\n\t<li><a href='admin.php?page={$submenu[$item[2]][0][2]}'$class>{$item[0]}</a></li>";
|
||||
else
|
||||
echo "\n\t<li><a href='{$submenu[$item[2]][0][2]}'$class>{$item[0]}</a></li>";
|
||||
} else if ( current_user_can($item[1]) ) {
|
||||
$menu_hook = get_plugin_page_hook($item[2], 'admin.php');
|
||||
if ( file_exists(WP_PLUGIN_DIR . "/{$item[2]}") || !empty($menu_hook) )
|
||||
echo "\n\t<li><a href='admin.php?page={$item[2]}'$class>{$item[0]}</a></li>";
|
||||
else
|
||||
echo "\n\t<li><a href='{$item[2]}'$class>{$item[0]}</a></li>";
|
||||
if ( ( $parent_file && $item[2] == $parent_file ) || strcmp($self, $item[2]) == 0 ) {
|
||||
if ( !empty($submenu[$item[2]]) )
|
||||
$class[] = 'wp-has-current-submenu wp-menu-open';
|
||||
else
|
||||
$class[] = 'current';
|
||||
}
|
||||
|
||||
if ( isset($item[3]) )
|
||||
$class[] = $item[3];
|
||||
|
||||
$class = $class ? ' class="' . join( ' ', $class ) . '"' : '';
|
||||
|
||||
echo "\n\t<li$class>";
|
||||
|
||||
if ( $submenu_as_parent && !empty($submenu[$item[2]]) ) {
|
||||
$submenu[$item[2]] = array_values($submenu[$item[2]]); // Re-index.
|
||||
$menu_hook = get_plugin_page_hook($submenu[$item[2]][0][2], $item[2]);
|
||||
if ( file_exists(WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook))
|
||||
echo "<a href='admin.php?page={$submenu[$item[2]][0][2]}'$class>{$item[0]}</a>";
|
||||
else
|
||||
echo "\n\t<a href='{$submenu[$item[2]][0][2]}'$class>{$item[0]}</a>";
|
||||
} else if ( current_user_can($item[1]) ) {
|
||||
$menu_hook = get_plugin_page_hook($item[2], 'admin.php');
|
||||
if ( file_exists(WP_PLUGIN_DIR . "/{$item[2]}") || !empty($menu_hook) )
|
||||
echo "\n\t<a href='admin.php?page={$item[2]}'$class>{$item[0]}</a>";
|
||||
else
|
||||
echo "\n\t<a href='{$item[2]}'$class>{$item[0]}</a>";
|
||||
}
|
||||
|
||||
if ( !empty($submenu[$item[2]]) ) {
|
||||
echo "\n\t<ul class='wp-submenu'>";
|
||||
$first = true;
|
||||
foreach ( $submenu[$item[2]] as $sub_key => $sub_item ) {
|
||||
if ( !current_user_can($sub_item[1]) )
|
||||
continue;
|
||||
|
||||
$class = array();
|
||||
if ( $first ) {
|
||||
$class[] = 'wp-first-item';
|
||||
$first = false;
|
||||
}
|
||||
if ( isset($submenu_file) ) {
|
||||
if ( $submenu_file == $sub_item[2] )
|
||||
$class[] = 'current';
|
||||
} else if ( (isset($plugin_page) && $plugin_page == $sub_item[2]) || (!isset($plugin_page) && $self == $sub_item[2]) ) {
|
||||
$class[] = 'current';
|
||||
}
|
||||
|
||||
$class = $class ? ' class="' . join( ' ', $class ) . '"' : '';
|
||||
|
||||
$menu_hook = get_plugin_page_hook($sub_item[2], $item[2]);
|
||||
|
||||
if ( file_exists(WP_PLUGIN_DIR . "/{$sub_item[2]}") || ! empty($menu_hook) ) {
|
||||
if ( 'admin.php' == $pagenow )
|
||||
echo "\n\t\t<li$class><a href='admin.php?page={$sub_item[2]}'$class>{$sub_item[0]}</a></li>";
|
||||
else
|
||||
echo "\n\t\t<li$class><a href='{$item[2]}?page={$sub_item[2]}'$class>{$sub_item[0]}</a></li>";
|
||||
} else {
|
||||
echo "\n\t\t<li$class><a href='{$sub_item[2]}'$class>{$sub_item[0]}</a></li>";
|
||||
}
|
||||
}
|
||||
echo "\n\t</ul>";
|
||||
}
|
||||
echo "</li>";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<ul id="dashmenu" class="wp-menu">
|
||||
|
||||
<?php
|
||||
|
||||
_wp_menu_output( $top_menu, $top_submenu, false );
|
||||
do_action( 'dashmenu' );
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<ul id="adminmenu">
|
||||
|
||||
<ul id="adminmenu" class="wp-menu">
|
||||
|
||||
<li class="write-new-button"><a class="button-secondary" href="post-new.php">Write New Post</a></li>
|
||||
|
||||
<?php
|
||||
foreach ( $menu as $key => $item ) {
|
||||
if ( 5 > $key || $key > 25 ) // get each menu item before 3
|
||||
continue;
|
||||
|
||||
$class = '';
|
||||
|
||||
// 0 = name, 1 = capability, 2 = file
|
||||
if (( strcmp($self, $item[2]) == 0 && empty($parent_file)) || ($parent_file && ($item[2] == $parent_file))) $class = ' class="current"';
|
||||
|
||||
if ( !empty($submenu[$item[2]]) ) {
|
||||
$submenu[$item[2]] = array_values($submenu[$item[2]]); // Re-index.
|
||||
$menu_hook = get_plugin_page_hook($submenu[$item[2]][0][2], $item[2]);
|
||||
if ( file_exists(WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook))
|
||||
echo "\n\t<li><a href='admin.php?page={$submenu[$item[2]][0][2]}'$class>{$item[0]}</a></li>";
|
||||
else
|
||||
echo "\n\t<li><a href='{$submenu[$item[2]][0][2]}'$class>{$item[0]}</a></li>";
|
||||
} else if ( current_user_can($item[1]) ) {
|
||||
$menu_hook = get_plugin_page_hook($item[2], 'admin.php');
|
||||
if ( file_exists(WP_PLUGIN_DIR . "/{$item[2]}") || !empty($menu_hook) )
|
||||
echo "\n\t<li><a href='admin.php?page={$item[2]}'$class>{$item[0]}</a></li>";
|
||||
else
|
||||
echo "\n\t<li><a href='{$item[2]}'$class>{$item[0]}</a></li>";
|
||||
}
|
||||
}
|
||||
|
||||
foreach ( $menu as $key => $item ) {
|
||||
if ( $key < 41 ) // there is a more efficient way to do this!
|
||||
continue;
|
||||
|
||||
$class = '';
|
||||
|
||||
// 0 = name, 1 = capability, 2 = file
|
||||
if (( strcmp($self, $item[2]) == 0 && empty($parent_file)) || ($parent_file && ($item[2] == $parent_file))) $class = ' class="current"';
|
||||
|
||||
if ( !empty($submenu[$item[2]]) ) {
|
||||
$submenu[$item[2]] = array_values($submenu[$item[2]]); // Re-index.
|
||||
$menu_hook = get_plugin_page_hook($submenu[$item[2]][0][2], $item[2]);
|
||||
if ( file_exists(WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook))
|
||||
echo "\n\t<li><a href='admin.php?page={$submenu[$item[2]][0][2]}'$class>{$item[0]}</a></li>";
|
||||
else
|
||||
echo "\n\t<li><a href='{$submenu[$item[2]][0][2]}'$class>{$item[0]}</a></li>";
|
||||
} else if ( current_user_can($item[1]) ) {
|
||||
$menu_hook = get_plugin_page_hook($item[2], 'admin.php');
|
||||
if ( file_exists(WP_PLUGIN_DIR . "/{$item[2]}") || !empty($menu_hook) )
|
||||
echo "\n\t<li><a href='admin.php?page={$item[2]}'$class>{$item[0]}</a></li>";
|
||||
else
|
||||
echo "\n\t<li><a href='{$item[2]}'$class>{$item[0]}</a></li>";
|
||||
}
|
||||
}
|
||||
|
||||
_wp_menu_output( $menu, $submenu );
|
||||
do_action( 'adminmenu' );
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<ul id="sidemenu">
|
||||
<?php
|
||||
$side_items = array();
|
||||
foreach ( $menu as $key => $item ) {
|
||||
if ( 26 > $key || $key > 40 )
|
||||
continue;
|
||||
|
||||
$class = '';
|
||||
|
||||
// 0 = name, 1 = capability, 2 = file
|
||||
if (( strcmp($self, $item[2]) == 0 && empty($parent_file)) || ($parent_file && ($item[2] == $parent_file))) $class = ' class="current"';
|
||||
|
||||
if ( !empty($submenu[$item[2]]) ) {
|
||||
$submenu[$item[2]] = array_values($submenu[$item[2]]); // Re-index.
|
||||
$menu_hook = get_plugin_page_hook($submenu[$item[2]][0][2], $item[2]);
|
||||
if ( file_exists(WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook))
|
||||
$side_items[] = "\n\t<li><a href='admin.php?page={$submenu[$item[2]][0][2]}'$class>{$item[0]}</a>";
|
||||
else
|
||||
$side_items[] = "\n\t<li><a href='{$submenu[$item[2]][0][2]}'$class>{$item[0]}</a>";
|
||||
} else if ( current_user_can($item[1]) ) {
|
||||
$menu_hook = get_plugin_page_hook($item[2], 'admin.php');
|
||||
if ( file_exists(WP_PLUGIN_DIR . "/{$item[2]}") || !empty($menu_hook) )
|
||||
$side_items[] = "\n\t<li><a href='admin.php?page={$item[2]}'$class>{$item[0]}</a>";
|
||||
else
|
||||
$side_items[] = "\n\t<li><a href='{$item[2]}'$class>{$item[0]}</a>";
|
||||
}
|
||||
}
|
||||
echo implode(' </li>', $side_items) . '</li>';
|
||||
unset($side_items);
|
||||
do_action( 'sidemenu' );
|
||||
?>
|
||||
</ul>
|
||||
|
||||
|
||||
<?php
|
||||
// Sub-menu
|
||||
if ( isset($submenu["$parent_file"]) ) :
|
||||
?>
|
||||
<ul id="submenu">
|
||||
<?php
|
||||
foreach ($submenu["$parent_file"] as $item) :
|
||||
if ( !current_user_can($item[1]) )
|
||||
continue;
|
||||
|
||||
if ( isset($submenu_file) ) {
|
||||
if ( $submenu_file == $item[2] ) $class = ' class="current"';
|
||||
else $class = '';
|
||||
} else if ( (isset($plugin_page) && $plugin_page == $item[2]) || (!isset($plugin_page) && $self == $item[2]) ) $class = ' class="current"';
|
||||
else $class = '';
|
||||
|
||||
$menu_hook = get_plugin_page_hook($item[2], $parent_file);
|
||||
|
||||
if (file_exists(WP_PLUGIN_DIR . "/{$item[2]}") || ! empty($menu_hook)) {
|
||||
if ( 'admin.php' == $pagenow )
|
||||
echo "\n\t<li><a href='admin.php?page={$item[2]}'$class>{$item[0]}</a></li>";
|
||||
else
|
||||
echo "\n\t<li><a href='{$parent_file}?page={$item[2]}'$class>{$item[0]}</a></li>";
|
||||
} else {
|
||||
echo "\n\t<li><a href='{$item[2]}'$class>{$item[0]}</a></li>";
|
||||
}
|
||||
endforeach;
|
||||
?>
|
||||
|
||||
</ul>
|
||||
<?php
|
||||
else :
|
||||
?>
|
||||
<div id="minisub"></div>
|
||||
<?php
|
||||
|
||||
endif;
|
||||
|
||||
do_action('admin_notices');
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -18,79 +18,62 @@
|
|||
* @name $menu
|
||||
* @var array
|
||||
*/
|
||||
$menu[0] = array(__('Dashboard'), 'read', 'index.php');
|
||||
|
||||
if (strpos($_SERVER['REQUEST_URI'], 'edit-pages.php') !== false)
|
||||
$menu[5] = array(__('Write'), 'edit_pages', 'page-new.php');
|
||||
elseif (strpos($_SERVER['REQUEST_URI'], 'link-manager.php') !== false)
|
||||
$menu[5] = array(__('Write'), 'manage_links', 'link-add.php');
|
||||
else
|
||||
$menu[5] = array(__('Write'), 'edit_posts', 'post-new.php');
|
||||
|
||||
if (strpos($_SERVER['REQUEST_URI'], 'page-new.php') !== false)
|
||||
$menu[10] = array(__('Manage'), 'edit_pages', 'edit-pages.php');
|
||||
elseif (strpos($_SERVER['REQUEST_URI'], 'link-add.php') !== false)
|
||||
$menu[10] = array(__('Manage'), 'manage_links', 'link-manager.php');
|
||||
else
|
||||
$menu[10] = array(__('Manage'), 'edit_posts', 'edit.php');
|
||||
|
||||
$awaiting_mod = wp_count_comments();
|
||||
$awaiting_mod = $awaiting_mod->moderated;
|
||||
$menu[15] = array(__('Design'), 'switch_themes', 'themes.php');
|
||||
$menu[20] = array( sprintf( __('Comments %s'), "<span id='awaiting-mod' class='count-$awaiting_mod'><span class='comment-count'>" . number_format_i18n($awaiting_mod) . "</span></span>" ), 'edit_posts', 'edit-comments.php');
|
||||
$menu[30] = array(__('Settings'), 'manage_options', 'options-general.php');
|
||||
|
||||
$update_plugins = get_option( 'update_plugins' );
|
||||
$update_count = 0;
|
||||
if ( isset( $update_plugins->response ) )
|
||||
$update_count = count( $update_plugins->response );
|
||||
$inbox_num = count( wp_get_inbox_items() );
|
||||
$awaiting_mod = wp_count_comments();
|
||||
$awaiting_mod = $awaiting_mod->moderated;
|
||||
|
||||
$menu[35] = array( sprintf( __('Plugins %s'), "<span id='update-plugins' class='count-$update_count'><span class='plugin-count'>" . number_format_i18n($update_count) . "</span></span>" ), 'activate_plugins', 'plugins.php');
|
||||
if ( current_user_can('edit_users') )
|
||||
$menu[40] = array(__('Users'), 'edit_users', 'users.php');
|
||||
else
|
||||
$menu[40] = array(__('Profile'), 'read', 'profile.php');
|
||||
$top_menu = $top_submenu = $menu = $submenu = array();
|
||||
|
||||
$_wp_real_parent_file['post.php'] = 'post-new.php'; // Back-compat
|
||||
$submenu['post-new.php'][5] = array(__('Post'), 'edit_posts', 'post-new.php');
|
||||
$submenu['post-new.php'][10] = array(__('Page'), 'edit_pages', 'page-new.php');
|
||||
$submenu['post-new.php'][15] = array(__('Link'), 'manage_links', 'link-add.php');
|
||||
$top_menu[5] = array( __('My Account'), 'read', 'profile.php' );
|
||||
$top_menu[10] = array( __('My Dashboard'), 'read', 'index.php' );
|
||||
$top_menu[15] = array( __('New Post'), 'edit_posts', 'post-new.php', 'highlighted' );
|
||||
//$top_menu[20] = array( sprintf( __('Inbox (%s)'), "<span id='inbox-num' class='count-$inbox_num'><span class='inbox-count'>" . number_format_i18n($inbox_num) . "</span></span>" ), 'edit_posts', 'inbox.php' );
|
||||
$top_menu[20] = array( sprintf( __('Comments (%s)'), "<span id='awaiting-mod' class='count-$awaiting_mod'><span class='comment-count'>" . number_format_i18n($awaiting_mod) . "</span></span>" ), 'edit_posts', 'edit-comments.php');
|
||||
$top_menu[25] = array( __('Help'), 'read', 'index.php?help' ); // place holder
|
||||
|
||||
$submenu['edit-comments.php'][5] = array(__('Comments'), 'edit_posts', 'edit-comments.php');
|
||||
$top_submenu['profile.php'][5] = array( __('Profile'), 'read', 'profile.php' );
|
||||
$top_submenu['profile.php'][10] = array( __('Stats'), 'read', 'inbox.php?page=stats' ); // place holder
|
||||
|
||||
$submenu['edit.php'][5] = array(__('Posts'), 'edit_posts', 'edit.php');
|
||||
$submenu['edit.php'][10] = array(__('Pages'), 'edit_pages', 'edit-pages.php');
|
||||
$submenu['edit.php'][15] = array(__('Links'), 'manage_links', 'link-manager.php');
|
||||
$submenu['edit.php'][20] = array(__('Categories'), 'manage_categories', 'categories.php');
|
||||
$submenu['edit.php'][25] = array(__('Tags'), 'manage_categories', 'edit-tags.php');
|
||||
$submenu['edit.php'][30] = array(__('Link Categories'), 'manage_categories', 'edit-link-categories.php');
|
||||
$submenu['edit.php'][35] = array(__('Media Library'), 'upload_files', 'upload.php');
|
||||
$submenu['edit.php'][40] = array(__('Import'), 'import', 'import.php');
|
||||
$submenu['edit.php'][45] = array(__('Export'), 'import', 'export.php');
|
||||
|
||||
if ( current_user_can('edit_users') ) {
|
||||
$_wp_real_parent_file['profile.php'] = 'users.php'; // Back-compat for plugins adding submenus to profile.php.
|
||||
$submenu['users.php'][5] = array(__('Authors & Users'), 'edit_users', 'users.php');
|
||||
$submenu['users.php'][10] = array(__('Your Profile'), 'read', 'profile.php');
|
||||
} else {
|
||||
$_wp_real_parent_file['users.php'] = 'profile.php';
|
||||
$submenu['profile.php'][5] = array(__('Your Profile'), 'read', 'profile.php');
|
||||
}
|
||||
$menu[0] = array( __('Dashboard'), 'read', 'index.php' );
|
||||
|
||||
$submenu['options-general.php'][10] = array(__('General'), 'manage_options', 'options-general.php');
|
||||
$submenu['options-general.php'][15] = array(__('Writing'), 'manage_options', 'options-writing.php');
|
||||
$submenu['options-general.php'][20] = array(__('Reading'), 'manage_options', 'options-reading.php');
|
||||
$submenu['options-general.php'][25] = array(__('Discussion'), 'manage_options', 'options-discussion.php');
|
||||
$submenu['options-general.php'][30] = array(__('Privacy'), 'manage_options', 'options-privacy.php');
|
||||
$submenu['options-general.php'][35] = array(__('Permalinks'), 'manage_options', 'options-permalink.php');
|
||||
$submenu['options-general.php'][40] = array(__('Miscellaneous'), 'manage_options', 'options-misc.php');
|
||||
$menu[5] = array( __('Content'), 'edit_posts', 'edit.php', 'wp-menu-open' );
|
||||
$submenu['edit.php'][5] = array( __('Posts'), 'edit_posts', 'edit.php' );
|
||||
$submenu['edit.php'][10] = array( __('Comments'), 'edit_posts', 'edit-comments.php' );
|
||||
$submenu['edit.php'][15] = array( __('Media Library'), 'upload_files', 'upload.php' );
|
||||
$submenu['edit.php'][20] = array( __('Links'), 'manage_links', 'link-manager.php' );
|
||||
$submenu['edit.php'][25] = array( __('Pages'), 'edit_pages', 'edit-pages.php' );
|
||||
|
||||
$submenu['plugins.php'][5] = array(__('Plugins'), 'activate_plugins', 'plugins.php');
|
||||
$submenu['plugins.php'][10] = array(__('Plugin Editor'), 'edit_plugins', 'plugin-editor.php');
|
||||
$menu[10] = array( __('Templates'), 'switch_themes', 'themes.php' );
|
||||
$submenu['themes.php'][5] = array(__('Themes'), 'switch_themes', 'themes.php');
|
||||
$submenu['themes.php'][10] = array(__('Theme Editor'), 'edit_themes', 'theme-editor.php');
|
||||
$submenu['plugins.php'][15] = array(__('Install Plugins'), 'install_plugins', 'plugin-install.php');
|
||||
|
||||
$submenu['themes.php'][5] = array(__('Themes'), 'switch_themes', 'themes.php');
|
||||
$submenu['themes.php'][10] = array(__('Theme Editor'), 'edit_themes', 'theme-editor.php');
|
||||
$menu[15] = array( __('Utilities'), 'read', 'users.php' ); // placeholder - should be inbox
|
||||
$submenu['users.php'][5] = array( __('Inbox'), 'read', 'inbox.php' );
|
||||
$submenu['users.php'][10] = array( __('Tags'), 'manage_categories', 'edit-tags.php' );
|
||||
$submenu['users.php'][15] = array( __('Categories'), 'manage_categories', 'categories.php' );
|
||||
$submenu['users.php'][20] = array( __('Link Categories'), 'manage_categories', 'edit-link-categories.php' );
|
||||
$submenu['users.php'][25] = array( __('Users'), 'edit_users', 'users.php' );
|
||||
$submenu['users.php'][30] = array( __('Import'), 'import', 'import.php' );
|
||||
$submenu['users.php'][35] = array( __('Export'), 'import', 'export.php' );
|
||||
$submenu['users.php'][40] = array( __('Settings'), 'manage_options', 'options-general.php' );
|
||||
$_wp_real_parent_file['options-general.php'] = 'users.php';
|
||||
$submenu['options-general.php'][10] = array( __('General'), 'manage_options', 'options-general.php' );
|
||||
$submenu['options-general.php'][15] = array( __('Writing'), 'manage_options', 'options-writing.php' );
|
||||
$submenu['options-general.php'][20] = array( __('Reading'), 'manage_options', 'options-reading.php' );
|
||||
$submenu['options-general.php'][25] = array( __('Discussion'), 'manage_options', 'options-discussion.php' );
|
||||
$submenu['options-general.php'][30] = array( __('Privacy'), 'manage_options', 'options-privacy.php' );
|
||||
$submenu['options-general.php'][35] = array( __('Permalinks'), 'manage_options', 'options-permalink.php' );
|
||||
$submenu['options-general.php'][40] = array( __('Miscellaneous'), 'manage_options', 'options-misc.php' );
|
||||
|
||||
$menu[20] = array( __('Plugins'), 'activate_plugins', 'plugins.php' );
|
||||
$submenu['plugins.php'][5] = array( __('Plugins'), 'activate_plugins', 'plugins.php' );
|
||||
$submenu['plugins.php'][10] = array( __('Plugin Editor'), 'edit_plugins', 'plugin-editor.php' );
|
||||
|
||||
do_action('_admin_menu');
|
||||
|
||||
|
@ -102,16 +85,18 @@ foreach ($menu as $menu_page) {
|
|||
$_wp_submenu_nopriv = array();
|
||||
$_wp_menu_nopriv = array();
|
||||
// Loop over submenus and remove pages for which the user does not have privs.
|
||||
foreach ($submenu as $parent => $sub) {
|
||||
foreach ($sub as $index => $data) {
|
||||
if ( ! current_user_can($data[1]) ) {
|
||||
unset($submenu[$parent][$index]);
|
||||
$_wp_submenu_nopriv[$parent][$data[2]] = true;
|
||||
foreach ( array( 'top_submenu', 'submenu' ) as $sub_loop ) {
|
||||
foreach ($$sub_loop as $parent => $sub) {
|
||||
foreach ($sub as $index => $data) {
|
||||
if ( ! current_user_can($data[1]) ) {
|
||||
unset(${$sub_loop}[$parent][$index]);
|
||||
$_wp_submenu_nopriv[$parent][$data[2]] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( empty($submenu[$parent]) )
|
||||
unset($submenu[$parent]);
|
||||
if ( empty(${$sub_loop}[$parent]) )
|
||||
unset(${$sub_loop}[$parent]);
|
||||
}
|
||||
}
|
||||
|
||||
// Loop over the top-level menu.
|
||||
|
|
|
@ -16,6 +16,9 @@ include('admin-header.php');
|
|||
?>
|
||||
|
||||
<div class="wrap">
|
||||
<ul class="wp-menu">
|
||||
<?php $array = array(); _wp_menu_output( $submenu['options-general.php'], $array ); unset($array); ?>
|
||||
</ul>
|
||||
<h2><?php _e('Discussion Settings') ?></h2>
|
||||
<form method="post" action="options.php">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
|
|
|
@ -10,12 +10,14 @@
|
|||
require_once('./admin.php');
|
||||
|
||||
$title = __('General Settings');
|
||||
$parent_file = 'options-general.php';
|
||||
|
||||
include('./admin-header.php');
|
||||
?>
|
||||
|
||||
<div class="wrap">
|
||||
<ul class="wp-menu">
|
||||
<?php $array = array(); _wp_menu_output( $submenu['options-general.php'], $array ); unset($array); ?>
|
||||
</ul>
|
||||
<h2><?php _e('General Settings') ?></h2>
|
||||
<form method="post" action="options.php">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
|
|
|
@ -17,6 +17,9 @@ include('admin-header.php');
|
|||
?>
|
||||
|
||||
<div class="wrap">
|
||||
<ul class="wp-menu">
|
||||
<?php $array = array(); _wp_menu_output( $submenu['options-general.php'], $array ); unset($array); ?>
|
||||
</ul>
|
||||
<h2><?php _e('Miscellaneous Settings') ?></h2>
|
||||
<form method="post" action="options.php">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
|
@ -159,4 +162,4 @@ include('admin-header.php');
|
|||
</form>
|
||||
</div>
|
||||
|
||||
<?php include('./admin-footer.php'); ?>
|
||||
<?php include('./admin-footer.php'); ?>
|
||||
|
|
|
@ -123,6 +123,9 @@ else
|
|||
<?php endif; ?>
|
||||
|
||||
<div class="wrap">
|
||||
<ul class="wp-menu">
|
||||
<?php $array = array(); _wp_menu_output( $submenu['options-general.php'], $array ); unset($array); ?>
|
||||
</ul>
|
||||
<h2><?php _e('Customize Permalink Structure') ?></h2>
|
||||
<form name="form" action="options-permalink.php" method="post">
|
||||
<?php wp_nonce_field('update-permalink') ?>
|
||||
|
|
|
@ -16,6 +16,9 @@ include('./admin-header.php');
|
|||
?>
|
||||
|
||||
<div class="wrap">
|
||||
<ul class="wp-menu">
|
||||
<?php $array = array(); _wp_menu_output( $submenu['options-general.php'], $array ); unset($array); ?>
|
||||
</ul>
|
||||
<h2><?php _e('Privacy Settings') ?></h2>
|
||||
<form method="post" action="options.php">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
|
|
|
@ -16,6 +16,9 @@ include('admin-header.php');
|
|||
?>
|
||||
|
||||
<div class="wrap">
|
||||
<ul class="wp-menu">
|
||||
<?php $array = array(); _wp_menu_output( $submenu['options-general.php'], $array ); unset($array); ?>
|
||||
</ul>
|
||||
<h2><?php _e('Reading Settings') ?></h2>
|
||||
<form name="form1" method="post" action="options.php">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
|
|
|
@ -16,6 +16,9 @@ include('admin-header.php');
|
|||
?>
|
||||
|
||||
<div class="wrap">
|
||||
<ul class="wp-menu">
|
||||
<?php $array = array(); _wp_menu_output( $submenu['options-general.php'], $array ); unset($array); ?>
|
||||
</ul>
|
||||
<h2><?php _e('Writing Settings') ?></h2>
|
||||
<form method="post" action="options.php">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
|
|
|
@ -58,6 +58,9 @@ default:
|
|||
include('admin-header.php'); ?>
|
||||
|
||||
<div class="wrap">
|
||||
<ul class="wp-menu">
|
||||
<?php $array = array(); _wp_menu_output( $submenu['options-general.php'], $array ); unset($array); ?>
|
||||
</ul>
|
||||
<h2><?php _e('All Settings'); ?></h2>
|
||||
<form name="form" action="options.php" method="post" id="all-options">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
/** WordPress Administration Bootstrap */
|
||||
require_once('admin.php');
|
||||
$title = __('New Page');
|
||||
$parent_file = 'post-new.php';
|
||||
$parent_file = 'edit.php';
|
||||
$submenu_file = 'edit-pages.php';
|
||||
$editing = true;
|
||||
wp_enqueue_script('autosave');
|
||||
wp_enqueue_script('page');
|
||||
|
|
|
@ -17,8 +17,8 @@ foreach( array('activate-selected', 'deactivate-selected', 'delete-selected', 'c
|
|||
}
|
||||
}
|
||||
|
||||
if( isset($_GET['action']) )
|
||||
$action = $_GET['action'];
|
||||
if( isset($_REQUEST['action']) )
|
||||
$action = $_REQUEST['action'];
|
||||
|
||||
$plugin = isset($_REQUEST['plugin']) ? $_REQUEST['plugin'] : '';
|
||||
|
||||
|
@ -327,7 +327,11 @@ function print_plugins_table($plugins, $context = '') {
|
|||
|
||||
<div class="tablenav">
|
||||
<div class="alignleft">
|
||||
<input type="submit" name="deactivate-selected" value="<?php _e('Deactivate') ?>" class="button-secondary" />
|
||||
<select name="action">
|
||||
<option value="" selected><?php _e('Actions'); ?></option>
|
||||
<option value="deactivate-selected"><?php _e('Deactivate'); ?></option>
|
||||
</select>
|
||||
<input type="submit" name="doaction" value="<?php _e('Apply'); ?>" class="button-secondary action" />
|
||||
</div>
|
||||
</div>
|
||||
<br class="clear" />
|
||||
|
@ -345,10 +349,14 @@ function print_plugins_table($plugins, $context = '') {
|
|||
|
||||
<div class="tablenav">
|
||||
<div class="alignleft">
|
||||
<input type="submit" name="activate-selected" value="<?php _e('Activate') ?>" class="button-secondary" />
|
||||
<select name="action">
|
||||
<option value="" selected><?php _e('Actions'); ?></option>
|
||||
<option value="activate-selected"><?php _e('Activate'); ?></option>
|
||||
<?php if( current_user_can('delete_plugins') ) : ?>
|
||||
<input type="submit" name="delete-selected" value="<?php _e('Delete') ?>" class="button-secondary" />
|
||||
<option value="delete-selected"><?php _e('Delete'); ?></option>
|
||||
<?php endif; ?>
|
||||
</select>
|
||||
<input type="submit" value="<?php _e('Apply'); ?>" name="doaction" class="button-secondary action" />
|
||||
<input type="submit" name="clear-recent-list" value="<?php _e('Clear List') ?>" class="button-secondary" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
/** Load WordPress Administration Bootstrap */
|
||||
require_once('admin.php');
|
||||
$title = __('Create New Post');
|
||||
$parent_file = 'post-new.php';
|
||||
$parent_file = 'edit.php';
|
||||
$submenu_file = 'edit.php';
|
||||
$editing = true;
|
||||
wp_enqueue_script('autosave');
|
||||
wp_enqueue_script('post');
|
||||
|
|
|
@ -35,14 +35,14 @@ function redirect_post($post_ID = '') {
|
|||
$location = $_POST['referredby'];
|
||||
} elseif ( !empty($_POST['mode']) && 'sidebar' == $_POST['mode'] ) {
|
||||
$location = 'sidebar.php?a=b';
|
||||
} elseif ( isset($_POST['save']) && ( empty($referredby) || $referredby == $referer || 'redo' != $referredby ) ) {
|
||||
} elseif ( ( isset($_POST['save']) || isset($_POST['publish']) ) && ( empty($referredby) || $referredby == $referer || 'redo' != $referredby ) ) {
|
||||
if ( $_POST['_wp_original_http_referer'] && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/post.php') === false && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/post-new.php') === false )
|
||||
$location = add_query_arg( array(
|
||||
'_wp_original_http_referer' => urlencode( stripslashes( $_POST['_wp_original_http_referer'] ) ),
|
||||
'message' => 1
|
||||
), get_edit_post_link( $post_ID, 'url' ) );
|
||||
else
|
||||
$location = add_query_arg( 'message', 4, get_edit_post_link( $post_ID, 'url' ) );
|
||||
$location = add_query_arg( 'message', 6, get_edit_post_link( $post_ID, 'url' ) );
|
||||
} elseif (isset($_POST['addmeta']) && $_POST['addmeta']) {
|
||||
$location = add_query_arg( 'message', 2, wp_get_referer() );
|
||||
$location = explode('#', $location);
|
||||
|
@ -62,6 +62,8 @@ function redirect_post($post_ID = '') {
|
|||
$location = "post-new.php?posted=$post_ID";
|
||||
} elseif ($action == 'editattachment') {
|
||||
$location = 'attachments.php';
|
||||
} elseif ( 'post-quickpress-save-cont' == $_POST['action'] ) {
|
||||
$location = "post.php?action=edit&post=$post_ID&message=7";
|
||||
} else {
|
||||
$location = add_query_arg( 'message', 4, get_edit_post_link( $post_ID, 'url' ) );
|
||||
}
|
||||
|
@ -75,9 +77,30 @@ if ( isset( $_POST['deletepost'] ) )
|
|||
switch($action) {
|
||||
case 'postajaxpost':
|
||||
case 'post':
|
||||
case 'post-quickpress-publish':
|
||||
case 'post-quickpress-save':
|
||||
case 'post-quickpress-save-cont':
|
||||
check_admin_referer('add-post');
|
||||
|
||||
$post_ID = 'post' == $action ? write_post() : edit_post();
|
||||
if ( 'post-quickpress-publish' == $action )
|
||||
$_POST['publish'] = 'publish'; // tell write_post() to publish
|
||||
|
||||
if ( !empty( $_POST['quickpress_post_ID'] ) ) {
|
||||
$_POST['post_ID'] = (int) $_POST['quickpress_post_ID'];
|
||||
$post_ID = edit_post();
|
||||
} else {
|
||||
$post_ID = 'postajaxpost' == $action ? edit_post() : write_post();
|
||||
}
|
||||
|
||||
if ( 'post-quickpress-save-cont' != $action && 0 === strpos( $action, 'post-quickpress' ) ) {
|
||||
$_POST['post_ID'] = $post_ID;
|
||||
// output the quickpress dashboard widget
|
||||
require_once(ABSPATH . 'wp-admin/includes/dashboard.php');
|
||||
add_filter( 'wp_dashboard_widgets', create_function( '$a', 'return array( "dashboard_quick_press" );' ) );
|
||||
wp_dashboard_setup();
|
||||
wp_dashboard();
|
||||
exit;
|
||||
}
|
||||
|
||||
redirect_post($post_ID);
|
||||
exit();
|
||||
|
|
|
@ -334,9 +334,11 @@ if($_REQUEST['ajax'] == 'photo') { ?>
|
|||
wp_enqueue_style('press-this');
|
||||
wp_enqueue_style('press-this-ie');
|
||||
wp_enqueue_style( 'colors' );
|
||||
wp_enqueue_script('post');
|
||||
wp_enqueue_script( 'post' );
|
||||
wp_enqueue_script('editor_functions');
|
||||
|
||||
// wp_teeny_mce();
|
||||
|
||||
do_action('admin_print_styles');
|
||||
do_action('admin_print_scripts');
|
||||
do_action('admin_head');
|
||||
|
@ -572,4 +574,4 @@ if($_REQUEST['ajax'] == 'photo') { ?>
|
|||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
@ -101,6 +101,14 @@ td.available-theme {
|
|||
margin-left:15%;
|
||||
padding: 11px 12px 16px 170px;
|
||||
}
|
||||
|
||||
#curtime
|
||||
{
|
||||
background-position:right 2px;
|
||||
padding-left:0;
|
||||
padding-right: 9px;
|
||||
}
|
||||
|
||||
#dashmenu {
|
||||
right:0;
|
||||
left:auto;
|
||||
|
|
|
@ -22,9 +22,7 @@ $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
|
|||
$update = '';
|
||||
|
||||
if ( empty($action) ) {
|
||||
if ( isset($_GET['deleteit']) )
|
||||
$action = 'delete';
|
||||
elseif ( isset($_GET['changeit']) && !empty($_GET['new_role']) )
|
||||
if ( isset($_GET['changeit']) && !empty($_GET['new_role']) )
|
||||
$action = 'promote';
|
||||
}
|
||||
|
||||
|
@ -258,9 +256,9 @@ default:
|
|||
<div class="wrap">
|
||||
<form id="posts-filter" action="" method="get">
|
||||
<?php if ( $wp_user_search->is_search() ) : ?>
|
||||
<h2><?php printf(__('Users Matching "%s"'), wp_specialchars($wp_user_search->search_term)); ?></h2>
|
||||
<h2><?php printf( current_user_can('create_users') ? __('Users Matching "%2$s" (<a href="%1$s">Add New</a>)') : __('Add New'), '#add-new-user', wp_specialchars($wp_user_search->search_term) ); ?></h2>
|
||||
<?php else : ?>
|
||||
<h2><?php _e('Manage Users'); ?></h2>
|
||||
<h2><?php printf( current_user_can('create_users') ? __('Users (<a href="%s">Add New</a>)') : __('Add New'), '#add-new-user' ); ?></h2>
|
||||
<?php endif; ?>
|
||||
|
||||
<ul class="subsubsub">
|
||||
|
@ -301,6 +299,7 @@ echo implode(' |</li>', $role_links) . '</li>';
|
|||
unset($role_links);
|
||||
?>
|
||||
</ul>
|
||||
|
||||
<p id="post-search">
|
||||
<label class="hidden" for="post-search-input"><?php _e( 'Search Users' ); ?>:</label>
|
||||
<input type="text" id="post-search-input" name="usersearch" value="<?php echo attribute_escape($wp_user_search->search_term); ?>" />
|
||||
|
@ -314,7 +313,11 @@ unset($role_links);
|
|||
<?php endif; ?>
|
||||
|
||||
<div class="alignleft">
|
||||
<input type="submit" value="<?php _e('Delete'); ?>" name="deleteit" class="button-secondary delete" />
|
||||
<select name="action">
|
||||
<option value="" selected><?php _e('Actions'); ?></option>
|
||||
<option value="delete"><?php _e('Delete'); ?></option>
|
||||
</select>
|
||||
<input type="submit" value="<?php _e('Apply'); ?>" name="doaction" class="button-secondary action" />
|
||||
<label class="hidden" for="new_role"><?php _e('Change role to…') ?></label><select name="new_role" id="new_role"><option value=''><?php _e('Change role to…') ?></option>"<?php wp_dropdown_roles(); ?></select>
|
||||
<input type="submit" value="<?php _e('Change'); ?>" name="changeit" class="button-secondary" />
|
||||
<?php wp_nonce_field('bulk-users'); ?>
|
||||
|
|
|
@ -969,11 +969,11 @@ function the_editor($content, $id = 'content', $prev_id = 'title', $media_button
|
|||
<?php }
|
||||
}
|
||||
|
||||
if ( $media_buttons ) { ?>
|
||||
/* if ( $media_buttons ) { ?>
|
||||
<div id="media-buttons" class="hide-if-no-js">
|
||||
<?php do_action( 'media_buttons' ); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } */ ?>
|
||||
</div>
|
||||
|
||||
<div id="quicktags">
|
||||
|
|
|
@ -107,7 +107,7 @@ function autosave_update_preview_link(post_id) {
|
|||
post_id: post_id,
|
||||
getpermalinknonce: jQuery('#getpermalinknonce').val()
|
||||
}, function(permalink) {
|
||||
jQuery('#previewview').html('<a target="_blank" href="'+permalink+'" tabindex="4">'+previewText+'</a>');
|
||||
jQuery('#previewview').html('<a class="button" target="_blank" href="'+permalink+'" tabindex="4">'+previewText+'</a>');
|
||||
|
||||
// Autosave when the preview button is clicked.
|
||||
jQuery('#previewview a').click(function(e) {
|
||||
|
|
|
@ -1,67 +1,67 @@
|
|||
<?php
|
||||
/**
|
||||
* $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
|
||||
*
|
||||
* This class was contributed by Michel Weimerskirch.
|
||||
*
|
||||
* @package MCManager.includes
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
class EnchantSpell extends SpellChecker {
|
||||
/**
|
||||
* Spellchecks an array of words.
|
||||
*
|
||||
* @param String $lang Selected language code (like en_US or de_DE). Shortcodes like "en" and "de" work with enchant >= 1.4.1
|
||||
* @param Array $words Array of words to check.
|
||||
* @return Array of misspelled words.
|
||||
*/
|
||||
function &checkWords($lang, $words) {
|
||||
$r = enchant_broker_init();
|
||||
|
||||
if (enchant_broker_dict_exists($r,$lang)) {
|
||||
$d = enchant_broker_request_dict($r, $lang);
|
||||
|
||||
$returnData = array();
|
||||
foreach($words as $key => $value) {
|
||||
$correct = enchant_dict_check($d, $value);
|
||||
if(!$correct) {
|
||||
$returnData[] = trim($value);
|
||||
}
|
||||
}
|
||||
|
||||
return $returnData;
|
||||
enchant_broker_free_dict($d);
|
||||
} else {
|
||||
|
||||
}
|
||||
enchant_broker_free($r);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns suggestions for a specific word.
|
||||
*
|
||||
* @param String $lang Selected language code (like en_US or de_DE). Shortcodes like "en" and "de" work with enchant >= 1.4.1
|
||||
* @param String $word Specific word to get suggestions for.
|
||||
* @return Array of suggestions for the specified word.
|
||||
*/
|
||||
function &getSuggestions($lang, $word) {
|
||||
$r = enchant_broker_init();
|
||||
$suggs = array();
|
||||
|
||||
if (enchant_broker_dict_exists($r,$lang)) {
|
||||
$d = enchant_broker_request_dict($r, $lang);
|
||||
$suggs = enchant_dict_suggest($d, $word);
|
||||
|
||||
enchant_broker_free_dict($d);
|
||||
} else {
|
||||
|
||||
}
|
||||
enchant_broker_free($r);
|
||||
|
||||
return $suggs;
|
||||
}
|
||||
}
|
||||
|
||||
<?php
|
||||
/**
|
||||
* $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
|
||||
*
|
||||
* This class was contributed by Michel Weimerskirch.
|
||||
*
|
||||
* @package MCManager.includes
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
class EnchantSpell extends SpellChecker {
|
||||
/**
|
||||
* Spellchecks an array of words.
|
||||
*
|
||||
* @param String $lang Selected language code (like en_US or de_DE). Shortcodes like "en" and "de" work with enchant >= 1.4.1
|
||||
* @param Array $words Array of words to check.
|
||||
* @return Array of misspelled words.
|
||||
*/
|
||||
function &checkWords($lang, $words) {
|
||||
$r = enchant_broker_init();
|
||||
|
||||
if (enchant_broker_dict_exists($r,$lang)) {
|
||||
$d = enchant_broker_request_dict($r, $lang);
|
||||
|
||||
$returnData = array();
|
||||
foreach($words as $key => $value) {
|
||||
$correct = enchant_dict_check($d, $value);
|
||||
if(!$correct) {
|
||||
$returnData[] = trim($value);
|
||||
}
|
||||
}
|
||||
|
||||
return $returnData;
|
||||
enchant_broker_free_dict($d);
|
||||
} else {
|
||||
|
||||
}
|
||||
enchant_broker_free($r);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns suggestions for a specific word.
|
||||
*
|
||||
* @param String $lang Selected language code (like en_US or de_DE). Shortcodes like "en" and "de" work with enchant >= 1.4.1
|
||||
* @param String $word Specific word to get suggestions for.
|
||||
* @return Array of suggestions for the specified word.
|
||||
*/
|
||||
function &getSuggestions($lang, $word) {
|
||||
$r = enchant_broker_init();
|
||||
$suggs = array();
|
||||
|
||||
if (enchant_broker_dict_exists($r,$lang)) {
|
||||
$d = enchant_broker_request_dict($r, $lang);
|
||||
$suggs = enchant_dict_suggest($d, $word);
|
||||
|
||||
enchant_broker_free_dict($d);
|
||||
} else {
|
||||
|
||||
}
|
||||
enchant_broker_free($r);
|
||||
|
||||
return $suggs;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
|
@ -0,0 +1,326 @@
|
|||
div#media-upload-header {
|
||||
margin: 0;
|
||||
padding: 0 5px;
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
border-bottom-width: 1px;
|
||||
border-bottom-style: solid;
|
||||
height: 2.5em;
|
||||
}
|
||||
|
||||
body#media-upload ul#sidemenu {
|
||||
font-weight: normal;
|
||||
margin: 0 5px;
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
bottom: -1px;
|
||||
}
|
||||
|
||||
div#media-upload-error {
|
||||
margin: 1em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
form {
|
||||
margin: 1em;
|
||||
}
|
||||
|
||||
#search-filter {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.media-upload-form label, .media-upload-form legend {
|
||||
display:block;
|
||||
font-weight: bold;
|
||||
font-size: 13px;
|
||||
margin-bottom: 0.5em;
|
||||
margin: 0 0 0.5em 0;
|
||||
}
|
||||
|
||||
th { position: relative; }
|
||||
|
||||
.media-upload-form label.form-help, td.help {
|
||||
font-style: italic;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.media-upload-form p.help {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.media-upload-form fieldset {
|
||||
width: 100%;
|
||||
border: none;
|
||||
text-align: justify;
|
||||
margin: 0 0 1em 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* specific to the image upload form */
|
||||
.align .field label {
|
||||
display: inline;
|
||||
padding: 0 0 0 28px;
|
||||
margin: 0 1em 0 0;
|
||||
}
|
||||
.image-align-none-label {
|
||||
background: url(../../../../../../wp-admin/images/align-none.png) no-repeat center left;
|
||||
}
|
||||
|
||||
.image-align-left-label {
|
||||
background: url(../../../../../../wp-admin/images/align-left.png) no-repeat center left;
|
||||
}
|
||||
|
||||
.image-align-center-label {
|
||||
background: url(../../../../../../wp-admin/images/align-center.png) no-repeat center left;
|
||||
}
|
||||
|
||||
.image-align-right-label {
|
||||
background: url(../../../../../../wp-admin/images/align-right.png) no-repeat center left;
|
||||
}
|
||||
|
||||
#flash-upload-ui, .insert-gallery {
|
||||
display: none;
|
||||
}
|
||||
|
||||
tr.image-size label {
|
||||
display: inline;
|
||||
margin: 0 1em 0 0;
|
||||
}
|
||||
.pinkynail {
|
||||
max-width: 40px;
|
||||
max-height: 40px;
|
||||
}
|
||||
|
||||
.filename.original {
|
||||
float: left;
|
||||
}
|
||||
.crunching {
|
||||
display: block;
|
||||
line-height: 32px;
|
||||
text-align: right;
|
||||
margin-right: 5px;
|
||||
}
|
||||
button.dismiss {
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: 5px;
|
||||
z-index: 4;
|
||||
}
|
||||
.file-error {
|
||||
margin: 0 0 5px 50px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.progress {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 623px;
|
||||
height: 36px;
|
||||
}
|
||||
.bar {
|
||||
width: 0px;
|
||||
height: 100%;
|
||||
border-right-width: 3px;
|
||||
border-right-style: solid;
|
||||
}
|
||||
|
||||
#library-form .progress, #gallery-form .progress {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.media-item .thumbnail {
|
||||
max-width: 128px;
|
||||
max-height: 128px;
|
||||
}
|
||||
.media-item .pinkynail {
|
||||
float: left;
|
||||
margin: 2px;
|
||||
height: 32px;
|
||||
max-width: 40px;
|
||||
}
|
||||
|
||||
thead.media-item-info tr {
|
||||
background-color: transparent;
|
||||
}
|
||||
thead.media-item-info th, thead.media-item-info td {
|
||||
border: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.form-table thead.media-item-info {
|
||||
border: 8px solid #fff;
|
||||
}
|
||||
|
||||
.describe.startopen, .describe.startclosed {
|
||||
display: none;
|
||||
}
|
||||
abbr.required {
|
||||
text-decoration: none;
|
||||
border: none;
|
||||
}
|
||||
.describe label {
|
||||
display: inline;
|
||||
}
|
||||
.describe td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.describe td.A1 {
|
||||
width: 132px;
|
||||
}
|
||||
.describe input[type="text"], .describe textarea {
|
||||
width: 460px;
|
||||
}
|
||||
.describe-toggle-on, .describe-toggle-off {
|
||||
display: block;
|
||||
line-height: 36px;
|
||||
float: right;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.describe-toggle-off {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.clickmask {
|
||||
}
|
||||
|
||||
.hidden {
|
||||
height: 0px;
|
||||
width: 0px;
|
||||
overflow: hidden;
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* Specific to Uploader */
|
||||
|
||||
#media-upload .media-upload-form p {
|
||||
margin: 0 1em 1em 0;
|
||||
}
|
||||
|
||||
#media-upload .media-upload-form p.ml-submit {
|
||||
padding: 1em 0;
|
||||
}
|
||||
|
||||
#media-upload p.help {
|
||||
font-style: italic;
|
||||
font-weight: normal;
|
||||
}
|
||||
#media-upload tr.image-size td.field {
|
||||
text-align: center;
|
||||
}
|
||||
#media-upload #media-items {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-bottom: none;
|
||||
width: 623px;
|
||||
}
|
||||
|
||||
#media-upload .media-item {
|
||||
position: relative;
|
||||
border-bottom-width: 1px;
|
||||
border-bottom-style: solid;
|
||||
min-height: 36px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#media-upload .ui-sortable .media-item {
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
.filename {
|
||||
float: left;
|
||||
line-height: 36px;
|
||||
margin-left: 10px;
|
||||
overflow: hidden;
|
||||
max-width: 430px;
|
||||
}
|
||||
#media-upload .describe {
|
||||
border-top-width: 1px;
|
||||
border-top-style: solid;
|
||||
padding: 5px;
|
||||
width: 100%;
|
||||
clear: both;
|
||||
cursor: default;
|
||||
}
|
||||
#media-upload .describe th.label {
|
||||
padding-top: .5em;
|
||||
text-align: left;
|
||||
}
|
||||
#media-upload tr.align td.field {
|
||||
text-align: center;
|
||||
}
|
||||
#media-upload tr.image-size {
|
||||
margin-bottom: 1em;
|
||||
height: 3em;
|
||||
}
|
||||
|
||||
#media-upload #filter {
|
||||
width: 623px;
|
||||
}
|
||||
|
||||
#media-upload #filter .subsubsub {
|
||||
margin: 8px 0;
|
||||
}
|
||||
|
||||
#filter .tablenav select {
|
||||
border-style:solid;
|
||||
border-width:1px;
|
||||
padding:2px;
|
||||
vertical-align:top;
|
||||
}
|
||||
|
||||
#media-upload a.delete,
|
||||
#media-upload a.del-link {
|
||||
padding: 0 3px 1px;
|
||||
}
|
||||
|
||||
#media-upload .del-attachment {
|
||||
display: none;
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.menu_order {
|
||||
float: right;
|
||||
font-size: 11px;
|
||||
margin: 10px 10px 0;
|
||||
}
|
||||
|
||||
.menu_order_input {
|
||||
border: 1px solid #DDDDDD;
|
||||
font-size: 10px;
|
||||
padding: 1px;
|
||||
width: 23px;
|
||||
}
|
||||
|
||||
.ui-sortable-helper {
|
||||
background-color: #fff;
|
||||
border: 1px solid #aaa;
|
||||
opacity: 0.6;
|
||||
filter: alpha(opacity=60);
|
||||
}
|
||||
|
||||
#media-upload th.order-head {
|
||||
width: 25%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#media-upload .widefat {
|
||||
width: 626px;
|
||||
border-style: solid solid none;
|
||||
}
|
||||
|
||||
.sorthelper {
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
#sidemenu a.current {
|
||||
background-color: #FFFFFF;
|
||||
border-color: #C6D9E9 #C6D9E9 #FFFFFF;
|
||||
color: #D54E21;
|
||||
}
|
||||
|
||||
#sidemenu a {
|
||||
border-bottom-color: transparent;
|
||||
border-top-color: transparent;
|
||||
}
|
|
@ -7,8 +7,9 @@
|
|||
<script type="text/javascript" src="js/editimage.js?ver=311f"></script>
|
||||
<script type="text/javascript" src="../../utils/form_utils.js?ver=311b"></script>
|
||||
|
||||
<link rel="stylesheet" href="css/media26.css?ver=2.6" type="text/css" media="all" />
|
||||
<link rel="stylesheet" href="css/editimage.css?ver=311f" type="text/css" media="all" />
|
||||
<link rel="stylesheet" href="../../../../../wp-admin/css/media.css?ver=20080709" type="text/css" media="all" />
|
||||
|
||||
<script type="text/javascript">
|
||||
if ( 'rtl' == tinyMCEPopup.editor.getParam('directionality','') )
|
||||
document.write('<link rel="stylesheet" href="css/editimage-rtl.css?ver=311b" type="text/css" media="all" />');
|
||||
|
|
|
@ -10,12 +10,23 @@
|
|||
|
||||
// Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('...');
|
||||
ed.addCommand('WP_EditImage', function() {
|
||||
var el = ed.selection.getNode();
|
||||
var el = ed.selection.getNode(), vp = tinymce.DOM.getViewPort(), H = vp.h, W = ( 720 < vp.w ) ? 720 : vp.w;
|
||||
|
||||
if ( ed.dom.getAttrib(el, 'class').indexOf('mceItem') != -1 || el.nodeName != 'IMG' )
|
||||
return;
|
||||
|
||||
tb_show('', url + '/editimage.html?ver=311f&TB_iframe=true');
|
||||
tinymce.DOM.setStyles('TB_window', {
|
||||
'top':'20px',
|
||||
'marginTop':'0',
|
||||
'width':( W - 50 )+'px',
|
||||
'height':( H - 45 )+'px',
|
||||
'margin-left':'-'+parseInt((( W - 50 ) / 2),10) + 'px'
|
||||
});
|
||||
tinymce.DOM.setStyles('TB_iframeContent', {
|
||||
'width':( W - 50 )+'px',
|
||||
'height':( H - 75 )+'px'
|
||||
});
|
||||
tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' );
|
||||
});
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
'broken' => __('An unidentified error has occurred.')
|
||||
) );
|
||||
|
||||
$scripts->add( 'autosave', '/wp-includes/js/autosave.js', array('schedule', 'wp-ajax-response'), '20080622' );
|
||||
$scripts->add( 'autosave', '/wp-includes/js/autosave.js', array('schedule', 'wp-ajax-response'), '20080701' );
|
||||
|
||||
$scripts->add( 'wp-lists', '/wp-includes/js/wp-lists.js', array('wp-ajax-response'), '20080729' );
|
||||
$scripts->localize( 'wp-lists', 'wpListL10n', array(
|
||||
|
@ -128,7 +128,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
$scripts->add( 'admin-forms', '/wp-admin/js/forms.js', array('jquery'), '20080729');
|
||||
$scripts->add( 'xfn', '/wp-admin/js/xfn.js', false, '3517' );
|
||||
$scripts->add( 'upload', '/wp-admin/js/upload.js', array('jquery'), '20070518' );
|
||||
$scripts->add( 'postbox', '/wp-admin/js/postbox.js', array('jquery'), '20080128' );
|
||||
$scripts->add( 'postbox', '/wp-admin/js/postbox.js', array('jquery-ui-sortable'), '20080723' );
|
||||
$scripts->localize( 'postbox', 'postboxL10n', array(
|
||||
'requestFile' => admin_url('admin-ajax.php'),
|
||||
) );
|
||||
|
@ -138,7 +138,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
'save' => __('Save'),
|
||||
'cancel' => __('Cancel'),
|
||||
) );
|
||||
$scripts->add( 'post', '/wp-admin/js/post.js', array('suggest', 'jquery-ui-tabs', 'wp-lists', 'postbox', 'slug'), '20080629' );
|
||||
$scripts->add( 'post', '/wp-admin/js/post.js', array('suggest', 'jquery-ui-tabs', 'wp-lists', 'postbox', 'slug'), '20080701' );
|
||||
$scripts->localize( 'post', 'postL10n', array(
|
||||
'tagsUsed' => __('Tags used on this post:'),
|
||||
'add' => attribute_escape(__('Add')),
|
||||
|
@ -159,7 +159,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
'edit' => __('Edit'),
|
||||
) );
|
||||
$scripts->add( 'admin-gallery', '/wp-admin/js/gallery.js', array( 'jquery-ui-sortable' ), '20080709' );
|
||||
$scripts->add( 'media-upload', '/wp-admin/js/media-upload.js', array( 'thickbox' ), '20080710' );
|
||||
$scripts->add( 'media-upload', '/wp-admin/js/media-upload.js', array( 'thickbox' ), '20080723' );
|
||||
$scripts->localize( 'upload', 'uploadL10n', array(
|
||||
'browseTitle' => attribute_escape(__('Browse your files')),
|
||||
'back' => __('« Back'),
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '2.7-bleeding';
|
||||
$wp_version = '2.7-hemorrhage';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|