diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-08-13 15:13:05 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-08-13 15:13:05 +0000 |
commit | bfa3b629e0d67016ec83050c5db762479af40609 (patch) | |
tree | 4c9ae204172d0fad3ae056ccc65ffe9ea91134d2 /wp-admin | |
parent | 7258ea2d7eeedb439607b72a1f74dee98e4b9d12 (diff) | |
download | wordpress-mu-bfa3b629e0d67016ec83050c5db762479af40609.tar.gz wordpress-mu-bfa3b629e0d67016ec83050c5db762479af40609.tar.xz wordpress-mu-bfa3b629e0d67016ec83050c5db762479af40609.zip |
Merge with WP revision 8635
git-svn-id: http://svn.automattic.com/wordpress-mu/branches/2.6@1421 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-admin')
43 files changed, 844 insertions, 785 deletions
diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php index 7564a8b..4485935 100644 --- a/wp-admin/admin-ajax.php +++ b/wp-admin/admin-ajax.php @@ -392,13 +392,16 @@ case 'add-comment' : list($comments, $total) = _wp_get_comment_list( $status, $search, $start, 1 ); + if ( get_option('show_avatars') ) + add_filter( 'comment_author', 'floated_admin_avatar' ); + if ( !$comments ) die('1'); $x = new WP_Ajax_Response(); foreach ( (array) $comments as $comment ) { get_comment( $comment ); ob_start(); - _wp_comment_row( $comment->comment_ID, $mode, false ); + _wp_comment_row( $comment->comment_ID, $mode, $status ); $comment_list_item = ob_get_contents(); ob_end_clean(); $x->add( array( diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php index f91e152..f35bfa0 100644 --- a/wp-admin/admin-header.php +++ b/wp-admin/admin-header.php @@ -74,10 +74,7 @@ unset($hook_suffixes, $hook_suffix); </div> <?php -$gears_compat = false; - -if ( ($is_gecko || $is_winIE) && strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'webkit') === false ) { - $gears_compat = true; +if ( ! $is_opera ) { ?> <div id="gears-info-box" class="info-box" style="display:none;"> <img src="images/gear.png" title="Gear" alt="" class="gears-img" /> @@ -93,7 +90,14 @@ if ( ($is_gecko || $is_winIE) && strpos(strtolower($_SERVER['HTTP_USER_AGENT']), <div id="gears-msg2" style="display:none;"> <h3 class="info-box-title"><?php _e('Gears Status'); ?></h3> <p><?php _e('Gears is installed on this computer but is not enabled for use with WordPress.'); ?></p> - <p><?php _e('To enable it, make sure this web site is not on the denied list in Gears Settings under your browser\'s Tools menu, then click the button below.'); ?></p> + <p><?php + + if ( $is_safari ) + _e('To enable it, make sure this web site is not on the denied list in Gears Settings under the Safari menu, then click the button below.'); + else + _e('To enable it, make sure this web site is not on the denied list in Gears Settings under your browser Tools menu, then click the button below.'); + + ?></p> <p><strong><?php _e('However if this is a public or shared computer, Gears should not be enabled.'); ?></strong></p> <div class="submit"><button class="button" onclick="wpGears.getPermission();"><?php _e('Enable Gears'); ?></button> <button class="button" style="margin-left:10px;" onclick="document.getElementById('gears-info-box').style.display='none';"><?php _e('Cancel'); ?></button></div> @@ -101,16 +105,22 @@ if ( ($is_gecko || $is_winIE) && strpos(strtolower($_SERVER['HTTP_USER_AGENT']), <div id="gears-msg3" style="display:none;"> <h3 class="info-box-title"><?php _e('Gears Status'); ?></h3> - <p><?php _e('Gears is installed and enabled on this computer. You can disable it from your browser Tools menu.'); ?></p> + <p><?php + + if ( $is_safari ) + _e('Gears is installed and enabled on this computer. You can disable it from the Safari menu.'); + else + _e('Gears is installed and enabled on this computer. You can disable it from your browser Tools menu.'); + + ?></p> <p><?php _e('If there are any errors, try disabling Gears, then reload the page and enable it again.'); ?></p> <p><?php _e('Local storage status:'); ?> <span id="gears-wait"><span style="color:#f00;"><?php _e('Please wait! Updating files:'); ?></span> <span id="gears-upd-number"></span></span></p> <div class="submit"><button class="button" onclick="document.getElementById('gears-info-box').style.display='none';"><?php _e('Close'); ?></button></div> </div> </div> - <?php } ?> -<div id="user_info"><p><?php printf(__('Howdy, <a href="%1$s">%2$s</a>!'), 'profile.php', $user_identity) ?> | <a href="<?php echo site_url('wp-login.php?action=logout', 'login') ?>" title="<?php _e('Log Out') ?>"><?php _e('Log Out'); ?></a><?php echo apply_filters( 'admin_header_navigation', __(' | <a href="http://codex.wordpress.org/">Help</a>') . ' | ' . __('<a href="http://wordpress.org/support/">Forums</a>') ); if ( $gears_compat ) { ?> | <span id="gears-menu"><a href="#" onclick="wpGears.message(1);return false;"><?php _e('Turbo') ?></a></span><?php } ?></p></div> +<div id="user_info"><p><?php printf(__('Howdy, <a href="%1$s">%2$s</a>!'), 'profile.php', $user_identity) ?> | <a href="<?php echo site_url('wp-login.php?action=logout', 'login') ?>" title="<?php _e('Log Out') ?>"><?php _e('Log Out'); ?></a><?php echo apply_filters( 'admin_header_navigation', __(' | <a href="http://codex.wordpress.org/">Help</a>') . ' | ' . __('<a href="http://wordpress.org/support/">Forums</a>') ); if ( ! $is_opera ) { ?> | <span id="gears-menu"><a href="#" onclick="wpGears.message(1);return false;"><?php _e('Turbo') ?></a></span><?php } ?></p></div> <?php require(ABSPATH . 'wp-admin/menu-header.php'); diff --git a/wp-admin/admin.php b/wp-admin/admin.php index 6936c0b..d16500e 100644 --- a/wp-admin/admin.php +++ b/wp-admin/admin.php @@ -59,7 +59,7 @@ if (isset($plugin_page)) { wp_die(__('Invalid plugin page')); } - if (! file_exists(ABSPATH . PLUGINDIR . "/$plugin_page") && ! file_exists(ABSPATH . MUPLUGINDIR . "/$plugin_page")) + if (! ( file_exists(WP_PLUGIN_DIR . "/$plugin_page") && is_file(WP_PLUGIN_DIR . "/$plugin_page") ) && ! file_exists(ABSPATH . MUPLUGINDIR . "/$plugin_page")) wp_die(sprintf(__('Cannot load %s.'), htmlentities($plugin_page))); do_action('load-' . $plugin_page); @@ -70,7 +70,7 @@ if (isset($plugin_page)) { if ( file_exists(ABSPATH . MUPLUGINDIR . "/$plugin_page") ) include(ABSPATH . MUPLUGINDIR . "/$plugin_page"); else - include(ABSPATH . PLUGINDIR . "/$plugin_page"); + include(WP_PLUGIN_DIR . "/$plugin_page"); } include(ABSPATH . 'wp-admin/admin-footer.php'); diff --git a/wp-admin/bookmarklet.php b/wp-admin/bookmarklet.php deleted file mode 100644 index 8618458..0000000 --- a/wp-admin/bookmarklet.php +++ /dev/null @@ -1,107 +0,0 @@ -<?php -$mode = 'bookmarklet'; -require_once('admin.php'); - -if ( ! current_user_can('edit_posts') ) - wp_die(__('Cheatin’ uh?')); - -if ('b' == $a): -?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> -<script type="text/javascript"> -<!-- -window.close() ---> -</script> -</head> -<body></body> -</html> -<?php -exit; -endif; - -$post = get_default_post_to_edit(); - -$popuptitle = wp_specialchars(stripslashes($popuptitle)); -$text = wp_specialchars(stripslashes(urldecode($text))); - -$popuptitle = funky_javascript_fix($popuptitle); -$text = funky_javascript_fix($text); - -$post_title = wp_specialchars($_REQUEST['post_title']); -if (!empty($post_title)) - $post->post_title = stripslashes($post_title); -else - $post->post_title = $popuptitle; - - -$content = wp_specialchars($_REQUEST['content']); -$popupurl = clean_url($_REQUEST['popupurl']); -if ( !empty($content) ) { - $post->post_content = wp_specialchars( stripslashes($_REQUEST['content']) ); -} else { - $post->post_content = '<a href="'.$popupurl.'">'.$popuptitle.'</a>'."\n$text"; -} - -/* /big funky fixes */ - -?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> -<title><?php bloginfo('name') ?> › Bookmarklet — WordPress</title> -<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> -<?php -wp_admin_css( 'css/global' ); -wp_admin_css(); -?> - -<style type="text/css"> -<!-- - -#wpbookmarklet textarea,input,select { - border-width: 1px; - border-color: #cccccc; - border-style: solid; - padding: 2px; - margin: 1px; -} - -#wpbookmarklet .checkbox { - background-color: #ffffff; - border-width: 0px; - padding: 0px; - margin: 0px; -} - -#wpbookmarklet textarea { - font-family: Verdana, Geneva, Arial, Helvetica; - font-size: 0.9em; -} - -#wpbookmarklet .wrap { - border: 0px; -} - -#wpbookmarklet #postdiv { - margin-bottom: 0.5em; -} - -#wpbookmarklet #titlediv { - margin-bottom: 1em; -} - ---> -</style> -</head> -<body id="wpbookmarklet"> -<div id="wphead"> -<h1><?php bloginfo('name') ?></h1> -</div> - -<?php require('edit-form.php'); ?> - -<?php do_action('admin_footer', ''); ?> - -</body> -</html> diff --git a/wp-admin/css/colors-classic-rtl.css b/wp-admin/css/colors-classic-rtl.css index 5d0d05c..4c6f327 100644 --- a/wp-admin/css/colors-classic-rtl.css +++ b/wp-admin/css/colors-classic-rtl.css @@ -1,3 +1,24 @@ +.post-com-count { +} +#adminmenu li a #awaiting-mod, #sidemenu li a #update-plugins { + background-image: url(../images/comment-stalk-rtl.gif); + background-position:right bottom; +} +#footer { + background-position:99% 10px; +} #poststuff .closed .togbox, #poststuff .togbox { -background-image: url(../images/toggle-arrow-rtl.gif) !important; -}
\ No newline at end of file + background-image: url(../images/toggle-arrow-rtl.gif) !important; +} +.bar { + border-right-color: transparent; + border-left-color: #99d; +} +.plugins .togl { + border-right-color: transparent; + border-left-color: #ccc; +} +#upload-menu li.current { + border-right-color: transparent; + border-left-color: #448abd; +} diff --git a/wp-admin/css/colors-fresh-rtl.css b/wp-admin/css/colors-fresh-rtl.css index 5d0d05c..d7b7afb 100644 --- a/wp-admin/css/colors-fresh-rtl.css +++ b/wp-admin/css/colors-fresh-rtl.css @@ -1,3 +1,24 @@ +.bar { + border-right-color: transparent; + border-left-color: #99d; +} +.post-com-count { +} +#adminmenu li a #awaiting-mod, #sidemenu li a #update-plugins { + background-image: url(../images/comment-stalk-rtl.gif); + background-position:right bottom; +} +#footer { + background-position:99% 10px; +} +.plugins .togl { + border-right-color: transparent; + border-left-color: #ccc; +} #poststuff .closed .togbox, #poststuff .togbox { -background-image: url(../images/toggle-arrow-rtl.gif) !important; -}
\ No newline at end of file + background-image: url(../images/toggle-arrow-rtl.gif); +} +#upload-menu li.current { + border-right-color:transparent; + border-left-color: #448abd; +} diff --git a/wp-admin/css/dashboard-rtl.css b/wp-admin/css/dashboard-rtl.css index 3b66d17..3c4fd61 100644 --- a/wp-admin/css/dashboard-rtl.css +++ b/wp-admin/css/dashboard-rtl.css @@ -1,79 +1,62 @@ +/* Right Now */ #rightnow { - margin-left: 15px; + margin-right:0; + margin-left: 7px; } - #rightnow .reallynow span { text-align: right; float: right; } - #rightnow .reallynow a { text-align: left; float: left; margin: 1px 0 0 6px; } - +/* Widgets */ +div#dashboard-widgets-wrap { + margin-right:0; + margin-left:-13px; +} div.dashboard-widget-holder { - float: right; + float:right; +} +div.dashboard-widget { + margin-right:0; + margin-left: 20px; } - h3.dashboard-widget-title span { text-align: right; float: right; } - -div.dashboard-widget-submit input { - font-family: sans-serif !important; -} - -#dashboard-widgets .widget_rss ul li a { - float:right; - font-weight:bold; - margin:0pt 0pt 0.2em 0.5em; -} - -#dashboard-widgets .widget_rss ul li span.rss-date { - float: right; -} - h3.dashboard-widget-title small { text-align: left; - float: left; + float:left; } -div.dashboard-widget-content ul, -div.dashboard-widget-content ol, -div.dashboard-widget-content dl { +div.dashboard-widget-submit input { + font-family: Tahoma; +} +div.dashboard-widget-content ul, div.dashboard-widget-content ol, div.dashboard-widget-content dl { padding-left:0; padding-right:15px; } -div#dashboard-widgets-wrap -{ - margin-right:0; - margin-left:-10px; -} - -div.dashboard-widget { - margin-right:0; - margin-left:20px; -} - -#dashboard-widgets .widget_rss ul li span.rss-date { - float:right; -} -#dashboard-widgets .widget_rss ul li a { - float:right; - margin:0 0 0.2em 0.5em; -} #dashboard_secondary div.dashboard-widget-content ul li { - float: right; + float:right; } #dashboard_secondary div.dashboard-widget-content ul li .post { - font-family: sans-serif !important; + font-family:arial; } #dashboard_secondary div.dashboard-widget-content ul li a { border-right:0 none; - border-left:1px solid #DADADA; + border-left: 1px solid #dadada; + height:110px; } #dashboard_secondary div.dashboard-widget-content ul li a cite { - font-family: sans-serif; + font-family: Tahoma; +} +#dashboard-widgets .widget_rss ul li span.rss-date { + float:right; +} +#dashboard-widgets .widget_rss ul li a { + float: right; + margin: 0 0 .2em .5em; } diff --git a/wp-admin/css/global-rtl.css b/wp-admin/css/global-rtl.css index 4967c54..c1dfe5e 100644 --- a/wp-admin/css/global-rtl.css +++ b/wp-admin/css/global-rtl.css @@ -1,34 +1,31 @@ -//* styles for use by people extending the WordPress interface */ -body, td { font-family: sans-serif; } - -textarea, input, select { font-family: sans-serif; } - -.alignleft { float: right; } -.alignright { float: left; } - -.textleft { text-align: right; } -.textright { text-align: left; } - -.wrap h2 { font-family: sans-serif; } - +body, td { + font-family: Tahoma; +} +textarea, input, select { + font-family: Tahoma; +} +h1, h2, h3 { + font-family:arial; +} .widefat td { padding: 7px 10px 9px 15px; } - .widefat th { padding: 9px 10px 6px 15px; text-align: right; } - .widefat th input { margin: 0 8px 0 0; } - .widefat .check-column { text-align: left; } - .wrap h2 { + font-family:arial; margin: 5px -4px 0 0; - padding: 0 0 7px 280px; + padding-right:0; + padding-left: 280px; +} +.wrap h2.long-header { + padding-left: 0; } diff --git a/wp-admin/css/ie-rtl.css b/wp-admin/css/ie-rtl.css index 54cadd0..1aa7cdb 100644 --- a/wp-admin/css/ie-rtl.css +++ b/wp-admin/css/ie-rtl.css @@ -1,53 +1,73 @@ -/* footer */ -body, td { - font-family: Tahoma,Verdana,sans-serif; +#poststuff .postbox h3 { + padding-left:0; + padding-right: 23px; } - -.wrap { - text-align: right; +* html #poststuff .postarea, * html #poststuff #titlediv { + margin-left:0; + margin-right: 3%; } - -.wrap h2 { - margin: 5px 0 0 4px; -} - -#footer { - padding-left:50px; +* html #poststuff h2 { + margin-right: 0; } -#footer p { - background:none; - height:auto; - padding: 5px 5px 0; -} - #bh { + padding-right:0; padding-left: 15px; - padding-right: 0px; } -/* write post */ +div#dashboard-widgets { + padding-right:0; + padding-left: 1px; +} +#tagchecklist span a { + margin: 4px -9px 0 0; +} #poststuff .togbox { - margin-right:-16px; + margin-left:0; + margin-right: -19px; } -#poststuff h3 { - padding-right:20px; +.widefat th input { + margin: 0 5px 0 0; } - -p#widget-search, p#post-search { - padding-left: 15px; +/* ---------- add by navid */ +#dashmenu { /* fix top right bottom in admin */ + direction:ltr; +} +#sidemenu a { /* fix left admin buttom ex. plugins, options */ + float:left; } - -.widefat th { - padding-bottom: 8px; +.wrap h2 { + margin:5px 4px 0 0; +} +#editor-toolbar {/* fix hover in media uploader icon */ + direction:ltr; +} +#TB_window { /* fix theme preview */ + left:2%; +} +/* fix widget page */ +form#widgets-filter { + position:static; } - -/* template editor */ -#template textarea { +#widget-search { + display:none; +} +/* fix manage comment page */ +ul.view-switch li { float:left; } - -/* Editor */ - -.mceToolbar { - direction: ltr; - text-align: left; -}
\ No newline at end of file +form#posts-filter { + position:static; +} +#post-search { + display:none; +} +#submenu { + margin-right: 20px; +} +/* Fixes for media-upload window */ +/* Center media-upload panel on screen */ +#TB_window { + width: 670px; + position: absolute; + top: 50%; + left: 50%; + margin-right: 335px !important; } diff --git a/wp-admin/css/install-rtl.css b/wp-admin/css/install-rtl.css index 3752856..efef961 100644 --- a/wp-admin/css/install-rtl.css +++ b/wp-admin/css/install-rtl.css @@ -1,26 +1,27 @@ body { - font-size: 11px; - font-family: sans-serif !important; + font-family: Tahoma; +} +/* Half the page disapears on IE6 */ +* html body { + width: 700px; + position: absolute; + left: 50%; + margin-right: 350px; } ul, ol { padding: 5px 22px 5px 5px; } -.form-table th { - text-align: right; -} -input { - padding: 1px +.step, th { + text-align:right; } -#logo { - text-align: left; +.submit input, .button, .button-secondary { + font-family: Tahoma; + margin-right:0; } -#admin_email { - direction: ltr; - text-align: left; -} -.submit input, .button, .button-secondary { - font-family: sans-serif !important; +.form-table th { + text-align:right; } h1 { - font-family: sans-serif; -}
\ No newline at end of file + font-family:arial; + margin: 5px -4px 0 0; +} diff --git a/wp-admin/css/login-rtl.css b/wp-admin/css/login-rtl.css index aa3c2c2..daefbac 100644 --- a/wp-admin/css/login-rtl.css +++ b/wp-admin/css/login-rtl.css @@ -1,35 +1,37 @@ body { - font-family: sans-serif; - direction: rtl; -} -#login form .submit input { - font-family: sans-serif !important; + font-family: Tahoma; } form { margin-left:0; - margin-right:8px; + margin-right: 8px; } form .forgetmenot { float:right; } +#login form .submit input { + font-family: Tahoma; +} form .submit { float:left; } +#backtoblog a { + left:auto; + right:15px; +} #login_error, .message { - margin:0 8px 16px 0; + margin: 0 8px 16px 0; } #nav { - margin: 0 8px 0 0; + margin:0 8px 0 0; } #user_pass, #user_login, #user_email { margin-right:0; margin-left: 6px; - direction:ltr; } h1 a { text-decoration:none; } -#backtoblog a { - left: auto; - right: 15px; -}
\ No newline at end of file +/* ltr input */ +#user_login, #user_pass { + direction:ltr; +} diff --git a/wp-admin/css/media-rtl.css b/wp-admin/css/media-rtl.css index f0c00df..b23ad0e 100644 --- a/wp-admin/css/media-rtl.css +++ b/wp-admin/css/media-rtl.css @@ -1,21 +1,66 @@ -ul#sidemenu { - left: auto; - right: 0; +body#media-upload ul#sidemenu { + left:auto; + right:0; + width: 620px; +} +#search-filter { + text-align:left; } .align .field label { - display: block; + padding: 0 28px 0 0; + margin: 0 0 0 1em; +} +.image-align-none-label, .image-align-left-label, .image-align-center-label, .image-align-right-label { + background-position:center right; +} +tr.image-size label { + margin: 0 0 0 1em; +} +.filename.original { float: right; - padding: 0 25px 0 0; - margin: 5px 3px 5px 5px; } -.align .field input { - display: block; +.crunching { + text-align: left; + margin-right:0; + margin-left: 5px; +} +button.dismiss { + right:auto; + left:5px; +} +.file-error { + margin: 0 50px 5px 0; +} +.progress { + left:auto; + right:0; +} +.bar { + border-right-width:0; + border-left-width: 3px; + border-left-style: solid; +} +.media-item .pinkynail { + float:right; +} +.describe-toggle-on, .describe-toggle-off { + float: left; + margin-right:0; + margin-left: 20px; +} +/* Specific to Uploader */ + +#media-upload .media-upload-form p { + margin: 0 0 1em 1em; +} +.filename { float: right; - margin: 5px 15px 5px 0; -} -.image-align-none-label, -.image-align-left-label, -.image-align-center-label, -.image-align-right-label { - background-position: center right; -}
\ No newline at end of file + margin-left:0; + margin-right: 10px; +} +#media-upload .describe th.label { + text-align:right; +} +.menu_order { + float:left; +} diff --git a/wp-admin/css/press-this-ie-rtl.css b/wp-admin/css/press-this-ie-rtl.css index 19c6f20..912e0e2 100644 --- a/wp-admin/css/press-this-ie-rtl.css +++ b/wp-admin/css/press-this-ie-rtl.css @@ -1,7 +1,3 @@ -#menu { margin-right: 8px !important; } - -p.submit input { text-align: right !important; } - -li.ui-tabs-selected a { height: 25px; } - -#photo_directions span { right: 200px; left: auto; height: 8px; }
\ No newline at end of file +.ui-tabs-nav { + margin-right: 0; +} diff --git a/wp-admin/css/press-this-rtl.css b/wp-admin/css/press-this-rtl.css index 27009c5..f75d7ec 100644 --- a/wp-admin/css/press-this-rtl.css +++ b/wp-admin/css/press-this-rtl.css @@ -1,59 +1,98 @@ body { - font-family: sans-serif; + font-family: Tahoma; } - -#viewsite { - right:auto; left: 8px; +.ui-tabs-nav { + padding-left:0; + padding-right:8px; } - -ul#menu { - padding-right: 8px; +.ui-tabs-nav li { + float: right; } - -.ui-tabs-nav li { - float: right; +.button { + font-family: Tahoma; + margin-left:0; + margin-right: 5px; } - -div#posting { - padding-right:16px; padding-left: 0; +#wphead #viewsite { + margin-left:0; + margin-right: 10px; } - -div#categories { - right: auto; left: 16px; +#viewsite { + right:auto; + left: 8px; } - -div#categories h2 { - margin:0.5em 1em 0.5em 0; +#wphead #viewsite a { + font-family: Tahoma; } - -#jaxtag { - padding-right :1em; padding-left: 0; +h1 { + right:auto; + left:0; } - -input#newtag { - margin-left: 4px; width: 100px; +div#posting { + padding-left:0; + padding-right: 16px; } - -#photo_directions span { - right: auto; left: 3px +#photo_directions span { + right:auto; + left:3px; } - -#TB_ajaxContent #options { - right: auto; left: 25px; +#img_container a { + float:right; } - -#TB_ajaxContent { - text-align: right; +#img_container a, #img_container a:link, #img_container a:visited { + margin:0 0 4px 4px; } - -#TB_ajaxContent #this_photo { - direction: ltr; +div#categories { + right:auto; + left:16px; } - -.video_split #extra_fields { - float: right; +div#categories h2 { + margin: .5em 1em .5em 0; +} +#tagsdiv #newtag { + margin-right:0; + margin-left: 5px; +} +#jaxtag { + padding-left:0; + padding-right: 1em; +} +#tagchecklist { + padding-left:0; + padding-right: 1em; +} +#tagchecklist span { + margin-right: 10px; + margin-left: .5em; + float: right; +} +#tagchecklist span a { + margin: 6px -9px 0pt 0; + float: right; +} +.submitbox { + float: left; +} +.submitbox .submit input { + text-align:right; +} +.video_split #extra_fields { + float:right; +} +.video_split .editor_area { + float: left; +} +.ac_results li { + text-align:right; +} +#TB_ajaxContent #options { + right:auto; + left:25px; +} +#post_status { + margin-left:0; + margin-right: 10px; +} +#footer { + padding: 10px 60px 0 0; } - -.video_split .editor_area { - float: left; -}
\ No newline at end of file diff --git a/wp-admin/css/press-this.css b/wp-admin/css/press-this.css index 70c7e64..daf60ba 100644 --- a/wp-admin/css/press-this.css +++ b/wp-admin/css/press-this.css @@ -4,6 +4,8 @@ body { margin: 0px; padding: 0px; } + +img { border: 0; } /* Tabs */ @media projection , screen { .ui-tabs-hide { diff --git a/wp-admin/css/theme-editor-rtl.css b/wp-admin/css/theme-editor-rtl.css index c3df152..7b9f31b 100644 --- a/wp-admin/css/theme-editor-rtl.css +++ b/wp-admin/css/theme-editor-rtl.css @@ -1,14 +1,15 @@ #template textarea { - font-family: monospace !important; + font-family:monospace; } #templateside { float:left; } #themeselector { padding-right:0; - padding-left:5px; + padding-left: 5px; + float: left; } div.tablenav { - margin-left:210px; margin-right:0; -}
\ No newline at end of file + margin-left: 210px; +} diff --git a/wp-admin/css/widgets-rtl.css b/wp-admin/css/widgets-rtl.css index 0bd4af6..70838cd 100644 --- a/wp-admin/css/widgets-rtl.css +++ b/wp-admin/css/widgets-rtl.css @@ -1,51 +1,45 @@ +/* 2 column liquid layout */ div.widget-liquid-left-holder { - clear:right; - float:right; + float: right; + clear: right; margin-right:0; - margin-left:-310px; + margin-left: -310px; } div.widget-liquid-left { margin-right:0; - margin-left:310px; + margin-left: 320px; } div.widget-liquid-right { - clear:left; - float:left; + float: left; + clear: left; } p#widget-search { + right:auto; left:0; - right:auto +} +h4.widget-title span { + float: right; +} +h4.widget-title a { + float: left; + margin-left:0; + margin-right: 1em; } ul#widget-list li.widget-list-item h4.widget-title { float:right; - text-align:right; } ul#widget-list li.widget-list-item div.widget-description { - margin:0 200px 0 0; - padding:0 4em 0 0; + margin: 0 200px 0 0; + padding: 0 4em 0 0; } .widget-control-save, .widget-control-remove { - float:right; margin-right:0; - margin-left:8px; -} -h4.widget-title span { + margin-left: 8px; float: right; } -h4.widget-title a { - float: left; - margin: 0 1em 0 0; -} -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 { +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 { right:auto; - left:1em; -} - -ul.widget-control-list div.widget-control-actions { - margin-right:0; - margin-left:-10px; + left: 1em; } -ul.widget-control-list h4.widget-title, -#dragHelper h4.widget-title { - text-align: right; -}
\ No newline at end of file diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index 6bb04aa..62fb2df 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -30,6 +30,8 @@ if ( !empty( $_REQUEST['delete_comments'] ) ) { } endforeach; $redirect_to = basename( __FILE__ ) . '?deleted=' . $comments_deleted . '&approved=' . $comments_approved . '&spam=' . $comments_spammed . '&unapproved=' . $comments_unapproved; + if ( isset($_REQUEST['apage']) ) + $redirect_to = add_query_arg( 'apage', absint($_REQUEST['apage']), $redirect_to ); if ( !empty($_REQUEST['mode']) ) $redirect_to = add_query_arg('mode', $_REQUEST['mode'], $redirect_to); if ( !empty($_REQUEST['comment_status']) ) @@ -175,6 +177,9 @@ if ( $page_links ) <input type="submit" value="<?php _e('Delete'); ?>" name="deleteit" class="button-secondary delete" /> <?php do_action('manage_comments_nav', $comment_status); ?> <?php wp_nonce_field('bulk-comments'); ?> +<?php if ( isset($_GET['apage']) ) { ?> + <input type="hidden" name="apage" value="<?php echo absint( $_GET['apage'] ); ?>" /> +<?php } ?> </div> <br class="clear" /> diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index bb629f4..983bc27 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -7,7 +7,9 @@ $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[5] = sprintf( __('Post restored to revision from %s'), wp_post_revision_title( $_GET['revision'], false ) ); + +if ( isset($_GET['revision']) ) + $messages[5] = sprintf( __('Post restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ); $notice = false; $notices[1] = __( 'There is an autosave of this post that is more recent than the version below. <a href="%s">View the autosave</a>.' ); @@ -71,14 +73,7 @@ $saveasdraft = '<input name="save" type="submit" id="save" class="button" tabind <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 -if ( !empty($_REQUEST['popupurl']) ) - echo clean_url(stripslashes($_REQUEST['popupurl'])); -else if ( strpos( wp_get_referer(), '/wp-admin/' ) === false && $post_ID && url_to_postid(wp_get_referer()) === $post_ID ) - echo 'redo'; -else - echo clean_url(stripslashes(wp_get_referer())); -?>" /> +<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 ?> @@ -115,7 +110,7 @@ if ( current_user_can('publish_posts') OR ( $post->post_status == 'publish' AND </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 post private') ?></label></p> +<p id="private-checkbox"><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 post private') ?></label></p> <?php endif; ?> <?php if ($post_ID) { diff --git a/wp-admin/edit-link-categories.php b/wp-admin/edit-link-categories.php index da5b415..c7a5e9d 100644 --- a/wp-admin/edit-link-categories.php +++ b/wp-admin/edit-link-categories.php @@ -10,12 +10,13 @@ if ( isset($_GET['deleteit']) && isset($_GET['delete']) ) { foreach( (array) $_GET['delete'] as $cat_ID ) { $cat_name = get_term_field('name', $cat_ID, 'link_category'); - + $default_cat_id = get_option('default_link_category'); + // Don't delete the default cats. - if ( $cat_ID == get_option('default_link_category') ) + if ( $cat_ID == $default_cat_id ) wp_die(sprintf(__("Can’t delete the <strong>%s</strong> category: this is the default one"), $cat_name)); - wp_delete_term($cat_ID, 'link_category'); + wp_delete_term($cat_ID, 'link_category', array('default' => $default_cat_id)); } $location = 'edit-link-categories.php'; diff --git a/wp-admin/edit-page-form.php b/wp-admin/edit-page-form.php index 89ac2b2..eb58d20 100644 --- a/wp-admin/edit-page-form.php +++ b/wp-admin/edit-page-form.php @@ -6,6 +6,9 @@ $messages[2] = __('Custom field updated.'); $messages[3] = __('Custom field deleted.'); $messages[4] = __('Page updated.'); +if ( isset($_GET['revision']) ) + $messages[5] = sprintf( __('Page restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ); + $notice = false; $notices[1] = __( 'There is an autosave of this page that is more recent than the version below. <a href="%s">View the autosave</a>.' ); @@ -27,10 +30,6 @@ if (!isset($post_ID) || 0 == $post_ID) { $temp_ID = (int) $temp_ID; $user_ID = (int) $user_ID; -$sendto = clean_url(stripslashes(wp_get_referer())); - -if ( 0 != $post_ID && $sendto == get_permalink($post_ID) ) - $sendto = 'redo'; ?> <?php if ( $notice ) : ?> @@ -57,12 +56,7 @@ if (isset($mode) && 'bookmarklet' == $mode) <?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 -if ( strpos( wp_get_referer(), '/wp-admin/' ) === false && $post_ID && url_to_postid(wp_get_referer()) === $post_ID ) - echo 'redo'; -else - echo clean_url(stripslashes(wp_get_referer())); -?>" /> +<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"> @@ -95,7 +89,7 @@ if ( current_user_can('publish_pages') OR ( $post->post_status == 'publish' AND </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> +<p id="private-checkbox"><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; ?> <?php diff --git a/wp-admin/edit-pages.php b/wp-admin/edit-pages.php index 6a9c5f7..c49bc1f 100644 --- a/wp-admin/edit-pages.php +++ b/wp-admin/edit-pages.php @@ -122,7 +122,7 @@ endif; $pagenum = absint( $_GET['pagenum'] ); if ( empty($pagenum) ) $pagenum = 1; -if( !$per_page || $pre_page < 0 ) +if( !$per_page || $per_page < 0 ) $per_page = 20; $num_pages = ceil(count($posts) / $per_page); diff --git a/wp-admin/gears-manifest.php b/wp-admin/gears-manifest.php index ba965a4..baf6c19 100644 --- a/wp-admin/gears-manifest.php +++ b/wp-admin/gears-manifest.php @@ -64,7 +64,7 @@ header( 'Content-Type: application/x-javascript; charset=UTF-8' ); ?> { "betaManifestVersion" : 1, -"version" : "<?php echo $man_version; ?>_20080710a", +"version" : "<?php echo $man_version; ?>_20080810", "entries" : [ <?php echo $defaults; ?> @@ -103,20 +103,7 @@ header( 'Content-Type: application/x-javascript; charset=UTF-8' ); { "url" : "images/no.png" }, { "url" : "images/yes.png" }, -{ "url" : "../wp-includes/images/crystal/archive.png" }, -{ "url" : "../wp-includes/images/crystal/audio.png" }, -{ "url" : "../wp-includes/images/crystal/code.png" }, -{ "url" : "../wp-includes/images/crystal/default.png" }, -{ "url" : "../wp-includes/images/crystal/document.png" }, -{ "url" : "../wp-includes/images/crystal/interactive.png" }, -{ "url" : "../wp-includes/images/crystal/text.png" }, -{ "url" : "../wp-includes/images/crystal/video.png" }, -{ "url" : "../wp-includes/images/crystal/spreadsheet.png" }, -{ "url" : "../wp-includes/images/rss.png" }, -{ "url" : "../wp-includes/js/thickbox/loadingAnimation.gif" }, -{ "url" : "../wp-includes/js/thickbox/tb-close.png" }, -{ "url" : "../wp-includes/js/swfupload/swfupload_f9.swf" }, - +<?php if ( is_file(ABSPATH.'/wp-includes/js/tinymce/tiny_mce.js') ) { ?> { "url" : "../wp-includes/js/tinymce/tiny_mce_popup.js?ver=311" }, { "url" : "../wp-includes/js/tinymce/utils/mctabs.js?ver=311" }, { "url" : "../wp-includes/js/tinymce/utils/validate.js?ver=311" }, @@ -131,7 +118,7 @@ header( 'Content-Type: application/x-javascript; charset=UTF-8' ); { "url" : "../wp-includes/js/tinymce/themes/advanced/js/link.js?ver=311" }, { "url" : "../wp-includes/js/tinymce/themes/advanced/js/source_editor.js?ver=311" }, { "url" : "../wp-includes/js/tinymce/themes/advanced/js/anchor.js?ver=311" }, -{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js?ver=311d" }, +{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js?ver=311g" }, { "url" : "../wp-includes/js/tinymce/tiny_mce.js?ver=311" }, { "url" : "../wp-includes/js/tinymce/themes/advanced/editor_template.js?ver=311" }, { "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js?ver=311" }, @@ -148,7 +135,7 @@ header( 'Content-Type: application/x-javascript; charset=UTF-8' ); { "url" : "../wp-includes/js/tinymce/plugins/paste/pastetext.htm?ver=311" }, { "url" : "../wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm?ver=311" }, { "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/template.htm?ver=311" }, -{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/editimage.html?ver=311d" }, +{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/editimage.html?ver=311g" }, { "url" : "../wp-includes/js/tinymce/wp-mce-help.php?ver=311" }, { "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css?ver=311" }, @@ -161,7 +148,7 @@ header( 'Content-Type: application/x-javascript; charset=UTF-8' ); { "url" : "../wp-includes/js/tinymce/plugins/media/css/media.css?ver=311" }, { "url" : "../wp-includes/js/tinymce/plugins/paste/css/pasteword.css?ver=311" }, { "url" : "../wp-includes/js/tinymce/plugins/paste/css/blank.css?ver=311" }, -{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css?ver=311d" }, +{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css?ver=311g" }, { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css?ver=311" }, { "url" : "../wp-includes/js/tinymce/wordpress.css?ver=311" }, @@ -203,5 +190,20 @@ header( 'Content-Type: application/x-javascript; charset=UTF-8' ); { "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/image.gif" }, { "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/media.gif" }, { "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/video.gif" }, -{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/audio.gif" } +{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/audio.gif" }, +<?php } ?> + +{ "url" : "../wp-includes/images/crystal/archive.png" }, +{ "url" : "../wp-includes/images/crystal/audio.png" }, +{ "url" : "../wp-includes/images/crystal/code.png" }, +{ "url" : "../wp-includes/images/crystal/default.png" }, +{ "url" : "../wp-includes/images/crystal/document.png" }, +{ "url" : "../wp-includes/images/crystal/interactive.png" }, +{ "url" : "../wp-includes/images/crystal/text.png" }, +{ "url" : "../wp-includes/images/crystal/video.png" }, +{ "url" : "../wp-includes/images/crystal/spreadsheet.png" }, +{ "url" : "../wp-includes/images/rss.png" }, +{ "url" : "../wp-includes/js/thickbox/loadingAnimation.gif" }, +{ "url" : "../wp-includes/js/thickbox/tb-close.png" }, +{ "url" : "../wp-includes/js/swfupload/swfupload_f9.swf" } ]} diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index abdb44d..d91ffc2 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -67,8 +67,7 @@ function get_image_send_to_editor($id, $alt, $title, $align, $url='', $rel = fal function image_add_caption( $html, $id, $alt, $title, $align, $url, $size ) { - // CAPTIONS_OFF is temporary. Do not use it. - if ( empty($alt) || ( defined('CAPTIONS_OFF') && true == CAPTIONS_OFF ) ) return $html; + if ( empty($alt) || apply_filters( 'disable_captions', '' ) ) return $html; $id = ( 0 < (int) $id ) ? 'attachment_' . $id : ''; preg_match( '/width="([0-9]+)/', $html, $matches ); @@ -103,7 +102,7 @@ function media_handle_upload($file_id, $post_id, $post_data = array()) { $file = wp_handle_upload($_FILES[$file_id], $overrides); if ( isset($file['error']) ) - return new wp_error( 'upload_error', $file['error'] ); + return new WP_Error( 'upload_error', $file['error'] ); $url = $file['url']; $type = $file['type']; @@ -143,7 +142,7 @@ function media_handle_sideload($file_array, $post_id, $desc = null, $post_data = $file = wp_handle_sideload($file_array, $overrides); if ( isset($file['error']) ) - return new wp_error( 'upload_error', $file['error'] ); + return new WP_Error( 'upload_error', $file['error'] ); $url = $file['url']; $type = $file['type']; @@ -281,7 +280,7 @@ function media_upload_form_handler() { if ( isset($_POST['send']) ) { $keys = array_keys($_POST['send']); $send_id = (int) array_shift($keys); - $attachment = $_POST['attachments'][$send_id]; + $attachment = stripslashes_deep( $_POST['attachments'][$send_id] ); $html = $attachment['post_title']; if ( !empty($attachment['url']) ) { if ( strpos($attachment['url'], 'attachment_id') || false !== strpos($attachment['url'], get_permalink($_POST['post_id'])) ) @@ -510,14 +509,8 @@ function image_attachment_fields_to_edit($form_fields, $post) { if ( substr($post->post_mime_type, 0, 5) == 'image' ) { $form_fields['post_title']['required'] = true; - // CAPTIONS_OFF is temporary. Do not use it. - if ( defined('CAPTIONS_OFF') && true == CAPTIONS_OFF ) { - $form_fields['post_excerpt']['label'] = __('Alternate Text'); - $form_fields['post_excerpt']['helps'][] = __('Alt text for the image, e.g. "The Mona Lisa"'); - } else { - $form_fields['post_excerpt']['label'] = __('Caption'); - $form_fields['post_excerpt']['helps'][] = __('Also used as alternate text for the image'); - } + $form_fields['post_excerpt']['label'] = __('Caption'); + $form_fields['post_excerpt']['helps'][] = __('Also used as alternate text for the image'); $form_fields['post_content']['label'] = __('Description'); @@ -606,19 +599,13 @@ function get_attachment_fields_to_edit($post, $errors = null) { $file = wp_get_attachment_url($post->ID); $link = get_attachment_link($post->ID); - // CAPTIONS_OFF is temporary. Do not use it. - if ( defined('CAPTIONS_OFF') && true == CAPTIONS_OFF ) - $alt = __('Alternate Text'); - else - $alt = __('Caption'); - $form_fields = array( 'post_title' => array( 'label' => __('Title'), 'value' => $edit_post->post_title, ), 'post_excerpt' => array( - 'label' => $alt, + 'label' => __('Caption'), 'value' => $edit_post->post_excerpt, ), 'post_content' => array( @@ -884,7 +871,6 @@ function media_upload_form( $errors = null ) { $post_id = intval($_REQUEST['post_id']); ?> -<input type='hidden' name='post_id' value='<?php echo (int) $post_id; ?>' /> <div id="media-upload-notice"> <?php if (isset($errors['upload_notice']) ) { ?> <?php echo $errors['upload_notice']; ?> @@ -947,9 +933,8 @@ jQuery(function($){ <div id="html-upload-ui"> <?php do_action('pre-html-upload-ui'); ?> <p> - <input type="file" name="async-upload" id="async-upload" /> <input type="submit" class="button" name="html-upload" value="<?php echo attribute_escape(__('Upload')); ?>" /> <a href="#" onClick="return top.tb_remove();"><?php _e('Cancel'); ?></a> + <input type="file" name="async-upload" id="async-upload" /> <input type="submit" class="button" name="html-upload" value="<?php echo attribute_escape(__('Upload')); ?>" /> <a href="#" onclick="return top.tb_remove();"><?php _e('Cancel'); ?></a> </p> - <input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" /> <br class="clear" /> <?php if ( is_lighttpd_before_150() ): ?> <p><?php _e('If you want to use all capabilities of the uploader, like uploading multiple files at once, please upgrade to lighttpd 1.5.'); ?></p> @@ -1021,7 +1006,7 @@ var addExtImage = { if ( f.alt.value ) { alt = f.alt.value.replace(/['"<>]+/g, ''); -<?php if ( ! defined('CAPTIONS_OFF') || true != CAPTIONS_OFF ) { // CAPTIONS_OFF is temporary. Do not use it. ?> +<?php if ( ! apply_filters( 'disable_captions', '' ) ) { ?> caption = f.alt.value.replace(/'/g, ''').replace(/"/g, '"').replace(/</g, '<').replace(/>/g, '>'); <?php } ?> } @@ -1082,6 +1067,7 @@ var addExtImage = { </div> </div> <input type="submit" class="button savebutton" name="save" value="<?php echo attribute_escape( __( 'Save all changes' ) ); ?>" /> +</form> <?php endif; } @@ -1278,14 +1264,23 @@ jQuery(function($){ } function type_form_image() { - $form = ' + + if ( apply_filters( 'disable_captions', '' ) ) { + $alt = __('Alternate Text'); + $alt_help = __('Alt text for the image, e.g. "The Mona Lisa"'); + } else { + $alt = __('Image Caption'); + $alt_help = __('Also used as alternate text for the image'); + } + + return ' <table class="describe"><tbody> <tr> <th valign="top" scope="row" class="label" style="width:120px;"> <span class="alignleft"><label for="src">' . __('Source') . '</label></span> <span class="alignright"><img id="status_img" src="images/required.gif" title="required" alt="required" /></span> </th> - <td class="field"><input id="src" name="src" value="" type="text" aria-required="true" onblur="addExtImage.getImageData()"></td> + <td class="field"><input id="src" name="src" value="" type="text" aria-required="true" onblur="addExtImage.getImageData()" /></td> </tr> <tr> @@ -1295,31 +1290,15 @@ function type_form_image() { </th> <td class="field"><p><input id="title" name="title" value="" type="text" aria-required="true" /></p></td> </tr> -'; - // CAPTIONS_OFF is temporary. Do not use it. - if ( defined('CAPTIONS_OFF') && true == CAPTIONS_OFF ) { - $form .= ' - <tr> - <th valign="top" scope="row" class="label"> - <span class="alignleft"><label for="alt">' . __('Alternate Text') . '</label></span> - </th> - <td class="field"><input id="alt" name="alt" value="" type="text" aria-required="true" /> - <p class="help">' . __('Alt text for the image, e.g. "The Mona Lisa"') . '</p></td> - </tr> -'; - } else { - $form .= ' <tr> <th valign="top" scope="row" class="label"> - <span class="alignleft"><label for="alt">' . __('Image Caption') . '</label></span> + <span class="alignleft"><label for="alt">' . $alt . '</label></span> </th> <td class="field"><input id="alt" name="alt" value="" type="text" aria-required="true" /> - <p class="help">' . __('Also used as alternate text for the image') . '</p></td> + <p class="help">' . $alt_help . '</p></td> </tr> -'; - } - $form .= ' + <tr class="align"> <th valign="top" scope="row" class="label"><p><label for="align">' . __('Alignment') . '</label></p></th> <td class="field"> @@ -1354,7 +1333,6 @@ function type_form_image() { </tbody></table> '; - return $form; } function type_form_audio() { diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index 2822dac..aca5242 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -34,7 +34,7 @@ function get_plugin_data( $plugin_file ) { function get_plugins($plugin_folder = '') { if ( ! $cache_plugins = wp_cache_get('plugins', 'plugins') ) - $cached_plugins = array(); + $cache_plugins = array(); if ( isset($cache_plugins[ $plugin_folder ]) ) return $cache_plugins[ $plugin_folder ]; @@ -239,14 +239,19 @@ function validate_active_plugins() { return; } + //Invalid is any plugin that is deactivated due to error. + $invalid = array(); + // If a plugin file does not exist, remove it from the list of active // plugins. foreach ( $check_plugins as $check_plugin ) { $result = validate_plugin($check_plugin); if ( is_wp_error( $result ) ) { + $invalid[$check_plugin] = $result; deactivate_plugins( $check_plugin, true); } } + return $invalid; } function validate_plugin($plugin) { diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index a34aeab..49ede25 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -603,7 +603,6 @@ function get_sample_permalink($id, $title=null, $name = null) { $post->post_status = $original_status; $post->post_date = $original_date; $post->post_name = $original_name; - $post->post_title = $original_title; return $permalink; } diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php index 3d15013..cec40fb 100644 --- a/wp-admin/includes/schema.php +++ b/wp-admin/includes/schema.php @@ -15,11 +15,12 @@ if ( $wpdb->supports_collation() ) { $wp_queries="CREATE TABLE $wpdb->terms ( term_id bigint(20) NOT NULL auto_increment, - name varchar(55) NOT NULL default '', + name varchar(200) NOT NULL default '', slug varchar(200) NOT NULL default '', term_group bigint(10) NOT NULL default 0, PRIMARY KEY (term_id), - UNIQUE KEY slug (slug) + UNIQUE KEY slug (slug), + KEY name (name) ) $charset_collate; CREATE TABLE $wpdb->term_taxonomy ( term_taxonomy_id bigint(20) NOT NULL auto_increment, diff --git a/wp-admin/includes/taxonomy.php b/wp-admin/includes/taxonomy.php index f3c5fcf..a0b95a7 100644 --- a/wp-admin/includes/taxonomy.php +++ b/wp-admin/includes/taxonomy.php @@ -133,7 +133,7 @@ function get_tags_to_edit( $post_id ) { foreach ( $tags as $tag ) $tag_names[] = $tag->name; - $tags_to_edit = join( ', ', $tag_names ); + $tags_to_edit = join( ',', $tag_names ); $tags_to_edit = attribute_escape( $tags_to_edit ); $tags_to_edit = apply_filters( 'tags_to_edit', $tags_to_edit ); return $tags_to_edit; diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 3a1abfd..3d6aac5 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -670,7 +670,7 @@ function user_row( $user_object, $style = '', $role = '' ) { } else { $edit = $user_object->user_login; } - $role_name = translate_with_context($wp_roles->role_names[$role]); + $role_name = $wp_roles->role_names[$role] ? translate_with_context($wp_roles->role_names[$role]) : __('None'); $r = "<tr id='user-$user_object->ID'$style> <th scope='row' class='check-column'><input type='checkbox' name='users[]' id='user_{$user_object->ID}' class='$role' value='{$user_object->ID}' /></th> <td><strong>$edit</strong></td> diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index 830a0d6..459c449 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -551,6 +551,10 @@ function upgrade_230() { $categories = $wpdb->get_results("SELECT * FROM $wpdb->categories ORDER BY cat_ID"); foreach ($categories as $category) { $term_id = (int) $category->cat_ID; + $name = $category->cat_name; + $description = $category->category_description; + $slug = $category->category_nicename; + $parent = $category->category_parent; $term_group = 0; // Associate terms with the same slug in a term group and make slugs unique. diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php index 3bf4fd7..94aa8bb 100644 --- a/wp-admin/includes/user.php +++ b/wp-admin/includes/user.php @@ -259,7 +259,7 @@ function wp_delete_user($id, $reassign = 'novalue') { } else { $reassign = (int) $reassign; $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET post_author = %d WHERE post_author = %d", $reassign, $id) ); - $wpdb->query( $wpdb->prepare("UPDATE $wpdb->links SET link_owner = %d WHERE link_owner = %d}", $reassign, $id) ); + $wpdb->query( $wpdb->prepare("UPDATE $wpdb->links SET link_owner = %d WHERE link_owner = %d", $reassign, $id) ); } // FINALLY, delete user diff --git a/wp-admin/install-helper.php b/wp-admin/install-helper.php index 8f04418..eebe0e3 100644 --- a/wp-admin/install-helper.php +++ b/wp-admin/install-helper.php @@ -9,6 +9,7 @@ $debug = 0; ** Returns: true if already exists or on successful completion ** false on error */ +if ( ! function_exists('maybe_create_table') ) : function maybe_create_table($table_name, $create_ddl) { global $wpdb; foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) { @@ -26,6 +27,7 @@ function maybe_create_table($table_name, $create_ddl) { } return false; } +endif; /** ** maybe_add_column() @@ -33,6 +35,7 @@ function maybe_create_table($table_name, $create_ddl) { ** Returns: true if already exists or on successful completion ** false on error */ +if ( ! function_exists('maybe_add_column') ) : function maybe_add_column($table_name, $column_name, $create_ddl) { global $wpdb, $debug; foreach ($wpdb->get_col("DESC $table_name",0) as $column ) { @@ -51,7 +54,7 @@ function maybe_add_column($table_name, $column_name, $create_ddl) { } return false; } - +endif; /** ** maybe_drop_column() diff --git a/wp-admin/js/forms.js b/wp-admin/js/forms.js index 5d6c35d..efd56a7 100644 --- a/wp-admin/js/forms.js +++ b/wp-admin/js/forms.js @@ -1,5 +1,5 @@ function checkAll(jQ) { // use attr( checked, fn ) - jQuery(jQ).find( 'tbody :checkbox' ).attr( 'checked', function() { + jQuery(jQ).find( 'tbody:visible :checkbox' ).attr( 'checked', function() { return jQuery(this).attr( 'checked' ) ? '' : 'checked'; } ); } @@ -23,4 +23,4 @@ jQuery( function($) { $( 'thead :checkbox' ).click( function() { checkAll( $(this).parents( 'form:first' ) ); } ); -} );
\ No newline at end of file +} ); diff --git a/wp-admin/js/wp-gears.js b/wp-admin/js/wp-gears.js index 22b5c00..20c8aa2 100644 --- a/wp-admin/js/wp-gears.js +++ b/wp-admin/js/wp-gears.js @@ -25,15 +25,15 @@ wpGears = { }, storeName : function() { - var name = window.location.protocol + window.location.host; + var name = window.location.protocol + window.location.host; - name = name.replace(/[\/\\:*"?<>|;,]+/g, '_'); // gears beta doesn't allow certain chars in the store name - name = 'wp_' + name.substring(0, 60); // max length of name is 64 chars + name = name.replace(/[\/\\:*"?<>|;,]+/g, '_'); // gears beta doesn't allow certain chars in the store name + name = 'wp_' + name.substring(0, 60); // max length of name is 64 chars - return name; - }, + return name; + }, - message : function(show) { + message : function(show) { var t = this, msg1 = t.I('gears-msg1'), msg2 = t.I('gears-msg2'), msg3 = t.I('gears-msg3'), num = t.I('gears-upd-number'), wait = t.I('gears-wait'); if ( ! msg1 ) return; @@ -61,23 +61,32 @@ wpGears = { I : function(id) { return document.getElementById(id); } -} +}; -function gearsInit() { +(function() { if ( 'undefined' != typeof google && google.gears ) return; var gf = false; - if ( 'undefined' != typeof GearsFactory ) { // Firefox + if ( 'undefined' != typeof GearsFactory ) { gf = new GearsFactory(); - } else { // IE + } else { try { gf = new ActiveXObject('Gears.Factory'); - } catch (e) {} + if ( factory.getBuildInfo().indexOf('ie_mobile') != -1 ) + gf.privateSetGlobalObject(this); + } catch (e) { + if ( ( 'undefined' != typeof navigator.mimeTypes ) && navigator.mimeTypes['application/x-googlegears'] ) { + gf = document.createElement("object"); + gf.style.display = "none"; + gf.width = 0; + gf.height = 0; + gf.type = "application/x-googlegears"; + document.documentElement.appendChild(gf); + } + } } if ( ! gf ) return; if ( 'undefined' == typeof google ) google = {}; if ( ! google.gears ) google.gears = { factory : gf }; -} - -gearsInit(); +})(); diff --git a/wp-admin/link-category.php b/wp-admin/link-category.php index a67cf2b..ea64791 100644 --- a/wp-admin/link-category.php +++ b/wp-admin/link-category.php @@ -28,12 +28,13 @@ case 'delete': wp_die(__('Cheatin’ uh?')); $cat_name = get_term_field('name', $cat_ID, 'link_category'); + $default_cat_id = get_option('default_link_category'); // Don't delete the default cats. - if ( $cat_ID == get_option('default_link_category') ) + if ( $cat_ID == $default_cat_id ) wp_die(sprintf(__("Can’t delete the <strong>%s</strong> category: this is the default one"), $cat_name)); - wp_delete_term($cat_ID, 'link_category'); + wp_delete_term($cat_ID, 'link_category', array('default' => $default_cat_id)); $location = 'edit-link-categories.php'; if ( $referer = wp_get_original_referer() ) { @@ -73,7 +74,9 @@ case 'editedcat': $location = $referer; } - if ( wp_update_term($cat_ID, 'link_category', $_POST) ) + $update = wp_update_term($cat_ID, 'link_category', $_POST); + + if ( $update && !is_wp_error($update) ) $location = add_query_arg('message', 3, $location); else $location = add_query_arg('message', 5, $location); diff --git a/wp-admin/menu-header.php b/wp-admin/menu-header.php index 8179fef..d8f1da2 100644 --- a/wp-admin/menu-header.php +++ b/wp-admin/menu-header.php @@ -22,13 +22,13 @@ foreach ( $menu as $key => $item ) { 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(ABSPATH . PLUGINDIR . "/{$submenu[$item[2]][0][2]}") || file_exists(ABSPATH . MUPLUGINDIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook)) + if ( file_exists(WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook) || file_exists(ABSPATH . MUPLUGINDIR . "/{$submenu[$item[2]][0][2]}") ) 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(ABSPATH . PLUGINDIR . "/{$item[2]}") || file_exists(ABSPATH . MUPLUGINDIR . "/{$item[2]}") || !empty($menu_hook)) + if ( file_exists(WP_PLUGIN_DIR . "/{$item[2]}") || !empty($menu_hook) || file_exists(ABSPATH . MUPLUGINDIR . "/{$item[2]}") ) 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>"; @@ -52,13 +52,13 @@ foreach ( $menu as $key => $item ) { 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(ABSPATH . PLUGINDIR . "/{$submenu[$item[2]][0][2]}") || file_exists(ABSPATH . MUPLUGINDIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook)) + if ( file_exists(WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook) || file_exists(ABSPATH . MUPLUGINDIR . "/{$submenu[$item[2]][0][2]}") ) 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(ABSPATH . PLUGINDIR . "/{$item[2]}") || file_exists(ABSPATH . MUPLUGINDIR . "/{$item[2]}") || !empty($menu_hook)) + if ( file_exists(WP_PLUGIN_DIR . "/{$item[2]}") || !empty($menu_hook) || file_exists(ABSPATH . MUPLUGINDIR . "/{$item[2]}") ) 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>"; @@ -77,13 +77,13 @@ foreach ( $menu as $key => $item ) { 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(ABSPATH . PLUGINDIR . "/{$submenu[$item[2]][0][2]}") || file_exists(ABSPATH . MUPLUGINDIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook)) + if ( file_exists(WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook) || file_exists(ABSPATH . MUPLUGINDIR . "/{$submenu[$item[2]][0][2]}") ) 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(ABSPATH . PLUGINDIR . "/{$item[2]}") || file_exists(ABSPATH . MUPLUGINDIR . "/{$item[2]}") ) + if ( file_exists(WP_PLUGIN_DIR . "/{$item[2]}") || !empty($menu_hook) || file_exists(ABSPATH . MUPLUGINDIR . "/{$item[2]}") ) 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>"; @@ -109,13 +109,13 @@ foreach ( $menu as $key => $item ) { 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(ABSPATH . PLUGINDIR . "/{$item[2]}") || file_exists(ABSPATH . MUPLUGINDIR . "/{$item[2]}") ) + if ( file_exists(WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook) || file_exists(ABSPATH . MUPLUGINDIR . "/{$submenu[$item[2]][0][2]}") ) $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(ABSPATH . PLUGINDIR . "/{$item[2]}") || file_exists(ABSPATH . MUPLUGINDIR . "/{$item[2]}") ) + if ( file_exists(WP_PLUGIN_DIR . "/{$item[2]}") || !empty($menu_hook) || file_exists(ABSPATH . MUPLUGINDIR . "/{$item[2]}") ) $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>"; @@ -146,7 +146,7 @@ else $class = ''; $menu_hook = get_plugin_page_hook($item[2], $parent_file); -if (file_exists(ABSPATH . PLUGINDIR . "/{$item[2]}") || file_exists(ABSPATH . MUPLUGINDIR . "/{$item[2]}") || ! empty($menu_hook)) { +if (file_exists(WP_PLUGIN_DIR . "/{$item[2]}") || ! empty($menu_hook) || file_exists(ABSPATH . MUPLUGINDIR . "/{$item[2]}")) { if ( 'admin.php' == $pagenow ) echo "\n\t<li><a href='admin.php?page={$item[2]}'$class>{$item[0]}</a></li>"; else diff --git a/wp-admin/options-permalink.php b/wp-admin/options-permalink.php index 06ad149..ab92adb 100644 --- a/wp-admin/options-permalink.php +++ b/wp-admin/options-permalink.php @@ -173,9 +173,9 @@ $structures = array( <h3><?php _e('Optional'); ?></h3> <?php if ($is_apache) : ?> - <p><?php _e('If you like, you may enter custom structures for your category and tag <abbr title="Universal Resource Locator">URL</abbr>s here. For example, using <code>/topics/</code> as your category base would make your category links like <code>http://example.org/topics/uncategorized/</code>. If you leave these blank the defaults will be used.') ?></p> + <p><?php _e('If you like, you may enter custom structures for your category and tag <abbr title="Universal Resource Locator">URL</abbr>s here. For example, using <code>topics</code> as your category base would make your category links like <code>http://example.org/topics/uncategorized/</code>. If you leave these blank the defaults will be used.') ?></p> <?php else : ?> - <p><?php _e('If you like, you may enter custom structures for your category and tag <abbr title="Universal Resource Locator">URL</abbr>s here. For example, using <code>/topics/</code> as your category base would make your category links like <code>http://example.org/index.php/topics/uncategorized/</code>. If you leave these blank the defaults will be used.') ?></p> + <p><?php _e('If you like, you may enter custom structures for your category and tag <abbr title="Universal Resource Locator">URL</abbr>s here. For example, using <code>topics</code> as your category base would make your category links like <code>http://example.org/index.php/topics/uncategorized/</code>. If you leave these blank the defaults will be used.') ?></p> <?php endif; ?> <table class="form-table"> diff --git a/wp-admin/page.php b/wp-admin/page.php index 7e030d1..21c0d78 100644 --- a/wp-admin/page.php +++ b/wp-admin/page.php @@ -35,9 +35,7 @@ function redirect_page($page_ID) { } elseif (!empty($referredby) && $referredby != $referer) { $location = $_POST['referredby']; $location = remove_query_arg('_wp_original_http_referer', $location); - if ( $_POST['referredby'] == 'redo' ) - $location = get_permalink( $page_ID ); - elseif ( false !== strpos($location, 'edit-pages.php') ) + if ( false !== strpos($location, 'edit-pages.php') ) $location = add_query_arg('posted', $page_ID, $location); elseif ( false !== strpos($location, 'wp-admin') ) $location = "page-new.php?posted=$page_ID"; diff --git a/wp-admin/plugins.php b/wp-admin/plugins.php index 15996ae..b1edbc0 100644 --- a/wp-admin/plugins.php +++ b/wp-admin/plugins.php @@ -172,8 +172,10 @@ wp_enqueue_script('admin-forms'); $title = __('Manage Plugins'); require_once('admin-header.php'); -validate_active_plugins(); - +$invalid = validate_active_plugins(); +if( !empty($invalid) ) + foreach($invalid as $plugin_file => $error) + echo '<div id="message" class="error"><p>' . sprintf(__('The plugin <code>%s</code> has been <strong>deactivated</strong> due to an error: %s'), wp_specialchars($plugin_file), $error->get_error_message()) . '</p></div>'; ?> <?php if ( isset($_GET['error']) ) : ?> diff --git a/wp-admin/post.php b/wp-admin/post.php index f6daec9..0dfb821 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -36,9 +36,7 @@ function redirect_post($post_ID = '') { } elseif (!empty($referredby) && $referredby != $referer) { $location = $_POST['referredby']; $location = remove_query_arg('_wp_original_http_referer', $location); - if ( $_POST['referredby'] == 'redo' ) - $location = get_permalink( $post_ID ); - elseif ( false !== strpos($location, 'edit.php') ) + if ( false !== strpos($location, 'edit.php') ) $location = add_query_arg('posted', $post_ID, $location); elseif ( false !== strpos($location, 'wp-admin') ) $location = "post-new.php?posted=$post_ID"; diff --git a/wp-admin/press-this.php b/wp-admin/press-this.php index 1e42def..863458e 100644 --- a/wp-admin/press-this.php +++ b/wp-admin/press-this.php @@ -34,13 +34,14 @@ function press_it() { $content = $_REQUEST['content']; foreach( (array) $_REQUEST['photo_src'] as $key => $image) { - // escape quote for matching - $quoted = preg_quote2($image); - + // see if files exist in content - we don't want to upload non-used selected files. - if( strpos($_REQUEST['content'], $quoted) !== false ) { + if( strpos($_REQUEST['content'], $image) !== false ) { $upload = media_sideload_image($image, $post_ID, $_REQUEST['photo_description'][$key]); + // Replace the POSTED content <img> with correct uploaded ones. + // escape quote for matching + $quoted = preg_quote2($image); if( !is_wp_error($upload) ) $content = preg_replace('/<img ([^>]*)src=(\"|\')'.$quoted.'(\2)([^>\/]*)\/*>/is', $upload, $content); } } @@ -183,19 +184,21 @@ if($_REQUEST['ajax'] == 'photo_images') { $host = parse_url($uri); - $pattern = '/<img ([^>]*)src=(\"|\')([^<>]+?\.(png|jpeg|jpg|jpe|gif)[^<>\'\"]*)(\2)([^>\/]*)\/*>/is'; + $pattern = '/<img ([^>]*)src=(\"|\')([^<>]+?\.(png|jpeg|jpg|jpe|gif))[^<>\'\"]*(\2)([^>\/]*)\/*>/is'; preg_match_all($pattern, $content, $matches); - + if ( empty($matches[1]) ) return ''; $sources = array(); foreach ($matches[3] as $src) { + // if no http in url if(strpos($src, 'http') === false) - if(strpos($src, '../') === false && strpos($src, './') === false) + // if it doesn't have a relative uri + if( strpos($src, '../') === false && strpos($src, './') === false && strpos($src, '/') === true) $src = 'http://'.str_replace('//','/', $host['host'].'/'.$src); else - $src = 'http://'.str_replace('//','/', $host['host'].'/'.$host['path'].'/'.$src); - + $src = 'http://'.str_replace('//','/', $host['host'].'/'.dirname($host['path']).'/'.$src); + $sources[] = clean_url($src); } return "'" . implode("','", $sources) . "'"; @@ -246,12 +249,12 @@ if($_REQUEST['ajax'] == 'photo_js') { ?> } function pick(img, desc) { - if (img) { - length = jQuery('.photolist input').length; + if (img) { + if('object' == typeof jQuery('.photolist input') && jQuery('.photolist input').length != 0) length = jQuery('.photolist input').length; if(length == 0) length = 1; jQuery('.photolist').append('<input name="photo_src[' + length + ']" value="' + img +'" type="hidden"/>'); jQuery('.photolist').append('<input name="photo_description[' + length + ']" value="' + desc +'" type="hidden"/>'); - append_editor("\n\n" + '<p><img src="' + img +'" alt="' + desc + '" /></p>'); + append_editor("\n\n" + '<p><img src="' + img +'" alt="' + desc + '" class="aligncenter"/></p>'); } tinyMCE.activeEditor.resizeToContent(); return false; @@ -266,6 +269,7 @@ if($_REQUEST['ajax'] == 'photo_js') { ?> } jQuery(document).ready(function() { + jQuery('#extra_fields').html('<div class="photolist"></div><small id="photo_directions"><?php _e("Click images to select:") ?> <span><a href="#" id="photo_add_url" class="thickbox"><?php _e("Add from URL") ?> +</a></span></small><div class="titlewrap"><div id="img_container"></div></div>'); jQuery('#img_container').html(strtoappend); jQuery('#photo_add_url').attr('href', '?ajax=thickbox_url&height=200&width=500'); tb_init('a.thickbox, area.thickbox, input.thickbox'); @@ -275,13 +279,7 @@ if($_REQUEST['ajax'] == 'photo_js') { ?> } if($_REQUEST['ajax'] == 'photo') { ?> - <div class="photolist"></div> - <small id="photo_directions"><?php _e('Click images to select:') ?> <span><a href="#" id="photo_add_url" class="thickbox"><?php _e('Add from URL') ?> +</a></span></small> - - <div class="titlewrap"> - <div id="img_container"></div> - </div> <?php die; } ?> @@ -322,6 +320,7 @@ if($_REQUEST['ajax'] == 'photo') { ?> editor_selector: "mceEditor", language : "<?php echo $language; ?>", width: "100%", + height: "300", theme : "advanced", theme_advanced_buttons1 : "bold,italic,underline,blockquote,separator,strikethrough,bullist,numlist,undo,redo,link,unlink", theme_advanced_buttons2 : "", @@ -445,7 +444,6 @@ if($_REQUEST['ajax'] == 'photo') { ?> <?php } ?> jQuery('#extra_fields').show(); jQuery('#extra_fields').before('<h2 id="waiting"><img src="images/loading.gif" alt="" /><?php echo js_escape( __( 'Loading...' ) ); ?></h2>'); - jQuery('#extra_fields').load('<?php echo clean_url($_SERVER['PHP_SELF']).'/?ajax=photo&u='.attribute_escape($url); ?>'); jQuery.ajax({ type: "GET", cache : false, @@ -472,7 +470,7 @@ if($_REQUEST['ajax'] == 'photo') { ?> show('video'); <?php } elseif ( preg_match("/vimeo\.com\/[0-9]+/i", $url) ) { ?> show('video'); - <?php } elseif ( preg_match("/flickr\.com/i", $url) ) { ?> + <?php } elseif ( preg_match("/flickr\.com/i", $url) ) { ?> show('photo'); <?php } ?> }); @@ -505,7 +503,7 @@ if($_REQUEST['ajax'] == 'photo') { ?> <div class="editor_area"> <h2 id="content_type"><label for="content"><?php _e('Post') ?></label></h2> <div class="editor-container"> - <textarea name="content" id="content" style="width:100%;" class="mceEditor"><?php if ($selection) { echo wp_richedit_pre($selection); } ?><a href="<?php echo $url ?>"><?php echo $title; ?></a>.</textarea> + <textarea name="content" id="content" style="width:100%;" class="mceEditor" rows="15"><?php if ($selection) { echo wp_richedit_pre($selection); } ?><a href="<?php echo $url ?>"><?php echo $title; ?></a>.</textarea> </div> </div> </div> diff --git a/wp-admin/revision.php b/wp-admin/revision.php index a724333..4820abc 100644 --- a/wp-admin/revision.php +++ b/wp-admin/revision.php @@ -134,9 +134,6 @@ if ( 'page' == $post->post_type ) { $title = __( 'Post Revisions' ); } -// Converts post_author ID# into name -add_filter( '_wp_post_revision_field_post_author', 'get_author_name' ); - require_once( 'admin-header.php' ); ?> diff --git a/wp-admin/rtl.css b/wp-admin/rtl.css index 5512d77..a23793b 100644 --- a/wp-admin/rtl.css +++ b/wp-admin/rtl.css @@ -1,324 +1,363 @@ -html,#edit-slug-box,#trackback,#category_nicename,#slug,#dbuser,#dbpass,#dbname,#dbhost,#dbprefix,#dccharset,input[name=gmpath],input[name=archivespath],input[name=lastentry],input[name=email],input[name=url],input[name=aim],input[name=yim],input[name=jabber],#newcontent,#email,#newcomment_author_url,#pass1,#pass2,#siteurl,#home,#admin_email,#date_format,#time_format,#mailserver_url,#mailserver_login,#mailserver_pass,#ping_sites,#blog_charset,#moderation_keys,#blacklist_keys,#permalink_structure,#category_base,#tag_base,#upload_path,#upload_url_path,#insertonly[src],#insertonly[href],#mailserver_port,#thumbnail_size_w,#thumbnail_size_h,#medium_size_w,#medium_size_h,#posts_per_page,#posts_per_rss,#comment_max_links,#insertonly[src],#link_url,#link_image,#rss_uri,#user_login,#key -{ - direction:ltr; - text-align:left +a:link, a:visited { + text-decoration:none; } - -body, td, .submit input, .button, .button-secondary, .button-highlighted, #your-profile legend, .quicktags, .search, #wpcontent select, #wphead #viewsite a, #wphead h1 { - font-family: sans-serif !important; +a:hover { + text-decoration:underline; } - -.code, #quicktags #ed_code { - font-family: monospace !important; +.plugins .togl { + border-right-width: 0; + border-left-width: 1px; + border-left-style: solid; } - -#wpwrap,#footer,#TB_title,.media-upload-form,#media-upload-header -{ - direction:rtl!important; - text-align:right!important +form#upload th { + text-align:left; } - -#user_info -{ - left:15px; - right:auto +td.available-theme { + text-align:right; +} +#current-theme img { + float: right; + margin-right:0; + margin-left: 1em; +} +.quicktags, .search { + font-family: Tahoma; +} +/* 201 - 403 +=================================== */ +.side-info ul { + padding-left:0; + padding-right:18px; +} +.submit input, .button, .button-secondary, .button-highlighted { + font-family: Tahoma; +} +#wpcontent select { + font-family: Tahoma; +} +/* #postdiv, #titlediv, #guiddiv, #poststuff .stuffbox { + margin:0 0 0 8px; +} */ +#quicktags #ed_code { + font-family: Tahoma; +} +#searchform fieldset { + float:right; + margin: 0 0 1em 1.5ex; +} +#searchform fieldset legend { + padding: 0 1px .2em 0; +} +#searchform #post-query-submit { + float:right; +} +/* 404 - 804 +=================================== */ +#template div { + margin-right:0; + margin-left: 190px; +} +* html #template div { + margin-left: 0; } - -#wphead h1 -{ - margin:0 0 0 15%; - padding:11px 15px 16px 170px +#your-profile legend { + font-family:arial; +} +#ajax-response.alignleft { + margin-left:0; + margin-right: 2em; +} +.page-numbers { + margin-right:0; + margin-left:3px; } - -#wphead #viewsite -{ +.comment-column { margin-left:0; - margin-right:10px + margin-right: 5px; } - -#sidemenu -{ +.tablenav a.button-secondary { + margin: 1px 0 0 8px; +} +#update-nag, .plugin-update { + clear:both; +} +/* .tablenav .tablenav-pages { float:left; - margin:-30px 315px 0 15px; - padding-left:0; - padding-right:10px +} */ +#user_info { + right:auto; + left:15px; +} +#wphead #viewsite { + margin-left:0; + margin-right:10px; +} +#wphead #viewsite a { + font-family: Tahoma; } - -#dashmenu -{ - font-size:11px; +#wphead h1 { + font-family:arial; + margin-right:0; + margin-left:15%; + padding: 11px 12px 16px 170px; +} +#dashmenu { + right:0; left:auto; padding-left:0; - padding-right:9px; - right:0 + padding-right: 9px; } - -#dashmenu a -{ +#dashmenu a { + margin-right:0; margin-left:8px; - margin-right:8px; } - -#adminmenu -{ - height:32px; - padding:5px 8px 0 0 +#adminmenu { + padding-left:0; + padding-right:11px; } - -#adminmenu li a -{ - display:block; - float:right; - font:700 16px/100% sans-serif; - margin:0 0 0 10px; - padding:5px 7px 9px -} - -#adminmenu li a.current -{ - font-weight:700 -} - -#adminmenu li a #awaiting-mod -{ - background:url(images/comment-stalk-rtl.gif) -309px bottom !important; - font-family: sans-serif !important; - margin-left:-45px; - margin-right:.2em; - margin-top:-5px -} - -#adminmenu li a:hover #awaiting-mod -{ - background-position: -229px bottom !important; -} - -#adminmenu li a #awaiting-mod span -{ - left:0; - right:auto +#adminmenu a { + font-family:arial; + font-weight:bold; + padding:6px 7px; } - -#submenu li a -{ - display:block; +#adminmenu a.current, #sidemenu a.current { + font-weight:bold; +} +#sidemenu { + margin: -30px 0 0 15px; + float: left; + padding-left:0; + padding-right: 10px; + height: 1%; /* Peek-a-boo in IE6 */ +} +#sidemenu a { float:right; - margin:0 10px 10px 0; - padding:2px 4px } - -p#post-search -{ +#submenu li { + padding: 0 17px 8px 0; + font-size:13px; +} +#adminmenu li a #awaiting-mod span, #sidemenu li a #update-plugins span { + right:auto; left:0; - right:auto -} - -.tablenav div -{ - float:right!important -} - -.tablenav .delete -{ - margin-left: 40px; - margin-right: 0; -} - -ul.view-switch -{ - float:left; - margin:-28px 0 -2px 5px } - -#currenttheme img -{ - float:right; - margin-left:1em; - margin-right:0 +#adminmenu li a:hover #awaiting-mod, #sidemenu li a:hover #update-plugins { + background-position: -160px top; } - -form#themeselector -{ - float:left +/* 804 - 1004 +=================================== */ +#footer { + padding: 10px 60px 0 0; } - -.form-table input.tog -{ - float:right; +.form-table th { + text-align:right; +} +.form-table input.tog { margin-right:0; - margin-left:2px; + margin-left: 2px; + float: right; } - -.curtime -{ - background-position:right 2px; - padding-left:0; - padding-right:18px; +.form-table table.color-palette { + float:right; } - -#poststuff #edButtonPreview,#poststuff #edButtonHTML -{ - float:left; - margin-left:8px; - margin-right:0 +#pass-strength-result { + float:right; + margin-right:0; + margin-left: 5px; } - -#poststuff #media-buttons -{ - direction: rtl; - float:left; - margin-left:20px; - margin-right:0 +#profile-page .form-table #rich_editing { + margin-right:0; + margin-left: 5px; } - -#poststuff #media-buttons a -{ - margin-left:8px; +#tagsdiv #newtag { margin-right:0; - padding: 0 5px 2px 2px; + margin-left: 5px; } - -#poststuff .togbox -{ +#tagchecklist { margin-left:0; - margin-right:-19px + margin-right: 10px; } - -#categorydiv ul#category-tabs,#linkcategorydiv ul#category-tabs -{ - float:right; - margin:0 0 0 -120px; - text-align:left +#tagchecklist strong { + margin-left:0; + margin-right: -8px; +} +#tagchecklist span { + margin-right:0; + margin-left: 25px; + float: right; +} +#tagchecklist span a { + margin: 6px -9px 0 0; + float: right; +} +/* 1005 - 1304 +=================================== */ +.ac_results li { + text-align:right; +} +#poststuff h2 { + clear:right; +} +#poststuff .postbox, #poststuff .stuffbox, #titlediv, #poststuff .postarea { + margin-left: 8px; + margin-right: 20px; +} +#edit-slug-buttons a.save { + margin-right:0; + margin-left:4px; } - -ul#category-tabs li.ui-tabs-selected,#poststuff .togbox -{ +#poststuff #edButtonPreview, #poststuff #edButtonHTML { + margin: 5px 0 0 8px; + float: left; +} +#poststuff #media-buttons { + float: left; + margin-right:0; + margin-left: 20px; +} +#poststuff #media-buttons a { + padding: 0 2px 2px 5px; +} +#poststuff .togbox { + margin-left:0; + margin-right: -21px; + -moz-border-radius-topleft:0; + -khtml-border-top-left-radius:0; + -webkit-border-top-left-radius:0; + border-top-left-radius:0; + -moz-border-radius-topright: 3px; + -khtml-border-top-right-radius: 3px; + -webkit-border-top-right-radius: 3px; + border-top-right-radius: 3px; + -moz-border-radius-bottomleft: 0; -khtml-border-bottom-left-radius:0; - -khtml-border-bottom-right-radius:3px; + -webkit-border-bottom-left-radius:0; + border-bottom-left-radius:0; + -moz-border-radius-bottomright: 3px; + -khtml-border-bottom-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + border-bottom-right-radius: 3px; +} +.submitbox .submitdelete { + margin-left:0; + margin-right:8px; +} +.submitbox .submit { + text-align:right; +} +.submitbox .submit input { + margin-right:0; + margin-left:3px; +} +#categorydiv #category-adder { + margin-left:0; + margin-right: 120px; +} +#categorydiv ul#category-tabs { + float: right; + text-align: left; + margin: 0 0 0 -120px; +} +ul#category-tabs li.ui-tabs-selected { + -moz-border-radius-topleft:0; -khtml-border-top-left-radius:0; - -khtml-border-top-right-radius:3px; + -webkit-border-top-left-radius:0; + border-top-left-radius:0; -moz-border-radius-bottomleft:0; - -moz-border-radius-bottomright:3px; - -moz-border-radius-topleft:0; - -moz-border-radius-topright:3px; + -khtml-border-bottom-left-radius:0; -webkit-border-bottom-left-radius:0; - -webkit-border-bottom-right-radius:3px; - -webkit-border-top-left-radius:0; - -webkit-border-top-right-radius:3px; border-bottom-left-radius:0; - border-bottom-right-radius:3px; - border-top-left-radius:0; - border-top-right-radius:3px + -moz-border-radius-topright: 3px; + -khtml-border-top-right-radius: 3px; + -webkit-border-top-right-radius: 3px; + border-top-right-radius: 3px; + -moz-border-radius-bottomright: 3px; + -khtml-border-bottom-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + border-bottom-right-radius: 3px; +} +div.ui-tabs-panel { + margin: 0 120px 0 5px; +} +/* 1305 - elakh! :-) +=================================== */ +#categorydiv ul.categorychecklist ul { + margin-left:0; + margin-right: 18px; } - -div.ui-tabs-panel -{ - margin:0 120px 0 0 +#linkcategorydiv #category-adder { + margin-left:0; + margin-right: 120px; } - -#tagchecklist span -{ - float:right; - margin-left:25px; - margin-right:0 +#linkcategorydiv ul#category-tabs { + float: right; + text-align: left; + margin: 0 0 0 -120px; } - -#tagchecklist span a { - margin: 6px -9px 0 0; +#linkcategorydiv ul.categorychecklist ul { + margin-left:0; + margin-right: 18px; +} +p#tag-search, p#post-search { + right:auto; + left:0; +} +#posts-filter fieldset { float: right; + margin: 0 0 1em 1.5ex; } - - -.tablenav .tablenav-pages -{ - float:left !important; - width:200px -} - -.tablenav-pages .page-numbers -{ - display:block; - float:right -} - -.side-info ul -{ - padding-left:0; - padding-right:18px +#posts-filter fieldset legend { + padding: 0 1px .2em 0; } - -.form-table table.color-palette { - float:right; +ul.view-switch { + float: left; + margin: -23px 0 -2px 5px; } - -#pass-strength-result -{ - float:right; - margin-right:0; - margin-left:5px; -} - -td.comment p.comment-author img.avatar -{ - float:right !important; - margin-right:0 !important; - margin-left:8px !important; -} - -#footer -{ - padding:10px 0 0 -} - -#footer p -{ - height:35px; - margin-right:20px; - padding:12px 40px 0 0; -} - -#submenu,#wpbody -{ - clear:both; +ul.view-switch li { + float: right; } - -#submenu li,ul.subsubsub li a -{ - padding:0; +#the-comment-list td.comment p.comment-author { + margin-right: 0 ; } - -table.widefat th,.form-table th -{ - text-align:right +#the-comment-list p.comment-author img { + float: right; + margin-right:0; + margin-left: 8px; } - -.widefat th input { - margin: 0 8px 0 0; - padding: 0; +#the-comment-list td.comment p { + margin-left:0; + margin-right: 8px; } - -.available-theme,#tagchecklist span a -{ - float:right +.curtime { + background-position: right 2px; + padding-left:0; + padding-right: 18px; } -#template div { +.tablenav .delete { margin-right:0; - margin-left:190px; + margin-left: 20px; } -.submitbox .submit { - text-align:right; +#tTips { } - -#editorcontainer { - border:1px solid; +td.action-links, th.action-links { + text-align:left; } - -.wrap h2 { - margin: 5px -4px 0 0; - padding-right: 0px; - padding-left: 280px; +.info-box { + left:auto; + right: 50%; + margin-left: 0; + margin-right: -225px; +} +.info-box .gears-img { + float: left; +} +/* LTR +=================================== */ +#edit-slug-box, #trackback, #metakeyinput, #post_password, #link_url, #link_image, #rss_uri, #category_nicename, #slug, #dbuser, #dbpass, #dbname, #dbprefix, #dccharset, #gmpath, #archivespath, #lastentry, #dbhost, #pages-exclude, #newcontent, #email, #newcomment_author_url, #siteurl, #home, #admin_email, #date_format, #time_format, #gmt_offset, #mailserver_url, #mailserver_port, #mailserver_login, #mailserver_pass, #ping_sites, #posts_per_page, #posts_per_rss, #blog_charset, #moderation_keys, #blacklist_keys, #comment_max_links, #permalink_structure, #category_base, #tag_base, #upload_path, #upload_url_path, #thumbnail_size_w, #thumbnail_size_h, #medium_size_w, #medium_size_h, #user_login, #url, #pass1, #pass2, #aim, #yim, #jabber, #key, #src, #hostname, #username, #password, #rules { + direction:ltr; } - -div#message { - clear: both; +/* TinyMCE +=================================== */ +.clearlooks2 .mceTop .mceLeft { + width:100% !important; } |