diff --git a/wp-admin/admin-footer.php b/wp-admin/admin-footer.php index 7f3da524a..6023bed96 100644 --- a/wp-admin/admin-footer.php +++ b/wp-admin/admin-footer.php @@ -1,13 +1,10 @@ - - + \ No newline at end of file diff --git a/wp-admin/admin.php b/wp-admin/admin.php index 3c2afcff6..de7b6aee7 100644 --- a/wp-admin/admin.php +++ b/wp-admin/admin.php @@ -82,7 +82,8 @@ if (isset($plugin_page)) { include(ABSPATH . "wp-admin/import/$importer.php"); - $parent_file = 'import.php'; + $parent_file = 'edit.php'; + $submenu_file = 'import.php'; $title = __('Import'); if (! isset($_GET['noheader'])) diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index b9879c4f7..f8d910920 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -14,8 +14,6 @@ $messages[3] = __('Custom field deleted.');
-

-

- + @@ -106,7 +106,7 @@ if ( count($arc_result) ) { ?> } ?> - + @@ -116,7 +116,7 @@ if ( count($arc_result) ) { ?>
- +
diff --git a/wp-admin/export.php b/wp-admin/export.php index 89badae8c..6dd953fa5 100644 --- a/wp-admin/export.php +++ b/wp-admin/export.php @@ -11,14 +11,16 @@ require_once ('admin-header.php');

-

-

We need some more text here. Maybe talking about the export file or how to save it.

+
+

+

+
'; echo '

'.__('Howdy! This importer allows you to extract posts from Blogware XML export file into your blog. Pick a Blogware file to upload and click Import.').'

'; wp_import_upload_form("admin.php?import=blogware&step=1"); + echo '
'; } function import_posts() { diff --git a/wp-admin/import/dotclear.php b/wp-admin/import/dotclear.php index 48db7218d..411495bdf 100644 --- a/wp-admin/import/dotclear.php +++ b/wp-admin/import/dotclear.php @@ -1,747 +1,747 @@ -get_var('SELECT cat_ID FROM '.$wpdb->categories.' WHERE category_nicename="'.$category_nicename.'"'); - - return $name; - } -} - -if(!function_exists('get_comment_count')) -{ - function get_comment_count($post_ID) - { - global $wpdb; - return $wpdb->get_var('SELECT count(*) FROM '.$wpdb->comments.' WHERE comment_post_ID = '.$post_ID); - } -} - -if(!function_exists('link_cat_exists')) -{ - function link_cat_exists($catname) - { - global $wpdb; - return $wpdb->get_var('SELECT cat_id FROM '.$wpdb->linkcategories.' WHERE cat_name = "'.$wpdb->escape($catname).'"'); - } -} - -if(!function_exists('link_exists')) -{ - function link_exists($linkname) - { - global $wpdb; - return $wpdb->get_var('SELECT link_id FROM '.$wpdb->links.' WHERE link_name = "'.$linkname.'"'); - } -} - -/* - Identify UTF-8 text - Taken from http://www.php.net/manual/fr/function.mb-detect-encoding.php#50087 -*/ -// -// utf8 encoding validation developed based on Wikipedia entry at: -// http://en.wikipedia.org/wiki/UTF-8 -// -// Implemented as a recursive descent parser based on a simple state machine -// copyright 2005 Maarten Meijer -// -// This cries out for a C-implementation to be included in PHP core -// - function valid_1byte($char) { - if(!is_int($char)) return false; - return ($char & 0x80) == 0x00; - } - - function valid_2byte($char) { - if(!is_int($char)) return false; - return ($char & 0xE0) == 0xC0; - } - - function valid_3byte($char) { - if(!is_int($char)) return false; - return ($char & 0xF0) == 0xE0; - } - - function valid_4byte($char) { - if(!is_int($char)) return false; - return ($char & 0xF8) == 0xF0; - } - - function valid_nextbyte($char) { - if(!is_int($char)) return false; - return ($char & 0xC0) == 0x80; - } - - function valid_utf8($string) { - $len = strlen($string); - $i = 0; - while( $i < $len ) { - $char = ord(substr($string, $i++, 1)); - if(valid_1byte($char)) { // continue - continue; - } else if(valid_2byte($char)) { // check 1 byte - if(!valid_nextbyte(ord(substr($string, $i++, 1)))) - return false; - } else if(valid_3byte($char)) { // check 2 bytes - if(!valid_nextbyte(ord(substr($string, $i++, 1)))) - return false; - if(!valid_nextbyte(ord(substr($string, $i++, 1)))) - return false; - } else if(valid_4byte($char)) { // check 3 bytes - if(!valid_nextbyte(ord(substr($string, $i++, 1)))) - return false; - if(!valid_nextbyte(ord(substr($string, $i++, 1)))) - return false; - if(!valid_nextbyte(ord(substr($string, $i++, 1)))) - return false; - } // goto next char - } - return true; // done - } - -function csc ($s) { - if (valid_utf8 ($s)) { - return $s; - } else { - return iconv(get_option ("dccharset"),"UTF-8",$s); - } -} - -function textconv ($s) { - return csc (preg_replace ('|(?)\s*\n|', ' ', $s)); -} - -/** - The Main Importer Class -**/ -class Dotclear_Import { - - function header() - { - echo '
'; - echo '

'.__('Import Dotclear').'

'; - echo '

'.__('Steps may take a few minutes depending on the size of your database. Please be patient.').'

'; - } - - function footer() - { - echo '
'; - } - - function greet() - { - echo '

'.__('Howdy! This importer allows you to extract posts from a Dotclear database into your blog. Mileage may vary.').'

'; - echo '

'.__('Your Dotclear Configuration settings are as follows:').'

'; - echo '
'; - $this->db_form(); - echo ''; - echo '
'; - } - - function get_dc_cats() - { - global $wpdb; - // General Housekeeping - $dcdb = new wpdb(get_option('dcuser'), get_option('dcpass'), get_option('dcname'), get_option('dchost')); - set_magic_quotes_runtime(0); - $dbprefix = get_option('dcdbprefix'); - - // Get Categories - return $dcdb->get_results('SELECT * FROM '.$dbprefix.'categorie', ARRAY_A); - } - - function get_dc_users() - { - global $wpdb; - // General Housekeeping - $dcdb = new wpdb(get_option('dcuser'), get_option('dcpass'), get_option('dcname'), get_option('dchost')); - set_magic_quotes_runtime(0); - $dbprefix = get_option('dcdbprefix'); - - // Get Users - - return $dcdb->get_results('SELECT * FROM '.$dbprefix.'user', ARRAY_A); - } - - function get_dc_posts() - { - // General Housekeeping - $dcdb = new wpdb(get_option('dcuser'), get_option('dcpass'), get_option('dcname'), get_option('dchost')); - set_magic_quotes_runtime(0); - $dbprefix = get_option('dcdbprefix'); - - // Get Posts - return $dcdb->get_results('SELECT '.$dbprefix.'post.*, '.$dbprefix.'categorie.cat_libelle_url AS post_cat_name - FROM '.$dbprefix.'post INNER JOIN '.$dbprefix.'categorie - ON '.$dbprefix.'post.cat_id = '.$dbprefix.'categorie.cat_id', ARRAY_A); - } - - function get_dc_comments() - { - global $wpdb; - // General Housekeeping - $dcdb = new wpdb(get_option('dcuser'), get_option('dcpass'), get_option('dcname'), get_option('dchost')); - set_magic_quotes_runtime(0); - $dbprefix = get_option('dcdbprefix'); - - // Get Comments - return $dcdb->get_results('SELECT * FROM '.$dbprefix.'comment', ARRAY_A); - } - - function get_dc_links() - { - //General Housekeeping - $dcdb = new wpdb(get_option('dcuser'), get_option('dcpass'), get_option('dcname'), get_option('dchost')); - set_magic_quotes_runtime(0); - $dbprefix = get_option('dcdbprefix'); - - return $dcdb->get_results('SELECT * FROM '.$dbprefix.'link ORDER BY position', ARRAY_A); - } - - function cat2wp($categories='') - { - // General Housekeeping - global $wpdb; - $count = 0; - $dccat2wpcat = array(); - // Do the Magic - if(is_array($categories)) - { - echo '

'.__('Importing Categories...').'

'; - foreach ($categories as $category) - { - $count++; - extract($category); - - // Make Nice Variables - $name = $wpdb->escape($cat_libelle_url); - $title = $wpdb->escape(csc ($cat_libelle)); - $desc = $wpdb->escape(csc ($cat_desc)); - - if($cinfo = category_exists($name)) - { - $ret_id = wp_insert_category(array('cat_ID' => $cinfo, 'category_nicename' => $name, 'cat_name' => $title, 'category_description' => $desc)); - } - else - { - $ret_id = wp_insert_category(array('category_nicename' => $name, 'cat_name' => $title, 'category_description' => $desc)); - } - $dccat2wpcat[$id] = $ret_id; - } - - // Store category translation for future use - add_option('dccat2wpcat',$dccat2wpcat); - echo '

'.sprintf(__('Done! %1$s categories imported.'), $count).'

'; - return true; - } - echo __('No Categories to Import!'); - return false; - } - - function users2wp($users='') - { - // General Housekeeping - global $wpdb; - $count = 0; - $dcid2wpid = array(); - - // Midnight Mojo - if(is_array($users)) - { - echo '

'.__('Importing Users...').'

'; - foreach($users as $user) - { - $count++; - extract($user); - - // Make Nice Variables - $name = $wpdb->escape(csc ($name)); - $RealName = $wpdb->escape(csc ($user_pseudo)); - - if($uinfo = get_userdatabylogin($name)) - { - - $ret_id = wp_insert_user(array( - 'ID' => $uinfo->ID, - 'user_login' => $user_id, - 'user_nicename' => $Realname, - 'user_email' => $user_email, - 'user_url' => 'http://', - 'display_name' => $Realname) - ); - } - else - { - $ret_id = wp_insert_user(array( - 'user_login' => $user_id, - 'user_nicename' => csc ($user_pseudo), - 'user_email' => $user_email, - 'user_url' => 'http://', - 'display_name' => $Realname) - ); - } - $dcid2wpid[$user_id] = $ret_id; - - // Set Dotclear-to-WordPress permissions translation - - // Update Usermeta Data - $user = new WP_User($ret_id); - $wp_perms = $user_level + 1; - if(10 == $wp_perms) { $user->set_role('administrator'); } - else if(9 == $wp_perms) { $user->set_role('editor'); } - else if(5 <= $wp_perms) { $user->set_role('editor'); } - else if(4 <= $wp_perms) { $user->set_role('author'); } - else if(3 <= $wp_perms) { $user->set_role('contributor'); } - else if(2 <= $wp_perms) { $user->set_role('contributor'); } - else { $user->set_role('subscriber'); } - - update_usermeta( $ret_id, 'wp_user_level', $wp_perms); - update_usermeta( $ret_id, 'rich_editing', 'false'); - update_usermeta( $ret_id, 'first_name', csc ($user_prenom)); - update_usermeta( $ret_id, 'last_name', csc ($user_nom)); - }// End foreach($users as $user) - - // Store id translation array for future use - add_option('dcid2wpid',$dcid2wpid); - - - echo '

'.sprintf(__('Done! %1$s users imported.'), $count).'

'; - return true; - }// End if(is_array($users) - - echo __('No Users to Import!'); - return false; - - }// End function user2wp() - - function posts2wp($posts='') - { - // General Housekeeping - global $wpdb; - $count = 0; - $dcposts2wpposts = array(); - $cats = array(); - - // Do the Magic - if(is_array($posts)) - { - echo '

'.__('Importing Posts...').'

'; - foreach($posts as $post) - { - $count++; - extract($post); - - // Set Dotclear-to-WordPress status translation - $stattrans = array(0 => 'draft', 1 => 'publish'); - $comment_status_map = array (0 => 'closed', 1 => 'open'); - - //Can we do this more efficiently? - $uinfo = ( get_userdatabylogin( $user_id ) ) ? get_userdatabylogin( $user_id ) : 1; - $authorid = ( is_object( $uinfo ) ) ? $uinfo->ID : $uinfo ; - - $Title = $wpdb->escape(csc ($post_titre)); - $post_content = textconv ($post_content); - $post_excerpt = ""; - if ($post_chapo != "") { - $post_excerpt = textconv ($post_chapo); - $post_content = $post_excerpt ."\n\n".$post_content; - } - $post_excerpt = $wpdb->escape ($post_excerpt); - $post_content = $wpdb->escape ($post_content); - $post_status = $stattrans[$post_pub]; - - // Import Post data into WordPress - - if($pinfo = post_exists($Title,$post_content)) - { - $ret_id = wp_insert_post(array( - 'ID' => $pinfo, - 'post_author' => $authorid, - 'post_date' => $post_dt, - 'post_date_gmt' => $post_dt, - 'post_modified' => $post_upddt, - 'post_modified_gmt' => $post_upddt, - 'post_title' => $Title, - 'post_content' => $post_content, - 'post_excerpt' => $post_excerpt, - 'post_status' => $post_status, - 'post_name' => $post_titre_url, - 'comment_status' => $comment_status_map[$post_open_comment], - 'ping_status' => $comment_status_map[$post_open_tb], - 'comment_count' => $post_nb_comment + $post_nb_trackback) - ); - } - else - { - $ret_id = wp_insert_post(array( - 'post_author' => $authorid, - 'post_date' => $post_dt, - 'post_date_gmt' => $post_dt, - 'post_modified' => $post_modified_gmt, - 'post_modified_gmt' => $post_modified_gmt, - 'post_title' => $Title, - 'post_content' => $post_content, - 'post_excerpt' => $post_excerpt, - 'post_status' => $post_status, - 'post_name' => $post_titre_url, - 'comment_status' => $comment_status_map[$post_open_comment], - 'ping_status' => $comment_status_map[$post_open_tb], - 'comment_count' => $post_nb_comment + $post_nb_trackback) - ); - } - $dcposts2wpposts[$post_id] = $ret_id; - - // Make Post-to-Category associations - $cats = array(); - if($cat1 = get_catbynicename($post_cat_name)) { $cats[1] = $cat1; } - - if(!empty($cats)) { wp_set_post_categories($ret_id, $cats); } - } - } - // Store ID translation for later use - add_option('dcposts2wpposts',$dcposts2wpposts); - - echo '

'.sprintf(__('Done! %1$s posts imported.'), $count).'

'; - return true; - } - - function comments2wp($comments='') - { - // General Housekeeping - global $wpdb; - $count = 0; - $dccm2wpcm = array(); - $postarr = get_option('dcposts2wpposts'); - - // Magic Mojo - if(is_array($comments)) - { - echo '

'.__('Importing Comments...').'

'; - foreach($comments as $comment) - { - $count++; - extract($comment); - - // WordPressify Data - $comment_ID = ltrim($comment_id, '0'); - $comment_post_ID = $postarr[$post_id]; - $comment_approved = "$comment_pub"; - $name = $wpdb->escape(csc ($comment_auteur)); - $email = $wpdb->escape($comment_email); - $web = "http://".$wpdb->escape($comment_site); - $message = $wpdb->escape(textconv ($comment_content)); - - if($cinfo = comment_exists($name, $comment_dt)) - { - // Update comments - $ret_id = wp_update_comment(array( - 'comment_ID' => $cinfo, - 'comment_post_ID' => $comment_post_ID, - 'comment_author' => $name, - 'comment_author_email' => $email, - 'comment_author_url' => $web, - 'comment_author_IP' => $comment_ip, - 'comment_date' => $comment_dt, - 'comment_date_gmt' => $comment_dt, - 'comment_content' => $message, - 'comment_approved' => $comment_approved) - ); - } - else - { - // Insert comments - $ret_id = wp_insert_comment(array( - 'comment_post_ID' => $comment_post_ID, - 'comment_author' => $name, - 'comment_author_email' => $email, - 'comment_author_url' => $web, - 'comment_author_IP' => $comment_ip, - 'comment_date' => $comment_dt, - 'comment_date_gmt' => $comment_dt, - 'comment_content' => $message, - 'comment_approved' => $comment_approved) - ); - } - $dccm2wpcm[$comment_ID] = $ret_id; - } - // Store Comment ID translation for future use - add_option('dccm2wpcm', $dccm2wpcm); - - // Associate newly formed categories with posts - get_comment_count($ret_id); - - - echo '

'.sprintf(__('Done! %1$s comments imported.'), $count).'

'; - return true; - } - echo __('No Comments to Import!'); - return false; - } - - function links2wp($links='') - { - // General Housekeeping - global $wpdb; - $count = 0; - - // Deal with the links - if(is_array($links)) - { - echo '

'.__('Importing Links...').'

'; - foreach($links as $link) - { - $count++; - extract($link); - - if ($title != "") { - if ($cinfo = link_cat_exists (csc ($title))) { - $category = $cinfo; - } else { - $wpdb->query ("INSERT INTO $wpdb->linkcategories (cat_name) VALUES ('". - $wpdb->escape (csc ($title))."')"); - $category = $wpdb->insert_id; - } - } else { - $linkname = $wpdb->escape(csc ($label)); - $description = $wpdb->escape(csc ($title)); - - if($linfo = link_exists($linkname)) { - $ret_id = wp_insert_link(array( - 'link_id' => $linfo, - 'link_url' => $href, - 'link_name' => $linkname, - 'link_category' => $category, - 'link_description' => $description) - ); - } else { - $ret_id = wp_insert_link(array( - 'link_url' => $url, - 'link_name' => $linkname, - 'link_category' => $category, - 'link_description' => $description) - ); - } - $dclinks2wplinks[$link_id] = $ret_id; - } - } - add_option('dclinks2wplinks',$dclinks2wplinks); - echo '

'; - printf(__('Done! %s links or link categories imported'), $count); - echo '

'; - return true; - } - echo __('No Links to Import!'); - return false; - } - - function import_categories() - { - // Category Import - $cats = $this->get_dc_cats(); - $this->cat2wp($cats); - add_option('dc_cats', $cats); - - - - echo '
'; - printf('', __('Import Users')); - echo '
'; - - } - - function import_users() - { - // User Import - $users = $this->get_dc_users(); - $this->users2wp($users); - - echo '
'; - printf('', __('Import Posts')); - echo '
'; - } - - function import_posts() - { - // Post Import - $posts = $this->get_dc_posts(); - $this->posts2wp($posts); - - echo '
'; - printf('', __('Import Comments')); - echo '
'; - } - - function import_comments() - { - // Comment Import - $comments = $this->get_dc_comments(); - $this->comments2wp($comments); - - echo '
'; - printf('', __('Import Links')); - echo '
'; - } - - function import_links() - { - //Link Import - $links = $this->get_dc_links(); - $this->links2wp($links); - add_option('dc_links', $links); - - echo '
'; - printf('', __('Finish')); - echo '
'; - } - - function cleanup_dcimport() - { - delete_option('dcdbprefix'); - delete_option('dc_cats'); - delete_option('dcid2wpid'); - delete_option('dccat2wpcat'); - delete_option('dcposts2wpposts'); - delete_option('dccm2wpcm'); - delete_option('dclinks2wplinks'); - delete_option('dcuser'); - delete_option('dcpass'); - delete_option('dcname'); - delete_option('dchost'); - delete_option('dccharset'); - $this->tips(); - } - - function tips() - { - echo '

'.__('Welcome to WordPress. We hope (and expect!) that you will find this platform incredibly rewarding! As a new WordPress user coming from Dotclear, there are some things that we would like to point out. Hopefully, they will help your transition go as smoothly as possible.').'

'; - echo '

'.__('Users').'

'; - echo '

'.sprintf(__('You have already setup WordPress and have been assigned an administrative login and password. Forget it. You didn\'t have that login in Dotclear, why should you have it here? Instead we have taken care to import all of your users into our system. Unfortunately there is one downside. Because both WordPress and Dotclear uses a strong encryption hash with passwords, it is impossible to decrypt it and we are forced to assign temporary passwords to all your users. Every user has the same username, but their passwords are reset to password123. So Login and change it.'), '/wp-login.php').'

'; - echo '

'.__('Preserving Authors').'

'; - echo '

'.__('Secondly, we have attempted to preserve post authors. If you are the only author or contributor to your blog, then you are safe. In most cases, we are successful in this preservation endeavor. However, if we cannot ascertain the name of the writer due to discrepancies between database tables, we assign it to you, the administrative user.').'

'; - echo '

'.__('Textile').'

'; - echo '

'.__('Also, since you\'re coming from Dotclear, you probably have been using Textile to format your comments and posts. If this is the case, we recommend downloading and installing Textile for WordPress. Trust me... You\'ll want it.').'

'; - echo '

'.__('WordPress Resources').'

'; - echo '

'.__('Finally, there are numerous WordPress resources around the internet. Some of them are:').'

'; - echo ''; - echo '

'.sprintf(__('That\'s it! What are you waiting for? Go login!'), '../wp-login.php').'

'; - } - - function db_form() - { - echo ''; - } - - function dispatch() - { - - if (empty ($_GET['step'])) - $step = 0; - else - $step = (int) $_GET['step']; - $this->header(); - - if ( $step > 0 ) - { - if($_POST['dbuser']) - { - if(get_option('dcuser')) - delete_option('dcuser'); - add_option('dcuser',$_POST['dbuser']); - } - if($_POST['dbpass']) - { - if(get_option('dcpass')) - delete_option('dcpass'); - add_option('dcpass',$_POST['dbpass']); - } - - if($_POST['dbname']) - { - if(get_option('dcname')) - delete_option('dcname'); - add_option('dcname',$_POST['dbname']); - } - if($_POST['dbhost']) - { - if(get_option('dchost')) - delete_option('dchost'); - add_option('dchost',$_POST['dbhost']); - } - if($_POST['dccharset']) - { - if(get_option('dccharset')) - delete_option('dccharset'); - add_option('dccharset',$_POST['dccharset']); - } - if($_POST['dbprefix']) - { - if(get_option('dcdbprefix')) - delete_option('dcdbprefix'); - add_option('dcdbprefix',$_POST['dbprefix']); - } - - - } - - switch ($step) - { - default: - case 0 : - $this->greet(); - break; - case 1 : - $this->import_categories(); - break; - case 2 : - $this->import_users(); - break; - case 3 : - $this->import_posts(); - break; - case 4 : - $this->import_comments(); - break; - case 5 : - $this->import_links(); - break; - case 6 : - $this->cleanup_dcimport(); - break; - } - - $this->footer(); - } - - function Dotclear_Import() - { - // Nothing. - } -} - -$dc_import = new Dotclear_Import(); -register_importer('dotclear', __('Dotclear'), __('Import posts from a Dotclear Blog'), array ($dc_import, 'dispatch')); -?> +get_var('SELECT cat_ID FROM '.$wpdb->categories.' WHERE category_nicename="'.$category_nicename.'"'); + + return $name; + } +} + +if(!function_exists('get_comment_count')) +{ + function get_comment_count($post_ID) + { + global $wpdb; + return $wpdb->get_var('SELECT count(*) FROM '.$wpdb->comments.' WHERE comment_post_ID = '.$post_ID); + } +} + +if(!function_exists('link_cat_exists')) +{ + function link_cat_exists($catname) + { + global $wpdb; + return $wpdb->get_var('SELECT cat_id FROM '.$wpdb->linkcategories.' WHERE cat_name = "'.$wpdb->escape($catname).'"'); + } +} + +if(!function_exists('link_exists')) +{ + function link_exists($linkname) + { + global $wpdb; + return $wpdb->get_var('SELECT link_id FROM '.$wpdb->links.' WHERE link_name = "'.$linkname.'"'); + } +} + +/* + Identify UTF-8 text + Taken from http://www.php.net/manual/fr/function.mb-detect-encoding.php#50087 +*/ +// +// utf8 encoding validation developed based on Wikipedia entry at: +// http://en.wikipedia.org/wiki/UTF-8 +// +// Implemented as a recursive descent parser based on a simple state machine +// copyright 2005 Maarten Meijer +// +// This cries out for a C-implementation to be included in PHP core +// + function valid_1byte($char) { + if(!is_int($char)) return false; + return ($char & 0x80) == 0x00; + } + + function valid_2byte($char) { + if(!is_int($char)) return false; + return ($char & 0xE0) == 0xC0; + } + + function valid_3byte($char) { + if(!is_int($char)) return false; + return ($char & 0xF0) == 0xE0; + } + + function valid_4byte($char) { + if(!is_int($char)) return false; + return ($char & 0xF8) == 0xF0; + } + + function valid_nextbyte($char) { + if(!is_int($char)) return false; + return ($char & 0xC0) == 0x80; + } + + function valid_utf8($string) { + $len = strlen($string); + $i = 0; + while( $i < $len ) { + $char = ord(substr($string, $i++, 1)); + if(valid_1byte($char)) { // continue + continue; + } else if(valid_2byte($char)) { // check 1 byte + if(!valid_nextbyte(ord(substr($string, $i++, 1)))) + return false; + } else if(valid_3byte($char)) { // check 2 bytes + if(!valid_nextbyte(ord(substr($string, $i++, 1)))) + return false; + if(!valid_nextbyte(ord(substr($string, $i++, 1)))) + return false; + } else if(valid_4byte($char)) { // check 3 bytes + if(!valid_nextbyte(ord(substr($string, $i++, 1)))) + return false; + if(!valid_nextbyte(ord(substr($string, $i++, 1)))) + return false; + if(!valid_nextbyte(ord(substr($string, $i++, 1)))) + return false; + } // goto next char + } + return true; // done + } + +function csc ($s) { + if (valid_utf8 ($s)) { + return $s; + } else { + return iconv(get_option ("dccharset"),"UTF-8",$s); + } +} + +function textconv ($s) { + return csc (preg_replace ('|(?)\s*\n|', ' ', $s)); +} + +/** + The Main Importer Class +**/ +class Dotclear_Import { + + function header() + { + echo '
'; + echo '

'.__('Import Dotclear').'

'; + echo '

'.__('Steps may take a few minutes depending on the size of your database. Please be patient.').'

'; + } + + function footer() + { + echo '
'; + } + + function greet() + { + echo '

'.__('Howdy! This importer allows you to extract posts from a Dotclear database into your blog. Mileage may vary.').'

'; + echo '

'.__('Your Dotclear Configuration settings are as follows:').'

'; + echo '
'; + $this->db_form(); + echo '

'; + echo '
'; + } + + function get_dc_cats() + { + global $wpdb; + // General Housekeeping + $dcdb = new wpdb(get_option('dcuser'), get_option('dcpass'), get_option('dcname'), get_option('dchost')); + set_magic_quotes_runtime(0); + $dbprefix = get_option('dcdbprefix'); + + // Get Categories + return $dcdb->get_results('SELECT * FROM '.$dbprefix.'categorie', ARRAY_A); + } + + function get_dc_users() + { + global $wpdb; + // General Housekeeping + $dcdb = new wpdb(get_option('dcuser'), get_option('dcpass'), get_option('dcname'), get_option('dchost')); + set_magic_quotes_runtime(0); + $dbprefix = get_option('dcdbprefix'); + + // Get Users + + return $dcdb->get_results('SELECT * FROM '.$dbprefix.'user', ARRAY_A); + } + + function get_dc_posts() + { + // General Housekeeping + $dcdb = new wpdb(get_option('dcuser'), get_option('dcpass'), get_option('dcname'), get_option('dchost')); + set_magic_quotes_runtime(0); + $dbprefix = get_option('dcdbprefix'); + + // Get Posts + return $dcdb->get_results('SELECT '.$dbprefix.'post.*, '.$dbprefix.'categorie.cat_libelle_url AS post_cat_name + FROM '.$dbprefix.'post INNER JOIN '.$dbprefix.'categorie + ON '.$dbprefix.'post.cat_id = '.$dbprefix.'categorie.cat_id', ARRAY_A); + } + + function get_dc_comments() + { + global $wpdb; + // General Housekeeping + $dcdb = new wpdb(get_option('dcuser'), get_option('dcpass'), get_option('dcname'), get_option('dchost')); + set_magic_quotes_runtime(0); + $dbprefix = get_option('dcdbprefix'); + + // Get Comments + return $dcdb->get_results('SELECT * FROM '.$dbprefix.'comment', ARRAY_A); + } + + function get_dc_links() + { + //General Housekeeping + $dcdb = new wpdb(get_option('dcuser'), get_option('dcpass'), get_option('dcname'), get_option('dchost')); + set_magic_quotes_runtime(0); + $dbprefix = get_option('dcdbprefix'); + + return $dcdb->get_results('SELECT * FROM '.$dbprefix.'link ORDER BY position', ARRAY_A); + } + + function cat2wp($categories='') + { + // General Housekeeping + global $wpdb; + $count = 0; + $dccat2wpcat = array(); + // Do the Magic + if(is_array($categories)) + { + echo '

'.__('Importing Categories...').'

'; + foreach ($categories as $category) + { + $count++; + extract($category); + + // Make Nice Variables + $name = $wpdb->escape($cat_libelle_url); + $title = $wpdb->escape(csc ($cat_libelle)); + $desc = $wpdb->escape(csc ($cat_desc)); + + if($cinfo = category_exists($name)) + { + $ret_id = wp_insert_category(array('cat_ID' => $cinfo, 'category_nicename' => $name, 'cat_name' => $title, 'category_description' => $desc)); + } + else + { + $ret_id = wp_insert_category(array('category_nicename' => $name, 'cat_name' => $title, 'category_description' => $desc)); + } + $dccat2wpcat[$id] = $ret_id; + } + + // Store category translation for future use + add_option('dccat2wpcat',$dccat2wpcat); + echo '

'.sprintf(__('Done! %1$s categories imported.'), $count).'

'; + return true; + } + echo __('No Categories to Import!'); + return false; + } + + function users2wp($users='') + { + // General Housekeeping + global $wpdb; + $count = 0; + $dcid2wpid = array(); + + // Midnight Mojo + if(is_array($users)) + { + echo '

'.__('Importing Users...').'

'; + foreach($users as $user) + { + $count++; + extract($user); + + // Make Nice Variables + $name = $wpdb->escape(csc ($name)); + $RealName = $wpdb->escape(csc ($user_pseudo)); + + if($uinfo = get_userdatabylogin($name)) + { + + $ret_id = wp_insert_user(array( + 'ID' => $uinfo->ID, + 'user_login' => $user_id, + 'user_nicename' => $Realname, + 'user_email' => $user_email, + 'user_url' => 'http://', + 'display_name' => $Realname) + ); + } + else + { + $ret_id = wp_insert_user(array( + 'user_login' => $user_id, + 'user_nicename' => csc ($user_pseudo), + 'user_email' => $user_email, + 'user_url' => 'http://', + 'display_name' => $Realname) + ); + } + $dcid2wpid[$user_id] = $ret_id; + + // Set Dotclear-to-WordPress permissions translation + + // Update Usermeta Data + $user = new WP_User($ret_id); + $wp_perms = $user_level + 1; + if(10 == $wp_perms) { $user->set_role('administrator'); } + else if(9 == $wp_perms) { $user->set_role('editor'); } + else if(5 <= $wp_perms) { $user->set_role('editor'); } + else if(4 <= $wp_perms) { $user->set_role('author'); } + else if(3 <= $wp_perms) { $user->set_role('contributor'); } + else if(2 <= $wp_perms) { $user->set_role('contributor'); } + else { $user->set_role('subscriber'); } + + update_usermeta( $ret_id, 'wp_user_level', $wp_perms); + update_usermeta( $ret_id, 'rich_editing', 'false'); + update_usermeta( $ret_id, 'first_name', csc ($user_prenom)); + update_usermeta( $ret_id, 'last_name', csc ($user_nom)); + }// End foreach($users as $user) + + // Store id translation array for future use + add_option('dcid2wpid',$dcid2wpid); + + + echo '

'.sprintf(__('Done! %1$s users imported.'), $count).'

'; + return true; + }// End if(is_array($users) + + echo __('No Users to Import!'); + return false; + + }// End function user2wp() + + function posts2wp($posts='') + { + // General Housekeeping + global $wpdb; + $count = 0; + $dcposts2wpposts = array(); + $cats = array(); + + // Do the Magic + if(is_array($posts)) + { + echo '

'.__('Importing Posts...').'

'; + foreach($posts as $post) + { + $count++; + extract($post); + + // Set Dotclear-to-WordPress status translation + $stattrans = array(0 => 'draft', 1 => 'publish'); + $comment_status_map = array (0 => 'closed', 1 => 'open'); + + //Can we do this more efficiently? + $uinfo = ( get_userdatabylogin( $user_id ) ) ? get_userdatabylogin( $user_id ) : 1; + $authorid = ( is_object( $uinfo ) ) ? $uinfo->ID : $uinfo ; + + $Title = $wpdb->escape(csc ($post_titre)); + $post_content = textconv ($post_content); + $post_excerpt = ""; + if ($post_chapo != "") { + $post_excerpt = textconv ($post_chapo); + $post_content = $post_excerpt ."\n\n".$post_content; + } + $post_excerpt = $wpdb->escape ($post_excerpt); + $post_content = $wpdb->escape ($post_content); + $post_status = $stattrans[$post_pub]; + + // Import Post data into WordPress + + if($pinfo = post_exists($Title,$post_content)) + { + $ret_id = wp_insert_post(array( + 'ID' => $pinfo, + 'post_author' => $authorid, + 'post_date' => $post_dt, + 'post_date_gmt' => $post_dt, + 'post_modified' => $post_upddt, + 'post_modified_gmt' => $post_upddt, + 'post_title' => $Title, + 'post_content' => $post_content, + 'post_excerpt' => $post_excerpt, + 'post_status' => $post_status, + 'post_name' => $post_titre_url, + 'comment_status' => $comment_status_map[$post_open_comment], + 'ping_status' => $comment_status_map[$post_open_tb], + 'comment_count' => $post_nb_comment + $post_nb_trackback) + ); + } + else + { + $ret_id = wp_insert_post(array( + 'post_author' => $authorid, + 'post_date' => $post_dt, + 'post_date_gmt' => $post_dt, + 'post_modified' => $post_modified_gmt, + 'post_modified_gmt' => $post_modified_gmt, + 'post_title' => $Title, + 'post_content' => $post_content, + 'post_excerpt' => $post_excerpt, + 'post_status' => $post_status, + 'post_name' => $post_titre_url, + 'comment_status' => $comment_status_map[$post_open_comment], + 'ping_status' => $comment_status_map[$post_open_tb], + 'comment_count' => $post_nb_comment + $post_nb_trackback) + ); + } + $dcposts2wpposts[$post_id] = $ret_id; + + // Make Post-to-Category associations + $cats = array(); + if($cat1 = get_catbynicename($post_cat_name)) { $cats[1] = $cat1; } + + if(!empty($cats)) { wp_set_post_categories($ret_id, $cats); } + } + } + // Store ID translation for later use + add_option('dcposts2wpposts',$dcposts2wpposts); + + echo '

'.sprintf(__('Done! %1$s posts imported.'), $count).'

'; + return true; + } + + function comments2wp($comments='') + { + // General Housekeeping + global $wpdb; + $count = 0; + $dccm2wpcm = array(); + $postarr = get_option('dcposts2wpposts'); + + // Magic Mojo + if(is_array($comments)) + { + echo '

'.__('Importing Comments...').'

'; + foreach($comments as $comment) + { + $count++; + extract($comment); + + // WordPressify Data + $comment_ID = ltrim($comment_id, '0'); + $comment_post_ID = $postarr[$post_id]; + $comment_approved = "$comment_pub"; + $name = $wpdb->escape(csc ($comment_auteur)); + $email = $wpdb->escape($comment_email); + $web = "http://".$wpdb->escape($comment_site); + $message = $wpdb->escape(textconv ($comment_content)); + + if($cinfo = comment_exists($name, $comment_dt)) + { + // Update comments + $ret_id = wp_update_comment(array( + 'comment_ID' => $cinfo, + 'comment_post_ID' => $comment_post_ID, + 'comment_author' => $name, + 'comment_author_email' => $email, + 'comment_author_url' => $web, + 'comment_author_IP' => $comment_ip, + 'comment_date' => $comment_dt, + 'comment_date_gmt' => $comment_dt, + 'comment_content' => $message, + 'comment_approved' => $comment_approved) + ); + } + else + { + // Insert comments + $ret_id = wp_insert_comment(array( + 'comment_post_ID' => $comment_post_ID, + 'comment_author' => $name, + 'comment_author_email' => $email, + 'comment_author_url' => $web, + 'comment_author_IP' => $comment_ip, + 'comment_date' => $comment_dt, + 'comment_date_gmt' => $comment_dt, + 'comment_content' => $message, + 'comment_approved' => $comment_approved) + ); + } + $dccm2wpcm[$comment_ID] = $ret_id; + } + // Store Comment ID translation for future use + add_option('dccm2wpcm', $dccm2wpcm); + + // Associate newly formed categories with posts + get_comment_count($ret_id); + + + echo '

'.sprintf(__('Done! %1$s comments imported.'), $count).'

'; + return true; + } + echo __('No Comments to Import!'); + return false; + } + + function links2wp($links='') + { + // General Housekeeping + global $wpdb; + $count = 0; + + // Deal with the links + if(is_array($links)) + { + echo '

'.__('Importing Links...').'

'; + foreach($links as $link) + { + $count++; + extract($link); + + if ($title != "") { + if ($cinfo = link_cat_exists (csc ($title))) { + $category = $cinfo; + } else { + $wpdb->query ("INSERT INTO $wpdb->linkcategories (cat_name) VALUES ('". + $wpdb->escape (csc ($title))."')"); + $category = $wpdb->insert_id; + } + } else { + $linkname = $wpdb->escape(csc ($label)); + $description = $wpdb->escape(csc ($title)); + + if($linfo = link_exists($linkname)) { + $ret_id = wp_insert_link(array( + 'link_id' => $linfo, + 'link_url' => $href, + 'link_name' => $linkname, + 'link_category' => $category, + 'link_description' => $description) + ); + } else { + $ret_id = wp_insert_link(array( + 'link_url' => $url, + 'link_name' => $linkname, + 'link_category' => $category, + 'link_description' => $description) + ); + } + $dclinks2wplinks[$link_id] = $ret_id; + } + } + add_option('dclinks2wplinks',$dclinks2wplinks); + echo '

'; + printf(__('Done! %s links or link categories imported'), $count); + echo '

'; + return true; + } + echo __('No Links to Import!'); + return false; + } + + function import_categories() + { + // Category Import + $cats = $this->get_dc_cats(); + $this->cat2wp($cats); + add_option('dc_cats', $cats); + + + + echo '
'; + printf('', __('Import Users')); + echo '
'; + + } + + function import_users() + { + // User Import + $users = $this->get_dc_users(); + $this->users2wp($users); + + echo '
'; + printf('', __('Import Posts')); + echo '
'; + } + + function import_posts() + { + // Post Import + $posts = $this->get_dc_posts(); + $this->posts2wp($posts); + + echo '
'; + printf('', __('Import Comments')); + echo '
'; + } + + function import_comments() + { + // Comment Import + $comments = $this->get_dc_comments(); + $this->comments2wp($comments); + + echo '
'; + printf('', __('Import Links')); + echo '
'; + } + + function import_links() + { + //Link Import + $links = $this->get_dc_links(); + $this->links2wp($links); + add_option('dc_links', $links); + + echo '
'; + printf('', __('Finish')); + echo '
'; + } + + function cleanup_dcimport() + { + delete_option('dcdbprefix'); + delete_option('dc_cats'); + delete_option('dcid2wpid'); + delete_option('dccat2wpcat'); + delete_option('dcposts2wpposts'); + delete_option('dccm2wpcm'); + delete_option('dclinks2wplinks'); + delete_option('dcuser'); + delete_option('dcpass'); + delete_option('dcname'); + delete_option('dchost'); + delete_option('dccharset'); + $this->tips(); + } + + function tips() + { + echo '

'.__('Welcome to WordPress. We hope (and expect!) that you will find this platform incredibly rewarding! As a new WordPress user coming from Dotclear, there are some things that we would like to point out. Hopefully, they will help your transition go as smoothly as possible.').'

'; + echo '

'.__('Users').'

'; + echo '

'.sprintf(__('You have already setup WordPress and have been assigned an administrative login and password. Forget it. You didn\'t have that login in Dotclear, why should you have it here? Instead we have taken care to import all of your users into our system. Unfortunately there is one downside. Because both WordPress and Dotclear uses a strong encryption hash with passwords, it is impossible to decrypt it and we are forced to assign temporary passwords to all your users. Every user has the same username, but their passwords are reset to password123. So Login and change it.'), '/wp-login.php').'

'; + echo '

'.__('Preserving Authors').'

'; + echo '

'.__('Secondly, we have attempted to preserve post authors. If you are the only author or contributor to your blog, then you are safe. In most cases, we are successful in this preservation endeavor. However, if we cannot ascertain the name of the writer due to discrepancies between database tables, we assign it to you, the administrative user.').'

'; + echo '

'.__('Textile').'

'; + echo '

'.__('Also, since you\'re coming from Dotclear, you probably have been using Textile to format your comments and posts. If this is the case, we recommend downloading and installing Textile for WordPress. Trust me... You\'ll want it.').'

'; + echo '

'.__('WordPress Resources').'

'; + echo '

'.__('Finally, there are numerous WordPress resources around the internet. Some of them are:').'

'; + echo ''; + echo '

'.sprintf(__('That\'s it! What are you waiting for? Go login!'), '../wp-login.php').'

'; + } + + function db_form() + { + echo ''; + printf('', __('Dotclear Database User:')); + printf('', __('Dotclear Database Password:')); + printf('', __('Dotclear Database Name:')); + printf('', __('Dotclear Database Host:')); + printf('', __('Dotclear Table prefix:')); + printf('', __('Originating character set:')); + echo '
'; + } + + function dispatch() + { + + if (empty ($_GET['step'])) + $step = 0; + else + $step = (int) $_GET['step']; + $this->header(); + + if ( $step > 0 ) + { + if($_POST['dbuser']) + { + if(get_option('dcuser')) + delete_option('dcuser'); + add_option('dcuser',$_POST['dbuser']); + } + if($_POST['dbpass']) + { + if(get_option('dcpass')) + delete_option('dcpass'); + add_option('dcpass',$_POST['dbpass']); + } + + if($_POST['dbname']) + { + if(get_option('dcname')) + delete_option('dcname'); + add_option('dcname',$_POST['dbname']); + } + if($_POST['dbhost']) + { + if(get_option('dchost')) + delete_option('dchost'); + add_option('dchost',$_POST['dbhost']); + } + if($_POST['dccharset']) + { + if(get_option('dccharset')) + delete_option('dccharset'); + add_option('dccharset',$_POST['dccharset']); + } + if($_POST['dbprefix']) + { + if(get_option('dcdbprefix')) + delete_option('dcdbprefix'); + add_option('dcdbprefix',$_POST['dbprefix']); + } + + + } + + switch ($step) + { + default: + case 0 : + $this->greet(); + break; + case 1 : + $this->import_categories(); + break; + case 2 : + $this->import_users(); + break; + case 3 : + $this->import_posts(); + break; + case 4 : + $this->import_comments(); + break; + case 5 : + $this->import_links(); + break; + case 6 : + $this->cleanup_dcimport(); + break; + } + + $this->footer(); + } + + function Dotclear_Import() + { + // Nothing. + } +} + +$dc_import = new Dotclear_Import(); +register_importer('dotclear', __('Dotclear'), __('Import posts from a Dotclear Blog'), array ($dc_import, 'dispatch')); +?> diff --git a/wp-admin/import/livejournal.php b/wp-admin/import/livejournal.php index d0c6102be..2d770ecfa 100644 --- a/wp-admin/import/livejournal.php +++ b/wp-admin/import/livejournal.php @@ -20,8 +20,10 @@ class LJ_Import { } function greet() { + echo '
'; echo '

'.__('Howdy! This importer allows you to extract posts from LiveJournal XML export file into your blog. Pick a LiveJournal file to upload and click Import.').'

'; wp_import_upload_form("admin.php?import=livejournal&step=1"); + echo '
'; } function import_posts() { diff --git a/wp-admin/import/mt.php b/wp-admin/import/mt.php index 4d608f7f3..440ffbece 100644 --- a/wp-admin/import/mt.php +++ b/wp-admin/import/mt.php @@ -21,9 +21,11 @@ class MT_Import { function greet() { $this->header(); ?> +

out of memory error try splitting up the import file into pieces.'); ?>

+
footer(); } diff --git a/wp-admin/import/rss.php b/wp-admin/import/rss.php index aabfe4e66..8a9b9a6a9 100644 --- a/wp-admin/import/rss.php +++ b/wp-admin/import/rss.php @@ -21,8 +21,10 @@ class RSS_Import { } function greet() { + echo '
'; echo '

'.__('Howdy! This importer allows you to extract posts from any RSS 2.0 file into your blog. This is useful if you want to import your posts from a system that is not handled by a custom import tool. Pick an RSS file to upload and click Import.').'

'; wp_import_upload_form("admin.php?import=rss&step=1"); + echo '
'; } function get_posts() { diff --git a/wp-admin/import/textpattern.php b/wp-admin/import/textpattern.php index f9937ff6c..e1a033978 100644 --- a/wp-admin/import/textpattern.php +++ b/wp-admin/import/textpattern.php @@ -50,14 +50,15 @@ class Textpattern_Import { echo ''; } - function greet() - { + function greet() { + echo '
'; echo '

'.__('Howdy! This importer allows you to extract posts from any Textpattern 4.0.2+ into your blog. This has not been tested on previous versions of Textpattern. Mileage may vary.').'

'; echo '

'.__('Your Textpattern Configuration settings are as follows:').'

'; echo '
'; $this->db_form(); - echo ''; + echo '

'; echo '
'; + echo '
'; } function get_txp_cats() @@ -568,13 +569,13 @@ class Textpattern_Import { function db_form() { - echo ''; + echo ''; + printf('', __('Textpattern Database User:')); + printf('', __('Textpattern Database Password:')); + printf('', __('Textpattern Database Name:')); + printf('', __('Textpattern Database Host:')); + printf('', __('Textpattern Table prefix (if any):')); + echo '
'; } function dispatch() diff --git a/wp-admin/import/wordpress.php b/wp-admin/import/wordpress.php index 0740ddfa8..8658aa92a 100644 --- a/wp-admin/import/wordpress.php +++ b/wp-admin/import/wordpress.php @@ -25,8 +25,10 @@ class WP_Import { } function greet() { + echo '
'; echo '

'.__('Howdy! Upload your WordPress eXtended RSS (WXR) file and we’ll import the posts and comments into this blog.').'

'; wp_import_upload_form("admin.php?import=wordpress&step=1"); + echo '
'; } function get_tag( $string, $tag ) { diff --git a/wp-admin/index.php b/wp-admin/index.php index b49f0ae2d..c6d2e9130 100644 --- a/wp-admin/index.php +++ b/wp-admin/index.php @@ -132,7 +132,8 @@ if (0 < $numcats) $numcats = number_format($numcats); $rss = @fetch_rss('http://wordpress.org/development/feed/'); if ( isset($rss->items) && 0 != count($rss->items) ) { ?> -

+
+

items = array_slice($rss->items, 0, 3); foreach ($rss->items as $item ) { @@ -143,24 +144,28 @@ foreach ($rss->items as $item ) { } } ?> - +
items) && 0 != count($rss->items) ) { ?>
-

»

+

+

»

+
+post_status == 'draft') { - wp_enqueue_script('prototype'); - wp_enqueue_script('autosave'); - } - require_once('admin-header.php'); - - if ( !current_user_can('edit_page', $page_ID) ) - die ( __('You are not allowed to edit this page.') ); - - include('edit-page-form.php'); - ?> -
-

- -
- post_type == 'attachment' ) { - if ( ! wp_delete_attachment($page_id) ) - wp_die( __('Error in deleting...') ); - } else { - if ( !wp_delete_post($page_id) ) - wp_die( __('Error in deleting...') ); - } - - $sendback = wp_get_referer(); - if (strstr($sendback, 'page.php')) $sendback = get_option('siteurl') .'/wp-admin/page.php'; - elseif (strstr($sendback, 'attachments.php')) $sendback = get_option('siteurl') .'/wp-admin/attachments.php'; - $sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback); - wp_redirect($sendback); - exit(); - break; - -default: - wp_redirect('edit-pages.php'); - exit(); - break; -} // end switch -include('admin-footer.php'); -?> +post_status == 'draft') { + wp_enqueue_script('prototype'); + wp_enqueue_script('autosave'); + } + require_once('admin-header.php'); + + if ( !current_user_can('edit_page', $page_ID) ) + die ( __('You are not allowed to edit this page.') ); + + include('edit-page-form.php'); + ?> +
+

+ +
+ post_type == 'attachment' ) { + if ( ! wp_delete_attachment($page_id) ) + wp_die( __('Error in deleting...') ); + } else { + if ( !wp_delete_post($page_id) ) + wp_die( __('Error in deleting...') ); + } + + $sendback = wp_get_referer(); + if (strstr($sendback, 'page.php')) $sendback = get_option('siteurl') .'/wp-admin/page.php'; + elseif (strstr($sendback, 'attachments.php')) $sendback = get_option('siteurl') .'/wp-admin/attachments.php'; + $sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback); + wp_redirect($sendback); + exit(); + break; + +default: + wp_redirect('edit-pages.php'); + exit(); + break; +} // end switch +include('admin-footer.php'); +?> diff --git a/wp-admin/plugins.php b/wp-admin/plugins.php index b8ad22558..25add89f1 100644 --- a/wp-admin/plugins.php +++ b/wp-admin/plugins.php @@ -78,7 +78,7 @@ if (empty($plugins)) { echo '

'; } else { ?> - +
@@ -112,7 +112,7 @@ if (empty($plugins)) { - + "; if ( current_user_can('edit_plugins') ) echo " @@ -130,7 +130,8 @@ if (empty($plugins)) {

%s directory and it will be automatically deactivated.', PLUGINDIR)); ?>

-

WordPress plugin directory. To install a plugin you generally just need to upload the plugin file into your %s directory. Once a plugin is uploaded, you may activate it here.', PLUGINDIR)); ?>

+

WordPress plugin directory.'); ?>

+

%s directory. Once a plugin is uploaded, you may activate it here.', PLUGINDIR)); ?>

diff --git a/wp-admin/post.php b/wp-admin/post.php index 598f5d2db..9c9369579 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -62,7 +62,7 @@ case 'edit': ?>
-

+

+

+

{$plugin_data['Title']} {$plugin_data['Version']}{$plugin_data['Description']} ".sprintf(__('By %s'), $plugin_data['Author']).".

{$plugin_data['Description']} ".sprintf(__('By %s'), $plugin_data['Author']).".

$toggle
-

- -

+

diff --git a/wp-admin/rtl.css b/wp-admin/rtl.css index ea62508d0..cfc375183 100644 --- a/wp-admin/rtl.css +++ b/wp-admin/rtl.css @@ -1,223 +1,223 @@ -#viewarc, #viewcat, #namediv, #emaildiv, #uridiv, #planetnews li, #login ul li, #your-profile fieldset, .alignleft .available-theme { - float: right -} - -#templateside, .alignright { - float: left; -} - -#login, #send, .widefat th { - text-align: right -} - -#postcustomsubmit, h2 small.quickjump, form#upload th, .submit, .editform th { - text-align: left -} - -body, td { - font: 13px Tahoma, "Lucida Grande", "Lucida Sans Unicode", Verdana; -} - -fieldset.options legend { - font-family: Tahoma, Georgia, "Times New Roman", Times, serif; -} - -textarea, input, select { - font: 13px Tahoma, Verdana, Arial, Helvetica, sans-serif; -} - -.quicktags, .search { - font: 12px Tahoma, Georgia, "Times New Roman", Times, serif; -} - -.submit input, .submit input:focus, .button { - border-right-color: #ccc; -} - -.submit input:active, .button:active { - border-right-color: #999; -} - -.updated, .confirm { - padding: 0 3em 0 1em; -} - -#adminmenu { - padding: .2em 2em .3em .2em; - height: 30px; -} - -#adminmenu a { - margin: 0 0 0 10px; - display: block; - float: right; -} - -#submenu { - height: 21px; - padding: 3px 3em 0 2em; -} - -#submenu .current { - border-left: 2px solid #045290; -} - -#submenu a { - padding: .3em .4em .33em .4em; - margin: 0 0 0 10px; - display: block; - float: right; -} - -#submenu li { - line-height: 100%; -} - -#postdiv , #titlediv, #guiddiv { - margin: 0 0 0 8px; -} - -#currenttheme img { - float: right; - margin-right: auto; - margin-left: 1em; -} - -#postdiv #quicktags { - padding-right: auto; - padding-left: 6px; -} - -#quicktags #ed_toolbar { - padding: 0px 0 0 2px; -} - -#ed_toolbar input { - margin: 3px 0 2px 2px; -} - -* html #postexcerpt .dbx-toggle-open, * html #postexcerpt .dbx-toggle-open, #postexcerpt div, #attachmentlinks div { - padding-right: auto; - padding-left: 8px; -} - -#login h1 { - left: auto; - right: 137px; -} - -#login h1 a { - display: none; -} - -#searchform { - float: right; - margin-right: auto; - margin-left: 3em; -} - -#poststuff { - margin-right: auto; - margin-left: 16em; -} - -#template div { - margin-right: auto; - margin-left: 190px; -} - -* html #template div { - margin-right: auto; - margin-left: 0px; -} - -#user_info { - right: auto; - left: 1em; -} - -#wphead { - padding: .8em 2em .8em 19em; -} - -#wphead h1 { - font-size: 2.4em; - font-family: Tahoma, Georgia, "Times New Roman", Times, serif -} - -#zeitgeist { - float: left; - margin-left: auto; - margin-right: 1em; -} - -#zeitgeist ul { - margin: 0 .6em .3em 0; - padding: 0 .6em 0 0; -} - -#moremeta fieldset div { - margin: 2px 0px 0 0; -} -#moremeta { - margin-right: auto; - margin-left: 15px; - right: auto; - left: 5%; -} -#categorydiv ul { - margin-left: auto; - margin-right: 10px; -} - -#your-profile legend { - font-family: Tahoma, Georgia, "Times New Roman", Times, serif; -} - -#moremeta .dbx-content { - background: url(images/box-butt.gif) no-repeat bottom left; - padding-right: auto; - padding-left: 2px; -} - -#moremeta .dbx-handle { - background: #2685af url(images/box-head.gif) no-repeat left; -} - -#moremeta .dbx-box { - background: url(images/box-bg.gif) repeat-y left; -} - -a.dbx-toggle, a.dbx-toggle:visited { - right: auto; - left: 2px; -} - -#advancedstuff a.dbx-toggle, #advancedstuff a.dbx-toggle-open:visited { - right: auto; - left: 5px; -} - -#advancedstuff a.dbx-toggle-open, #advancedstuff a.dbx-toggle-open:visited { - right: auto; - left: 5px; -} - -#categorychecklist { - margin-right: auto; - margin-left: 6px; -} - -#ajax-response.alignleft { - margin-left: auto; - margin-right: 2em; -} - -#postdivrich #edButtons { - padding-left: auto; - padding-right: 3px; -} - -#edButtons input, #edButtons input:active { - margin: 0px 0 -1px 2px; -} +#viewarc, #viewcat, #namediv, #emaildiv, #uridiv, #planetnews li, #login ul li, #your-profile fieldset, .alignleft .available-theme { + float: right +} + +#templateside, .alignright { + float: left; +} + +#login, #send, .widefat th { + text-align: right +} + +#postcustomsubmit, form#upload th, .submit, .editform th { + text-align: left +} + +body, td { + font: 13px Tahoma, "Lucida Grande", "Lucida Sans Unicode", Verdana; +} + +fieldset.options legend { + font-family: Tahoma, Georgia, "Times New Roman", Times, serif; +} + +textarea, input, select { + font: 13px Tahoma, Verdana, Arial, Helvetica, sans-serif; +} + +.quicktags, .search { + font: 12px Tahoma, Georgia, "Times New Roman", Times, serif; +} + +.submit input, .submit input:focus, .button { + border-right-color: #ccc; +} + +.submit input:active, .button:active { + border-right-color: #999; +} + +.updated, .confirm { + padding: 0 3em 0 1em; +} + +#adminmenu { + padding: .2em 2em .3em .2em; + height: 30px; +} + +#adminmenu a { + margin: 0 0 0 10px; + display: block; + float: right; +} + +#submenu { + height: 21px; + padding: 3px 3em 0 2em; +} + +#submenu .current { + border-left: 2px solid #045290; +} + +#submenu a { + padding: .3em .4em .33em .4em; + margin: 0 0 0 10px; + display: block; + float: right; +} + +#submenu li { + line-height: 100%; +} + +#postdiv , #titlediv, #guiddiv { + margin: 0 0 0 8px; +} + +#currenttheme img { + float: right; + margin-right: auto; + margin-left: 1em; +} + +#postdiv #quicktags { + padding-right: auto; + padding-left: 6px; +} + +#quicktags #ed_toolbar { + padding: 0px 0 0 2px; +} + +#ed_toolbar input { + margin: 3px 0 2px 2px; +} + +* html #postexcerpt .dbx-toggle-open, * html #postexcerpt .dbx-toggle-open, #postexcerpt div, #attachmentlinks div { + padding-right: auto; + padding-left: 8px; +} + +#login h1 { + left: auto; + right: 137px; +} + +#login h1 a { + display: none; +} + +#searchform { + float: right; + margin-right: auto; + margin-left: 3em; +} + +#poststuff { + margin-right: auto; + margin-left: 16em; +} + +#template div { + margin-right: auto; + margin-left: 190px; +} + +* html #template div { + margin-right: auto; + margin-left: 0px; +} + +#user_info { + right: auto; + left: 1em; +} + +#wphead { + padding: .8em 2em .8em 19em; +} + +#wphead h1 { + font-size: 2.4em; + font-family: Tahoma, Georgia, "Times New Roman", Times, serif +} + +#zeitgeist { + float: left; + margin-left: auto; + margin-right: 1em; +} + +#zeitgeist ul { + margin: 0 .6em .3em 0; + padding: 0 .6em 0 0; +} + +#moremeta fieldset div { + margin: 2px 0px 0 0; +} +#moremeta { + margin-right: auto; + margin-left: 15px; + right: auto; + left: 5%; +} +#categorydiv ul { + margin-left: auto; + margin-right: 10px; +} + +#your-profile legend { + font-family: Tahoma, Georgia, "Times New Roman", Times, serif; +} + +#moremeta .dbx-content { + background: url(images/box-butt.gif) no-repeat bottom left; + padding-right: auto; + padding-left: 2px; +} + +#moremeta .dbx-handle { + background: #2685af url(images/box-head.gif) no-repeat left; +} + +#moremeta .dbx-box { + background: url(images/box-bg.gif) repeat-y left; +} + +a.dbx-toggle, a.dbx-toggle:visited { + right: auto; + left: 2px; +} + +#advancedstuff a.dbx-toggle, #advancedstuff a.dbx-toggle-open:visited { + right: auto; + left: 5px; +} + +#advancedstuff a.dbx-toggle-open, #advancedstuff a.dbx-toggle-open:visited { + right: auto; + left: 5px; +} + +#categorychecklist { + margin-right: auto; + margin-left: 6px; +} + +#ajax-response.alignleft { + margin-left: auto; + margin-right: 2em; +} + +#postdivrich #edButtons { + padding-left: auto; + padding-right: 3px; +} + +#edButtons input, #edButtons input:active { + margin: 0px 0 -1px 2px; +} diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php index 3281ba91c..dc8c2f6de 100644 --- a/wp-admin/theme-editor.php +++ b/wp-admin/theme-editor.php @@ -93,7 +93,7 @@ default: } ?> - + diff --git a/wp-admin/upload-functions.php b/wp-admin/upload-functions.php index 6268ea360..3211e4a95 100644 --- a/wp-admin/upload-functions.php +++ b/wp-admin/upload-functions.php @@ -1,362 +1,358 @@ -post_content ); - - $class = 'text'; - $thumb_src = ''; - $innerHTML = get_attachment_innerHTML( $id, false, $dims ); - if ( $image_src = strstr($innerHTML, 'src="') ) { - $image_src = explode('"', $image_src); - $image_src = $image_src[1]; - $thumb_src = wp_make_link_relative($image_src); - $class = 'image'; - $innerHTML = ' ' . str_replace($image_src, $thumb_src, $innerHTML); - } - - $src = wp_make_link_relative( get_the_guid() ); - - $r = ''; - - if ( $href ) - $r .= "\n"; - if ( $href || $image_src ) - $r .= "\t\t\t$innerHTML"; - if ( $href ) - $r .= "\n"; - $r .= "\n\t\t
\n\t\t\t

\n"; - $r .= "\t\t\t\t\n"; - - if ( $image_src ) - $r .= "\t\t\t\t\n"; - if ( isset($width) ) { - $r .= "\t\t\t\t\n"; - $r .= "\t\t\t\t\n"; - } - $r .= "\t\t\t\t\n"; - $r .= "\t\t\t\t\n"; - $r .= "\t\t\t\t\n"; - $r .= "\t\t\t

\n\t\t
\n"; - return $r; -} - -function wp_upload_view() { - global $style, $post_id; - $id = get_the_ID(); - $attachment_data = get_post_meta( $id, '_wp_attachment_metadata', true ); -?> -
-
-

"; - the_title(); - if ( !isset($attachment_data['width']) ) - echo ''; - ?>

- ' . __('view') . ''; - echo ' | '; - echo '' . __('edit') . ''; - echo ' | '; - echo '' . __('cancel') . ''; - echo ' ]'; ?> -
- -
-"; - echo wp_upload_display( array(171, 128) ); - if ( isset($attachment_data['width']) ) - echo ''; ?> -
- -
- - id="upload-file" method="post" action=""> - -
-

"; - the_title(); - if ( !isset($attachment_data['width']) ) - echo ''; - ?>

- ' . __('view') . ''; - echo ' | '; - echo '' . __('links') . ''; - echo ' | '; - echo '' . __('cancel') . ''; - echo ' ]'; ?> -
- -
-"; - echo wp_upload_display( array(171, 128) ); - if ( isset($attachment_data['width']) ) - echo ''; ?> -
- - - - - - - - - - - - - - - - - - - - -
- - - - - - - - -
- - - - -
-
- -" - . __('Browse Files') . '' - ); - - $overrides = array('action'=>'upload'); - - $file = wp_handle_upload($_FILES['image'], $overrides); - - if ( isset($file['error']) ) - wp_die($file['error'] . "
'" . __('Back to Image Uploading') . '' - ); - - $url = $file['url']; - $type = $file['type']; - $file = $file['file']; - $filename = basename($file); - - // Construct the attachment array - $attachment = array( - 'post_title' => $post_title ? $post_title : $filename, - 'post_content' => $post_content, - 'post_type' => 'attachment', - 'post_parent' => $post_id, - 'post_mime_type' => $type, - 'guid' => $url - ); - - // Save the data - $id = wp_insert_attachment($attachment, $file, $post_id); - - if ( preg_match('!^image/!', $attachment['post_mime_type']) ) { - // Generate the attachment's postmeta. - $imagesize = getimagesize($file); - $imagedata['width'] = $imagesize['0']; - $imagedata['height'] = $imagesize['1']; - list($uwidth, $uheight) = get_udims($imagedata['width'], $imagedata['height']); - $imagedata['hwstring_small'] = "height='$uheight' width='$uwidth'"; - $imagedata['file'] = $file; - - add_post_meta($id, '_wp_attachment_metadata', $imagedata); - - if ( $imagedata['width'] * $imagedata['height'] < 3 * 1024 * 1024 ) { - if ( $imagedata['width'] > 128 && $imagedata['width'] >= $imagedata['height'] * 4 / 3 ) - $thumb = wp_create_thumbnail($file, 128); - elseif ( $imagedata['height'] > 96 ) - $thumb = wp_create_thumbnail($file, 96); - - if ( @file_exists($thumb) ) { - $newdata = $imagedata; - $newdata['thumb'] = basename($thumb); - update_post_meta($id, '_wp_attachment_metadata', $newdata, $imagedata); - } else { - $error = $thumb; - } - } - } else { - add_post_meta($id, '_wp_attachment_metadata', array()); - } - - wp_redirect( get_option('siteurl') . "/wp-admin/upload.php?style=$style&tab=browse&action=view&ID=$id&post_id=$post_id"); - die; - break; - - case 'save' : - global $from_tab, $post_id, $style; - if ( !$from_tab ) - $from_tab = 'upload'; - check_admin_referer( 'inlineuploading' ); - - wp_update_post($_POST); - wp_redirect( get_option('siteurl') . "/wp-admin/upload.php?style=$style&tab=$from_tab&post_id=$post_id"); - die; - break; - - case 'delete' : - global $ID, $post_id, $from_tab, $style; - if ( !$from_tab ) - $from_tab = 'upload'; - - check_admin_referer( 'inlineuploading' ); - - if ( !current_user_can('edit_post', (int) $ID) ) - wp_die( __('You are not allowed to delete this attachment.') - . " " - . __('Go back') . '' - ); - - wp_delete_attachment($ID); - - wp_redirect( get_option('siteurl') . "/wp-admin/upload.php?style=$style&tab=$from_tab&post_id=$post_id" ); - die; - break; - - endswitch; -} - -add_action( 'upload_files_upload', 'wp_upload_tab_upload_action' ); - -function wp_upload_grab_attachments( $obj ) { - $obj->is_attachment = true; -} - -function wp_upload_posts_where( $where ) { - global $post_id; - return $where . " AND post_parent = '" . (int) $post_id . "'"; -} - -function wp_upload_tab_browse() { - global $wpdb, $action, $paged; - $old_vars = compact( 'paged' ); - - switch ( $action ) : - case 'edit' : - case 'view' : - global $ID; - $attachments = query_posts("attachment_id=$ID"); - if ( have_posts() ) : while ( have_posts() ) : the_post(); - 'edit' == $action ? wp_upload_form() : wp_upload_view(); - endwhile; endif; - break; - default : - global $tab, $post_id, $style; - add_action( 'pre_get_posts', 'wp_upload_grab_attachments' ); - if ( 'browse' == $tab && $post_id ) - add_filter( 'posts_where', 'wp_upload_posts_where' ); - $attachments = query_posts("what_to_show=posts&posts_per_page=10&paged=$paged"); - $count_query = "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'attachment'"; - if ( $post_id ) - $count_query .= " AND post_parent = '$post_id'"; - $total = $wpdb->get_var($count_query); - - echo "\n\n"; - - echo "
\n"; - break; - endswitch; - - extract($old_vars); -} - - -function wp_upload_tab_browse_action() { - global $style; - if ( 'inline' == $style ) - wp_enqueue_script('upload'); -} - -add_action( 'upload_files_browse', 'wp_upload_tab_browse_action' ); -add_action( 'upload_files_browse-all', 'wp_upload_tab_browse_action' ); - -function wp_upload_admin_head() { - global $wp_locale; - echo "\n"; - if ( 'rtl' == $wp_locale->text_direction ) - echo "\n"; - if ( 'inline' == @$_GET['style'] ) { - echo ""; - } -} - +post_content ); + + $class = 'text'; + $innerHTML = get_attachment_innerHTML( $id, false, $dims ); + if ( $image_src = strstr($innerHTML, 'src="') ) { + $image_src = explode('"', $image_src); + $image_src = $image_src[1]; + $class = 'image'; + $innerHTML = ' ' . $innerHTML; + } + + $r = ''; + + if ( $href ) + $r .= "\n"; + if ( $href || $image_src ) + $r .= "\t\t\t$innerHTML"; + if ( $href ) + $r .= "\n"; + $r .= "\n\t\t
\n\t\t\t

\n"; + $r .= "\t\t\t\t\n"; + + if ( $image_src ) + $r .= "\t\t\t\t\n"; + if ( isset($width) ) { + $r .= "\t\t\t\t\n"; + $r .= "\t\t\t\t\n"; + } + $r .= "\t\t\t\t\n"; + $r .= "\t\t\t\t\n"; + $r .= "\t\t\t\t\n"; + $r .= "\t\t\t

\n\t\t
\n"; + return $r; +} + +function wp_upload_view() { + global $style, $post_id; + $id = get_the_ID(); + $attachment_data = get_post_meta( $id, '_wp_attachment_metadata', true ); +?> +
+
+

"; + the_title(); + if ( !isset($attachment_data['width']) ) + echo ''; + ?>

+ ' . __('view') . ''; + echo ' | '; + echo '' . __('edit') . ''; + echo ' | '; + echo '' . __('cancel') . ''; + echo ' ]'; ?> +
+ +
+"; + echo wp_upload_display( array(171, 128) ); + if ( isset($attachment_data['width']) ) + echo ''; ?> +
+ +
+ + id="upload-file" method="post" action=""> + +
+

"; + the_title(); + if ( !isset($attachment_data['width']) ) + echo ''; + ?>

+ ' . __('view') . ''; + echo ' | '; + echo '' . __('links') . ''; + echo ' | '; + echo '' . __('cancel') . ''; + echo ' ]'; ?> +
+ +
+"; + echo wp_upload_display( array(171, 128) ); + if ( isset($attachment_data['width']) ) + echo ''; ?> +
+ + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + +
+ + + + +
+
+ +" + . __('Browse Files') . '' + ); + + $overrides = array('action'=>'upload'); + + $file = wp_handle_upload($_FILES['image'], $overrides); + + if ( isset($file['error']) ) + wp_die($file['error'] . "
'" . __('Back to Image Uploading') . '' + ); + + $url = $file['url']; + $type = $file['type']; + $file = $file['file']; + $filename = basename($file); + + // Construct the attachment array + $attachment = array( + 'post_title' => $post_title ? $post_title : $filename, + 'post_content' => $post_content, + 'post_type' => 'attachment', + 'post_parent' => $post_id, + 'post_mime_type' => $type, + 'guid' => $url + ); + + // Save the data + $id = wp_insert_attachment($attachment, $file, $post_id); + + if ( preg_match('!^image/!', $attachment['post_mime_type']) ) { + // Generate the attachment's postmeta. + $imagesize = getimagesize($file); + $imagedata['width'] = $imagesize['0']; + $imagedata['height'] = $imagesize['1']; + list($uwidth, $uheight) = get_udims($imagedata['width'], $imagedata['height']); + $imagedata['hwstring_small'] = "height='$uheight' width='$uwidth'"; + $imagedata['file'] = $file; + + add_post_meta($id, '_wp_attachment_metadata', $imagedata); + + if ( $imagedata['width'] * $imagedata['height'] < 3 * 1024 * 1024 ) { + if ( $imagedata['width'] > 128 && $imagedata['width'] >= $imagedata['height'] * 4 / 3 ) + $thumb = wp_create_thumbnail($file, 128); + elseif ( $imagedata['height'] > 96 ) + $thumb = wp_create_thumbnail($file, 96); + + if ( @file_exists($thumb) ) { + $newdata = $imagedata; + $newdata['thumb'] = basename($thumb); + update_post_meta($id, '_wp_attachment_metadata', $newdata, $imagedata); + } else { + $error = $thumb; + } + } + } else { + add_post_meta($id, '_wp_attachment_metadata', array()); + } + + wp_redirect( get_option('siteurl') . "/wp-admin/upload.php?style=$style&tab=browse&action=view&ID=$id&post_id=$post_id"); + die; + break; + + case 'save' : + global $from_tab, $post_id, $style; + if ( !$from_tab ) + $from_tab = 'upload'; + check_admin_referer( 'inlineuploading' ); + + wp_update_post($_POST); + wp_redirect( get_option('siteurl') . "/wp-admin/upload.php?style=$style&tab=$from_tab&post_id=$post_id"); + die; + break; + + case 'delete' : + global $ID, $post_id, $from_tab, $style; + if ( !$from_tab ) + $from_tab = 'upload'; + + check_admin_referer( 'inlineuploading' ); + + if ( !current_user_can('edit_post', (int) $ID) ) + wp_die( __('You are not allowed to delete this attachment.') + . " " + . __('Go back') . '' + ); + + wp_delete_attachment($ID); + + wp_redirect( get_option('siteurl') . "/wp-admin/upload.php?style=$style&tab=$from_tab&post_id=$post_id" ); + die; + break; + + endswitch; +} + +add_action( 'upload_files_upload', 'wp_upload_tab_upload_action' ); + +function wp_upload_grab_attachments( $obj ) { + $obj->is_attachment = true; +} + +function wp_upload_posts_where( $where ) { + global $post_id; + return $where . " AND post_parent = '" . (int) $post_id . "'"; +} + +function wp_upload_tab_browse() { + global $wpdb, $action, $paged; + $old_vars = compact( 'paged' ); + + switch ( $action ) : + case 'edit' : + case 'view' : + global $ID; + $attachments = query_posts("attachment_id=$ID"); + if ( have_posts() ) : while ( have_posts() ) : the_post(); + 'edit' == $action ? wp_upload_form() : wp_upload_view(); + endwhile; endif; + break; + default : + global $tab, $post_id, $style; + add_action( 'pre_get_posts', 'wp_upload_grab_attachments' ); + if ( 'browse' == $tab && $post_id ) + add_filter( 'posts_where', 'wp_upload_posts_where' ); + $attachments = query_posts("what_to_show=posts&posts_per_page=10&paged=$paged"); + $count_query = "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'attachment'"; + if ( $post_id ) + $count_query .= " AND post_parent = '$post_id'"; + $total = $wpdb->get_var($count_query); + + echo "\n\n"; + + echo "
\n"; + break; + endswitch; + + extract($old_vars); +} + + +function wp_upload_tab_browse_action() { + global $style; + if ( 'inline' == $style ) + wp_enqueue_script('upload'); +} + +add_action( 'upload_files_browse', 'wp_upload_tab_browse_action' ); +add_action( 'upload_files_browse-all', 'wp_upload_tab_browse_action' ); + +function wp_upload_admin_head() { + global $wp_locale; + echo "\n"; + if ( 'rtl' == $wp_locale->text_direction ) + echo "\n"; + if ( 'inline' == @$_GET['style'] ) { + echo ""; + } +} + diff --git a/wp-admin/upload-js.php b/wp-admin/upload-js.php index c7b27aa82..60d04cd23 100644 --- a/wp-admin/upload-js.php +++ b/wp-admin/upload-js.php @@ -1,242 +1,239 @@ - -addLoadEvent( function() { - theFileList = { - currentImage: {ID: 0}, - nonce: '', - tab: '', - postID: 0, - - initializeVars: function() { - this.urlData = document.location.href.split('?'); - this.params = this.urlData[1].toQueryParams(); - this.postID = this.params['post_id']; - this.tab = this.params['tab']; - this.style = this.params['style']; - this.ID = this.params['ID']; - if ( !this.style ) - this.style = 'default'; - var nonceEl = $('nonce-value'); - if ( nonceEl ) - this.nonce = nonceEl.value; - if ( this.ID ) { - this.grabImageData( this.ID ); - this.imageView( this.ID ); - } - }, - - initializeLinks: function() { - if ( this.ID ) - return; - $$('a.file-link').each( function(i) { - var id = i.id.split('-').pop(); - i.onclick = function(e) { theFileList[ 'inline' == theFileList.style ? 'imageView' : 'editView' ](id, e); } - } ); - }, - - grabImageData: function(id) { - if ( id == this.currentImage.ID ) - return; - var thumbEl = $('attachment-thumb-url-' + id); - if ( thumbEl ) - this.currentImage.thumb = ( 0 == id ? '' : thumbEl.value ); - else - this.currentImage.thumb = false; - this.currentImage.src = ( 0 == id ? '' : $('attachment-url-' + id).value ); - this.currentImage.page = ( 0 == id ? '' : $('attachment-page-url-' + id).value ); - this.currentImage.title = ( 0 == id ? '' : $('attachment-title-' + id).value ); - this.currentImage.description = ( 0 == id ? '' : $('attachment-description-' + id).value ); - var widthEl = $('attachment-width-' + id); - if ( widthEl ) { - this.currentImage.width = ( 0 == id ? '' : widthEl.value ); - this.currentImage.height = ( 0 == id ? '' : $('attachment-height-' + id).value ); - } else { - this.currentImage.width = false; - this.currentImage.height = false; - } - this.currentImage.ID = id; - }, - - imageView: function(id, e) { - this.prepView(id); - var h = ''; - - h += "
" - h += "
" - if ( !this.currentImage.thumb ) - h += "

" + this.currentImage.title + "

"; - else - h += "

" + this.currentImage.title + "

"; - h += "[ "; - h += "edit" - h += ' | '; - if ( this.ID ) { - var params = $H(this.params); - params.ID = ''; - params.action = ''; - h += "cancel"; - } else { - h += "cancel"; - } - h += " ]"; - h += '
' - h += "
"; - if ( this.currentImage.thumb ) - h += "" + this.currentImage.title + ""; - else - h += ' '; - h += "
"; - - h += "
"; - h += ""; - if ( this.currentImage.thumb ) { - h += ""; - } - - h += ""; - - h += "
Show"; - h += "
"; - h += ""; - h += "
Link"; - h += "
"; - h += "
"; - h += ""; - h += "
"; - h += ""; - h += "
"; - h += "
"; - - h += "
"; - - new Insertion.Top('upload-content', h); - if (e) Event.stop(e); - return false; - }, - - editView: function(id, e) { - this.prepView(id); - var h = ''; - - var action = 'upload.php?style=' + this.style + '&tab=upload'; - if ( this.postID ) - action += '&post_id=' + this.postID; - h += "
"; - h += "
" - if ( !this.currentImage.thumb ) - h += "

" + this.currentImage.title + "

"; - else - h += "

" + this.currentImage.title + "

"; - h += "[ "; - h += "options" - h += ' | '; - if ( this.ID ) { - var params = $H(this.params); - params.ID = ''; - params.action = ''; - h += "cancel"; - } else { - h += "cancel"; - } - h += " ]"; - h += '
' - h += "
"; - if ( this.currentImage.thumb ) - h += "" + this.currentImage.title + ""; - else - h += ' '; - h += "
"; - - - h += "" - h += ""; - h += ""; - h += ""; - h += ""; - h += ""; - h += "
"; - h += ""; - h += ""; - h += ""; - h += ""; - h += "
"; - h += ""; - h += "
"; - - new Insertion.Top('upload-content', h); - if (e) Event.stop(e); - return false; - }, - - prepView: function(id) { - this.cancelView( true ); - var filesEl = $('upload-files'); - if ( filesEl ) - filesEl.hide(); - var navEl = $('current-tab-nav'); - if ( navEl ) - navEl.hide(); - this.grabImageData(id); - }, - - cancelView: function( prep ) { - if ( !prep ) { - var filesEl = $('upload-files'); - if ( filesEl ) - filesEl.show(); - var navEl = $('current-tab-nav'); - if ( navEl ) - navEl.show(); - } - if ( !this.ID ) - this.grabImageData(0); - var div = $('upload-file'); - if ( div ) - div.remove(); - return false; - }, - - sendToEditor: function(id) { - this.grabImageData(id); - var link = ''; - var display = ''; - var h = ''; - - link = $A(document.forms.uploadoptions.elements.link).detect( function(i) { return i.checked; } ).value; - displayEl = $A(document.forms.uploadoptions.elements.display).detect( function(i) { return i.checked; } ) - if ( displayEl ) - display = displayEl.value; - - if ( 'none' != link ) - h += ""; - if ( display ) - h += "" + this.currentImage.title + ""; - else - h += this.currentImage.title; - if ( 'none' != link ) - h += ""; - - var win = window.opener ? window.opener : window.dialogArguments; - if ( !win ) - win = top; - tinyMCE = win.tinyMCE; - if ( typeof tinyMCE != 'undefined' && tinyMCE.getInstanceById('content') ) - win.tinyMCE.execCommand('mceInsertContent', false, h); - else - win.edInsertContent(win.edCanvas, h); - this.cancelView(); - return false; - }, - - deleteFile: function(id) { - if ( confirm("Are you sure you want to delete the file '" + this.currentImage.title + "'?\nClick ok to delete or cancel to go back.") ) { - $('action-value').value = 'delete'; - $('upload-file').submit(); - return true; - } - return false; - } - - }; - theFileList.initializeVars(); - theFileList.initializeLinks(); -} ); + +addLoadEvent( function() { + theFileList = { + currentImage: {ID: 0}, + nonce: '', + tab: '', + postID: 0, + + initializeVars: function() { + this.urlData = document.location.href.split('?'); + this.params = this.urlData[1].toQueryParams(); + this.postID = this.params['post_id']; + this.tab = this.params['tab']; + this.style = this.params['style']; + this.ID = this.params['ID']; + if ( !this.style ) + this.style = 'default'; + var nonceEl = $('nonce-value'); + if ( nonceEl ) + this.nonce = nonceEl.value; + if ( this.ID ) { + this.grabImageData( this.ID ); + this.imageView( this.ID ); + } + }, + + initializeLinks: function() { + if ( this.ID ) + return; + $$('a.file-link').each( function(i) { + var id = i.id.split('-').pop(); + i.onclick = function(e) { theFileList[ 'inline' == theFileList.style ? 'imageView' : 'editView' ](id, e); } + } ); + }, + + grabImageData: function(id) { + if ( id == this.currentImage.ID ) + return; + var thumbEl = $('attachment-thumb-url-' + id); + if ( thumbEl ) + this.currentImage.thumb = ( 0 == id ? '' : thumbEl.value ); + else + this.currentImage.thumb = false; + this.currentImage.src = ( 0 == id ? '' : $('attachment-url-' + id).value ); + this.currentImage.page = ( 0 == id ? '' : $('attachment-page-url-' + id).value ); + this.currentImage.title = ( 0 == id ? '' : $('attachment-title-' + id).value ); + this.currentImage.description = ( 0 == id ? '' : $('attachment-description-' + id).value ); + var widthEl = $('attachment-width-' + id); + if ( widthEl ) { + this.currentImage.width = ( 0 == id ? '' : widthEl.value ); + this.currentImage.height = ( 0 == id ? '' : $('attachment-height-' + id).value ); + } else { + this.currentImage.width = false; + this.currentImage.height = false; + } + this.currentImage.ID = id; + }, + + imageView: function(id, e) { + this.prepView(id); + var h = ''; + + h += "
" + if ( this.ID ) { + var params = $H(this.params); + params.ID = ''; + params.action = ''; + h += "« Back"; + } else { + h += "« Back"; + } + h += "
" + if ( !this.currentImage.thumb ) + h += "

" + this.currentImage.title + "

"; + else + h += "

" + this.currentImage.title + "

"; + h += " — "; + h += "Edit" + h += ""; + h += '
' + h += "
"; + if ( this.currentImage.thumb ) + h += "" + this.currentImage.title + ""; + else + h += ' '; + h += "
"; + + h += "
"; + h += ""; + if ( this.currentImage.thumb ) { + h += ""; + } + + h += ""; + + h += "
Show:"; + h += "
"; + h += ""; + h += "
Link to:"; + h += "
"; + h += "
"; + h += ""; + h += "

"; + h += ""; + h += "

"; + h += "
"; + + h += "
"; + + new Insertion.Top('upload-content', h); + if (e) Event.stop(e); + return false; + }, + + editView: function(id, e) { + this.prepView(id); + var h = ''; + + var action = 'upload.php?style=' + this.style + '&tab=upload'; + if ( this.postID ) + action += '&post_id=' + this.postID; + h += "
"; + if ( this.ID ) { + var params = $H(this.params); + params.ID = ''; + params.action = ''; + h += "« Back"; + } else { + h += "« Back"; + } + h += "
" + if ( !this.currentImage.thumb ) + h += "

" + this.currentImage.title + "

"; + else + h += "

" + this.currentImage.title + "

"; + h += " — "; + h += "Insert" + h += ""; + h += '
' + h += "
"; + if ( this.currentImage.thumb ) + h += "" + this.currentImage.title + ""; + else + h += ' '; + h += "
"; + + + h += "" + h += ""; + h += ""; + h += ""; + h += ""; + h += ""; + h += "
"; + h += ""; + h += ""; + h += ""; + h += ""; + h += "
"; + h += "
"; + + new Insertion.Top('upload-content', h); + if (e) Event.stop(e); + return false; + }, + + prepView: function(id) { + this.cancelView( true ); + var filesEl = $('upload-files'); + if ( filesEl ) + filesEl.hide(); + var navEl = $('current-tab-nav'); + if ( navEl ) + navEl.hide(); + this.grabImageData(id); + }, + + cancelView: function( prep ) { + if ( !prep ) { + var filesEl = $('upload-files'); + if ( filesEl ) + filesEl.show(); + var navEl = $('current-tab-nav'); + if ( navEl ) + navEl.show(); + } + if ( !this.ID ) + this.grabImageData(0); + var div = $('upload-file'); + if ( div ) + div.remove(); + return false; + }, + + sendToEditor: function(id) { + this.grabImageData(id); + var link = ''; + var display = ''; + var h = ''; + + link = $A(document.forms.uploadoptions.elements.link).detect( function(i) { return i.checked; } ).value; + displayEl = $A(document.forms.uploadoptions.elements.display).detect( function(i) { return i.checked; } ) + if ( displayEl ) + display = displayEl.value; + + if ( 'none' != link ) + h += ""; + if ( display ) + h += "" + this.currentImage.title + ""; + else + h += this.currentImage.title; + if ( 'none' != link ) + h += ""; + + var win = window.opener ? window.opener : window.dialogArguments; + if ( !win ) + win = top; + tinyMCE = win.tinyMCE; + if ( typeof tinyMCE != 'undefined' && tinyMCE.getInstanceById('content') ) + win.tinyMCE.execCommand('mceInsertContent', false, h); + else + win.edInsertContent(win.edCanvas, h); + this.cancelView(); + return false; + }, + + deleteFile: function(id) { + if ( confirm("Are you sure you want to delete the file '" + this.currentImage.title + "'?\nClick ok to delete or cancel to go back.") ) { + $('action-value').value = 'delete'; + $('upload-file').submit(); + return true; + } + return false; + } + + }; + theFileList.initializeVars(); + theFileList.initializeLinks(); +} ); diff --git a/wp-admin/upload.css b/wp-admin/upload.css index 485c6b743..25f1c089a 100644 --- a/wp-admin/upload.css +++ b/wp-admin/upload.css @@ -1,137 +1,175 @@ -body { background: #dfe8f1; } - -.upload-file-data { display: none; } - -#upload-menu { - background: #fff; - margin: 0px; - padding: 0; - list-style: none; - height: 2em; - border-bottom: 1px solid #448abd; - width: 100%; -} - -#upload-menu li { margin: 0 0 0 .75em; } - -#upload-menu li div { - color: #000; - padding: 5px; - border-top: 3px solid #fff; -} - -#upload-menu li a { - color: #000; - text-decoration: none; - border-bottom: none; -} - -#upload-menu li span a.page-numbers { color: #00019b; } - -#upload-menu .current div { - background: #dfe8f1; - border-right: 2px solid #448abd; -} - -#upload-menu div:hover { - background: #dfe8f1; - color: #000; -} - -#upload-content { - position: relative; - clear: both; - margin: 0; - padding: 0; - border: none; - width: 100%; - height: 100%; - background: none; -} - -#upload-file { - position: relative; - margin: 0; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: #dfe8f1; -} - -form#upload-file input, form#upload-file textarea, div#upload-content.upload table { width: 100%; } - -form#upload-file div.submit input { width: auto; } - -#upload-file-view { padding: 0 0 0 15px; } - -#file-title { - margin: 0 0 .2em 15px; - padding: 0; - display: block; -} - -h2 { - margin: 0 .2em 0 0; - padding: 0; - display: inline; - border: none; - color: #000; - font-weight: bold; - font-size: 1.4em; - line-height: 1.4em; -} - -#upload-files { - list-style-type: none; - margin: 0; - padding: 15px 0 0; -} - -#upload-files li { margin: 0 0 15px 15px; } - -#upload-files a, #upload-file-view a, a.file-link { - border: none; - text-decoration: none; -} - -#upload-file-view a img { padding-bottom: .2em; border-bottom: 1px solid #6699CC; } - -#upload-files a.file-link { - display: block; - width: 130px; - height: 128px; - background-color: rgb(209, 226, 239); - text-align: center; - overflow-y: hidden; -} - -#upload-files a.file-link.image { - line-height: 128px; - font-size: 2px; - letter-spacing: 0; -} - -#upload-files a.file-link img { vertical-align: middle; } - -#the-attachment-links { float: right; } - -#the-attachment-links textarea { - font-size: 10px; - overflow: hidden; -} - -form table { float: none; padding: 0 15px; } - -table { - float: left; - margin: 0; - padding: 0; -} - -th { text-align: right; vertical-align: text-top; } - -tr, td, th { - margin-top: 0; - padding-top: 0; -} +body { background: #f9fcfe; } + +.upload-file-data { display: none; } + +#upload-menu { + background: #247fab; + margin: 0px; + padding: 0; + list-style: none; + height: 2em; + border-bottom: 1px solid #448abd; + width: 100%; +} + +#upload-menu li { margin: 0 0 0 .75em; } + +#upload-menu li div { + padding: 5px; + border-top: 3px solid #247fab; +} + +#upload-menu li a { + text-decoration: none; + border-bottom: none; + color: #fff; +} + +#upload-menu li span a.page-numbers { color: #00019b; } + +#upload-menu .current div { + background: #f9fcfe; + border-right: 2px solid #448abd; + color: #000; +} + +#upload-menu .current div a, #upload-menu div:hover a { + color: #000; +} + +#upload-menu div:hover { + background: #f9fcfe; + color: #000; +} + +#upload-content { + position: relative; + clear: both; + margin: 0; + padding: 0; + border: none; + width: 100%; + height: 100%; + background: none; +} + +#upload-file { + margin: 0 auto; + top: 0; + left: 0; + width: 45em; + height: 100%; + background: #f9fcfe; +} +#upload-file th { + width: 8em; +} + +form#upload-file input, form#upload-file textarea, div#upload-content.upload table { width: 100%; } + +form#upload-file div.submit input { width: auto; } + +#upload-file-view { padding: 0 0 0 75px; } + +#file-title { + margin: 0 0 .2em 75px; + padding: 0; + display: block; + font-family: Georgia, "Times New Roman", Times, serif; + font-size: 16px; +} + +h2 { + margin: 0 .2em 0 0; + padding: 0; + display: inline; + border: none; + color: #000; + font-size: 1.4em; + line-height: 1.4em; +} + +.back { + display: block; + position: absolute; + left: 14px; + top: 10px; +} + +#upload-files { + list-style-type: none; + margin: 0; + padding: 15px 0 0; +} + +#upload-files li { margin: 0 0 15px 15px; } + +#upload-files a, #upload-file-view a, a.file-link { + border: none; + text-decoration: none; +} + +#upload-file-view a img { padding-bottom: .2em; border-bottom: 1px solid #6699CC; } + +#upload-files a.file-link { + display: block; + width: 130px; + height: 128px; + background-color: rgb(209, 226, 239); + text-align: center; + overflow: hidden; +} + +#upload-files a.text { + padding-top: 40px; + height: 88px; + font-size: 16px; +} + +#upload-files a.file-link.image { + line-height: 128px; + font-size: 2px; + letter-spacing: 0; +} + +#upload-files a.file-link img { vertical-align: middle; } + +#the-attachment-links { float: right; } + +#the-attachment-links textarea { + font-size: 10px; + overflow: hidden; +} + +form table { float: none; padding: 0 15px; } + +table { + float: left; + margin: 0; + padding: 0; +} + +th { text-align: right; vertical-align: text-top; } + +tr, td, th { + margin-top: 0; + padding-top: 0; +} + +#uploadoptions th { + width: 80px; +} + +#uploadoptions p { + margin: 0; + padding: 0; +} + +#uploadoptions td { + padding-left: 1em; + line-height: 140%; +} + +#uploadoptions table { + width: 300px; +} \ No newline at end of file diff --git a/wp-admin/upload.php b/wp-admin/upload.php index 2293b8a5f..a99257050 100644 --- a/wp-admin/upload.php +++ b/wp-admin/upload.php @@ -71,6 +71,7 @@ function addLoadEvent(func) {if ( typeof wpOnload!='function'){wpOnload=func;}el else : add_action( 'admin_head', 'wp_upload_admin_head' ); include_once('admin-header.php'); + echo "
"; endif; echo "
    \n"; @@ -116,6 +117,7 @@ call_user_func( $wp_upload_tabs[$tab][2] ); echo "
\n"; if ( 'inline' != $style ) : + echo "
"; include_once('admin-footer.php'); else : ?> diff --git a/wp-admin/users.php b/wp-admin/users.php index f21de0393..4a8e88790 100644 --- a/wp-admin/users.php +++ b/wp-admin/users.php @@ -64,8 +64,6 @@ class WP_User_Search { } $this->query_from_where = "FROM $wpdb->users WHERE 1=1 $search_sql"; - if ( !$_GET['update'] && !$this->search_term && !$this->raw_page && $wpdb->get_var("SELECT COUNT(ID) FROM $wpdb->users") > $this->users_per_page ) - $this->too_many_total_users = sprintf(__('Because this blog has more than %s users, they cannot all be shown on one page. Use the paging or search functionality in order to find the user you want to edit.'), $this->users_per_page); } function query() { @@ -326,12 +324,6 @@ default: -too_many_total_users ) : ?> -
-

too_many_total_users; ?>

-
- -
is_search() ) : ?> @@ -341,7 +333,7 @@ default: search_errors ) ) : ?> @@ -362,10 +354,14 @@ default:

-

first_user + 1, min($wp_user_search->first_user + $wp_user_search->users_per_page, $wp_user_search->total_users_for_query), $wp_user_search->total_users_for_query); ?>

+

first_user && $wp_user_search->total_users_for_query <= 50 ) + printf(__('%3$s shown below'), $wp_user_search->first_user + 1, min($wp_user_search->first_user + $wp_user_search->users_per_page, $wp_user_search->total_users_for_query), $wp_user_search->total_users_for_query); + else + printf(__('%1$s – %2$s of %3$s shown below'), $wp_user_search->first_user + 1, min($wp_user_search->first_user + $wp_user_search->users_per_page, $wp_user_search->total_users_for_query), $wp_user_search->total_users_for_query); ?>

results_are_paged() ) : ?> -
page_links(); ?>

+

page_links(); ?>

@@ -405,7 +401,7 @@ foreach ( (array) $roleclass as $user_object ) { results_are_paged() ) : ?> -
page_links(); ?>
+

page_links(); ?>

@@ -436,6 +432,7 @@ foreach ( (array) $roleclass as $user_object ) {

+
'.sprintf(__('Users can register themselves or you can manually create users here.'), get_option('siteurl').'/wp-register.php').'

'; ?> @@ -486,6 +483,7 @@ foreach ( (array) $roleclass as $user_object ) {

+
diff --git a/wp-admin/wp-admin.css b/wp-admin/wp-admin.css index f8e635118..272a46abe 100644 --- a/wp-admin/wp-admin.css +++ b/wp-admin/wp-admin.css @@ -20,6 +20,12 @@ a.delete:hover { color: #fff; } +#devnews h4 { + font-family: Georgia, "Times New Roman", Times, serif; + font-size: 18px; + font-weight: normal; +} + #planetnews ul { list-style: none; margin: 0; @@ -40,6 +46,23 @@ a.delete:hover { overflow: hidden; } +#planetnews li .post { + font-family: Georgia, "Times New Roman", Times, serif; + font-size: 18px; + display: block; + height: 60px; +} + +#planetnews .hidden { + display: none; +} + +.readmore { + clear: both; + text-align: right; + margin-right: 5em; +} + .widefat { width: 100%; } @@ -52,6 +75,15 @@ a.delete:hover { text-align: left; } +.plugins p { + margin: 4px; + padding: 0; +} + +.plugins .name { + font-size: 16px; +} + .import-system { font-size: 16px; } @@ -61,9 +93,9 @@ thead, .thead { } #import-upload-form { - width: 300px; margin: auto; - text-align: center; + background: #eee; + padding: 1em; } a.edit, a.delete, a.edit:hover, a.delete:hover { @@ -133,25 +165,12 @@ form, label input { } h2 { - border-bottom: .5em solid #f0f8ff; + border-bottom: .5em solid #e5f3ff; color: #333; - font: normal 30px/5px serif; + font: normal 32px/5px serif; margin: 5px 10px; } -h2 small.quickjump { - display: block; - text-align: right; -} - -h2 small.quickjump a { - text-decoration: none; - border-bottom: 0; - font-size: 15px; - background: #f0f8ff; - padding: 5px 10px; -} - img, #footer a { border: 0; } @@ -170,7 +189,7 @@ li, dd { } p, li, dl, dd, dt { - line-height: 130%; + line-height: 140%; } textarea, input, select { @@ -306,7 +325,7 @@ form#upload #post_content { font: 12px Georgia, "Times New Roman", Times, serif; } -.submit input, .submit input:focus, .button { +.submit input, .submit input:focus, .button, .button:focus { background: url( images/fade-butt.png ); border: 3px double #999; border-left-color: #ccc; @@ -322,6 +341,14 @@ form#upload #post_content { border-top-color: #999; } +.button, .button:focus { + padding: 0.15em; +} + +* html .button { + padding: 0; +} + .submit, .editform th, #postcustomsubmit { text-align: right; } @@ -388,14 +415,27 @@ form#upload #post_content { border: 1px solid #ccc; clear: both; margin: 15px 5%; - padding: .5em 1em; + padding: 1em; +} + +.narrow { + width: 450px; + margin: auto; +} + +.narrow p { + line-height: 150%; } .wrap h2 { - margin: .8em 0 .5em; + margin: .4em 0 .5em; clear: both; } +* html .wrap h2 { + margin-top: 1em; +} + table .vers { text-align: center; } @@ -411,6 +451,7 @@ textarea.all-options, input.all-options { padding: .2em .2em .3em 2em; } + #adminmenu .current, #submenu .current { font-weight: bold; text-decoration: none; @@ -422,7 +463,6 @@ textarea.all-options, input.all-options { font-weight: normal; margin: 0; padding: 3px 5px; - text-decoration: underline; border-bottom: none; } @@ -438,11 +478,24 @@ textarea.all-options, input.all-options { text-align: center; } -#submenu { +#adminmenu a.current { + background: #0d324f; + border-right: 2px solid #4f96c8; + border-top: 1px solid #96c0de; + color: #fff; + padding-bottom: 8px; +} + +#submenu, #minisub { background: #0d324f; border-bottom: none; margin: 0; padding: 3px 2em 0 3em; + height: 25px; +} + +#minisub { + height: 6px; } #submenu .current { @@ -456,7 +509,7 @@ textarea.all-options, input.all-options { border: none; color: #fff; font-size: 12px; - padding: .3em .4em .33em; + padding: .3em .4em .4em; } #submenu a:hover { @@ -465,7 +518,7 @@ textarea.all-options, input.all-options { } #submenu li { - line-height: 170%; + line-height: 180%; } @@ -493,6 +546,11 @@ textarea.all-options, input.all-options { width: 100%; } +#postdivrich #content { + padding: .7em; + line-height: 140%; +} + #titlediv input, #guiddiv input { margin: 0px; width: 100%; @@ -563,7 +621,8 @@ input.delete:hover { } #title { - font-size: 1.5em; + font-size: 1.7em; + padding: 4px; } #postexcerpt div, #attachmentlinks div { @@ -589,6 +648,23 @@ input.delete:hover { #footer { clear: both; text-align: center; + width: 500px; + margin: auto; + height: 100px; +} + +#footer .docs { + padding-top: 19px; + line-height: 160%; +} + +#footer .docs a { + text-decoration: underline; +} +#footer .logo { + float: left; + margin: 0; + padding: 0; } #login { @@ -698,6 +774,8 @@ input.delete:hover { margin: 0; font-size: 15px; } +.plugins p { +} #login .fullwidth { width: 320px; @@ -705,13 +783,13 @@ input.delete:hover { #searchform { float: left; - margin-right: 3em; - width: 16em; + margin-right: 1em; + width: 18em; } #viewarc { float: left; - width: 20em; + width: 23em; margin-bottom: 1em; } @@ -763,6 +841,7 @@ input.delete:hover { #templateside { float: right; width: 170px; + overflow: hidden; } #templateside h3, #postcustom p.submit { @@ -812,7 +891,7 @@ input.delete:hover { #zeitgeist { background: #eee; - border: 1px solid #69c; + border: 1px solid #c5c5c5; float: right; font-size: 90%; margin-bottom: .5em; @@ -826,6 +905,10 @@ input.delete:hover { border-bottom: none; } +* html #zeitgeist h2 { + padding-top: 10px; +} + #zeitgeist h2 { margin-top: .4em; } @@ -1216,3 +1299,22 @@ input #catadd { background: #fff url( images/fade-butt.png ) repeat-x 0px 15px; border-bottom: 1px solid #ccc; } + +.page-numbers { + padding: 4px 7px; + border: 1px solid #fff; + margin-right: 3px; +} + +a.page-numbers { + border: 1px solid #ccc; +} + +a.page-numbers:hover { + border: 1px solid #999; +} + +.page-numbers.current { + border: 1px solid #999; + font-weight: bold; +} \ No newline at end of file diff --git a/wp-includes/js/tinymce/plugins/wordpress/wordpress.css b/wp-includes/js/tinymce/plugins/wordpress/wordpress.css index 3698741b7..ec8ea5bd8 100644 --- a/wp-includes/js/tinymce/plugins/wordpress/wordpress.css +++ b/wp-includes/js/tinymce/plugins/wordpress/wordpress.css @@ -24,11 +24,9 @@ /* You can extend this CSS by adding your own CSS file with the the content_css option */ body { - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 0.9em; - line-height: 1.2em; - padding: .3em; - background-color: #FFFFFF; + background: #fff; + font: 1em/1.3em Georgia, "Times New Roman", Times, serif; + padding: .5em; } td {