From: Edward Z. Yang Date: Tue, 22 Dec 2009 16:32:31 +0000 (-0500) Subject: Wordpress 2.9 X-Git-Tag: wordpress-2.9 X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/commitdiff_plain/refs/tags/wordpress-2.9 Wordpress 2.9 Signed-off-by: Edward Z. Yang --- diff --git a/readme.html b/readme.html index fa7071c6..dc3c3b05 100644 --- a/readme.html +++ b/readme.html @@ -8,7 +8,7 @@

WordPress -
Version 2.8.5 +
Version 2.9

Semantic Personal Publishing Platform

@@ -29,7 +29,7 @@

Upgrading

Before you upgrade anything, make sure you have backup copies of any files you may have modified such as index.php.

-

Upgrading from any previous WordPress to 2.8.5:

+

Upgrading from any previous WordPress to 2.9:

  1. Delete your old WP files, saving ones you've modified.
  2. Upload the new files.
  3. @@ -57,7 +57,7 @@

    System Recommendations

    • PHP version 4.3 or higher.
    • -
    • MySQL version 4.0 or higher.
    • +
    • MySQL version 4.1.2 or higher.
    • ... and a link to http://wordpress.org on your site.

    WordPress is the official continuation of b2/cafélog, which came from Michel V. The work has been continued by the WordPress developers. If you would like to support WordPress, please consider donating.

    diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php index 7f04dd7d..5778a12e 100644 --- a/wp-admin/admin-ajax.php +++ b/wp-admin/admin-ajax.php @@ -37,8 +37,8 @@ if ( ! is_user_logged_in() ) { $x->send(); } - if ( !empty( $_POST['action']) ) - do_action( 'wp_ajax_nopriv_' . $_POST['action'] ); + if ( !empty( $_REQUEST['action']) ) + do_action( 'wp_ajax_nopriv_' . $_REQUEST['action'] ); die('-1'); } @@ -91,6 +91,8 @@ case 'wp-compression-test' : echo $test_str; die; } elseif ( 2 == $_GET['test'] ) { + if ( !isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) + die('-1'); if ( false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) { header('Content-Encoding: deflate'); $out = gzdeflate( $test_str, 1 ); @@ -111,6 +113,23 @@ case 'wp-compression-test' : die('0'); break; +case 'imgedit-preview' : + $post_id = intval($_GET['postid']); + if ( empty($post_id) || !current_user_can('edit_post', $post_id) ) + die('-1'); + + check_ajax_referer( "image_editor-$post_id" ); + + include_once( ABSPATH . 'wp-admin/includes/image-edit.php' ); + if ( !stream_preview_image($post_id) ) + die('-1'); + + die(); + break; +case 'oembed-cache' : + $return = ( $wp_embed->cache_oembed( $_GET['post'] ) ) ? '1' : '0'; + die( $return ); + break; default : do_action( 'wp_ajax_' . $_GET['action'] ); die('0'); @@ -143,15 +162,18 @@ function _wp_ajax_delete_comment_response( $comment_id ) { if ( 0 != $total % $per_page && 1 != mt_rand( 1, $per_page ) ) // Only do the expensive stuff on a page-break, and about 1 other time per page die( (string) time() ); + $post_id = 0; $status = 'total_comments'; // What type of comment count are we looking for? $parsed = parse_url( $url ); if ( isset( $parsed['query'] ) ) { parse_str( $parsed['query'], $query_vars ); if ( !empty( $query_vars['comment_status'] ) ) $status = $query_vars['comment_status']; + if ( !empty( $query_vars['p'] ) ) + $post_id = (int) $query_vars['p']; } - $comment_count = wp_count_comments(); + $comment_count = wp_count_comments($post_id); $time = time(); // The time since the last comment count if ( isset( $comment_count->$status ) ) // We're looking for a known type of comment count @@ -181,19 +203,36 @@ function _wp_ajax_delete_comment_response( $comment_id ) { $id = isset($_POST['id'])? (int) $_POST['id'] : 0; switch ( $action = $_POST['action'] ) : case 'delete-comment' : // On success, die with time() instead of 1 - check_ajax_referer( "delete-comment_$id" ); if ( !$comment = get_comment( $id ) ) die( (string) time() ); if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) ) die('-1'); - if ( isset($_POST['spam']) && 1 == $_POST['spam'] ) { - if ( 'spam' == wp_get_comment_status( $comment->comment_ID ) ) + check_ajax_referer( "delete-comment_$id" ); + $status = wp_get_comment_status( $comment->comment_ID ); + + if ( isset($_POST['trash']) && 1 == $_POST['trash'] ) { + if ( 'trash' == $status ) die( (string) time() ); - $r = wp_set_comment_status( $comment->comment_ID, 'spam' ); - } else { + $r = wp_trash_comment( $comment->comment_ID ); + } elseif ( isset($_POST['untrash']) && 1 == $_POST['untrash'] ) { + if ( 'trash' != $status ) + die( (string) time() ); + $r = wp_untrash_comment( $comment->comment_ID ); + } elseif ( isset($_POST['spam']) && 1 == $_POST['spam'] ) { + if ( 'spam' == $status ) + die( (string) time() ); + $r = wp_spam_comment( $comment->comment_ID ); + } elseif ( isset($_POST['unspam']) && 1 == $_POST['unspam'] ) { + if ( 'spam' != $status ) + die( (string) time() ); + $r = wp_unspam_comment( $comment->comment_ID ); + } elseif ( isset($_POST['delete']) && 1 == $_POST['delete'] ) { $r = wp_delete_comment( $comment->comment_ID ); + } else { + die('-1'); } + if ( $r ) // Decide if we need to send back '1' or a more complicated response including page links and comment counts _wp_ajax_delete_comment_response( $comment->comment_ID ); die( '0' ); @@ -213,20 +252,18 @@ case 'delete-cat' : die('0'); break; case 'delete-tag' : - check_ajax_referer( "delete-tag_$id" ); + $tag_id = (int) $_POST['tag_ID']; + check_ajax_referer( "delete-tag_$tag_id" ); if ( !current_user_can( 'manage_categories' ) ) die('-1'); - if ( !empty($_POST['taxonomy']) ) - $taxonomy = $_POST['taxonomy']; - else - $taxonomy = 'post_tag'; + $taxonomy = !empty($_POST['taxonomy']) ? $_POST['taxonomy'] : 'post_tag'; - $tag = get_term( $id, $taxonomy ); + $tag = get_term( $tag_id, $taxonomy ); if ( !$tag || is_wp_error( $tag ) ) die('1'); - if ( wp_delete_term($id, $taxonomy)) + if ( wp_delete_term($tag_id, $taxonomy)) die('1'); else die('0'); @@ -305,6 +342,25 @@ case 'delete-post' : else die('0'); break; +case 'trash-post' : +case 'untrash-post' : + check_ajax_referer( "{$action}_$id" ); + if ( !current_user_can( 'delete_post', $id ) ) + die('-1'); + + if ( !get_post( $id ) ) + die('1'); + + if ( 'trash-post' == $action ) + $done = wp_trash_post( $id ); + else + $done = wp_untrash_post( $id ); + + if ( $done ) + die('1'); + + die('0'); + break; case 'delete-page' : check_ajax_referer( "{$action}_$id" ); if ( !current_user_can( 'delete_page', $id ) ) @@ -328,23 +384,19 @@ case 'dim-comment' : // On success, die with time() instead of 1 $x->send(); } - if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) ) - die('-1'); - if ( !current_user_can( 'moderate_comments' ) ) + if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) && !current_user_can( 'moderate_comments' ) ) die('-1'); $current = wp_get_comment_status( $comment->comment_ID ); if ( $_POST['new'] == $current ) die( (string) time() ); - $r = 0; - if ( in_array( $current, array( 'unapproved', 'spam' ) ) ) { - check_ajax_referer( "approve-comment_$id" ); + check_ajax_referer( "approve-comment_$id" ); + if ( in_array( $current, array( 'unapproved', 'spam' ) ) ) $result = wp_set_comment_status( $comment->comment_ID, 'approve', true ); - } else { - check_ajax_referer( "unapprove-comment_$id" ); + else $result = wp_set_comment_status( $comment->comment_ID, 'hold', true ); - } + if ( is_wp_error($result) ) { $x = new WP_Ajax_Response( array( 'what' => 'comment', @@ -366,11 +418,8 @@ case 'add-category' : // On the Fly $parent = 0; $post_category = isset($_POST['post_category'])? (array) $_POST['post_category'] : array(); $checked_categories = array_map( 'absint', (array) $post_category ); - $popular_ids = isset( $_POST['popular_ids'] ) ? - array_map( 'absint', explode( ',', $_POST['popular_ids'] ) ) : - false; + $popular_ids = wp_popular_terms_checklist('category', 0, 10, false); - $x = new WP_Ajax_Response(); foreach ( $names as $cat_name ) { $cat_name = trim($cat_name); $category_nicename = sanitize_title($cat_name); @@ -385,28 +434,43 @@ case 'add-category' : // On the Fly wp_category_checklist( 0, $cat_id, $checked_categories, $popular_ids ); $data = ob_get_contents(); ob_end_clean(); - $x->add( array( + $add = array( 'what' => 'category', 'id' => $cat_id, - 'data' => $data, + 'data' => str_replace( array("\n", "\t"), '', $data), 'position' => -1 - ) ); + ); } if ( $parent ) { // Foncy - replace the parent and all its children $parent = get_category( $parent ); + $term_id = $parent->term_id; + + while ( $parent->parent ) { // get the top parent + $parent = &get_category( $parent->parent ); + if ( is_wp_error( $parent ) ) + break; + $term_id = $parent->term_id; + } + ob_start(); - dropdown_categories( 0, $parent ); + wp_category_checklist( 0, $term_id, $checked_categories, $popular_ids, null, false ); $data = ob_get_contents(); ob_end_clean(); - $x->add( array( + $add = array( 'what' => 'category', - 'id' => $parent->term_id, - 'old_id' => $parent->term_id, - 'data' => $data, + 'id' => $term_id, + 'data' => str_replace( array("\n", "\t"), '', $data), 'position' => -1 - ) ); - + ); } + + ob_start(); + wp_dropdown_categories( array( 'hide_empty' => 0, 'name' => 'newcat_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category') ) ); + $sup = ob_get_contents(); + ob_end_clean(); + $add['supplemental'] = array( 'newcat_parent' => $sup ); + + $x = new WP_Ajax_Response( $add ); $x->send(); break; case 'add-link-category' : // On the Fly @@ -527,43 +591,16 @@ case 'add-tag' : // From Manage->Tags if ( !current_user_can( 'manage_categories' ) ) die('-1'); - if ( '' === trim($_POST['name']) ) { - $x = new WP_Ajax_Response( array( - 'what' => 'tag', - 'id' => new WP_Error( 'name', __('You did not enter a tag name.') ) - ) ); - $x->send(); - } - - if ( !empty($_POST['taxonomy']) ) - $taxonomy = $_POST['taxonomy']; - else - $taxonomy = 'post_tag'; - - $tag = wp_insert_term($_POST['name'], $taxonomy, $_POST ); + $taxonomy = !empty($_POST['taxonomy']) ? $_POST['taxonomy'] : 'post_tag'; + $tag = wp_insert_term($_POST['tag-name'], $taxonomy, $_POST ); - if ( is_wp_error($tag) ) { - $x = new WP_Ajax_Response( array( - 'what' => 'tag', - 'id' => $tag - ) ); - $x->send(); + if ( !$tag || is_wp_error($tag) || (!$tag = get_term( $tag['term_id'], $taxonomy )) ) { + echo '

    ' . __('An error has occured. Please reload the page and try again.') . '

    '; + exit; } - if ( !$tag || (!$tag = get_term( $tag['term_id'], $taxonomy )) ) - die('0'); - - $tag_full_name = $tag->name; - $tag_full_name = esc_attr($tag_full_name); - - $x = new WP_Ajax_Response( array( - 'what' => 'tag', - 'id' => $tag->term_id, - 'position' => '-1', - 'data' => _tag_row( $tag, '', $taxonomy ), - 'supplemental' => array('name' => $tag_full_name, 'show-link' => sprintf(__( 'Tag %s added' ), "tag-$tag->term_id", $tag_full_name)) - ) ); - $x->send(); + echo _tag_row( $tag, '', $taxonomy ); + exit; break; case 'get-tagcloud' : if ( !current_user_can( 'edit_posts' ) ) @@ -599,7 +636,7 @@ case 'get-tagcloud' : break; case 'add-comment' : check_ajax_referer( $action ); - if ( !current_user_can( 'edit_post', $id ) ) + if ( !current_user_can( 'edit_posts' ) ) die('-1'); $search = isset($_POST['s']) ? $_POST['s'] : false; $status = isset($_POST['comment_status']) ? $_POST['comment_status'] : 'all'; @@ -674,7 +711,7 @@ case 'replyto-comment' : if ( empty($status) ) die('1'); - elseif ( in_array($status, array('draft', 'pending') ) ) + elseif ( in_array($status, array('draft', 'pending', 'trash') ) ) die( __('Error: you are replying to a comment on a draft post.') ); $user = wp_get_current_user(); @@ -885,6 +922,8 @@ case 'autosave' : // The name of this action is hardcoded in edit_post() $message = sprintf( __('Draft Saved at %s.'), date_i18n( $draft_saved_date_format ) ); $supplemental = array(); + if ( isset($login_grace_period) ) + $supplemental['session_expired'] = add_query_arg( 'interim-login', 1, wp_login_url() ); $id = $revision_id = 0; if($_POST['post_ID'] < 0) { @@ -964,15 +1003,10 @@ case 'autosave' : // The name of this action is hardcoded in edit_post() case 'autosave-generate-nonces' : check_ajax_referer( 'autosave', 'autosavenonce' ); $ID = (int) $_POST['post_ID']; - if($_POST['post_type'] == 'post') { - if(current_user_can('edit_post', $ID)) - die(wp_create_nonce('update-post_' . $ID)); - } - if($_POST['post_type'] == 'page') { - if(current_user_can('edit_page', $ID)) { - die(wp_create_nonce('update-page_' . $ID)); - } - } + $post_type = ( 'page' == $_POST['post_type'] ) ? 'page' : 'post'; + if ( current_user_can( "edit_{$post_type}", $ID ) ) + die( json_encode( array( 'updateNonce' => wp_create_nonce( "update-{$post_type}_{$ID}" ), 'deleteURL' => str_replace( '&', '&', wp_nonce_url( admin_url( $post_type . '.php?action=trash&post=' . $ID ), "trash-{$post_type}_{$ID}" ) ) ) ) ); + do_action('autosave_generate_nonces'); die('0'); break; case 'closed-postboxes' : @@ -993,7 +1027,7 @@ case 'closed-postboxes' : update_usermeta($user->ID, 'closedpostboxes_'.$page, $closed); if ( is_array($hidden) ) { - $hidden = array_diff( $hidden, array('submitdiv', 'pagesubmitdiv', 'linksubmitdiv') ); // postboxes that are always shown + $hidden = array_diff( $hidden, array('submitdiv', 'linksubmitdiv') ); // postboxes that are always shown update_usermeta($user->ID, 'meta-box-hidden_'.$page, $hidden); } @@ -1148,10 +1182,7 @@ case 'inline-save-tax': break; case 'tag' : - if ( !empty($_POST['taxonomy']) ) - $taxonomy = $_POST['taxonomy']; - else - $taxonomy = 'post_tag'; + $taxonomy = !empty($_POST['taxonomy']) ? $_POST['taxonomy'] : 'post_tag'; $tag = get_term( $id, $taxonomy ); $_POST['description'] = $tag->description; @@ -1162,7 +1193,7 @@ case 'inline-save-tax': if ( !$tag || is_wp_error( $tag ) ) die( __('Tag not updated.') ); - echo _tag_row($tag); + echo _tag_row($tag, '', $taxonomy); } else { die( __('Tag not updated.') ); } @@ -1181,10 +1212,10 @@ case 'find_posts': $what = isset($_POST['pages']) ? 'page' : 'post'; $s = stripslashes($_POST['ps']); preg_match_all('/".*?("|$)|((?<=[\\s",+])|^)[^\\s",+]+/', $s, $matches); - $search_terms = array_map(create_function('$a', 'return trim($a, "\\"\'\\n\\r ");'), $matches[0]); + $search_terms = array_map('_search_terms_tidy', $matches[0]); $searchand = $search = ''; - foreach( (array) $search_terms as $term) { + foreach ( (array) $search_terms as $term ) { $term = addslashes_gpc($term); $search .= "{$searchand}(($wpdb->posts.post_title LIKE '%{$term}%') OR ($wpdb->posts.post_content LIKE '%{$term}%'))"; $searchand = ' AND '; @@ -1193,12 +1224,12 @@ case 'find_posts': if ( count($search_terms) > 1 && $search_terms[0] != $s ) $search .= " OR ($wpdb->posts.post_title LIKE '%{$term}%') OR ($wpdb->posts.post_content LIKE '%{$term}%')"; - $posts = $wpdb->get_results( "SELECT ID, post_title, post_status, post_date FROM $wpdb->posts WHERE post_type = '$what' AND $search ORDER BY post_date_gmt DESC LIMIT 50" ); + $posts = $wpdb->get_results( "SELECT ID, post_title, post_status, post_date FROM $wpdb->posts WHERE post_type = '$what' AND post_status IN ('draft', 'publish') AND ($search) ORDER BY post_date_gmt DESC LIMIT 50" ); if ( ! $posts ) exit( __('No posts found.') ); - $html = ''; + $html = '

    '.__('Title').''.__('Time').''.__('Status').'
    '; foreach ( $posts as $post ) { switch ( $post->post_status ) { @@ -1213,7 +1244,7 @@ case 'find_posts': $stat = __('Pending Review'); break; case 'draft' : - $stat = __('Unpublished'); + $stat = __('Draft'); break; } @@ -1348,6 +1379,51 @@ case 'save-widget' : die(); break; +case 'image-editor': + $attachment_id = intval($_POST['postid']); + if ( empty($attachment_id) || !current_user_can('edit_post', $attachment_id) ) + die('-1'); + + check_ajax_referer( "image_editor-$attachment_id" ); + include_once( ABSPATH . 'wp-admin/includes/image-edit.php' ); + + $msg = false; + switch ( $_POST['do'] ) { + case 'save' : + $msg = wp_save_image($attachment_id); + $msg = json_encode($msg); + die($msg); + break; + case 'scale' : + $msg = wp_save_image($attachment_id); + break; + case 'restore' : + $msg = wp_restore_image($attachment_id); + break; + } + + wp_image_editor($attachment_id, $msg); + die(); + break; +case 'set-post-thumbnail': + $post_id = intval( $_POST['post_id'] ); + if ( !current_user_can( 'edit_post', $post_id ) ) + die( '-1' ); + $thumbnail_id = intval( $_POST['thumbnail_id'] ); + + if ( $thumbnail_id == '-1' ) { + delete_post_meta( $post_id, '_thumbnail_id' ); + die( _wp_post_thumbnail_html() ); + } + + if ( $thumbnail_id && get_post( $thumbnail_id ) ) { + $thumbnail_html = wp_get_attachment_image( $thumbnail_id, 'thumbnail' ); + if ( !empty( $thumbnail_html ) ) { + update_post_meta( $post_id, '_thumbnail_id', $thumbnail_id ); + die( _wp_post_thumbnail_html( $thumbnail_id ) ); + } + } + die( '0' ); default : do_action( 'wp_ajax_' . $_POST['action'] ); die('0'); diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php index 27c496a7..81711f38 100644 --- a/wp-admin/admin-header.php +++ b/wp-admin/admin-header.php @@ -41,7 +41,7 @@ $admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix); //','uid':'ID; ?>','time':''}; -var ajaxurl = '', pagenow = '', adminpage = ''; +var ajaxurl = '', pagenow = '', adminpage = '', thousandsSeparator = 'number_format['thousands_sep']; ?>', decimalPoint = 'number_format['decimal_point']; ?>'; //]]> %s category: this is the default one"), $cat_name)); + wp_die( sprintf( __("Can’t delete the %s category: this is the default one"), get_cat_name($cat_ID) ) ); wp_delete_category($cat_ID); @@ -59,18 +62,20 @@ case 'bulk-delete': if ( !current_user_can('manage_categories') ) wp_die( __('You are not allowed to delete categories.') ); - foreach ( (array) $_GET['delete'] as $cat_ID ) { - $cat_name = get_cat_name($cat_ID); + $cats = (array) $_GET['delete']; + $default_cat = get_option('default_category'); + foreach ( $cats as $cat_ID ) { + $cat_ID = (int) $cat_ID; - // Don't delete the default cats. - if ( $cat_ID == get_option('default_category') ) - wp_die(sprintf(__("Can’t delete the %s category: this is the default one"), $cat_name)); + // Don't delete the default cat. + if ( $cat_ID == $default_cat ) + wp_die( sprintf( __("Can’t delete the %s category: this is the default one"), get_cat_name($cat_ID) ) ); wp_delete_category($cat_ID); } wp_safe_redirect( wp_get_referer() ); - exit(); + exit; break; case 'edit': @@ -161,10 +166,10 @@ $pagenum = isset( $_GET['pagenum'] ) ? absint( $_GET['pagenum'] ) : 0; if ( empty($pagenum) ) $pagenum = 1; -$cats_per_page = get_user_option('categories_per_page'); -if ( empty($cats_per_page) ) +$cats_per_page = (int) get_user_option( 'categories_per_page', 0, false ); +if ( empty( $cats_per_page ) || $cats_per_page < 1 ) $cats_per_page = 20; -$cats_per_page = apply_filters('edit_categories_per_page', $cats_per_page); +$cats_per_page = apply_filters( 'edit_categories_per_page', $cats_per_page ); if ( !empty($_GET['s']) ) $num_cats = count(get_categories(array('hide_empty' => 0, 'search' => $_GET['s']))); @@ -280,7 +285,7 @@ if ( $page_links )
    -

    +

    diff --git a/wp-admin/comment.php b/wp-admin/comment.php index 6499c08d..8b63a57a 100644 --- a/wp-admin/comment.php +++ b/wp-admin/comment.php @@ -17,6 +17,18 @@ wp_reset_vars( array('action') ); if ( isset( $_POST['deletecomment'] ) ) $action = 'deletecomment'; +if ( 'cdc' == $action ) + $action = 'delete'; +elseif ( 'mac' == $action ) + $action = 'approve'; + +if ( isset( $_GET['dt'] ) ) { + if ( 'spam' == $_GET['dt'] ) + $action = 'spam'; + elseif ( 'trash' == $_GET['dt'] ) + $action = 'trash'; +} + /** * Display error message at bottom of comments. * @@ -44,68 +56,60 @@ case 'editcomment' : if ( !current_user_can('edit_post', $comment->comment_post_ID) ) comment_footer_die( __('You are not allowed to edit comments on this post.') ); + if ( 'trash' == $comment->comment_approved ) + comment_footer_die( __('This comment is in the Trash. Please move it out of the Trash if you want to edit it.') ); + $comment = get_comment_to_edit( $comment_id ); include('edit-form-comment.php'); break; -case 'cdc' : -case 'mac' : +case 'delete' : +case 'approve' : +case 'trash' : +case 'spam' : require_once('admin-header.php'); $comment_id = absint( $_GET['c'] ); - $formaction = 'cdc' == $action ? 'deletecomment' : 'approvecomment'; - $nonce_action = 'cdc' == $action ? 'delete-comment_' : 'approve-comment_'; + $formaction = $action . 'comment'; + $nonce_action = 'approve' == $action ? 'approve-comment_' : 'delete-comment_'; $nonce_action .= $comment_id; if ( !$comment = get_comment_to_edit( $comment_id ) ) comment_footer_die( __('Oops, no comment with this ID.') . sprintf(' '.__('Go back').'!', 'edit.php') ); if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) ) - comment_footer_die( 'cdc' == $action ? __('You are not allowed to delete comments on this post.') : __('You are not allowed to edit comments on this post, so you cannot approve this comment.') ); + comment_footer_die( 'approve' != $action ? __('You are not allowed to delete comments on this post.') : __('You are not allowed to edit comments on this post, so you cannot approve this comment.') ); ?>

    -

    - -
    - -

    '.__('Title').''.__('Date').''.__('Status').'
    - - - - -
    ' onclick="self.location='" />
    - - - - - - - - - - - - +
    @@ -128,87 +132,112 @@ if ( 'spam' == $_GET['dt'] ) {
    comment_author; ?>
    +

    + +
    + + + + + + +
    + + + + + + +
    + '.__('Go back').'!', 'edit-comments.php') ); - - if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) ) + if ( !current_user_can('edit_post', $comment->comment_post_ID ) ) comment_footer_die( __('You are not allowed to edit comments on this post.') ); - if ( 'spam' == $_REQUEST['dt'] ) - wp_set_comment_status( $comment->comment_ID, 'spam' ); - else - wp_delete_comment( $comment->comment_ID ); - - if ( '' != wp_get_referer() && false == $noredir && false === strpos(wp_get_referer(), 'comment.php' ) ) - wp_redirect( wp_get_referer() ); - else if ( '' != wp_get_original_referer() && false == $noredir ) - wp_redirect( wp_get_original_referer() ); + if ( '' != wp_get_referer() && false == $noredir && false === strpos(wp_get_referer(), 'comment.php') ) + $redir = wp_get_referer(); + elseif ( '' != wp_get_original_referer() && false == $noredir ) + $redir = wp_get_original_referer(); else - wp_redirect( admin_url('edit-comments.php') ); + $redir = admin_url('edit-comments.php'); + + $redir = remove_query_arg( array('spammed', 'unspammed', 'trashed', 'untrashed', 'deleted', 'ids'), $redir ); + + switch ( $action ) { + case 'deletecomment' : + wp_delete_comment( $comment_id ); + $redir = add_query_arg( array('deleted' => '1'), $redir ); + break; + case 'trashcomment' : + wp_trash_comment($comment_id); + $redir = add_query_arg( array('trashed' => '1', 'ids' => $comment_id), $redir ); + break; + case 'untrashcomment' : + wp_untrash_comment($comment_id); + $redir = add_query_arg( array('untrashed' => '1'), $redir ); + break; + case 'spamcomment' : + wp_spam_comment($comment_id); + $redir = add_query_arg( array('spammed' => '1', 'ids' => $comment_id), $redir ); + break; + case 'unspamcomment' : + wp_unspam_comment($comment_id); + $redir = add_query_arg( array('unspammed' => '1'), $redir ); + break; + } + + wp_redirect( $redir ); die; break; +case 'approvecomment' : case 'unapprovecomment' : $comment_id = absint( $_GET['c'] ); - check_admin_referer( 'unapprove-comment_' . $comment_id ); + check_admin_referer( 'approve-comment_' . $comment_id ); - if ( isset( $_GET['noredir'] ) ) - $noredir = true; - else - $noredir = false; + $noredir = isset( $_GET['noredir'] ); if ( !$comment = get_comment( $comment_id ) ) comment_footer_die( __('Oops, no comment with this ID.') . sprintf(' '.__('Go back').'!', 'edit.php') ); - if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) ) - comment_footer_die( __('You are not allowed to edit comments on this post, so you cannot disapprove this comment.') ); - - wp_set_comment_status( $comment->comment_ID, 'hold' ); + if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) ) { + if ( 'approvecomment' == $action ) + comment_footer_die( __('You are not allowed to edit comments on this post, so you cannot approve this comment.') ); + else + comment_footer_die( __('You are not allowed to edit comments on this post, so you cannot disapprove this comment.') ); + } if ( '' != wp_get_referer() && false == $noredir ) - wp_redirect( wp_get_referer() ); + $redir = remove_query_arg( array('approved', 'unapproved'), wp_get_referer() ); else - wp_redirect( admin_url('edit-comments.php?p=' . absint( $comment->comment_post_ID ) . '#comments') ); + $redir = admin_url('edit-comments.php?p=' . absint( $comment->comment_post_ID ) ); - exit(); - break; - -case 'approvecomment' : - $comment_id = absint( $_GET['c'] ); - check_admin_referer( 'approve-comment_' . $comment_id ); - - if ( isset( $_GET['noredir'] ) ) - $noredir = true; - else - $noredir = false; - - if ( !$comment = get_comment( $comment_id ) ) - comment_footer_die( __('Oops, no comment with this ID.') . sprintf(' '.__('Go back').'!', 'edit.php') ); - - if ( !current_user_can('edit_post', $comment->comment_post_ID) ) - comment_footer_die( __('You are not allowed to edit comments on this post, so you cannot approve this comment.') ); + if ( 'approvecomment' == $action ) { + wp_set_comment_status( $comment_id, 'approve' ); + $redir = add_query_arg( array( 'approved' => 1 ), $redir ); + } else { + wp_set_comment_status( $comment_id, 'hold' ); + $redir = add_query_arg( array( 'unapproved' => 1 ), $redir ); + } - wp_set_comment_status( $comment->comment_ID, 'approve' ); - - if ( '' != wp_get_referer() && false == $noredir ) - wp_redirect( wp_get_referer() ); - else - wp_redirect( admin_url('edit-comments.php?p=' . absint( $comment->comment_post_ID ) . '#comments') ); + wp_redirect( $redir ); exit(); break; @@ -237,4 +266,4 @@ default: include('admin-footer.php'); -?> \ No newline at end of file +?> diff --git a/wp-admin/css/colors-classic.css b/wp-admin/css/colors-classic.css index a6cb4f94..427f262b 100644 --- a/wp-admin/css/colors-classic.css +++ b/wp-admin/css/colors-classic.css @@ -1,1671 +1 @@ -html { - background-color: #f7f6f1; -} - -* html input, -* html .widget { - border-color: #8cbdd5; -} - -textarea, -input, -select { - border-color: #dfdfdf; -} - -kbd, -code { - background: #eaeaea; -} - -input[readonly] { - background-color: #eee; -} - -.find-box-search { - border-color: #dfdfdf; - background-color: #f1f1f1; -} - -.find-box { - background-color: #f1f1f1; -} - -.find-box-inside { - background-color: #fff; -} - -a.page-numbers:hover { - border-color: #999; -} - -body, -#wpbody, -.form-table .pre { - color: #333; -} - -body > #upload-menu { - border-bottom-color: #fff; -} - -#postcustomstuff table, -#your-profile fieldset, -#rightnow, -div.dashboard-widget, -#dashboard-widgets p.dashboard-widget-links, -#replyrow #ed_reply_toolbar input { - border-color: #ccc; -} - -#poststuff .inside label.spam { - color: red; -} - -#poststuff .inside label.waiting { - color: orange; -} - -#poststuff .inside label.approved { - color: green; -} - -#postcustomstuff table { - border-color: #dfdfdf; - background-color: #f9f9f9; -} - -#postcustomstuff thead th { - background-color: #f1f1f1; -} - -#postcustomstuff table input, -#postcustomstuff table textarea { - border-color: #dfdfdf; - background-color: #fff; -} - -.widefat { - border-color: #dfdfdf; - background-color: #fff; -} - -div.dashboard-widget-error { - background-color: #c43; -} - -div.dashboard-widget-notice { - background-color: #cfe1ef; -} - -div.dashboard-widget-submit { - border-top-color: #ccc; -} - -div.tabs-panel, -ul#category-tabs li.tabs { - border-color: #dfdfdf; -} - -ul#category-tabs li.tabs { - background-color: #f1f1f1; -} - -input.disabled, -textarea.disabled { - background-color: #ccc; -} -/* #upload-menu li a.upload-tab-link, */ -.login #backtoblog a:hover, -#plugin-information .action-button a, -#plugin-information .action-button a:hover, -#plugin-information .action-button a:visited { - color: #fff; -} - -.widget .widget-top, -.postbox h3, -.stuffbox h3 { - background: #d5e6f2 url("../images/blue-grad.png") repeat-x left top; - text-shadow: #fff 0 1px 0; -} - -.form-table th, -.form-wrap label { - color: #222; - text-shadow: #fff 0 1px 0; -} - -.description, -.form-wrap p { - color: #666; -} - -strong .post-com-count span { - background-color: #21759b; -} - -.sorthelper { - background-color: #ccf3fa; -} - -.ac_match, -.subsubsub a.current { - color: #000; -} - -.wrap h2 { - color: #093e56; -} - -.ac_over { - background-color: #f0f0b8; -} - -.ac_results { - background-color: #fff; - border-color: #808080; -} - -.ac_results li { - color: #101010; -} - -.alt -.alternate { - background-color: #edfbfc; -} - -.available-theme a.screenshot { - background-color: #f1f1f1; - border-color: #ddd; -} - -.bar { - background-color: #e8e8e8; - border-right-color: #99d; -} - -#media-upload { - background: #fff; -} - -#media-upload .slidetoggle { - border-top-color: #dfdfdf; -} - -.error, -#login #login_error { - background-color: #ffebe8; - border-color: #c00; -} - -.error a { - color: #c00; -} - -.form-invalid { - background-color: #ffebe8 !important; -} - -.form-invalid input { - border-color: #c00 !important; -} - -.submit { - border-color: #8cbdd5; -} - -.highlight { - background-color: #e4f2fd; - color: #d54e21; -} - -.howto, -.nonessential, -#edit-slug-box, -.form-input-tip, -.rss-widget span.rss-date, -.subsubsub { - color: #666; -} - -.media-item { - border-bottom-color: #dfdfdf; -} - -#wpbody-content #media-items .describe { - border-top-color: #dfdfdf; -} - -.describe input[type="text"], -.describe textarea { - border-color: #dfdfdf; -} - -.media-upload-form label.form-help, -td.help { - color: #9a9a9a; -} - -.post-com-count { - background-image: url(../images/bubble_bg.gif); - color: #fff; -} - -.post-com-count span { - background-color: #bbb; - color: #fff; -} - -.post-com-count:hover span { - background-color: #d54e21; -} - -.quicktags, .search { - background-color: #ccc; - color: #000; -} - -.side-info h5 { - border-bottom-color: #dadada; -} - -.side-info ul { - color: #666; -} - -.button, -.button-secondary, -.submit input, -input[type=button], -input[type=submit] { - border-color: #dfdfdf; - color: #464646; -} - -.button:hover, -.button-secondary:hover, -.submit input:hover, -input[type=button]:hover, -input[type=submit]:hover { - color: #000; - border-color: #adaca7; -} - -.button, -.submit input, -.button-secondary { - background: #f2f2f2 url(../images/white-grad.png) repeat-x scroll left top; -} - -.button:active, -.submit input:active, -.button-secondary:active { - background: #eee url(../images/white-grad-active.png) repeat-x scroll left top; -} - -.button-primary, -.submit .button-primary, -#login form .submit input { - border-color: #5b86ab !important; - font-weight: bold; - color: #fff !important; - background: #5580a6 url(../images/button-grad-vs.png) repeat-x scroll left top; -} - -.button-primary:active, -#login form .submit input:active { - background: #21759b url(../images/button-grad-active-vs.png) repeat-x scroll left top !important; -} - -.button[disabled], -.button:disabled, -.button-secondary[disabled], -.button-secondary:disabled, -a.button.disabled { - color: #ccc !important; - border-color: #ccc; -} - -.button-primary[disabled], -.button-primary:disabled { - color: #80a3d2 !important; -} - -a:active, -a:focus { - color: #d54e21; -} - -a:hover, -#wphead #viewsite a:hover, -#adminmenu a:hover, -#adminmenu ul.wp-submenu a:hover, -#the-comment-list .comment a:hover, -#rightnow a:hover, -#login form .submit input:hover, -#media-upload a.del-link:hover, -div.dashboard-widget-submit input:hover, -.subsubsub a:hover, -.subsubsub a.current:hover, -.ui-tabs-nav a:hover, -.plugins .inactive a:hover, -#all-plugins-table .plugins .inactive a:hover, -#search-plugins-table .plugins .inactive a:hover { - color: #d54e21; -} - -#the-comment-list .comment-item, -#dashboard-widgets #dashboard_quick_press form p.submit { - border-color: #dfdfdf; -} - -#dashboard_right_now .table { - background:#faf9f7 !important; -} - -.button-primary:hover, -#login form .submit input:hover { - border-color: #2e5475 !important; - color: #eaf2fa !important; -} - -#side-sortables #category-tabs .tabs a { - color: #333; -} - -#rightnow .rbutton { - background-color: #ebebeb; - color: #264761; -} - -.submitbox .submit { - background-color: #464646; - color: #ccc; -} - -.plugins a.delete:hover, -#all-plugins-table .plugins a.delete:hover, -#search-plugins-table .plugins a.delete:hover, -.submitbox .submitdelete, -a.delete { - color: #f00; - border-bottom-color: #f00; -} - -.submitbox .submitdelete:hover, -#media-items a.delete:hover { - color: #fff; - background-color: #f00; - border-bottom-color: #f00; -} - -#normal-sortables .submitbox .submitdelete:hover { - color: #000; - background-color: #f00; - border-bottom-color: #f00; -} - -.tablenav .dots { - border-color: transparent; -} - -.tablenav .next, -.tablenav .prev { - border-color: transparent; - color: #21759b; -} - -.tablenav .next:hover, -.tablenav .prev:hover { - border-color: transparent; - color: #d54e21; -} - -.updated, -.login #login_error, -.login .message { - background-color: #ffffe0; - border-color: #e6db55; -} - -.update-message { - color: #000000; -} - -a.page-numbers { - border-bottom-color: #b8d3e2; -} - -.commentlist li { - border-bottom-color: #ccc; -} - -.widefat td, -.widefat th, -#install-plugins .plugins td, -#install-plugins .plugins th { - border-color: #dfdfdf; -} - -.widefat th { - text-shadow: rgba(255,255,255,0.8) 0 1px 0; -} - -.widefat thead tr th, -.widefat tfoot tr th, -h3.dashboard-widget-title, -h3.dashboard-widget-title span, -h3.dashboard-widget-title small, -.find-box-head { - color: #333; - background: #d5e6f2 url(../images/blue-grad.png) repeat-x scroll left top; -} - -h3.dashboard-widget-title small a { - color: #d7d7d7; -} - -h3.dashboard-widget-title small a:hover { - color: #fff; -} - -a, -#adminmenu a, -#poststuff #edButtonPreview, -#poststuff #edButtonHTML, -#the-comment-list p.comment-author strong a, -#media-upload a.del-link, -#media-items a.delete, -.plugins a.delete, -.ui-tabs-nav a { - color: #1c6280; -} - -/* Because we don't want visited on these links */ -body.press-this .tabs a, -body.press-this .tabs a:hover { - background-color: #fff; - border-color: #c6d9e9; - border-bottom-color: #fff; - color: #d54e21; -} - -#adminmenu #awaiting-mod, -#adminmenu .update-plugins, -#sidemenu a .update-plugins, -#rightnow .reallynow, -#plugin-information .action-button { - background-color: #d54e21; - color: #fff; -} - -#adminmenu li a:hover #awaiting-mod, -#adminmenu li a:hover .update-plugins, -#sidemenu li a:hover .update-plugins { - background-color: #264761; - color: #fff; -} - -#adminmenu li.current a #awaiting-mod, -#adminmenu li.current a .update-plugins, -#adminmenu li.wp-has-current-submenu a .update-plugins, -#adminmenu li.wp-has-current-submenu a .update-plugins { - background-color: #ddd; - color: #000; - text-shadow: none; - -moz-box-shadow: rgba(0,0,0,0.2) 0 -1px 0; - -khtml-box-shadow: rgba(0,0,0,0.2) 0 -1px 0; - -webkit-box-shadow: rgba(0,0,0,0.2) 0 -1px 0; - box-shadow: rgba(0,0,0,0.2) 0 -1px 0; -} - -#adminmenu li.current a:hover #awaiting-mod, -#adminmenu li.current a:hover .update-plugins, -#adminmenu li.wp-has-current-submenu a:hover #awaiting-mod, -#adminmenu li.wp-has-current-submenu a:hover .update-plugins { - background-color: #264761; - color: #fff; -} - -div#media-upload-header, -div#plugin-information-header { - background-color: #f9f9f9; - border-bottom-color: #dfdfdf; -} - -#currenttheme img { - border-color: #666; -} - -#dashboard_secondary div.dashboard-widget-content ul li a { - background-color: #f9f9f9; -} - -input.readonly, textarea.readonly { - background-color: #ddd; -} - -#ed_toolbar input, -#ed_reply_toolbar input { - background: #fff url("../images/fade-butt.png") repeat-x 0 -2px; -} - -#editable-post-name { - background-color: #fffbcc; -} - -#edit-slug-box strong, -.tablenav .displaying-num, -#submitted-on { - color: #777; -} - -.login #nav a { - color: #21759b !important; -} - -.login #nav a:hover { - color: #d54e21 !important; -} - -#footer, -#footer-upgrade { - background: #1d507d; - color: #b6d1e4; -} - -#media-items { - border-color: #dfdfdf; -} - -.checkbox, -.side-info, -.plugins tr, -.postbox, -#your-profile #rich_editing { - background-color: #fff; -} - -.plugins .inactive, -.plugins .inactive th, -.plugins .inactive td, -tr.inactive + tr.plugin-update-tr .plugin-update { - background-color: #ebeeef; -} - -.plugin-update-tr .update-message { - background-color: #fffbe4; - border-color: #dfdfdf; -} - -.plugins .active, -.plugins .active th, -.plugins .active td { - color: #000; -} - -.plugins .inactive a { - color: #557799; -} - -#the-comment-list .unapproved, -#the-comment-list .unapproved th, -#the-comment-list .unapproved td { - background-color: #ffffe0; -} - -#the-comment-list .approve a { - color: #006505; -} - -#the-comment-list .unapprove a { - color: #d98500; -} - -#the-comment-list .delete a { - color: #bc0b0b; -} - -.widget, -#widget-list .widget-top, -.postbox, -#titlediv, -#poststuff .postarea, -.stuffbox { - border-color: #dfdfdf; -} - -.widget, -.postbox { - background-color: #fff; -} - -.ui-sortable .postbox h3 { - color: #093e56; -} - -.widget .widget-top, -.ui-sortable .postbox h3:hover { - color: #000; -} - -.curtime #timestamp { - background-image: url(../images/date-button.gif); -} - -#quicktags #ed_link { - color: #00f; -} - -#rightnow .youhave { - background-color: #f0f6fb; -} - -#rightnow a { - color: #448abd; -} - -.tagchecklist span a, -#bulk-titles div a { - background: url(../images/xit.gif) no-repeat; -} - -.tagchecklist span a:hover, -#bulk-titles div a:hover { - background: url(../images/xit.gif) no-repeat -10px 0; -} - -#update-nag { - background-color: #fffeeb; - border-color: #ccc; - color: #555; -} - -.login #backtoblog a { - color: #ccc; -} - -#wphead { - background-color: #1d507d; -} - -body.login { - border-top-color: #093e56; -} - -#wphead h1 a { - color: #fff; -} - -#login form input { - color: #555; -} - -#user_info { - color: #b6d1e4; -} - -#user_info a:link, -#user_info a:visited, -#footer a:link, -#footer a:visited { - color: #fff; - text-decoration: none; -} - -#user_info a:hover, -#user_info a:active, -#footer a:hover, -#footer a:active { - text-decoration: underline; -} - -div#media-upload-error, -.file-error, -abbr.required, -.widget-control-remove:hover, -.delete a:hover { - color: #f00; -} - -/* password strength meter */ -#pass-strength-result { - background-color: #eee; - border-color: #ddd !important; -} - -#pass-strength-result.bad { - background-color: #ffb78c; - border-color: #ff853c !important; -} - -#pass-strength-result.good { - background-color: #ffec8b; - border-color: #fc0 !important; -} - -#pass-strength-result.short { - background-color: #ffa0a0; - border-color: #f04040 !important; -} - -#pass-strength-result.strong { - background-color: #c3ff88; - border-color: #8dff1c !important; -} - -/* editors */ -#quicktags { - border-color: #dfdfdf; - background-color: #dfdfdf; -} - -#ed_toolbar input { - border-color: #c3c3c3; -} - -#ed_toolbar input:hover { - border-color: #aaa; - background: #ddd; -} - -#poststuff .wp_themeSkin .mceStatusbar { - border-color: #ededed; -} - -#poststuff #edButtonPreview, -#poststuff #edButtonHTML { - background-color: #f2f1eb; - border-color: #dfdfdf; - color: #999; -} - -#poststuff #editor-toolbar .active { - border-bottom-color: #e3eef7; - background-color: #e3eef7; - color: #333; -} - -/* TinyMCE */ -#post-status-info { - background-color: #ededed; -} - -.wp_themeSkin *, -.wp_themeSkin a:hover, -.wp_themeSkin a:link, -.wp_themeSkin a:visited, -.wp_themeSkin a:active { - color: #000; -} - -/* Containers */ -.wp_themeSkin iframe { - background: #fff; -} - -/* Layout */ -.wp_themeSkin .mceStatusbar { - color: #000; - background-color: #f5f5f5; -} - -/* Button */ -.wp_themeSkin .mceButton { - background-color: #e9e8e8; - border-color: #b2b2b2; -} - -.wp_themeSkin a.mceButtonEnabled:hover, -.wp_themeSkin a.mceButtonActive, -.wp_themeSkin a.mceButtonSelected { - background-color: #d5d5d5; - border-color: #777 !important; -} - -.wp_themeSkin .mceButtonDisabled { - border-color: #ccc !important; -} - -/* ListBox */ -.wp_themeSkin .mceListBox .mceText, -.wp_themeSkin .mceListBox .mceOpen { - border-color: #b2b2b2; - background-color: #d5d5d5; -} - -.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen, -.wp_themeSkin .mceListBoxHover .mceOpen, -.wp_themeSkin .mceListBoxSelected .mceOpen, -.wp_themeSkin .mceListBoxSelected .mceText { - border-color: #777 !important; - background-color: #d5d5d5; -} - -.wp_themeSkin table.mceListBoxEnabled:hover .mceText, -.wp_themeSkin .mceListBoxHover .mceText { - border-color: #777 !important; -} - -.wp_themeSkin select.mceListBox { - border-color: #b2b2b2; - background-color: #fff; -} - -/* SplitButton */ -.wp_themeSkin .mceSplitButton a.mceAction, -.wp_themeSkin .mceSplitButton a.mceOpen { - border-color: #b2b2b2; -} - -.wp_themeSkin .mceSplitButton a.mceOpen:hover, -.wp_themeSkin .mceSplitButtonSelected a.mceOpen, -.wp_themeSkin table.mceSplitButtonEnabled:hover a.mceAction, -.wp_themeSkin .mceSplitButton a.mceAction:hover { - background-color: #d5d5d5; - border-color: #777 !important; -} - -.wp_themeSkin .mceSplitButtonActive { - background-color: #b2b2b2; -} - -/* ColorSplitButton */ -.wp_themeSkin div.mceColorSplitMenu table { - background-color: #ebebeb; - border-color: #b2b2b2; -} - -.wp_themeSkin .mceColorSplitMenu a { - border-color: #b2b2b2; -} - -.wp_themeSkin .mceColorSplitMenu a.mceMoreColors { - border-color: #fff; -} - -.wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover { - border-color: #0a246a; - background-color: #b6bdd2; -} - -.wp_themeSkin a.mceMoreColors:hover { - border-color: #0a246a; -} - -/* Menu */ -.wp_themeSkin .mceMenu { - border-color: #ddd; -} - -.wp_themeSkin .mceMenu table { - background-color: #ebeaeb; -} - -.wp_themeSkin .mceMenu .mceText { - color: #000; -} - -.wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover, -.wp_themeSkin .mceMenu .mceMenuItemActive { - background-color: #f5f5f5; -} -.wp_themeSkin td.mceMenuItemSeparator { - background-color: #aaa; -} -.wp_themeSkin .mceMenuItemTitle a { - background-color: #ccc; - border-bottom-color: #aaa; -} -.wp_themeSkin .mceMenuItemTitle span.mceText { - color: #000; -} -.wp_themeSkin .mceMenuItemDisabled .mceText { - color: #888; -} - -#quicktags, -.wp_themeSkin tr.mceFirst td.mceToolbar { - background: #e3eef7 url("../images/ed-bg-vs.gif") repeat-x scroll left top; -} -.wp_themeSkin tr.mceFirst td.mceToolbar { - border-color: #dfdfdf; -} - -.wp-admin #mceModalBlocker { - background: #000; -} - -.wp-admin .clearlooks2 .mceFocus .mceTop .mceLeft { - background: #444; - border-left: 1px solid #999; - border-top: 1px solid #999; - -moz-border-radius: 4px 0 0 0; - -webkit-border-top-left-radius: 4px; - -khtml-border-top-left-radius: 4px; - border-top-left-radius: 4px; -} - -.wp-admin .clearlooks2 .mceFocus .mceTop .mceRight { - background: #444; - border-right: 1px solid #999; - border-top: 1px solid #999; - border-top-right-radius: 4px; - -khtml-border-top-right-radius: 4px; - -webkit-border-top-right-radius: 4px; - -moz-border-radius: 0 4px 0 0; -} - -.wp-admin .clearlooks2 .mceMiddle .mceLeft { - background: #f1f1f1; - border-left: 1px solid #999; -} - -.wp-admin .clearlooks2 .mceMiddle .mceRight { - background: #f1f1f1; - border-right: 1px solid #999; -} - -.wp-admin .clearlooks2 .mceBottom { - background: #f1f1f1; - border-bottom: 1px solid #999; -} - -.wp-admin .clearlooks2 .mceBottom .mceLeft { - background: #f1f1f1; - border-bottom: 1px solid #999; - border-left: 1px solid #999; -} - -.wp-admin .clearlooks2 .mceBottom .mceCenter { - background: #f1f1f1; - border-bottom: 1px solid #999; -} - -.wp-admin .clearlooks2 .mceBottom .mceRight { - background: #f1f1f1; - border-bottom: 1px solid #999; - border-right: 1px solid #999; -} - -.wp-admin .clearlooks2 .mceFocus .mceTop span { - color: #e5e5e5; -} -/* end TinyMCE */ - -#editorcontainer, -#post-status-info, -#titlediv #title, -.editwidget .widget-inside { - border-color: #dfdfdf; -} - -#titlediv #title { - background-color: #fff; -} - -#tTips p#tTips_inside { - background-color: #ddd; - color: #333; -} - -#timestampdiv input, -#namediv input, -#poststuff .inside .the-tagcloud { - border-color: #dfdfdf; -} - -/* menu */ -#adminmenu * { - border-color: #dfdfdf; -} - -#adminmenu li.wp-menu-separator { - background: transparent url(../images/menu-arrows.gif) no-repeat scroll left 5px; -} - -.folded #adminmenu li.wp-menu-separator { - background: transparent url(../images/menu-arrows.gif) no-repeat scroll right -34px; -} - -#adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle, -#adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle { - background: transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -207px; -} - -#adminmenu .wp-has-submenu:hover .wp-menu-toggle, -#adminmenu .wp-menu-open .wp-menu-toggle { - background: transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -109px; -} - -#adminmenu a.menu-top { - background: #eaf3fa url(../images/menu-bits-vs.gif) repeat-x scroll left -379px; -} - -#adminmenu .wp-submenu a { - background: #fff url(../images/menu-bits-vs.gif) no-repeat scroll 0 -310px; -} - -#adminmenu .wp-has-current-submenu ul li a { - background: none; -} - -#adminmenu .wp-has-current-submenu ul li a.current { - background: url(../images/menu-dark.gif) top left no-repeat !important; -} - -#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, -#adminmenu .menu-top .current { - background: #3c6b95 url(../images/menu-bits-vs.gif) top left repeat-x; - border-color: #1d507d; - color: #fff; - text-shadow: rgba(0,0,0,0.4) 0 -1px 0; -} - -#adminmenu li.wp-has-current-submenu .wp-submenu, -#adminmenu li.wp-has-current-submenu ul li a { - border-color: #aaa !important; -} - -#adminmenu li.wp-has-current-submenu ul li a { - background: url(../images/menu-dark.gif) bottom left no-repeat !important; -} - -#adminmenu li.wp-has-current-submenu ul { - border-bottom-color: #aaa; -} - -#adminmenu li.menu-top .current:hover { - border-color: #6583c0; -} - -#adminmenu .wp-submenu .current a.current { - background: transparent url(../images/menu-bits-vs.gif) no-repeat scroll 0 -289px; -} - -#adminmenu .wp-submenu a:hover { - background-color: #eaf2fa !important; - color: #333 !important; -} - -#adminmenu .wp-submenu li.current, -#adminmenu .wp-submenu li.current a, -#adminmenu .wp-submenu li.current a:hover { - color: #333; - background-color: #f5f5f5; - background-image: none; - border-color: #e3e3e3; - text-shadow: rgba(255,255,255,1) 0 1px 0; -} - -#adminmenu .wp-submenu ul { - background-color: #fff; -} - -.folded #adminmenu li.menu-top, -#adminmenu .wp-submenu .wp-submenu-head { - background-color: #eaf2fa; -} - -.folded #adminmenu li.wp-has-current-submenu, -.folded #adminmenu li.menu-top.current { - background-color: #bbd8e7; -} - -#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head { - background-color: #bbd8e7; - border-color: #8cbdd5; -} - -#adminmenu div.wp-submenu { - background-color: transparent; -} - -/* menu icons */ -#adminmenu #menu-dashboard div.wp-menu-image { - background: transparent url("../images/menu-vs.png") no-repeat scroll -61px -33px; -} - -#adminmenu #menu-dashboard:hover div.wp-menu-image, -#adminmenu #menu-dashboard.wp-has-current-submenu div.wp-menu-image, -#adminmenu #menu-dashboard.current div.wp-menu-image { - background: transparent url("../images/menu-vs.png") no-repeat scroll -61px -1px; -} - -#adminmenu #menu-posts div.wp-menu-image { - background: transparent url("../images/menu-vs.png") no-repeat scroll -272px -33px; -} - -#adminmenu #menu-posts:hover div.wp-menu-image, -#adminmenu #menu-posts.wp-has-current-submenu div.wp-menu-image { - background: transparent url("../images/menu-vs.png") no-repeat scroll -272px -1px; -} - -#adminmenu #menu-media div.wp-menu-image { - background: transparent url("../images/menu-vs.png") no-repeat scroll -121px -33px; -} - -#adminmenu #menu-media:hover div.wp-menu-image, -#adminmenu #menu-media.wp-has-current-submenu div.wp-menu-image { - background: transparent url("../images/menu-vs.png") no-repeat scroll -121px -1px; -} - -#adminmenu #menu-links div.wp-menu-image { - background: transparent url("../images/menu-vs.png") no-repeat scroll -91px -33px; -} - -#adminmenu #menu-links:hover div.wp-menu-image, -#adminmenu #menu-links.wp-has-current-submenu div.wp-menu-image { - background: transparent url("../images/menu-vs.png") no-repeat scroll -91px -1px; -} - -#adminmenu #menu-pages div.wp-menu-image { - background: transparent url("../images/menu-vs.png") no-repeat scroll -151px -33px; -} - -#adminmenu #menu-pages:hover div.wp-menu-image, -#adminmenu #menu-pages.wp-has-current-submenu div.wp-menu-image { - background: transparent url("../images/menu-vs.png") no-repeat scroll -151px -1px; -} - -#adminmenu #menu-comments div.wp-menu-image { - background: transparent url("../images/menu-vs.png") no-repeat scroll -31px -33px; -} - -#adminmenu #menu-comments:hover div.wp-menu-image, -#adminmenu #menu-comments.wp-has-current-submenu div.wp-menu-image, -#adminmenu #menu-comments.current div.wp-menu-image { - background: transparent url("../images/menu-vs.png") no-repeat scroll -31px -1px; -} - -#adminmenu #menu-appearance div.wp-menu-image { - background: transparent url("../images/menu-vs.png") no-repeat scroll -1px -33px; -} - -#adminmenu #menu-appearance:hover div.wp-menu-image, -#adminmenu #menu-appearance.wp-has-current-submenu div.wp-menu-image { - background: transparent url("../images/menu-vs.png") no-repeat scroll -1px -1px; -} - -#adminmenu #menu-plugins div.wp-menu-image { - background: transparent url("../images/menu-vs.png") no-repeat scroll -181px -33px; -} - -#adminmenu #menu-plugins:hover div.wp-menu-image, -#adminmenu #menu-plugins.wp-has-current-submenu div.wp-menu-image { - background: transparent url("../images/menu-vs.png") no-repeat scroll -181px -1px; -} - -#adminmenu #menu-users div.wp-menu-image { - background: transparent url("../images/menu-vs.png") no-repeat scroll -301px -33px; -} - -#adminmenu #menu-users:hover div.wp-menu-image, -#adminmenu #menu-users.wp-has-current-submenu div.wp-menu-image { - background: transparent url("../images/menu-vs.png") no-repeat scroll -301px -1px; -} - -#adminmenu #menu-tools div.wp-menu-image { - background: transparent url("../images/menu-vs.png") no-repeat scroll -211px -33px; -} - -#adminmenu #menu-tools:hover div.wp-menu-image, -#adminmenu #menu-tools.wp-has-current-submenu div.wp-menu-image { - background: transparent url("../images/menu-vs.png") no-repeat scroll -211px -1px; -} - -#adminmenu #menu-settings div.wp-menu-image { - background: transparent url("../images/menu-vs.png") no-repeat scroll -241px -33px; -} - -#adminmenu #menu-settings:hover div.wp-menu-image, -#adminmenu #menu-settings.wp-has-current-submenu div.wp-menu-image { - background: transparent url("../images/menu-vs.png") no-repeat scroll -241px -1px; -} -/* end menu */ - - -/* Diff */ -table.diff .diff-deletedline { - background-color: #fdd; -} - -table.diff .diff-deletedline del { - background-color: #f99; -} - -table.diff .diff-addedline { - background-color: #dfd; -} - -table.diff .diff-addedline ins { - background-color: #9f9; -} - -#att-info { - background-color: #e4f2fd; -} - -/* edit image */ -#sidemenu a { - background-color: #f9f9f9; - border-color: #f9f9f9; - border-bottom-color: #dfdfdf; -} - -#sidemenu a.current { - background-color: #fff; - border-color: #dfdfdf #dfdfdf #fff; - color: #d54e21; -} - -#screen-options-wrap, -#contextual-help-wrap { - background-color: #eae9e4; - border-color: #dfdfdf; -} - -#screen-meta-links a.show-settings { - color: #606060; -} - -#screen-meta-links a.show-settings:hover { - color: #000; -} - -#replysubmit { - background-color: #f1f1f1; - border-top-color: #ddd; -} - -#replyerror { - border-color: #ddd; - background-color: #f9f9f9; -} - -#edithead, -#replyhead { - background-color: #f1f1f1; -} - -#ed_reply_toolbar { - background-color: #e9e9e9; -} - -/* table vim shortcuts */ -.vim-current, -.vim-current th, -.vim-current td { - background-color: #e4f2fd !important; -} - -/* Install Plugins */ -.star-average, -.star.star-rating { - background-color: #fc0; -} - -div.star.select:hover { - background-color: #d00; -} - -#plugin-information .fyi ul { - background-color: #eaf3fa; -} - -#plugin-information .fyi h2.mainheader { - background-color: #cee1ef; -} - -#plugin-information pre, -#plugin-information code { - background-color: #ededff; -} - -#plugin-information pre { - border: 1px solid #ccc; -} - -/* inline editor */ -.inline-edit-row fieldset input[type="text"], -.inline-edit-row fieldset textarea, -#bulk-titles, -#replyrow input { - border-color: #ddd; -} - -.inline-editor div.title { - background-color: #eaf3fa; -} - -.inline-editor ul.cat-checklist { - background-color: #fff; - border-color: #ddd; -} - -.inline-editor .categories .catshow, -.inline-editor .categories .cathide { - color: #21759b; -} - -.inline-editor .quick-edit-save { - background-color: #f1f1f1; -} - -#replyrow #ed_reply_toolbar input:hover { - border-color: #aaa; - background: #ddd; -} - -fieldset.inline-edit-col-right .inline-edit-col { - border-color: #dfdfdf; -} - -.attention { - color: #d54e21; -} - -.meta-box-sortables .postbox:hover .handlediv { - background: transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -111px; -} - -#major-publishing-actions { - background: #eaf2fa; -} - -.tablenav .tablenav-pages { - color: #555; -} - -.tablenav .tablenav-pages a { - border-color: #e3e3e3; - background: #eee url('../images/menu-bits-vs.gif') repeat-x scroll left -379px; -} - -.tablenav .tablenav-pages a:hover { - color: #d54e21; - border-color: #d54321; -} - -.tablenav .tablenav-pages a:active { - color: #fff !important; -} - -.tablenav .tablenav-pages .current { - background: #dfdfdf; - border-color: #d3d3d3; -} - -#availablethemes, -#availablethemes td { - border-color: #ddd; -} - -#current-theme img { - border-color: #999; -} - -#TB_window #TB_title a.tb-theme-preview-link, -#TB_window #TB_title a.tb-theme-preview-link:visited { - color: #999; -} - -#TB_window #TB_title a.tb-theme-preview-link:hover, -#TB_window #TB_title a.tb-theme-preview-link:focus { - color: #ccc; -} - -.misc-pub-section { - border-bottom-color: #eee; -} - -#minor-publishing { - border-bottom-color: #ddd; -} - -#post-body .misc-pub-section { - border-right-color: #eee; -} - -.post-com-count span { - background-color: #bbb; -} - -.form-table .color-palette td { - border-color: #fff; -} - -.sortable-placeholder { - border-color: #bbb; - background-color: #f5f5f5; -} - -#post-body ul#category-tabs li.tabs a { - color: #333; -} - -#wp_editimgbtn, -#wp_delimgbtn, -#wp_editgallery, -#wp_delgallery { - border-color: #999; - background-color: #eee; -} - -#wp_editimgbtn:hover, -#wp_delimgbtn:hover, -#wp_editgallery:hover, -#wp_delgallery:hover { - border-color: #555; - background-color: #ccc; -} - -#favorite-first { - background: #5580a6 url(../images/fav-vs.png) repeat-x 0 center; - border-color: #517ea5 !important; - border-bottom-color: #416686 !important; -} - -#favorite-actions .slide-down { - background-image: url(../images/fav-top-vs.gif); - background-position:0 0; - background-repeat: repeat-x; -} - -#favorite-inside { - border-color: #5b86ac; - background-color: #5580a6; -} - -#favorite-toggle { - background: transparent url(../images/fav-arrow-vs.gif) no-repeat 0 -4px; -} - -#favorite-actions a { - color: #ddd; -} - -#favorite-actions a:hover { - color: #fff; -} - -#favorite-inside a:hover { - text-decoration: underline; -} - -#favorite-actions .slide-down { - border-bottom-color: #626262; -} - -.submit input, -.button, -.button-primary, -.button-secondary, -.button-highlighted, -#postcustomstuff .submit input { - text-shadow: rgba(255,255,255,1) 0 1px 0; -} - -.button-primary, -.submit .button-primary { - text-shadow: rgba(0,0,0,0.3) 0 -1px 0; -} - -#screen-meta a.show-settings { - background-color: transparent; - text-shadow: rgba(255,255,255,0.7) 0 1px 0; -} - -#icon-edit, -#icon-post { - background: transparent url(../images/icons32-vs.png) no-repeat -552px -5px; -} - -#icon-index { - background: transparent url(../images/icons32-vs.png) no-repeat -137px -5px; -} - -#icon-upload { - background: transparent url(../images/icons32-vs.png) no-repeat -251px -5px; -} - -#icon-link-manager, -#icon-link, -#icon-link-category { - background: transparent url(../images/icons32-vs.png) no-repeat -190px -5px; -} - -#icon-edit-pages, -#icon-page { - background: transparent url(../images/icons32-vs.png) no-repeat -312px -5px; -} - -#icon-edit-comments { - background: transparent url(../images/icons32-vs.png) no-repeat -72px -5px; -} - -#icon-themes { - background: transparent url(../images/icons32-vs.png) no-repeat -11px -5px; -} - -#icon-plugins { - background: transparent url(../images/icons32-vs.png) no-repeat -370px -5px; -} - -#icon-users, -#icon-profile, -#icon-user-edit { - background: transparent url(../images/icons32-vs.png) no-repeat -600px -5px; -} - -#icon-tools, -#icon-admin { - background: transparent url(../images/icons32-vs.png) no-repeat -432px -5px; -} - -#icon-options-general { - background: transparent url(../images/icons32-vs.png) no-repeat -492px -5px; -} - -.view-switch #view-switch-list { - background: transparent url(../images/list-vs.png) no-repeat 0 0; -} - -.view-switch #view-switch-list.current { - background: transparent url(../images/list-vs.png) no-repeat -40px 0; -} - -.view-switch #view-switch-excerpt { - background: transparent url(../images/list-vs.png) no-repeat -20px 0; -} - -.view-switch #view-switch-excerpt.current { - background: transparent url(../images/list-vs.png) no-repeat -60px 0; -} - -#header-logo { - background: transparent url(../images/wp-logo-vs.gif) no-repeat scroll center center; -} - -#wphead #site-visit-button { - background-color: #3c6b95; - background-image: url(../images/visit-site-button-grad-vs.gif); - color: #b6d1e4; - text-shadow: #3f3f3f 0 -1px 0; -} - -#wphead a:hover #site-visit-button { - color: #fff; -} - -#wphead a:focus #site-visit-button, -#wphead a:active #site-visit-button { - background-position: 0 -27px; -} - -.popular-tags, -.feature-filter { - background-color: #fff; - border-color: #dfdfdf; -} - -#theme-information .action-button { - border-top-color: #dfdfdf; -} - -.theme-listing br.line { - border-bottom-color: #ccc; -} - -div.widgets-sortables, -#widgets-left .inactive { - background-color: #f1f1f1; - border-color: #ddd; -} - -#available-widgets .widget-holder { - background-color: #fff; - border-color: #ddd; -} - -#widgets-left .sidebar-name { - background-color: #aaa; - background-image: url(../images/ed-bg-vs.gif); - text-shadow: #FFFFFF 0 1px 0; - border-color: #dfdfdf; -} - -#widgets-right .sidebar-name { - background-image: url(../images/fav-vs.png); - text-shadow: #3f3f3f 0 -1px 0; - background-color: #636363; - border-color: #636363; - color: #fff; -} - -.sidebar-name:hover, -#removing-widget { - color: #d54e21; -} - -#removing-widget span { - color: black; -} - -#widgets-left .sidebar-name-arrow { - background: transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -109px; -} - -#widgets-right .sidebar-name-arrow { - background: transparent url(../images/fav-arrow-vs.gif) no-repeat scroll 0 -1px; -} - -.in-widget-title { - color: #606060; -} - -.deleting .widget-title * { - color: #aaa; -} +html{background-color:#f7f6f1;}* html input,* html .widget{border-color:#8cbdd5;}textarea,input[type="text"],input[type="password"],input[type="file"],input[type="button"],input[type="submit"],input[type="reset"],select{border-color:#dfdfdf;background-color:#fff;}kbd,code{background:#eaeaea;}input[readonly]{background-color:#eee;}.find-box-search{border-color:#dfdfdf;background-color:#f1f1f1;}.find-box{background-color:#f1f1f1;}.find-box-inside{background-color:#fff;}a.page-numbers:hover{border-color:#999;}body,#wpbody,.form-table .pre{color:#333;}body>#upload-menu{border-bottom-color:#fff;}#postcustomstuff table,#your-profile fieldset,#rightnow,div.dashboard-widget,#dashboard-widgets p.dashboard-widget-links,#replyrow #ed_reply_toolbar input{border-color:#ccc;}#poststuff .inside label.spam,#poststuff .inside label.deleted{color:red;}#poststuff .inside label.waiting{color:orange;}#poststuff .inside label.approved{color:green;}#postcustomstuff table{border-color:#dfdfdf;background-color:#f9f9f9;}#postcustomstuff thead th{background-color:#f1f1f1;}#postcustomstuff table input,#postcustomstuff table textarea{border-color:#dfdfdf;background-color:#fff;}.widefat{border-color:#dfdfdf;background-color:#fff;}div.dashboard-widget-error{background-color:#c43;}div.dashboard-widget-notice{background-color:#cfe1ef;}div.dashboard-widget-submit{border-top-color:#ccc;}div.tabs-panel,ul#category-tabs li.tabs{border-color:#dfdfdf;}ul#category-tabs li.tabs{background-color:#f1f1f1;}input.disabled,textarea.disabled{background-color:#ccc;}.login #backtoblog a:hover,#plugin-information .action-button a,#plugin-information .action-button a:hover,#plugin-information .action-button a:visited{color:#fff;}.widget .widget-top,.postbox h3,.stuffbox h3{background:#d5e6f2 url("../images/blue-grad.png") repeat-x left top;text-shadow:#fff 0 1px 0;}.form-table th,.form-wrap label{color:#222;text-shadow:#fff 0 1px 0;}.description,.form-wrap p{color:#666;}strong .post-com-count span{background-color:#21759b;}.sorthelper{background-color:#ccf3fa;}.ac_match,.subsubsub a.current{color:#000;}.wrap h2{color:#093e56;}.ac_over{background-color:#f0f0b8;}.ac_results{background-color:#fff;border-color:#808080;}.ac_results li{color:#101010;}.alt .alternate{background-color:#edfbfc;}.available-theme a.screenshot{background-color:#f1f1f1;border-color:#ddd;}.bar{background-color:#e8e8e8;border-right-color:#99d;}#media-upload,#media-upload .media-item .slidetoggle{background:#fff;}#media-upload .slidetoggle{border-top-color:#dfdfdf;}.error,.login #login_error{background-color:#ffebe8;border-color:#c00;}.error a{color:#c00;}.form-invalid{background-color:#ffebe8!important;}.form-invalid input,.form-invalid select{border-color:#c00!important;}.submit{border-color:#8cbdd5;}.highlight{background-color:#e4f2fd;color:#d54e21;}.howto,.nonessential,#edit-slug-box,.form-input-tip,.rss-widget span.rss-date,.subsubsub{color:#666;}.media-item{border-bottom-color:#dfdfdf;}#wpbody-content #media-items .describe{border-top-color:#dfdfdf;}.media-upload-form label.form-help,td.help{color:#9a9a9a;}.post-com-count{background-image:url(../images/bubble_bg.gif);color:#fff;}.post-com-count span{background-color:#bbb;color:#fff;}.post-com-count:hover span{background-color:#d54e21;}.quicktags,.search{background-color:#ccc;color:#000;}.side-info h5{border-bottom-color:#dadada;}.side-info ul{color:#666;}.button,.button-secondary,.submit input,input[type=button],input[type=submit]{border-color:#dfdfdf;color:#464646;}.button:hover,.button-secondary:hover,.submit input:hover,input[type=button]:hover,input[type=submit]:hover{color:#000;border-color:#adaca7;}.button,.submit input,.button-secondary{background:#f2f2f2 url(../images/white-grad.png) repeat-x scroll left top;text-shadow:rgba(255,255,255,1) 0 1px 0;}.button:active,.submit input:active,.button-secondary:active{background:#eee url(../images/white-grad-active.png) repeat-x scroll left top;}input.button-primary,button.button-primary,a.button-primary{border-color:#5b86ab;font-weight:bold;color:#fff;background:#5580a6 url(../images/button-grad-vs.png) repeat-x scroll left top;text-shadow:rgba(0,0,0,0.3) 0 -1px 0;}input.button-primary:active,button.button-primary:active,a.button-primary:active{background:#21759b url(../images/button-grad-active-vs.png) repeat-x scroll left top;color:#eaf2fa;}input.button-primary:hover,button.button-primary:hover,a.button-primary:hover,a.button-primary:focus,a.button-primary:active{border-color:#2e5475;color:#eaf2fa;}.button-disabled,.button[disabled],.button:disabled,.button-secondary[disabled],.button-secondary:disabled,a.button.disabled{color:#aaa!important;border-color:#ddd!important;}.button-primary-disabled,.button-primary[disabled],.button-primary:disabled{color:#B0C3E2!important;background:#6590A6!important;}a:hover,a:active,a:focus{color:#d54e21;}#wphead #viewsite a:hover,#adminmenu a:hover,#adminmenu ul.wp-submenu a:hover,#the-comment-list .comment a:hover,#rightnow a:hover,#media-upload a.del-link:hover,div.dashboard-widget-submit input:hover,.subsubsub a:hover,.subsubsub a.current:hover,.ui-tabs-nav a:hover,.plugins .inactive a:hover,#all-plugins-table .plugins .inactive a:hover,#search-plugins-table .plugins .inactive a:hover{color:#d54e21;}#the-comment-list .comment-item,#dashboard-widgets #dashboard_quick_press form p.submit{border-color:#dfdfdf;}#dashboard_right_now .table{background:#faf9f7!important;}#side-sortables #category-tabs .tabs a{color:#333;}#rightnow .rbutton{background-color:#ebebeb;color:#264761;}.submitbox .submit{background-color:#464646;color:#ccc;}.plugins a.delete:hover,#all-plugins-table .plugins a.delete:hover,#search-plugins-table .plugins a.delete:hover,.submitbox .submitdelete{color:#f00;border-bottom-color:#f00;}.submitbox .submitdelete:hover,#media-items a.delete:hover{color:#fff;background-color:#f00;border-bottom-color:#f00;}#normal-sortables .submitbox .submitdelete:hover{color:#000;background-color:#f00;border-bottom-color:#f00;}.tablenav .dots{border-color:transparent;}.tablenav .next,.tablenav .prev{border-color:transparent;color:#21759b;}.tablenav .next:hover,.tablenav .prev:hover{border-color:transparent;color:#d54e21;}.updated,.login .message{background-color:#ffffe0;border-color:#e6db55;}.update-message{color:#000;}a.page-numbers{border-bottom-color:#b8d3e2;}.commentlist li{border-bottom-color:#ccc;}.widefat td,.widefat th,#install-plugins .plugins td,#install-plugins .plugins th{border-color:#dfdfdf;}.widefat th{text-shadow:rgba(255,255,255,0.8) 0 1px 0;}.widefat thead tr th,.widefat tfoot tr th,h3.dashboard-widget-title,h3.dashboard-widget-title span,h3.dashboard-widget-title small,.find-box-head{color:#333;background:#d5e6f2 url(../images/blue-grad.png) repeat-x scroll left top;}h3.dashboard-widget-title small a{color:#d7d7d7;}h3.dashboard-widget-title small a:hover{color:#fff;}a,#adminmenu a,#poststuff #edButtonPreview,#poststuff #edButtonHTML,#the-comment-list p.comment-author strong a,#media-upload a.del-link,#media-items a.delete,.plugins a.delete,.ui-tabs-nav a{color:#1c6280;}body.press-this .tabs a,body.press-this .tabs a:hover{background-color:#fff;border-color:#c6d9e9;border-bottom-color:#fff;color:#d54e21;}#adminmenu #awaiting-mod,#adminmenu .update-plugins,#sidemenu a .update-plugins,#rightnow .reallynow,#plugin-information .action-button{background-color:#d54e21;color:#fff;}#adminmenu li a:hover #awaiting-mod,#adminmenu li a:hover .update-plugins,#sidemenu li a:hover .update-plugins{background-color:#264761;color:#fff;}#adminmenu li.current a #awaiting-mod,#adminmenu li.current a .update-plugins,#adminmenu li.wp-has-current-submenu a .update-plugins,#adminmenu li.wp-has-current-submenu a .update-plugins{background-color:#ddd;color:#000;text-shadow:none;-moz-box-shadow:rgba(0,0,0,0.2) 0 -1px 0;-khtml-box-shadow:rgba(0,0,0,0.2) 0 -1px 0;-webkit-box-shadow:rgba(0,0,0,0.2) 0 -1px 0;box-shadow:rgba(0,0,0,0.2) 0 -1px 0;}#adminmenu li.current a:hover #awaiting-mod,#adminmenu li.current a:hover .update-plugins,#adminmenu li.wp-has-current-submenu a:hover #awaiting-mod,#adminmenu li.wp-has-current-submenu a:hover .update-plugins{background-color:#264761;color:#fff;}div#media-upload-header,div#plugin-information-header{background-color:#f9f9f9;border-bottom-color:#dfdfdf;}#currenttheme img{border-color:#666;}#dashboard_secondary div.dashboard-widget-content ul li a{background-color:#f9f9f9;}input.readonly,textarea.readonly{background-color:#ddd;}#ed_toolbar input,#ed_reply_toolbar input{background:#fff url("../images/fade-butt.png") repeat-x 0 -2px;}#editable-post-name{background-color:#fffbcc;}#edit-slug-box strong,.tablenav .displaying-num,#submitted-on{color:#777;}.login #nav a{color:#21759b!important;}.login #nav a:hover{color:#d54e21!important;}#footer,#footer-upgrade{background:#1d507d;color:#b6d1e4;}#media-items,.imgedit-group{border-color:#dfdfdf;}.checkbox,.side-info,.plugins tr,.postbox,#your-profile #rich_editing{background-color:#fff;}.plugins .inactive,.plugins .inactive th,.plugins .inactive td,tr.inactive+tr.plugin-update-tr .plugin-update{background-color:#ebeeef;}.plugin-update-tr .update-message{background-color:#fffbe4;border-color:#dfdfdf;}.plugins .active,.plugins .active th,.plugins .active td{color:#000;}.plugins .inactive a{color:#579;}#the-comment-list tr.undo,#the-comment-list div.undo{background-color:#f4f4f4;}#the-comment-list .unapproved{background-color:#ffffe0;}#the-comment-list .approve a{color:#006505;}#the-comment-list .unapprove a{color:#d98500;}table.widefat span.delete a,table.widefat span.trash a,table.widefat span.spam a,#dashboard_recent_comments .delete a,#dashboard_recent_comments .trash a,#dashboard_recent_comments .spam a{color:#bc0b0b;}.widget,#widget-list .widget-top,.postbox,#titlediv,#poststuff .postarea,.stuffbox{border-color:#dfdfdf;}.widget,.postbox{background-color:#fff;}.ui-sortable .postbox h3{color:#093e56;}.widget .widget-top,.ui-sortable .postbox h3:hover{color:#000;}.curtime #timestamp{background-image:url(../images/date-button.gif);}#quicktags #ed_link{color:#00f;}#rightnow .youhave{background-color:#f0f6fb;}#rightnow a{color:#448abd;}.tagchecklist span a,#bulk-titles div a{background:url(../images/xit.gif) no-repeat;}.tagchecklist span a:hover,#bulk-titles div a:hover{background:url(../images/xit.gif) no-repeat -10px 0;}#update-nag{background-color:#fffeeb;border-color:#ccc;color:#555;}.login #backtoblog a{color:#ccc;}#wphead{background-color:#1d507d;}body.login{border-top-color:#093e56;}#wphead h1 a{color:#fff;}#user_info{color:#b6d1e4;}#user_info a:link,#user_info a:visited,#footer a:link,#footer a:visited{color:#fff;text-decoration:none;}#user_info a:hover,#user_info a:active,#footer a:hover,#footer a:active{text-decoration:underline;}div#media-upload-error,.file-error,abbr.required,.widget-control-remove:hover,table.widefat .delete a:hover,table.widefat .trash a:hover,table.widefat .spam a:hover,#dashboard_recent_comments .delete a:hover,#dashboard_recent_comments .trash a:hover,#dashboard_recent_comments .spam a:hover{color:#f00;}#pass-strength-result{background-color:#eee;border-color:#ddd!important;}#pass-strength-result.bad{background-color:#ffb78c;border-color:#ff853c!important;}#pass-strength-result.good{background-color:#ffec8b;border-color:#fc0!important;}#pass-strength-result.short{background-color:#ffa0a0;border-color:#f04040!important;}#pass-strength-result.strong{background-color:#c3ff88;border-color:#8dff1c!important;}#quicktags{border-color:#dfdfdf;background-color:#dfdfdf;}#ed_toolbar input{border-color:#c3c3c3;}#ed_toolbar input:hover{border-color:#aaa;background:#ddd;}#poststuff .wp_themeSkin .mceStatusbar{border-color:#ededed;}#poststuff #edButtonPreview,#poststuff #edButtonHTML{background-color:#f2f1eb;border-color:#dfdfdf;color:#999;}#poststuff #editor-toolbar .active{border-bottom-color:#e3eef7;background-color:#e3eef7;color:#333;}#post-status-info{background-color:#ededed;}.wp_themeSkin *,.wp_themeSkin a:hover,.wp_themeSkin a:link,.wp_themeSkin a:visited,.wp_themeSkin a:active{color:#000;}.wp_themeSkin iframe{background:#fff;}.wp_themeSkin .mceStatusbar{color:#000;background-color:#f5f5f5;}.wp_themeSkin .mceButton{background-color:#e9e8e8;border-color:#b2b2b2;}.wp_themeSkin a.mceButtonEnabled:hover,.wp_themeSkin a.mceButtonActive,.wp_themeSkin a.mceButtonSelected{background-color:#d5d5d5;border-color:#777!important;}.wp_themeSkin .mceButtonDisabled{border-color:#ccc!important;}.wp_themeSkin .mceListBox .mceText,.wp_themeSkin .mceListBox .mceOpen{border-color:#b2b2b2;background-color:#d5d5d5;}.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen,.wp_themeSkin .mceListBoxHover .mceOpen,.wp_themeSkin .mceListBoxSelected .mceOpen,.wp_themeSkin .mceListBoxSelected .mceText{border-color:#777!important;background-color:#d5d5d5;}.wp_themeSkin table.mceListBoxEnabled:hover .mceText,.wp_themeSkin .mceListBoxHover .mceText{border-color:#777!important;}.wp_themeSkin select.mceListBox{border-color:#b2b2b2;background-color:#fff;}.wp_themeSkin .mceSplitButton a.mceAction,.wp_themeSkin .mceSplitButton a.mceOpen{border-color:#b2b2b2;}.wp_themeSkin .mceSplitButton a.mceOpen:hover,.wp_themeSkin .mceSplitButtonSelected a.mceOpen,.wp_themeSkin table.mceSplitButtonEnabled:hover a.mceAction,.wp_themeSkin .mceSplitButton a.mceAction:hover{background-color:#d5d5d5;border-color:#777!important;}.wp_themeSkin .mceSplitButtonActive{background-color:#b2b2b2;}.wp_themeSkin div.mceColorSplitMenu table{background-color:#ebebeb;border-color:#b2b2b2;}.wp_themeSkin .mceColorSplitMenu a{border-color:#b2b2b2;}.wp_themeSkin .mceColorSplitMenu a.mceMoreColors{border-color:#fff;}.wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover{border-color:#0a246a;background-color:#b6bdd2;}.wp_themeSkin a.mceMoreColors:hover{border-color:#0a246a;}.wp_themeSkin .mceMenu{border-color:#ddd;}.wp_themeSkin .mceMenu table{background-color:#ebeaeb;}.wp_themeSkin .mceMenu .mceText{color:#000;}.wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover,.wp_themeSkin .mceMenu .mceMenuItemActive{background-color:#f5f5f5;}.wp_themeSkin td.mceMenuItemSeparator{background-color:#aaa;}.wp_themeSkin .mceMenuItemTitle a{background-color:#ccc;border-bottom-color:#aaa;}.wp_themeSkin .mceMenuItemTitle span.mceText{color:#000;}.wp_themeSkin .mceMenuItemDisabled .mceText{color:#888;}#quicktags,.wp_themeSkin tr.mceFirst td.mceToolbar{background:#e3eef7 url("../images/ed-bg-vs.gif") repeat-x scroll left top;}.wp_themeSkin tr.mceFirst td.mceToolbar{border-color:#dfdfdf;}.wp-admin #mceModalBlocker{background:#000;}.wp-admin .clearlooks2 .mceFocus .mceTop .mceLeft{background:#444;border-left:1px solid #999;border-top:1px solid #999;-moz-border-radius:4px 0 0 0;-webkit-border-top-left-radius:4px;-khtml-border-top-left-radius:4px;border-top-left-radius:4px;}.wp-admin .clearlooks2 .mceFocus .mceTop .mceRight{background:#444;border-right:1px solid #999;border-top:1px solid #999;border-top-right-radius:4px;-khtml-border-top-right-radius:4px;-webkit-border-top-right-radius:4px;-moz-border-radius:0 4px 0 0;}.wp-admin .clearlooks2 .mceMiddle .mceLeft{background:#f1f1f1;border-left:1px solid #999;}.wp-admin .clearlooks2 .mceMiddle .mceRight{background:#f1f1f1;border-right:1px solid #999;}.wp-admin .clearlooks2 .mceBottom{background:#f1f1f1;border-bottom:1px solid #999;}.wp-admin .clearlooks2 .mceBottom .mceLeft{background:#f1f1f1;border-bottom:1px solid #999;border-left:1px solid #999;}.wp-admin .clearlooks2 .mceBottom .mceCenter{background:#f1f1f1;border-bottom:1px solid #999;}.wp-admin .clearlooks2 .mceBottom .mceRight{background:#f1f1f1;border-bottom:1px solid #999;border-right:1px solid #999;}.wp-admin .clearlooks2 .mceFocus .mceTop span{color:#e5e5e5;}#editorcontainer,#post-status-info,#titlediv #title,.editwidget .widget-inside{border-color:#dfdfdf;}#titlediv #title{background-color:#fff;}#tTips p#tTips_inside{background-color:#ddd;color:#333;}#timestampdiv input,#namediv input,#poststuff .inside .the-tagcloud{border-color:#dfdfdf;}#adminmenu *{border-color:#dfdfdf;}#adminmenu li.wp-menu-separator{background:transparent url(../images/menu-arrows.gif) no-repeat scroll left 5px;}.folded #adminmenu li.wp-menu-separator{background:transparent url(../images/menu-arrows.gif) no-repeat scroll right -34px;}#adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle,#adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle{background:transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -207px;}#adminmenu .wp-has-submenu:hover .wp-menu-toggle,#adminmenu .wp-menu-open .wp-menu-toggle{background:transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -109px;}#adminmenu a.menu-top{background:#eaf3fa url(../images/menu-bits-vs.gif) repeat-x scroll left -379px;}#adminmenu .wp-submenu a{background:#fff url(../images/menu-bits-vs.gif) no-repeat scroll 0 -310px;}#adminmenu .wp-has-current-submenu ul li a{background:none;}#adminmenu .wp-has-current-submenu ul li a.current{background:url(../images/menu-dark.gif) top left no-repeat!important;}#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,#adminmenu .menu-top .current{background:#3c6b95 url(../images/menu-bits-vs.gif) top left repeat-x;border-color:#1d507d;color:#fff;text-shadow:rgba(0,0,0,0.4) 0 -1px 0;}#adminmenu li.wp-has-current-submenu .wp-submenu,#adminmenu li.wp-has-current-submenu ul li a{border-color:#aaa!important;}#adminmenu li.wp-has-current-submenu ul li a{background:url(../images/menu-dark.gif) bottom left no-repeat!important;}#adminmenu li.wp-has-current-submenu ul{border-bottom-color:#aaa;}#adminmenu li.menu-top .current:hover{border-color:#6583c0;}#adminmenu .wp-submenu .current a.current{background:transparent url(../images/menu-bits-vs.gif) no-repeat scroll 0 -289px;}#adminmenu .wp-submenu a:hover{background-color:#eaf2fa!important;color:#333!important;}#adminmenu .wp-submenu li.current,#adminmenu .wp-submenu li.current a,#adminmenu .wp-submenu li.current a:hover{color:#333;background-color:#f5f5f5;background-image:none;border-color:#e3e3e3;text-shadow:rgba(255,255,255,1) 0 1px 0;}#adminmenu .wp-submenu ul{background-color:#fff;}.folded #adminmenu li.menu-top,#adminmenu .wp-submenu .wp-submenu-head{background-color:#eaf2fa;}.folded #adminmenu li.wp-has-current-submenu,.folded #adminmenu li.menu-top.current{background-color:#bbd8e7;}#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head{background-color:#bbd8e7;border-color:#8cbdd5;}#adminmenu div.wp-submenu{background-color:transparent;}#adminmenu #menu-dashboard div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -61px -33px;}#adminmenu #menu-dashboard:hover div.wp-menu-image,#adminmenu #menu-dashboard.wp-has-current-submenu div.wp-menu-image,#adminmenu #menu-dashboard.current div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -61px -1px;}#adminmenu #menu-posts div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -272px -33px;}#adminmenu #menu-posts:hover div.wp-menu-image,#adminmenu #menu-posts.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -272px -1px;}#adminmenu #menu-media div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -121px -33px;}#adminmenu #menu-media:hover div.wp-menu-image,#adminmenu #menu-media.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -121px -1px;}#adminmenu #menu-links div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -91px -33px;}#adminmenu #menu-links:hover div.wp-menu-image,#adminmenu #menu-links.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -91px -1px;}#adminmenu #menu-pages div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -151px -33px;}#adminmenu #menu-pages:hover div.wp-menu-image,#adminmenu #menu-pages.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -151px -1px;}#adminmenu #menu-comments div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -31px -33px;}#adminmenu #menu-comments:hover div.wp-menu-image,#adminmenu #menu-comments.wp-has-current-submenu div.wp-menu-image,#adminmenu #menu-comments.current div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -31px -1px;}#adminmenu #menu-appearance div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -1px -33px;}#adminmenu #menu-appearance:hover div.wp-menu-image,#adminmenu #menu-appearance.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -1px -1px;}#adminmenu #menu-plugins div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -181px -33px;}#adminmenu #menu-plugins:hover div.wp-menu-image,#adminmenu #menu-plugins.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -181px -1px;}#adminmenu #menu-users div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -301px -33px;}#adminmenu #menu-users:hover div.wp-menu-image,#adminmenu #menu-users.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -301px -1px;}#adminmenu #menu-tools div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -211px -33px;}#adminmenu #menu-tools:hover div.wp-menu-image,#adminmenu #menu-tools.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -211px -1px;}#adminmenu #menu-settings div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -241px -33px;}#adminmenu #menu-settings:hover div.wp-menu-image,#adminmenu #menu-settings.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu-vs.png") no-repeat scroll -241px -1px;}table.diff .diff-deletedline{background-color:#fdd;}table.diff .diff-deletedline del{background-color:#f99;}table.diff .diff-addedline{background-color:#dfd;}table.diff .diff-addedline ins{background-color:#9f9;}#att-info{background-color:#e4f2fd;}#sidemenu a{background-color:#f9f9f9;border-color:#f9f9f9;border-bottom-color:#dfdfdf;}#sidemenu a.current{background-color:#fff;border-color:#dfdfdf #dfdfdf #fff;color:#d54e21;}#screen-options-wrap,#contextual-help-wrap{background-color:#eae9e4;border-color:#dfdfdf;}#screen-meta-links a.show-settings{color:#606060;}#screen-meta-links a.show-settings:hover{color:#000;}#replysubmit{background-color:#f1f1f1;border-top-color:#ddd;}#replyerror{border-color:#ddd;background-color:#f9f9f9;}#edithead,#replyhead{background-color:#f1f1f1;}#ed_reply_toolbar{background-color:#e9e9e9;}.vim-current,.vim-current th,.vim-current td{background-color:#e4f2fd!important;}.star-average,.star.star-rating{background-color:#fc0;}div.star.select:hover{background-color:#d00;}#plugin-information .fyi ul{background-color:#eaf3fa;}#plugin-information .fyi h2.mainheader{background-color:#cee1ef;}#plugin-information pre,#plugin-information code{background-color:#ededff;}#plugin-information pre{border:1px solid #ccc;}.inline-edit-row fieldset input[type="text"],.inline-edit-row fieldset textarea,#bulk-titles,#replyrow input{border-color:#ddd;}.inline-editor div.title{background-color:#eaf3fa;}.inline-editor ul.cat-checklist{background-color:#fff;border-color:#ddd;}.inline-editor .categories .catshow,.inline-editor .categories .cathide{color:#21759b;}.inline-editor .quick-edit-save{background-color:#f1f1f1;}#replyrow #ed_reply_toolbar input:hover{border-color:#aaa;background:#ddd;}fieldset.inline-edit-col-right .inline-edit-col{border-color:#dfdfdf;}.attention{color:#d54e21;}.meta-box-sortables .postbox:hover .handlediv{background:transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -111px;}#major-publishing-actions{background:#eaf2fa;}.tablenav .tablenav-pages{color:#555;}.tablenav .tablenav-pages a{border-color:#e3e3e3;background:#eee url('../images/menu-bits-vs.gif') repeat-x scroll left -379px;}.tablenav .tablenav-pages a:hover{color:#d54e21;border-color:#d54321;}.tablenav .tablenav-pages a:active{color:#fff!important;}.tablenav .tablenav-pages .current{background:#dfdfdf;border-color:#d3d3d3;}#availablethemes,#availablethemes td{border-color:#ddd;}#current-theme img{border-color:#999;}#TB_window #TB_title a.tb-theme-preview-link,#TB_window #TB_title a.tb-theme-preview-link:visited{color:#999;}#TB_window #TB_title a.tb-theme-preview-link:hover,#TB_window #TB_title a.tb-theme-preview-link:focus{color:#ccc;}.misc-pub-section{border-bottom-color:#eee;}#minor-publishing{border-bottom-color:#ddd;}#post-body .misc-pub-section{border-right-color:#eee;}.post-com-count span{background-color:#bbb;}.form-table .color-palette td{border-color:#fff;}.sortable-placeholder{border-color:#bbb;background-color:#f5f5f5;}#post-body ul#category-tabs li.tabs a{color:#333;}#wp_editimgbtn,#wp_delimgbtn,#wp_editgallery,#wp_delgallery{border-color:#999;background-color:#eee;}#wp_editimgbtn:hover,#wp_delimgbtn:hover,#wp_editgallery:hover,#wp_delgallery:hover{border-color:#555;background-color:#ccc;}#favorite-first{background:#5580a6 url(../images/fav-vs.png) repeat-x 0 center;border-color:#517ea5!important;border-bottom-color:#416686!important;}#favorite-actions .slide-down{background-image:url(../images/fav-top-vs.gif);background-position:0 0;background-repeat:repeat-x;}#favorite-inside{border-color:#5b86ac;background-color:#5580a6;}#favorite-toggle{background:transparent url(../images/fav-arrow-vs.gif) no-repeat 0 -4px;}#favorite-actions a{color:#ddd;}#favorite-actions a:hover{color:#fff;}#favorite-inside a:hover{text-decoration:underline;}#favorite-actions .slide-down{border-bottom-color:#626262;}#screen-meta a.show-settings{background-color:transparent;text-shadow:rgba(255,255,255,0.7) 0 1px 0;}#icon-edit,#icon-post{background:transparent url(../images/icons32-vs.png) no-repeat -552px -5px;}#icon-index{background:transparent url(../images/icons32-vs.png) no-repeat -137px -5px;}#icon-upload{background:transparent url(../images/icons32-vs.png) no-repeat -251px -5px;}#icon-link-manager,#icon-link,#icon-link-category{background:transparent url(../images/icons32-vs.png) no-repeat -190px -5px;}#icon-edit-pages,#icon-page{background:transparent url(../images/icons32-vs.png) no-repeat -312px -5px;}#icon-edit-comments{background:transparent url(../images/icons32-vs.png) no-repeat -72px -5px;}#icon-themes{background:transparent url(../images/icons32-vs.png) no-repeat -11px -5px;}#icon-plugins{background:transparent url(../images/icons32-vs.png) no-repeat -370px -5px;}#icon-users,#icon-profile,#icon-user-edit{background:transparent url(../images/icons32-vs.png) no-repeat -600px -5px;}#icon-tools,#icon-admin{background:transparent url(../images/icons32-vs.png) no-repeat -432px -5px;}#icon-options-general{background:transparent url(../images/icons32-vs.png) no-repeat -492px -5px;}.view-switch #view-switch-list{background:transparent url(../images/list-vs.png) no-repeat 0 0;}.view-switch #view-switch-list.current{background:transparent url(../images/list-vs.png) no-repeat -40px 0;}.view-switch #view-switch-excerpt{background:transparent url(../images/list-vs.png) no-repeat -20px 0;}.view-switch #view-switch-excerpt.current{background:transparent url(../images/list-vs.png) no-repeat -60px 0;}#header-logo{background:transparent url(../images/wp-logo-vs.gif) no-repeat scroll center center;}#wphead #site-visit-button{background-color:#3c6b95;background-image:url(../images/visit-site-button-grad-vs.gif);color:#b6d1e4;text-shadow:#3f3f3f 0 -1px 0;}#wphead a:hover #site-visit-button{color:#fff;}#wphead a:focus #site-visit-button,#wphead a:active #site-visit-button{background-position:0 -27px;}.popular-tags,.feature-filter{background-color:#fff;border-color:#dfdfdf;}#theme-information .action-button{border-top-color:#dfdfdf;}.theme-listing br.line{border-bottom-color:#ccc;}div.widgets-sortables,#widgets-left .inactive{background-color:#f1f1f1;border-color:#ddd;}#available-widgets .widget-holder{background-color:#fff;border-color:#ddd;}#widgets-left .sidebar-name{background-color:#aaa;background-image:url(../images/ed-bg-vs.gif);text-shadow:#FFF 0 1px 0;border-color:#dfdfdf;}#widgets-right .sidebar-name{background-image:url(../images/fav-vs.png);text-shadow:#3f3f3f 0 -1px 0;background-color:#636363;border-color:#636363;color:#fff;}.sidebar-name:hover,#removing-widget{color:#d54e21;}#removing-widget span{color:black;}#widgets-left .sidebar-name-arrow{background:transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -109px;}#widgets-right .sidebar-name-arrow{background:transparent url(../images/fav-arrow-vs.gif) no-repeat scroll 0 -1px;}.in-widget-title{color:#606060;}.deleting .widget-title *{color:#aaa;}.imgedit-menu div{border-color:#d5d5d5;background-color:#f1f1f1;}.imgedit-menu div:hover{border-color:#c1c1c1;background-color:#eaeaea;}.imgedit-menu div.disabled{border-color:#ccc;background-color:#ddd;filter:alpha(opacity=50);opacity:.5;}#dashboard_recent_comments div.undo{border-top-color:#dfdfdf;}.comment-ays,.comment-ays th{border-color:#ddd;}.comment-ays th{background-color:#f1f1f1;} \ No newline at end of file diff --git a/wp-admin/css/colors-classic.dev.css b/wp-admin/css/colors-classic.dev.css new file mode 100644 index 00000000..9f244186 --- /dev/null +++ b/wp-admin/css/colors-classic.dev.css @@ -0,0 +1,1708 @@ +html { + background-color: #f7f6f1; +} + +* html input, +* html .widget { + border-color: #8cbdd5; +} + +textarea, +input[type="text"], +input[type="password"], +input[type="file"], +input[type="button"], +input[type="submit"], +input[type="reset"], +select { + border-color: #dfdfdf; + background-color: #fff; +} + +kbd, +code { + background: #eaeaea; +} + +input[readonly] { + background-color: #eee; +} + +.find-box-search { + border-color: #dfdfdf; + background-color: #f1f1f1; +} + +.find-box { + background-color: #f1f1f1; +} + +.find-box-inside { + background-color: #fff; +} + +a.page-numbers:hover { + border-color: #999; +} + +body, +#wpbody, +.form-table .pre { + color: #333; +} + +body > #upload-menu { + border-bottom-color: #fff; +} + +#postcustomstuff table, +#your-profile fieldset, +#rightnow, +div.dashboard-widget, +#dashboard-widgets p.dashboard-widget-links, +#replyrow #ed_reply_toolbar input { + border-color: #ccc; +} + +#poststuff .inside label.spam, +#poststuff .inside label.deleted { + color: red; +} + +#poststuff .inside label.waiting { + color: orange; +} + +#poststuff .inside label.approved { + color: green; +} + +#postcustomstuff table { + border-color: #dfdfdf; + background-color: #f9f9f9; +} + +#postcustomstuff thead th { + background-color: #f1f1f1; +} + +#postcustomstuff table input, +#postcustomstuff table textarea { + border-color: #dfdfdf; + background-color: #fff; +} + +.widefat { + border-color: #dfdfdf; + background-color: #fff; +} + +div.dashboard-widget-error { + background-color: #c43; +} + +div.dashboard-widget-notice { + background-color: #cfe1ef; +} + +div.dashboard-widget-submit { + border-top-color: #ccc; +} + +div.tabs-panel, +ul#category-tabs li.tabs { + border-color: #dfdfdf; +} + +ul#category-tabs li.tabs { + background-color: #f1f1f1; +} + +input.disabled, +textarea.disabled { + background-color: #ccc; +} +/* #upload-menu li a.upload-tab-link, */ +.login #backtoblog a:hover, +#plugin-information .action-button a, +#plugin-information .action-button a:hover, +#plugin-information .action-button a:visited { + color: #fff; +} + +.widget .widget-top, +.postbox h3, +.stuffbox h3 { + background: #d5e6f2 url("../images/blue-grad.png") repeat-x left top; + text-shadow: #fff 0 1px 0; +} + +.form-table th, +.form-wrap label { + color: #222; + text-shadow: #fff 0 1px 0; +} + +.description, +.form-wrap p { + color: #666; +} + +strong .post-com-count span { + background-color: #21759b; +} + +.sorthelper { + background-color: #ccf3fa; +} + +.ac_match, +.subsubsub a.current { + color: #000; +} + +.wrap h2 { + color: #093e56; +} + +.ac_over { + background-color: #f0f0b8; +} + +.ac_results { + background-color: #fff; + border-color: #808080; +} + +.ac_results li { + color: #101010; +} + +.alt +.alternate { + background-color: #edfbfc; +} + +.available-theme a.screenshot { + background-color: #f1f1f1; + border-color: #ddd; +} + +.bar { + background-color: #e8e8e8; + border-right-color: #99d; +} + +#media-upload, +#media-upload .media-item .slidetoggle { + background: #fff; +} + +#media-upload .slidetoggle { + border-top-color: #dfdfdf; +} + +.error, +.login #login_error { + background-color: #ffebe8; + border-color: #c00; +} + +.error a { + color: #c00; +} + +.form-invalid { + background-color: #ffebe8 !important; +} + +.form-invalid input, +.form-invalid select { + border-color: #c00 !important; +} + +.submit { + border-color: #8cbdd5; +} + +.highlight { + background-color: #e4f2fd; + color: #d54e21; +} + +.howto, +.nonessential, +#edit-slug-box, +.form-input-tip, +.rss-widget span.rss-date, +.subsubsub { + color: #666; +} + +.media-item { + border-bottom-color: #dfdfdf; +} + +#wpbody-content #media-items .describe { + border-top-color: #dfdfdf; +} + +.media-upload-form label.form-help, +td.help { + color: #9a9a9a; +} + +.post-com-count { + background-image: url(../images/bubble_bg.gif); + color: #fff; +} + +.post-com-count span { + background-color: #bbb; + color: #fff; +} + +.post-com-count:hover span { + background-color: #d54e21; +} + +.quicktags, .search { + background-color: #ccc; + color: #000; +} + +.side-info h5 { + border-bottom-color: #dadada; +} + +.side-info ul { + color: #666; +} + +.button, +.button-secondary, +.submit input, +input[type=button], +input[type=submit] { + border-color: #dfdfdf; + color: #464646; +} + +.button:hover, +.button-secondary:hover, +.submit input:hover, +input[type=button]:hover, +input[type=submit]:hover { + color: #000; + border-color: #adaca7; +} + +.button, +.submit input, +.button-secondary { + background: #f2f2f2 url(../images/white-grad.png) repeat-x scroll left top; + text-shadow: rgba(255,255,255,1) 0 1px 0; +} + +.button:active, +.submit input:active, +.button-secondary:active { + background: #eee url(../images/white-grad-active.png) repeat-x scroll left top; +} + +input.button-primary, +button.button-primary, +a.button-primary { + border-color: #5b86ab; + font-weight: bold; + color: #fff; + background: #5580a6 url(../images/button-grad-vs.png) repeat-x scroll left top; + text-shadow: rgba(0,0,0,0.3) 0 -1px 0; +} + +input.button-primary:active, +button.button-primary:active, +a.button-primary:active { + background: #21759b url(../images/button-grad-active-vs.png) repeat-x scroll left top; + color: #eaf2fa; +} + +input.button-primary:hover, +button.button-primary:hover, +a.button-primary:hover, +a.button-primary:focus, +a.button-primary:active { + border-color: #2e5475; + color: #eaf2fa; +} + +.button-disabled, +.button[disabled], +.button:disabled, +.button-secondary[disabled], +.button-secondary:disabled, +a.button.disabled { + color: #aaa !important; + border-color: #ddd !important; +} + +.button-primary-disabled, +.button-primary[disabled], +.button-primary:disabled { + color: #B0C3E2 !important; + background: #6590A6 !important; +} + +a:hover, +a:active, +a:focus { + color: #d54e21; +} + +#wphead #viewsite a:hover, +#adminmenu a:hover, +#adminmenu ul.wp-submenu a:hover, +#the-comment-list .comment a:hover, +#rightnow a:hover, +#media-upload a.del-link:hover, +div.dashboard-widget-submit input:hover, +.subsubsub a:hover, +.subsubsub a.current:hover, +.ui-tabs-nav a:hover, +.plugins .inactive a:hover, +#all-plugins-table .plugins .inactive a:hover, +#search-plugins-table .plugins .inactive a:hover { + color: #d54e21; +} + +#the-comment-list .comment-item, +#dashboard-widgets #dashboard_quick_press form p.submit { + border-color: #dfdfdf; +} + +#dashboard_right_now .table { + background:#faf9f7 !important; +} + +#side-sortables #category-tabs .tabs a { + color: #333; +} + +#rightnow .rbutton { + background-color: #ebebeb; + color: #264761; +} + +.submitbox .submit { + background-color: #464646; + color: #ccc; +} + +.plugins a.delete:hover, +#all-plugins-table .plugins a.delete:hover, +#search-plugins-table .plugins a.delete:hover, +.submitbox .submitdelete { + color: #f00; + border-bottom-color: #f00; +} + +.submitbox .submitdelete:hover, +#media-items a.delete:hover { + color: #fff; + background-color: #f00; + border-bottom-color: #f00; +} + +#normal-sortables .submitbox .submitdelete:hover { + color: #000; + background-color: #f00; + border-bottom-color: #f00; +} + +.tablenav .dots { + border-color: transparent; +} + +.tablenav .next, +.tablenav .prev { + border-color: transparent; + color: #21759b; +} + +.tablenav .next:hover, +.tablenav .prev:hover { + border-color: transparent; + color: #d54e21; +} + +.updated, +.login .message { + background-color: #ffffe0; + border-color: #e6db55; +} + +.update-message { + color: #000000; +} + +a.page-numbers { + border-bottom-color: #b8d3e2; +} + +.commentlist li { + border-bottom-color: #ccc; +} + +.widefat td, +.widefat th, +#install-plugins .plugins td, +#install-plugins .plugins th { + border-color: #dfdfdf; +} + +.widefat th { + text-shadow: rgba(255,255,255,0.8) 0 1px 0; +} + +.widefat thead tr th, +.widefat tfoot tr th, +h3.dashboard-widget-title, +h3.dashboard-widget-title span, +h3.dashboard-widget-title small, +.find-box-head { + color: #333; + background: #d5e6f2 url(../images/blue-grad.png) repeat-x scroll left top; +} + +h3.dashboard-widget-title small a { + color: #d7d7d7; +} + +h3.dashboard-widget-title small a:hover { + color: #fff; +} + +a, +#adminmenu a, +#poststuff #edButtonPreview, +#poststuff #edButtonHTML, +#the-comment-list p.comment-author strong a, +#media-upload a.del-link, +#media-items a.delete, +.plugins a.delete, +.ui-tabs-nav a { + color: #1c6280; +} + +/* Because we don't want visited on these links */ +body.press-this .tabs a, +body.press-this .tabs a:hover { + background-color: #fff; + border-color: #c6d9e9; + border-bottom-color: #fff; + color: #d54e21; +} + +#adminmenu #awaiting-mod, +#adminmenu .update-plugins, +#sidemenu a .update-plugins, +#rightnow .reallynow, +#plugin-information .action-button { + background-color: #d54e21; + color: #fff; +} + +#adminmenu li a:hover #awaiting-mod, +#adminmenu li a:hover .update-plugins, +#sidemenu li a:hover .update-plugins { + background-color: #264761; + color: #fff; +} + +#adminmenu li.current a #awaiting-mod, +#adminmenu li.current a .update-plugins, +#adminmenu li.wp-has-current-submenu a .update-plugins, +#adminmenu li.wp-has-current-submenu a .update-plugins { + background-color: #ddd; + color: #000; + text-shadow: none; + -moz-box-shadow: rgba(0,0,0,0.2) 0 -1px 0; + -khtml-box-shadow: rgba(0,0,0,0.2) 0 -1px 0; + -webkit-box-shadow: rgba(0,0,0,0.2) 0 -1px 0; + box-shadow: rgba(0,0,0,0.2) 0 -1px 0; +} + +#adminmenu li.current a:hover #awaiting-mod, +#adminmenu li.current a:hover .update-plugins, +#adminmenu li.wp-has-current-submenu a:hover #awaiting-mod, +#adminmenu li.wp-has-current-submenu a:hover .update-plugins { + background-color: #264761; + color: #fff; +} + +div#media-upload-header, +div#plugin-information-header { + background-color: #f9f9f9; + border-bottom-color: #dfdfdf; +} + +#currenttheme img { + border-color: #666; +} + +#dashboard_secondary div.dashboard-widget-content ul li a { + background-color: #f9f9f9; +} + +input.readonly, textarea.readonly { + background-color: #ddd; +} + +#ed_toolbar input, +#ed_reply_toolbar input { + background: #fff url("../images/fade-butt.png") repeat-x 0 -2px; +} + +#editable-post-name { + background-color: #fffbcc; +} + +#edit-slug-box strong, +.tablenav .displaying-num, +#submitted-on { + color: #777; +} + +.login #nav a { + color: #21759b !important; +} + +.login #nav a:hover { + color: #d54e21 !important; +} + +#footer, +#footer-upgrade { + background: #1d507d; + color: #b6d1e4; +} + +#media-items, +.imgedit-group { + border-color: #dfdfdf; +} + +.checkbox, +.side-info, +.plugins tr, +.postbox, +#your-profile #rich_editing { + background-color: #fff; +} + +.plugins .inactive, +.plugins .inactive th, +.plugins .inactive td, +tr.inactive + tr.plugin-update-tr .plugin-update { + background-color: #ebeeef; +} + +.plugin-update-tr .update-message { + background-color: #fffbe4; + border-color: #dfdfdf; +} + +.plugins .active, +.plugins .active th, +.plugins .active td { + color: #000; +} + +.plugins .inactive a { + color: #557799; +} + +#the-comment-list tr.undo, +#the-comment-list div.undo { + background-color: #f4f4f4; +} + +#the-comment-list .unapproved { + background-color: #ffffe0; +} + +#the-comment-list .approve a { + color: #006505; +} + +#the-comment-list .unapprove a { + color: #d98500; +} + +table.widefat span.delete a, +table.widefat span.trash a, +table.widefat span.spam a, +#dashboard_recent_comments .delete a, +#dashboard_recent_comments .trash a, +#dashboard_recent_comments .spam a { + color: #bc0b0b; +} + +.widget, +#widget-list .widget-top, +.postbox, +#titlediv, +#poststuff .postarea, +.stuffbox { + border-color: #dfdfdf; +} + +.widget, +.postbox { + background-color: #fff; +} + +.ui-sortable .postbox h3 { + color: #093e56; +} + +.widget .widget-top, +.ui-sortable .postbox h3:hover { + color: #000; +} + +.curtime #timestamp { + background-image: url(../images/date-button.gif); +} + +#quicktags #ed_link { + color: #00f; +} + +#rightnow .youhave { + background-color: #f0f6fb; +} + +#rightnow a { + color: #448abd; +} + +.tagchecklist span a, +#bulk-titles div a { + background: url(../images/xit.gif) no-repeat; +} + +.tagchecklist span a:hover, +#bulk-titles div a:hover { + background: url(../images/xit.gif) no-repeat -10px 0; +} + +#update-nag { + background-color: #fffeeb; + border-color: #ccc; + color: #555; +} + +.login #backtoblog a { + color: #ccc; +} + +#wphead { + background-color: #1d507d; +} + +body.login { + border-top-color: #093e56; +} + +#wphead h1 a { + color: #fff; +} + +#user_info { + color: #b6d1e4; +} + +#user_info a:link, +#user_info a:visited, +#footer a:link, +#footer a:visited { + color: #fff; + text-decoration: none; +} + +#user_info a:hover, +#user_info a:active, +#footer a:hover, +#footer a:active { + text-decoration: underline; +} + +div#media-upload-error, +.file-error, +abbr.required, +.widget-control-remove:hover, +table.widefat .delete a:hover, +table.widefat .trash a:hover, +table.widefat .spam a:hover, +#dashboard_recent_comments .delete a:hover, +#dashboard_recent_comments .trash a:hover, +#dashboard_recent_comments .spam a:hover { + color: #f00; +} + +/* password strength meter */ +#pass-strength-result { + background-color: #eee; + border-color: #ddd !important; +} + +#pass-strength-result.bad { + background-color: #ffb78c; + border-color: #ff853c !important; +} + +#pass-strength-result.good { + background-color: #ffec8b; + border-color: #fc0 !important; +} + +#pass-strength-result.short { + background-color: #ffa0a0; + border-color: #f04040 !important; +} + +#pass-strength-result.strong { + background-color: #c3ff88; + border-color: #8dff1c !important; +} + +/* editors */ +#quicktags { + border-color: #dfdfdf; + background-color: #dfdfdf; +} + +#ed_toolbar input { + border-color: #c3c3c3; +} + +#ed_toolbar input:hover { + border-color: #aaa; + background: #ddd; +} + +#poststuff .wp_themeSkin .mceStatusbar { + border-color: #ededed; +} + +#poststuff #edButtonPreview, +#poststuff #edButtonHTML { + background-color: #f2f1eb; + border-color: #dfdfdf; + color: #999; +} + +#poststuff #editor-toolbar .active { + border-bottom-color: #e3eef7; + background-color: #e3eef7; + color: #333; +} + +/* TinyMCE */ +#post-status-info { + background-color: #ededed; +} + +.wp_themeSkin *, +.wp_themeSkin a:hover, +.wp_themeSkin a:link, +.wp_themeSkin a:visited, +.wp_themeSkin a:active { + color: #000; +} + +/* Containers */ +.wp_themeSkin iframe { + background: #fff; +} + +/* Layout */ +.wp_themeSkin .mceStatusbar { + color: #000; + background-color: #f5f5f5; +} + +/* Button */ +.wp_themeSkin .mceButton { + background-color: #e9e8e8; + border-color: #b2b2b2; +} + +.wp_themeSkin a.mceButtonEnabled:hover, +.wp_themeSkin a.mceButtonActive, +.wp_themeSkin a.mceButtonSelected { + background-color: #d5d5d5; + border-color: #777 !important; +} + +.wp_themeSkin .mceButtonDisabled { + border-color: #ccc !important; +} + +/* ListBox */ +.wp_themeSkin .mceListBox .mceText, +.wp_themeSkin .mceListBox .mceOpen { + border-color: #b2b2b2; + background-color: #d5d5d5; +} + +.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen, +.wp_themeSkin .mceListBoxHover .mceOpen, +.wp_themeSkin .mceListBoxSelected .mceOpen, +.wp_themeSkin .mceListBoxSelected .mceText { + border-color: #777 !important; + background-color: #d5d5d5; +} + +.wp_themeSkin table.mceListBoxEnabled:hover .mceText, +.wp_themeSkin .mceListBoxHover .mceText { + border-color: #777 !important; +} + +.wp_themeSkin select.mceListBox { + border-color: #b2b2b2; + background-color: #fff; +} + +/* SplitButton */ +.wp_themeSkin .mceSplitButton a.mceAction, +.wp_themeSkin .mceSplitButton a.mceOpen { + border-color: #b2b2b2; +} + +.wp_themeSkin .mceSplitButton a.mceOpen:hover, +.wp_themeSkin .mceSplitButtonSelected a.mceOpen, +.wp_themeSkin table.mceSplitButtonEnabled:hover a.mceAction, +.wp_themeSkin .mceSplitButton a.mceAction:hover { + background-color: #d5d5d5; + border-color: #777 !important; +} + +.wp_themeSkin .mceSplitButtonActive { + background-color: #b2b2b2; +} + +/* ColorSplitButton */ +.wp_themeSkin div.mceColorSplitMenu table { + background-color: #ebebeb; + border-color: #b2b2b2; +} + +.wp_themeSkin .mceColorSplitMenu a { + border-color: #b2b2b2; +} + +.wp_themeSkin .mceColorSplitMenu a.mceMoreColors { + border-color: #fff; +} + +.wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover { + border-color: #0a246a; + background-color: #b6bdd2; +} + +.wp_themeSkin a.mceMoreColors:hover { + border-color: #0a246a; +} + +/* Menu */ +.wp_themeSkin .mceMenu { + border-color: #ddd; +} + +.wp_themeSkin .mceMenu table { + background-color: #ebeaeb; +} + +.wp_themeSkin .mceMenu .mceText { + color: #000; +} + +.wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover, +.wp_themeSkin .mceMenu .mceMenuItemActive { + background-color: #f5f5f5; +} +.wp_themeSkin td.mceMenuItemSeparator { + background-color: #aaa; +} +.wp_themeSkin .mceMenuItemTitle a { + background-color: #ccc; + border-bottom-color: #aaa; +} +.wp_themeSkin .mceMenuItemTitle span.mceText { + color: #000; +} +.wp_themeSkin .mceMenuItemDisabled .mceText { + color: #888; +} + +#quicktags, +.wp_themeSkin tr.mceFirst td.mceToolbar { + background: #e3eef7 url("../images/ed-bg-vs.gif") repeat-x scroll left top; +} +.wp_themeSkin tr.mceFirst td.mceToolbar { + border-color: #dfdfdf; +} + +.wp-admin #mceModalBlocker { + background: #000; +} + +.wp-admin .clearlooks2 .mceFocus .mceTop .mceLeft { + background: #444; + border-left: 1px solid #999; + border-top: 1px solid #999; + -moz-border-radius: 4px 0 0 0; + -webkit-border-top-left-radius: 4px; + -khtml-border-top-left-radius: 4px; + border-top-left-radius: 4px; +} + +.wp-admin .clearlooks2 .mceFocus .mceTop .mceRight { + background: #444; + border-right: 1px solid #999; + border-top: 1px solid #999; + border-top-right-radius: 4px; + -khtml-border-top-right-radius: 4px; + -webkit-border-top-right-radius: 4px; + -moz-border-radius: 0 4px 0 0; +} + +.wp-admin .clearlooks2 .mceMiddle .mceLeft { + background: #f1f1f1; + border-left: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceMiddle .mceRight { + background: #f1f1f1; + border-right: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceBottom { + background: #f1f1f1; + border-bottom: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceBottom .mceLeft { + background: #f1f1f1; + border-bottom: 1px solid #999; + border-left: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceBottom .mceCenter { + background: #f1f1f1; + border-bottom: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceBottom .mceRight { + background: #f1f1f1; + border-bottom: 1px solid #999; + border-right: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceFocus .mceTop span { + color: #e5e5e5; +} +/* end TinyMCE */ + +#editorcontainer, +#post-status-info, +#titlediv #title, +.editwidget .widget-inside { + border-color: #dfdfdf; +} + +#titlediv #title { + background-color: #fff; +} + +#tTips p#tTips_inside { + background-color: #ddd; + color: #333; +} + +#timestampdiv input, +#namediv input, +#poststuff .inside .the-tagcloud { + border-color: #dfdfdf; +} + +/* menu */ +#adminmenu * { + border-color: #dfdfdf; +} + +#adminmenu li.wp-menu-separator { + background: transparent url(../images/menu-arrows.gif) no-repeat scroll left 5px; +} + +.folded #adminmenu li.wp-menu-separator { + background: transparent url(../images/menu-arrows.gif) no-repeat scroll right -34px; +} + +#adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle, +#adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle { + background: transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -207px; +} + +#adminmenu .wp-has-submenu:hover .wp-menu-toggle, +#adminmenu .wp-menu-open .wp-menu-toggle { + background: transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -109px; +} + +#adminmenu a.menu-top { + background: #eaf3fa url(../images/menu-bits-vs.gif) repeat-x scroll left -379px; +} + +#adminmenu .wp-submenu a { + background: #fff url(../images/menu-bits-vs.gif) no-repeat scroll 0 -310px; +} + +#adminmenu .wp-has-current-submenu ul li a { + background: none; +} + +#adminmenu .wp-has-current-submenu ul li a.current { + background: url(../images/menu-dark.gif) top left no-repeat !important; +} + +#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, +#adminmenu .menu-top .current { + background: #3c6b95 url(../images/menu-bits-vs.gif) top left repeat-x; + border-color: #1d507d; + color: #fff; + text-shadow: rgba(0,0,0,0.4) 0 -1px 0; +} + +#adminmenu li.wp-has-current-submenu .wp-submenu, +#adminmenu li.wp-has-current-submenu ul li a { + border-color: #aaa !important; +} + +#adminmenu li.wp-has-current-submenu ul li a { + background: url(../images/menu-dark.gif) bottom left no-repeat !important; +} + +#adminmenu li.wp-has-current-submenu ul { + border-bottom-color: #aaa; +} + +#adminmenu li.menu-top .current:hover { + border-color: #6583c0; +} + +#adminmenu .wp-submenu .current a.current { + background: transparent url(../images/menu-bits-vs.gif) no-repeat scroll 0 -289px; +} + +#adminmenu .wp-submenu a:hover { + background-color: #eaf2fa !important; + color: #333 !important; +} + +#adminmenu .wp-submenu li.current, +#adminmenu .wp-submenu li.current a, +#adminmenu .wp-submenu li.current a:hover { + color: #333; + background-color: #f5f5f5; + background-image: none; + border-color: #e3e3e3; + text-shadow: rgba(255,255,255,1) 0 1px 0; +} + +#adminmenu .wp-submenu ul { + background-color: #fff; +} + +.folded #adminmenu li.menu-top, +#adminmenu .wp-submenu .wp-submenu-head { + background-color: #eaf2fa; +} + +.folded #adminmenu li.wp-has-current-submenu, +.folded #adminmenu li.menu-top.current { + background-color: #bbd8e7; +} + +#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head { + background-color: #bbd8e7; + border-color: #8cbdd5; +} + +#adminmenu div.wp-submenu { + background-color: transparent; +} + +/* menu icons */ +#adminmenu #menu-dashboard div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -61px -33px; +} + +#adminmenu #menu-dashboard:hover div.wp-menu-image, +#adminmenu #menu-dashboard.wp-has-current-submenu div.wp-menu-image, +#adminmenu #menu-dashboard.current div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -61px -1px; +} + +#adminmenu #menu-posts div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -272px -33px; +} + +#adminmenu #menu-posts:hover div.wp-menu-image, +#adminmenu #menu-posts.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -272px -1px; +} + +#adminmenu #menu-media div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -121px -33px; +} + +#adminmenu #menu-media:hover div.wp-menu-image, +#adminmenu #menu-media.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -121px -1px; +} + +#adminmenu #menu-links div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -91px -33px; +} + +#adminmenu #menu-links:hover div.wp-menu-image, +#adminmenu #menu-links.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -91px -1px; +} + +#adminmenu #menu-pages div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -151px -33px; +} + +#adminmenu #menu-pages:hover div.wp-menu-image, +#adminmenu #menu-pages.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -151px -1px; +} + +#adminmenu #menu-comments div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -31px -33px; +} + +#adminmenu #menu-comments:hover div.wp-menu-image, +#adminmenu #menu-comments.wp-has-current-submenu div.wp-menu-image, +#adminmenu #menu-comments.current div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -31px -1px; +} + +#adminmenu #menu-appearance div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -1px -33px; +} + +#adminmenu #menu-appearance:hover div.wp-menu-image, +#adminmenu #menu-appearance.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -1px -1px; +} + +#adminmenu #menu-plugins div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -181px -33px; +} + +#adminmenu #menu-plugins:hover div.wp-menu-image, +#adminmenu #menu-plugins.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -181px -1px; +} + +#adminmenu #menu-users div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -301px -33px; +} + +#adminmenu #menu-users:hover div.wp-menu-image, +#adminmenu #menu-users.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -301px -1px; +} + +#adminmenu #menu-tools div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -211px -33px; +} + +#adminmenu #menu-tools:hover div.wp-menu-image, +#adminmenu #menu-tools.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -211px -1px; +} + +#adminmenu #menu-settings div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -241px -33px; +} + +#adminmenu #menu-settings:hover div.wp-menu-image, +#adminmenu #menu-settings.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu-vs.png") no-repeat scroll -241px -1px; +} +/* end menu */ + + +/* Diff */ +table.diff .diff-deletedline { + background-color: #fdd; +} + +table.diff .diff-deletedline del { + background-color: #f99; +} + +table.diff .diff-addedline { + background-color: #dfd; +} + +table.diff .diff-addedline ins { + background-color: #9f9; +} + +#att-info { + background-color: #e4f2fd; +} + +/* edit image */ +#sidemenu a { + background-color: #f9f9f9; + border-color: #f9f9f9; + border-bottom-color: #dfdfdf; +} + +#sidemenu a.current { + background-color: #fff; + border-color: #dfdfdf #dfdfdf #fff; + color: #d54e21; +} + +#screen-options-wrap, +#contextual-help-wrap { + background-color: #eae9e4; + border-color: #dfdfdf; +} + +#screen-meta-links a.show-settings { + color: #606060; +} + +#screen-meta-links a.show-settings:hover { + color: #000; +} + +#replysubmit { + background-color: #f1f1f1; + border-top-color: #ddd; +} + +#replyerror { + border-color: #ddd; + background-color: #f9f9f9; +} + +#edithead, +#replyhead { + background-color: #f1f1f1; +} + +#ed_reply_toolbar { + background-color: #e9e9e9; +} + +/* table vim shortcuts */ +.vim-current, +.vim-current th, +.vim-current td { + background-color: #e4f2fd !important; +} + +/* Install Plugins */ +.star-average, +.star.star-rating { + background-color: #fc0; +} + +div.star.select:hover { + background-color: #d00; +} + +#plugin-information .fyi ul { + background-color: #eaf3fa; +} + +#plugin-information .fyi h2.mainheader { + background-color: #cee1ef; +} + +#plugin-information pre, +#plugin-information code { + background-color: #ededff; +} + +#plugin-information pre { + border: 1px solid #ccc; +} + +/* inline editor */ +.inline-edit-row fieldset input[type="text"], +.inline-edit-row fieldset textarea, +#bulk-titles, +#replyrow input { + border-color: #ddd; +} + +.inline-editor div.title { + background-color: #eaf3fa; +} + +.inline-editor ul.cat-checklist { + background-color: #fff; + border-color: #ddd; +} + +.inline-editor .categories .catshow, +.inline-editor .categories .cathide { + color: #21759b; +} + +.inline-editor .quick-edit-save { + background-color: #f1f1f1; +} + +#replyrow #ed_reply_toolbar input:hover { + border-color: #aaa; + background: #ddd; +} + +fieldset.inline-edit-col-right .inline-edit-col { + border-color: #dfdfdf; +} + +.attention { + color: #d54e21; +} + +.meta-box-sortables .postbox:hover .handlediv { + background: transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -111px; +} + +#major-publishing-actions { + background: #eaf2fa; +} + +.tablenav .tablenav-pages { + color: #555; +} + +.tablenav .tablenav-pages a { + border-color: #e3e3e3; + background: #eee url('../images/menu-bits-vs.gif') repeat-x scroll left -379px; +} + +.tablenav .tablenav-pages a:hover { + color: #d54e21; + border-color: #d54321; +} + +.tablenav .tablenav-pages a:active { + color: #fff !important; +} + +.tablenav .tablenav-pages .current { + background: #dfdfdf; + border-color: #d3d3d3; +} + +#availablethemes, +#availablethemes td { + border-color: #ddd; +} + +#current-theme img { + border-color: #999; +} + +#TB_window #TB_title a.tb-theme-preview-link, +#TB_window #TB_title a.tb-theme-preview-link:visited { + color: #999; +} + +#TB_window #TB_title a.tb-theme-preview-link:hover, +#TB_window #TB_title a.tb-theme-preview-link:focus { + color: #ccc; +} + +.misc-pub-section { + border-bottom-color: #eee; +} + +#minor-publishing { + border-bottom-color: #ddd; +} + +#post-body .misc-pub-section { + border-right-color: #eee; +} + +.post-com-count span { + background-color: #bbb; +} + +.form-table .color-palette td { + border-color: #fff; +} + +.sortable-placeholder { + border-color: #bbb; + background-color: #f5f5f5; +} + +#post-body ul#category-tabs li.tabs a { + color: #333; +} + +#wp_editimgbtn, +#wp_delimgbtn, +#wp_editgallery, +#wp_delgallery { + border-color: #999; + background-color: #eee; +} + +#wp_editimgbtn:hover, +#wp_delimgbtn:hover, +#wp_editgallery:hover, +#wp_delgallery:hover { + border-color: #555; + background-color: #ccc; +} + +#favorite-first { + background: #5580a6 url(../images/fav-vs.png) repeat-x 0 center; + border-color: #517ea5 !important; + border-bottom-color: #416686 !important; +} + +#favorite-actions .slide-down { + background-image: url(../images/fav-top-vs.gif); + background-position:0 0; + background-repeat: repeat-x; +} + +#favorite-inside { + border-color: #5b86ac; + background-color: #5580a6; +} + +#favorite-toggle { + background: transparent url(../images/fav-arrow-vs.gif) no-repeat 0 -4px; +} + +#favorite-actions a { + color: #ddd; +} + +#favorite-actions a:hover { + color: #fff; +} + +#favorite-inside a:hover { + text-decoration: underline; +} + +#favorite-actions .slide-down { + border-bottom-color: #626262; +} + +#screen-meta a.show-settings { + background-color: transparent; + text-shadow: rgba(255,255,255,0.7) 0 1px 0; +} + +#icon-edit, +#icon-post { + background: transparent url(../images/icons32-vs.png) no-repeat -552px -5px; +} + +#icon-index { + background: transparent url(../images/icons32-vs.png) no-repeat -137px -5px; +} + +#icon-upload { + background: transparent url(../images/icons32-vs.png) no-repeat -251px -5px; +} + +#icon-link-manager, +#icon-link, +#icon-link-category { + background: transparent url(../images/icons32-vs.png) no-repeat -190px -5px; +} + +#icon-edit-pages, +#icon-page { + background: transparent url(../images/icons32-vs.png) no-repeat -312px -5px; +} + +#icon-edit-comments { + background: transparent url(../images/icons32-vs.png) no-repeat -72px -5px; +} + +#icon-themes { + background: transparent url(../images/icons32-vs.png) no-repeat -11px -5px; +} + +#icon-plugins { + background: transparent url(../images/icons32-vs.png) no-repeat -370px -5px; +} + +#icon-users, +#icon-profile, +#icon-user-edit { + background: transparent url(../images/icons32-vs.png) no-repeat -600px -5px; +} + +#icon-tools, +#icon-admin { + background: transparent url(../images/icons32-vs.png) no-repeat -432px -5px; +} + +#icon-options-general { + background: transparent url(../images/icons32-vs.png) no-repeat -492px -5px; +} + +.view-switch #view-switch-list { + background: transparent url(../images/list-vs.png) no-repeat 0 0; +} + +.view-switch #view-switch-list.current { + background: transparent url(../images/list-vs.png) no-repeat -40px 0; +} + +.view-switch #view-switch-excerpt { + background: transparent url(../images/list-vs.png) no-repeat -20px 0; +} + +.view-switch #view-switch-excerpt.current { + background: transparent url(../images/list-vs.png) no-repeat -60px 0; +} + +#header-logo { + background: transparent url(../images/wp-logo-vs.gif) no-repeat scroll center center; +} + +#wphead #site-visit-button { + background-color: #3c6b95; + background-image: url(../images/visit-site-button-grad-vs.gif); + color: #b6d1e4; + text-shadow: #3f3f3f 0 -1px 0; +} + +#wphead a:hover #site-visit-button { + color: #fff; +} + +#wphead a:focus #site-visit-button, +#wphead a:active #site-visit-button { + background-position: 0 -27px; +} + +.popular-tags, +.feature-filter { + background-color: #fff; + border-color: #dfdfdf; +} + +#theme-information .action-button { + border-top-color: #dfdfdf; +} + +.theme-listing br.line { + border-bottom-color: #ccc; +} + +div.widgets-sortables, +#widgets-left .inactive { + background-color: #f1f1f1; + border-color: #ddd; +} + +#available-widgets .widget-holder { + background-color: #fff; + border-color: #ddd; +} + +#widgets-left .sidebar-name { + background-color: #aaa; + background-image: url(../images/ed-bg-vs.gif); + text-shadow: #FFFFFF 0 1px 0; + border-color: #dfdfdf; +} + +#widgets-right .sidebar-name { + background-image: url(../images/fav-vs.png); + text-shadow: #3f3f3f 0 -1px 0; + background-color: #636363; + border-color: #636363; + color: #fff; +} + +.sidebar-name:hover, +#removing-widget { + color: #d54e21; +} + +#removing-widget span { + color: black; +} + +#widgets-left .sidebar-name-arrow { + background: transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -109px; +} + +#widgets-right .sidebar-name-arrow { + background: transparent url(../images/fav-arrow-vs.gif) no-repeat scroll 0 -1px; +} + +.in-widget-title { + color: #606060; +} + +.deleting .widget-title * { + color: #aaa; +} + +.imgedit-menu div { + border-color: #d5d5d5; + background-color: #f1f1f1; +} + +.imgedit-menu div:hover { + border-color: #c1c1c1; + background-color: #eaeaea; +} + +.imgedit-menu div.disabled { + border-color: #ccc; + background-color: #ddd; + filter: alpha(opacity=50); + opacity: 0.5; +} + +#dashboard_recent_comments div.undo { + border-top-color: #dfdfdf; +} + +.comment-ays, +.comment-ays th { + border-color: #ddd; +} + +.comment-ays th { + background-color: #f1f1f1; +} diff --git a/wp-admin/css/colors-fresh.css b/wp-admin/css/colors-fresh.css index 7b73e98c..f9448c8d 100644 --- a/wp-admin/css/colors-fresh.css +++ b/wp-admin/css/colors-fresh.css @@ -1,1660 +1 @@ -html { - background-color: #f9f9f9; -} - -* html input, -* html .widget { - border-color: #dfdfdf; -} - -textarea, -input, -select { - border-color: #DFDFDF; -} - -kbd, -code { - background: #eaeaea; -} - -input[readonly] { - background-color: #eee; -} - -.find-box-search { - border-color: #dfdfdf; - background-color: #f1f1f1; -} - -.find-box { - background-color: #f1f1f1; -} - -.find-box-inside { - background-color: #fff; -} - -a.page-numbers:hover { - border-color: #999; -} - -body, -#wpbody, -.form-table .pre { - color: #333; -} - -body > #upload-menu { - border-bottom-color: #fff; -} - -#postcustomstuff table, -#your-profile fieldset, -#rightnow, -div.dashboard-widget, -#dashboard-widgets p.dashboard-widget-links, -#replyrow #ed_reply_toolbar input { - border-color: #ccc; -} - -#poststuff .inside label.spam { - color: red; -} - -#poststuff .inside label.waiting { - color: orange; -} - -#poststuff .inside label.approved { - color: green; -} - -#postcustomstuff table { - border-color: #dfdfdf; - background-color: #F9F9F9; -} - -#postcustomstuff thead th { - background-color: #F1F1F1; -} - -#postcustomstuff table input, -#postcustomstuff table textarea { - border-color: #dfdfdf; - background-color: #fff; -} - -.widefat { - border-color: #dfdfdf; - background-color: #fff; -} - -div.dashboard-widget-error { - background-color: #c43; -} - -div.dashboard-widget-notice { - background-color: #cfe1ef; -} - -div.dashboard-widget-submit { - border-top-color: #ccc; -} - -div.tabs-panel, -ul#category-tabs li.tabs { - border-color: #dfdfdf; -} - -ul#category-tabs li.tabs { - background-color: #f1f1f1; -} - -input.disabled, -textarea.disabled { - background-color: #ccc; -} -/* #upload-menu li a.upload-tab-link, */ -.login #backtoblog a:hover, -#plugin-information .action-button a, -#plugin-information .action-button a:hover, -#plugin-information .action-button a:visited { - color: #fff; -} - -.widget .widget-top, -.postbox h3, -.stuffbox h3 { - background: #dfdfdf url("../images/gray-grad.png") repeat-x left top; - text-shadow: #fff 0 1px 0; -} - -.form-table th, -.form-wrap label { - color: #222; - text-shadow: #fff 0 1px 0; -} - -.description, -.form-wrap p { - color: #666; -} - -strong .post-com-count span { - background-color: #21759b; -} - -.sorthelper { - background-color: #ccf3fa; -} - -.ac_match, -.subsubsub a.current { - color: #000; -} - -.wrap h2 { - color: #464646; -} - -.ac_over { - background-color: #f0f0b8; -} - -.ac_results { - background-color: #fff; - border-color: #808080; -} - -.ac_results li { - color: #101010; -} - -.alternate, -.alt { - background-color: #f9f9f9; -} - -.available-theme a.screenshot { - background-color: #f1f1f1; - border-color: #ddd; -} - -.bar { - background-color: #e8e8e8; - border-right-color: #99d; -} - -#media-upload { - background: #fff; -} - -#media-upload .slidetoggle { - border-top-color: #dfdfdf; -} - -.error, -#login #login_error { - background-color: #ffebe8; - border-color: #c00; -} - -.error a { - color: #c00; -} - -.form-invalid { - background-color: #ffebe8 !important; -} - -.form-invalid input { - border-color: #c00 !important; -} - -.submit { - border-color: #DFDFDF; -} - -.highlight { - background-color: #e4f2fd; - color: #d54e21; -} - -.howto, -.nonessential, -#edit-slug-box, -.form-input-tip, -.rss-widget span.rss-date, -.subsubsub { - color: #666; -} - -.media-item { - border-bottom-color: #dfdfdf; -} - -#wpbody-content #media-items .describe { - border-top-color: #dfdfdf; -} - -.describe input[type="text"], -.describe textarea { - border-color: #dfdfdf; -} - -.media-upload-form label.form-help, -td.help { - color: #9a9a9a; -} - -.post-com-count { - background-image: url(../images/bubble_bg.gif); - color: #fff; -} - -.post-com-count span { - background-color: #bbb; - color: #fff; -} - -.post-com-count:hover span { - background-color: #d54e21; -} - -.quicktags, .search { - background-color: #ccc; - color: #000; -} - -.side-info h5 { - border-bottom-color: #dadada; -} - -.side-info ul { - color: #666; -} - -.button, -.button-secondary, -.submit input, -input[type=button], -input[type=submit] { - border-color: #bbb; - color: #464646; -} - -.button:hover, -.button-secondary:hover, -.submit input:hover, -input[type=button]:hover, -input[type=submit]:hover { - color: #000; - border-color: #666; -} - -.button, -.submit input, -.button-secondary { - background: #f2f2f2 url(../images/white-grad.png) repeat-x scroll left top; -} - -.button:active, -.submit input:active, -.button-secondary:active { - background: #eee url(../images/white-grad-active.png) repeat-x scroll left top; -} - -.button-primary, -.submit .button-primary, -#login form .submit input { - border-color: #298cba !important; - font-weight: bold; - color: #FFF !important; - background: #21759B url(../images/button-grad.png) repeat-x scroll left top; -} - -.button-primary:active, -#login form .submit input:active { - background: #21759b url(../images/button-grad-active.png) repeat-x scroll left top !important; -} - -.button[disabled], -.button:disabled, -.button-secondary[disabled], -.button-secondary:disabled, -a.button.disabled { - color: #ccc !important; - border-color: #ccc; -} - -.button-primary[disabled], -.button-primary:disabled { - color: #2fa0d5 !important; -} - -a:active, -a:focus { - color: #d54e21; -} - -a:hover, -#wphead #viewsite a:hover, -#adminmenu a:hover, -#adminmenu ul.wp-submenu a:hover, -#the-comment-list .comment a:hover, -#rightnow a:hover, -#login form .submit input:hover, -#media-upload a.del-link:hover, -div.dashboard-widget-submit input:hover, -.subsubsub a:hover, -.subsubsub a.current:hover, -.ui-tabs-nav a:hover, -.plugins .inactive a:hover, -#all-plugins-table .plugins .inactive a:hover, -#search-plugins-table .plugins .inactive a:hover { - color: #d54e21; -} - -#the-comment-list .comment-item, -#dashboard-widgets #dashboard_quick_press form p.submit { - border-color: #dfdfdf; -} - -.button-primary:hover, -#login form .submit input:hover { - border-color: #13455b !important; - color: #EAF2FA !important; -} - -#side-sortables #category-tabs .tabs a { - color: #333; -} - -#rightnow .rbutton { - background-color: #ebebeb; - color: #264761; -} - -.submitbox .submit { - background-color: #464646; - color: #ccc; -} - -.plugins a.delete:hover, -#all-plugins-table .plugins a.delete:hover, -#search-plugins-table .plugins a.delete:hover, -.submitbox .submitdelete, -a.delete { - color: #f00; - border-bottom-color: #f00; -} - -.submitbox .submitdelete:hover, -#media-items a.delete:hover { - color: #fff; - background-color: #f00; - border-bottom-color: #f00; -} - -#normal-sortables .submitbox .submitdelete:hover { - color: #000; - background-color: #f00; - border-bottom-color: #f00; -} - -.tablenav .dots { - border-color: transparent; -} - -.tablenav .next, -.tablenav .prev { - border-color: transparent; - color: #21759b; -} - -.tablenav .next:hover, -.tablenav .prev:hover { - border-color: transparent; - color: #d54e21; -} - -.updated, -.login #login_error, -.login .message { - background-color: #ffffe0; - border-color: #e6db55; -} - -.update-message { - color: #000000; -} - -a.page-numbers { - border-bottom-color: #B8D3E2; -} - -.commentlist li { - border-bottom-color: #ccc; -} - -.widefat td, -.widefat th, -#install-plugins .plugins td, -#install-plugins .plugins th { - border-color: #dfdfdf; -} - -.widefat th { - text-shadow: rgba(255,255,255,0.8) 0 1px 0; -} - -.widefat thead tr th, -.widefat tfoot tr th, -h3.dashboard-widget-title, -h3.dashboard-widget-title span, -h3.dashboard-widget-title small, -.find-box-head { - color: #333; - background: #dfdfdf url(../images/gray-grad.png) repeat-x scroll left top; -} - -h3.dashboard-widget-title small a { - color: #d7d7d7; -} - -h3.dashboard-widget-title small a:hover { - color: #fff; -} - -a, -#adminmenu a, -#poststuff #edButtonPreview, -#poststuff #edButtonHTML, -#the-comment-list p.comment-author strong a, -#media-upload a.del-link, -#media-items a.delete, -.plugins a.delete, -.ui-tabs-nav a { - color: #21759b; -} - -/* Because we don't want visited on these links */ -body.press-this .tabs a, -body.press-this .tabs a:hover { - background-color: #fff; - border-color: #c6d9e9; - border-bottom-color: #fff; - color: #d54e21; -} - -#adminmenu #awaiting-mod, -#adminmenu .update-plugins, -#sidemenu a .update-plugins, -#rightnow .reallynow, -#plugin-information .action-button { - background-color: #d54e21; - color: #fff; -} - -#adminmenu li a:hover #awaiting-mod, -#adminmenu li a:hover .update-plugins, -#sidemenu li a:hover .update-plugins { - background-color: #264761; - color: #fff; -} - -#adminmenu li.current a #awaiting-mod, -#adminmenu li.current a .update-plugins, -#adminmenu li.wp-has-current-submenu a .update-plugins, -#adminmenu li.wp-has-current-submenu a .update-plugins { - background-color: #ddd; - color: #000; - text-shadow: none; - -moz-box-shadow: rgba(0,0,0,0.2) 0 -1px 0; - -khtml-box-shadow: rgba(0,0,0,0.2) 0 -1px 0; - -webkit-box-shadow: rgba(0,0,0,0.2) 0 -1px 0; - box-shadow: rgba(0,0,0,0.2) 0 -1px 0; -} - -#adminmenu li.current a:hover #awaiting-mod, -#adminmenu li.current a:hover .update-plugins, -#adminmenu li.wp-has-current-submenu a:hover #awaiting-mod, -#adminmenu li.wp-has-current-submenu a:hover .update-plugins { - background-color: #264761; - color: #fff; -} - -div#media-upload-header, -div#plugin-information-header { - background-color: #f9f9f9; - border-bottom-color: #dfdfdf; -} - -#currenttheme img { - border-color: #666; -} - -#dashboard_secondary div.dashboard-widget-content ul li a { - background-color: #f9f9f9; -} - -input.readonly, textarea.readonly { - background-color: #ddd; -} - -#ed_toolbar input, -#ed_reply_toolbar input { - background: #fff url("../images/fade-butt.png") repeat-x 0 -2px; -} - -#editable-post-name { - background-color: #fffbcc; -} - -#edit-slug-box strong, -.tablenav .displaying-num, -#submitted-on { - color: #777; -} - -.login #nav a { - color: #21759b !important; -} - -.login #nav a:hover { - color: #d54e21 !important; -} - -#footer, -#footer-upgrade { - background: #464646; - color: #999; -} - -#media-items { - border-color: #dfdfdf; -} - -.checkbox, -.side-info, -.plugins tr, -#your-profile #rich_editing { - background-color: #fff; -} - -.plugins .inactive, -.plugins .inactive th, -.plugins .inactive td, -tr.inactive + tr.plugin-update-tr .plugin-update { - background-color: #eee; -} - -.plugin-update-tr .update-message { - background-color: #fffbe4; - border-color: #dfdfdf; -} - -.plugins .active, -.plugins .active th, -.plugins .active td { - color: #000; -} - -.plugins .inactive a { - color: #557799; -} - -#the-comment-list .unapproved, -#the-comment-list .unapproved th, -#the-comment-list .unapproved td { - background-color: #ffffe0; -} - -#the-comment-list .approve a { - color: #006505; -} - -#the-comment-list .unapprove a { - color: #d98500; -} - -#the-comment-list .delete a { - color: #bc0b0b; -} - -.widget, -#widget-list .widget-top, -.postbox, -#titlediv, -#poststuff .postarea, -.stuffbox { - border-color: #dfdfdf; -} - -.widget, -.postbox { - background-color: #fff; -} - -.ui-sortable .postbox h3 { - color: #464646; -} - -.widget .widget-top, -.ui-sortable .postbox h3:hover { - color: #000; -} - -.curtime #timestamp { - background-image: url(../images/date-button.gif); -} - -#quicktags #ed_link { - color: #00f; -} - -#rightnow .youhave { - background-color: #f0f6fb; -} - -#rightnow a { - color: #448abd; -} - -.tagchecklist span a, -#bulk-titles div a { - background: url(../images/xit.gif) no-repeat; -} - -.tagchecklist span a:hover, -#bulk-titles div a:hover { - background: url(../images/xit.gif) no-repeat -10px 0; -} - -#update-nag { - background-color: #fffeeb; - border-color: #ccc; - color: #555; -} - -.login #backtoblog a { - color: #ccc; -} - -#wphead { - background-color: #464646; -} - -body.login { - border-top-color: #464646; -} - -#wphead h1 a { - color: #fff; -} - -#login form input { - color: #555; -} - -#user_info { - color: #999; -} - -#user_info a:link, -#user_info a:visited, -#footer a:link, -#footer a:visited { - color: #ccc; - text-decoration: none; -} - -#user_info a:hover, -#footer a:hover { - color: #fff; - text-decoration: underline !important; -} - -#user_info a:active, -#footer a:active { - color: #ccc !important; -} - -div#media-upload-error, -.file-error, -abbr.required, -.widget-control-remove:hover, -.delete a:hover { - color: #f00; -} - -#pass-strength-result { - background-color: #eee; - border-color: #ddd !important; -} - -#pass-strength-result.bad { - background-color: #ffb78c; - border-color: #ff853c !important; -} - -#pass-strength-result.good { - background-color: #ffec8b; - border-color: #fc0 !important; -} - -#pass-strength-result.short { - background-color: #ffa0a0; - border-color: #f04040 !important; -} - -#pass-strength-result.strong { - background-color: #c3ff88; - border-color: #8dff1c !important; -} - -/* editors */ -#quicktags { - border-color: #dfdfdf; - background-color: #dfdfdf; -} - -#ed_toolbar input { - border-color: #C3C3C3; -} - -#ed_toolbar input:hover { - border-color: #aaa; - background: #ddd; -} - -#poststuff .wp_themeSkin .mceStatusbar { - border-color: #EDEDED; -} - -#poststuff #edButtonPreview, -#poststuff #edButtonHTML { - background-color: #f1f1f1; - border-color: #dfdfdf; - color: #999; -} - -#poststuff #editor-toolbar .active { - border-bottom-color: #e9e9e9; - background-color: #e9e9e9; - color: #333; -} - -/* TinyMCE */ -#post-status-info { - background-color: #EDEDED; -} - -.wp_themeSkin *, -.wp_themeSkin a:hover, -.wp_themeSkin a:link, -.wp_themeSkin a:visited, -.wp_themeSkin a:active { - color: #000; -} - -/* Containers */ -.wp_themeSkin iframe { - background: #fff; -} - -/* Layout */ -.wp_themeSkin .mceStatusbar { - color: #000; - background-color: #f5f5f5; -} - -/* Button */ -.wp_themeSkin .mceButton { - background-color: #e9e8e8; - border-color: #B2B2B2; -} - -.wp_themeSkin a.mceButtonEnabled:hover, -.wp_themeSkin a.mceButtonActive, -.wp_themeSkin a.mceButtonSelected { - background-color: #d5d5d5; - border-color: #777 !important; -} - -.wp_themeSkin .mceButtonDisabled { - border-color: #ccc !important; -} - -/* ListBox */ -.wp_themeSkin .mceListBox .mceText, -.wp_themeSkin .mceListBox .mceOpen { - border-color: #B2B2B2; - background-color: #d5d5d5; -} - -.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen, -.wp_themeSkin .mceListBoxHover .mceOpen, -.wp_themeSkin .mceListBoxSelected .mceOpen, -.wp_themeSkin .mceListBoxSelected .mceText { - border-color: #777 !important; - background-color: #d5d5d5; -} - -.wp_themeSkin table.mceListBoxEnabled:hover .mceText, -.wp_themeSkin .mceListBoxHover .mceText { - border-color: #777 !important; -} - -.wp_themeSkin select.mceListBox { - border-color: #B2B2B2; - background-color: #fff; -} - -/* SplitButton */ -.wp_themeSkin .mceSplitButton a.mceAction, -.wp_themeSkin .mceSplitButton a.mceOpen { - border-color: #B2B2B2; -} - -.wp_themeSkin .mceSplitButton a.mceOpen:hover, -.wp_themeSkin .mceSplitButtonSelected a.mceOpen, -.wp_themeSkin table.mceSplitButtonEnabled:hover a.mceAction, -.wp_themeSkin .mceSplitButton a.mceAction:hover { - background-color: #d5d5d5; - border-color: #777 !important; -} - -.wp_themeSkin .mceSplitButtonActive { - background-color: #B2B2B2; -} - -/* ColorSplitButton */ -.wp_themeSkin div.mceColorSplitMenu table { - background-color: #ebebeb; - border-color: #B2B2B2; -} - -.wp_themeSkin .mceColorSplitMenu a { - border-color: #B2B2B2; -} - -.wp_themeSkin .mceColorSplitMenu a.mceMoreColors { - border-color: #fff; -} - -.wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover { - border-color: #0A246A; - background-color: #B6BDD2; -} - -.wp_themeSkin a.mceMoreColors:hover { - border-color: #0A246A; -} - -/* Menu */ -.wp_themeSkin .mceMenu { - border-color: #ddd; -} - -.wp_themeSkin .mceMenu table { - background-color: #ebeaeb; -} - -.wp_themeSkin .mceMenu .mceText { - color: #000; -} - -.wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover, -.wp_themeSkin .mceMenu .mceMenuItemActive { - background-color: #f5f5f5; -} -.wp_themeSkin td.mceMenuItemSeparator { - background-color: #aaa; -} -.wp_themeSkin .mceMenuItemTitle a { - background-color: #ccc; - border-bottom-color: #aaa; -} -.wp_themeSkin .mceMenuItemTitle span.mceText { - color: #000; -} -.wp_themeSkin .mceMenuItemDisabled .mceText { - color: #888; -} - -.wp_themeSkin tr.mceFirst td.mceToolbar { - background: #dfdfdf url("../images/ed-bg.gif") repeat-x scroll left top; - border-color: #dfdfdf; -} - -.wp-admin #mceModalBlocker { - background: #000; -} - -.wp-admin .clearlooks2 .mceFocus .mceTop .mceLeft { - background: #444444; - border-left: 1px solid #999; - border-top: 1px solid #999; - -moz-border-radius: 4px 0 0 0; - -webkit-border-top-left-radius: 4px; - -khtml-border-top-left-radius: 4px; - border-top-left-radius: 4px; -} - -.wp-admin .clearlooks2 .mceFocus .mceTop .mceRight { - background: #444444; - border-right: 1px solid #999; - border-top: 1px solid #999; - border-top-right-radius: 4px; - -khtml-border-top-right-radius: 4px; - -webkit-border-top-right-radius: 4px; - -moz-border-radius: 0 4px 0 0; -} - -.wp-admin .clearlooks2 .mceMiddle .mceLeft { - background: #f1f1f1; - border-left: 1px solid #999; -} - -.wp-admin .clearlooks2 .mceMiddle .mceRight { - background: #f1f1f1; - border-right: 1px solid #999; -} - -.wp-admin .clearlooks2 .mceBottom { - background: #f1f1f1; - border-bottom: 1px solid #999; -} - -.wp-admin .clearlooks2 .mceBottom .mceLeft { - background: #f1f1f1; - border-bottom: 1px solid #999; - border-left: 1px solid #999; -} - -.wp-admin .clearlooks2 .mceBottom .mceCenter { - background: #f1f1f1; - border-bottom: 1px solid #999; -} - -.wp-admin .clearlooks2 .mceBottom .mceRight { - background: #f1f1f1; - border-bottom: 1px solid #999; - border-right: 1px solid #999; -} - -.wp-admin .clearlooks2 .mceFocus .mceTop span { - color: #e5e5e5; -} -/* end TinyMCE */ - -#editorcontainer, -#post-status-info, -#titlediv #title, -.editwidget .widget-inside { - border-color: #dfdfdf; -} - -#titlediv #title { - background-color: #fff; -} - -#tTips p#tTips_inside { - background-color: #ddd; - color: #333; -} - -#timestampdiv input, -#namediv input, -#poststuff .inside .the-tagcloud { - border-color: #ddd; -} - -/* menu */ -#adminmenu * { - border-color: #e3e3e3; -} - -#adminmenu li.wp-menu-separator { - background: transparent url(../images/menu-arrows.gif) no-repeat scroll left 5px; -} - -.folded #adminmenu li.wp-menu-separator { - background: transparent url(../images/menu-arrows.gif) no-repeat scroll right -34px; -} - -#adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle, -#adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle { - background: transparent url(../images/menu-bits.gif) no-repeat scroll left -207px; -} - -#adminmenu .wp-has-submenu:hover .wp-menu-toggle, -#adminmenu .wp-menu-open .wp-menu-toggle { - background: transparent url(../images/menu-bits.gif) no-repeat scroll left -109px; -} - -#adminmenu a.menu-top { - background: #f1f1f1 url(../images/menu-bits.gif) repeat-x scroll left -379px; -} - -#adminmenu .wp-submenu a { - background: #FFFFFF url(../images/menu-bits.gif) no-repeat scroll 0 -310px; -} - -#adminmenu .wp-has-current-submenu ul li a { - background: none; -} - -#adminmenu .wp-has-current-submenu ul li a.current { - background: url(../images/menu-dark.gif) top left no-repeat !important; -} - -#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, -#adminmenu .menu-top .current { - background: #6d6d6d url(../images/menu-bits.gif) top left repeat-x; - border-color: #6d6d6d; - color: #fff; - text-shadow: rgba(0,0,0,0.4) 0px -1px 0px; -} - -#adminmenu li.wp-has-current-submenu .wp-submenu, -#adminmenu li.wp-has-current-submenu ul li a { - border-color: #aaa !important; -} - -#adminmenu li.wp-has-current-submenu ul li a { - background: url(../images/menu-dark.gif) bottom left no-repeat !important; -} - -#adminmenu li.wp-has-current-submenu ul { - border-bottom-color: #aaa; -} - -#adminmenu li.menu-top .current:hover { - border-color: #B5B5B5; -} - -#adminmenu .wp-submenu .current a.current { - background: transparent url(../images/menu-bits.gif) no-repeat scroll 0 -289px; -} - -#adminmenu .wp-submenu a:hover { - background-color: #EAF2FA !important; - color: #333 !important; -} - -#adminmenu .wp-submenu li.current, -#adminmenu .wp-submenu li.current a, -#adminmenu .wp-submenu li.current a:hover { - color: #333; - background-color: #f5f5f5; - background-image: none; - border-color: #e3e3e3; - text-shadow: rgba(255,255,255,1) 0px 1px 0px; -} - -#adminmenu .wp-submenu ul { - background-color: #fff; -} - -.folded #adminmenu li.menu-top, -#adminmenu .wp-submenu .wp-submenu-head { - background-color: #F1F1F1; -} - -.folded #adminmenu li.wp-has-current-submenu, -.folded #adminmenu li.menu-top.current { - background-color: #e6e6e6; -} - -#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head { - background-color: #EAEAEA; - border-color: #aaa; -} - -#adminmenu div.wp-submenu { - background-color: transparent; -} - -/* menu icons */ -#adminmenu #menu-dashboard div.wp-menu-image { - background: transparent url("../images/menu.png") no-repeat scroll -61px -33px; -} - -#adminmenu #menu-dashboard:hover div.wp-menu-image, -#adminmenu #menu-dashboard.wp-has-current-submenu div.wp-menu-image, -#adminmenu #menu-dashboard.current div.wp-menu-image { - background: transparent url("../images/menu.png") no-repeat scroll -61px -1px; -} - -#adminmenu #menu-posts div.wp-menu-image { - background: transparent url("../images/menu.png") no-repeat scroll -272px -33px; -} - -#adminmenu #menu-posts:hover div.wp-menu-image, -#adminmenu #menu-posts.wp-has-current-submenu div.wp-menu-image { - background: transparent url("../images/menu.png") no-repeat scroll -272px -1px; -} - -#adminmenu #menu-media div.wp-menu-image { - background: transparent url("../images/menu.png") no-repeat scroll -121px -33px; -} - -#adminmenu #menu-media:hover div.wp-menu-image, -#adminmenu #menu-media.wp-has-current-submenu div.wp-menu-image { - background: transparent url("../images/menu.png") no-repeat scroll -121px -1px; -} - -#adminmenu #menu-links div.wp-menu-image { - background: transparent url("../images/menu.png") no-repeat scroll -91px -33px; -} - -#adminmenu #menu-links:hover div.wp-menu-image, -#adminmenu #menu-links.wp-has-current-submenu div.wp-menu-image { - background: transparent url("../images/menu.png") no-repeat scroll -91px -1px; -} - -#adminmenu #menu-pages div.wp-menu-image { - background: transparent url("../images/menu.png") no-repeat scroll -151px -33px; -} - -#adminmenu #menu-pages:hover div.wp-menu-image, -#adminmenu #menu-pages.wp-has-current-submenu div.wp-menu-image { - background: transparent url("../images/menu.png") no-repeat scroll -151px -1px; -} - -#adminmenu #menu-comments div.wp-menu-image { - background: transparent url("../images/menu.png") no-repeat scroll -31px -33px; -} - -#adminmenu #menu-comments:hover div.wp-menu-image, -#adminmenu #menu-comments.wp-has-current-submenu div.wp-menu-image, -#adminmenu #menu-comments.current div.wp-menu-image { - background: transparent url("../images/menu.png") no-repeat scroll -31px -1px; -} - -#adminmenu #menu-appearance div.wp-menu-image { - background: transparent url("../images/menu.png") no-repeat scroll -1px -33px; -} - -#adminmenu #menu-appearance:hover div.wp-menu-image, -#adminmenu #menu-appearance.wp-has-current-submenu div.wp-menu-image { - background: transparent url("../images/menu.png") no-repeat scroll -1px -1px; -} - -#adminmenu #menu-plugins div.wp-menu-image { - background: transparent url("../images/menu.png") no-repeat scroll -181px -33px; -} - -#adminmenu #menu-plugins:hover div.wp-menu-image, -#adminmenu #menu-plugins.wp-has-current-submenu div.wp-menu-image { - background: transparent url("../images/menu.png") no-repeat scroll -181px -1px; -} - -#adminmenu #menu-users div.wp-menu-image { - background: transparent url("../images/menu.png") no-repeat scroll -301px -33px; -} - -#adminmenu #menu-users:hover div.wp-menu-image, -#adminmenu #menu-users.wp-has-current-submenu div.wp-menu-image { - background: transparent url("../images/menu.png") no-repeat scroll -301px -1px; -} - -#adminmenu #menu-tools div.wp-menu-image { - background: transparent url("../images/menu.png") no-repeat scroll -211px -33px; -} - -#adminmenu #menu-tools:hover div.wp-menu-image, -#adminmenu #menu-tools.wp-has-current-submenu div.wp-menu-image { - background: transparent url("../images/menu.png") no-repeat scroll -211px -1px; -} - -#adminmenu #menu-settings div.wp-menu-image { - background: transparent url("../images/menu.png") no-repeat scroll -241px -33px; -} - -#adminmenu #menu-settings:hover div.wp-menu-image, -#adminmenu #menu-settings.wp-has-current-submenu div.wp-menu-image { - background: transparent url("../images/menu.png") no-repeat scroll -241px -1px; -} -/* end menu */ - - -/* Diff */ -table.diff .diff-deletedline { - background-color: #ffdddd; -} - -table.diff .diff-deletedline del { - background-color: #ff9999; -} - -table.diff .diff-addedline { - background-color: #ddffdd; -} - -table.diff .diff-addedline ins { - background-color: #99ff99; -} - -#att-info { - background-color: #E4F2FD; -} - -/* edit image */ -#sidemenu a { - background-color: #f9f9f9; - border-color: #f9f9f9; - border-bottom-color: #dfdfdf; -} - -#sidemenu a.current { - background-color: #fff; - border-color: #dfdfdf #dfdfdf #fff; - color: #D54E21; -} - -#screen-options-wrap, -#contextual-help-wrap { - background-color: #f1f1f1; - border-color: #dfdfdf; -} - -#screen-meta-links a.show-settings { - color: #606060; -} - -#screen-meta-links a.show-settings:hover { - color: #000; -} - -#replysubmit { - background-color: #f1f1f1; - border-top-color: #ddd; -} - -#replyerror { - border-color: #ddd; - background-color: #f9f9f9; -} - -#edithead, -#replyhead { - background-color: #f1f1f1; -} - -#ed_reply_toolbar { - background-color: #e9e9e9; -} - -/* table vim shortcuts */ -.vim-current, -.vim-current th, -.vim-current td { - background-color: #E4F2FD !important; -} - -/* Install Plugins */ -.star-average, -.star.star-rating { - background-color: #fc0; -} - -div.star.select:hover { - background-color: #d00; -} - -#plugin-information .fyi ul { - background-color: #eaf3fa; -} - -#plugin-information .fyi h2.mainheader { - background-color: #cee1ef; -} - -#plugin-information pre, -#plugin-information code { - background-color: #ededff; -} - -#plugin-information pre { - border: 1px solid #ccc; -} - -/* inline editor */ -.inline-edit-row fieldset input[type="text"], -.inline-edit-row fieldset textarea, -#bulk-titles, -#replyrow input { - border-color: #ddd; -} - -.inline-editor div.title { - background-color: #EAF3FA; -} - -.inline-editor ul.cat-checklist { - background-color: #FFFFFF; - border-color: #ddd; -} - -.inline-editor .categories .catshow, -.inline-editor .categories .cathide { - color: #21759b; -} - -.inline-editor .quick-edit-save { - background-color: #f1f1f1; -} - -#replyrow #ed_reply_toolbar input:hover { - border-color: #aaa; - background: #ddd; -} - -fieldset.inline-edit-col-right .inline-edit-col { - border-color: #dfdfdf; -} - -.attention { - color: #D54E21; -} - -.meta-box-sortables .postbox:hover .handlediv { - background: transparent url(../images/menu-bits.gif) no-repeat scroll left -111px; -} - -#major-publishing-actions { - background: #eaf2fa; -} - -.tablenav .tablenav-pages { - color: #555; -} - -.tablenav .tablenav-pages a { - border-color: #e3e3e3; - background: #eee url('../images/menu-bits.gif') repeat-x scroll left -379px; -} - -.tablenav .tablenav-pages a:hover { - color: #d54e21; - border-color: #d54321; -} - -.tablenav .tablenav-pages a:active { - color: #fff !important; -} - -.tablenav .tablenav-pages .current { - background: #dfdfdf; - border-color: #d3d3d3; -} - -#availablethemes, -#availablethemes td { - border-color: #ddd; -} - -#current-theme img { - border-color: #999; -} - -#TB_window #TB_title a.tb-theme-preview-link, -#TB_window #TB_title a.tb-theme-preview-link:visited { - color: #999; -} - -#TB_window #TB_title a.tb-theme-preview-link:hover, -#TB_window #TB_title a.tb-theme-preview-link:focus { - color: #ccc; -} - -.misc-pub-section { - border-bottom-color: #eee; -} - -#minor-publishing { - border-bottom-color: #ddd; -} - -#post-body .misc-pub-section { - border-right-color: #eee; -} - -.post-com-count span { - background-color: #bbb; -} - -.form-table .color-palette td { - border-color: #fff; -} - -.sortable-placeholder { - border-color: #bbb; - background-color: #f5f5f5; -} - -#post-body ul#category-tabs li.tabs a { - color: #333; -} - -#wp_editimgbtn, -#wp_delimgbtn, -#wp_editgallery, -#wp_delgallery { - border-color: #999; - background-color: #eee; -} - -#wp_editimgbtn:hover, -#wp_delimgbtn:hover, -#wp_editgallery:hover, -#wp_delgallery:hover { - border-color: #555; - background-color: #ccc; -} - -#favorite-first { - background: #797979 url(../images/fav.png) repeat-x left center; - border-color: #777 !important; - border-bottom-color: #666 !important; -} - -#favorite-inside { - border-color: #797979; - background-color: #797979; -} - -#favorite-toggle { - background: transparent url(../images/fav-arrow.gif) no-repeat 0 -4px; -} - -#favorite-actions a { - color: #ddd; -} - -#favorite-actions a:hover { - color: #fff; -} - -#favorite-inside a:hover { - text-decoration: underline; -} - -#favorite-actions .slide-down { - border-bottom-color: #626262; -} - -.submit input, -.button, -.button-primary, -.button-secondary, -.button-highlighted, -#postcustomstuff .submit input { - text-shadow: rgba(255,255,255,1) 0 1px 0; -} - -.button-primary, -.submit .button-primary { - text-shadow: rgba(0,0,0,0.3) 0 -1px 0; -} - -#screen-meta a.show-settings { - background-color: transparent; - text-shadow: rgba(255,255,255,0.7) 0 1px 0; -} - -#icon-edit, -#icon-post { - background: transparent url(../images/icons32.png) no-repeat -552px -5px; -} - -#icon-index { - background: transparent url(../images/icons32.png) no-repeat -137px -5px; -} - -#icon-upload { - background: transparent url(../images/icons32.png) no-repeat -251px -5px; -} - -#icon-link-manager, -#icon-link, -#icon-link-category { - background: transparent url(../images/icons32.png) no-repeat -190px -5px; -} - -#icon-edit-pages, -#icon-page { - background: transparent url(../images/icons32.png) no-repeat -312px -5px; -} - -#icon-edit-comments { - background: transparent url(../images/icons32.png) no-repeat -72px -5px; -} - -#icon-themes { - background: transparent url(../images/icons32.png) no-repeat -11px -5px; -} - -#icon-plugins { - background: transparent url(../images/icons32.png) no-repeat -370px -5px; -} - -#icon-users, -#icon-profile, -#icon-user-edit { - background: transparent url(../images/icons32.png) no-repeat -600px -5px; -} - -#icon-tools, -#icon-admin { - background: transparent url(../images/icons32.png) no-repeat -432px -5px; -} - -#icon-options-general { - background: transparent url(../images/icons32.png) no-repeat -492px -5px; -} - -.view-switch #view-switch-list { - background: transparent url(../images/list.png) no-repeat 0 0; -} - -.view-switch #view-switch-list.current { - background: transparent url(../images/list.png) no-repeat -40px 0; -} - -.view-switch #view-switch-excerpt { - background: transparent url(../images/list.png) no-repeat -20px 0; -} - -.view-switch #view-switch-excerpt.current { - background: transparent url(../images/list.png) no-repeat -60px 0; -} - -#header-logo { - background: transparent url(../images/wp-logo.gif) no-repeat scroll center center; -} - -#wphead #site-visit-button { - background-color:#585858; - background-image: url(../images/visit-site-button-grad.gif); - color:#aaa; - text-shadow: #3F3F3F 0 -1px 0; -} - -#wphead a:hover #site-visit-button { - color:#fff; -} - -#wphead a:focus #site-visit-button, -#wphead a:active #site-visit-button { - background-position:0 -27px; -} - -.popular-tags, -.feature-filter { - background-color: #FFFFFF; - border-color: #DFDFDF; -} - -#theme-information .action-button { - border-top-color: #DFDFDF; -} - -.theme-listing br.line { - border-bottom-color: #ccc; -} - -div.widgets-sortables, -#widgets-left .inactive { - background-color: #f1f1f1; - border-color: #ddd; -} - -#available-widgets .widget-holder { - background-color: #fff; - border-color: #ddd; -} - -#widgets-left .sidebar-name { - background-color: #aaa; - background-image: url(../images/ed-bg.gif); - text-shadow: #FFFFFF 0 1px 0; - border-color: #dfdfdf; -} - -#widgets-right .sidebar-name { - background-image: url(../images/fav.png); - text-shadow: #3f3f3f 0 -1px 0; - background-color: #636363; - border-color: #636363; - color: #fff; -} - -.sidebar-name:hover, -#removing-widget { - color: #d54e21; -} - -#removing-widget span { - color: black; -} - -#widgets-left .sidebar-name-arrow { - background: transparent url(../images/menu-bits.gif) no-repeat scroll left -109px; -} - -#widgets-right .sidebar-name-arrow { - background: transparent url(../images/fav-arrow.gif) no-repeat scroll 0 -1px; -} - -.in-widget-title { - color: #606060; -} - -.deleting .widget-title * { - color: #aaa; -} +html{background-color:#f9f9f9;}* html input,* html .widget{border-color:#dfdfdf;}textarea,input[type="text"],input[type="password"],input[type="file"],input[type="button"],input[type="submit"],input[type="reset"],select{border-color:#dfdfdf;background-color:#fff;}kbd,code{background:#eaeaea;}input[readonly]{background-color:#eee;}.find-box-search{border-color:#dfdfdf;background-color:#f1f1f1;}.find-box{background-color:#f1f1f1;}.find-box-inside{background-color:#fff;}a.page-numbers:hover{border-color:#999;}body,#wpbody,.form-table .pre{color:#333;}body>#upload-menu{border-bottom-color:#fff;}#postcustomstuff table,#your-profile fieldset,#rightnow,div.dashboard-widget,#dashboard-widgets p.dashboard-widget-links,#replyrow #ed_reply_toolbar input{border-color:#ccc;}#poststuff .inside label.spam,#poststuff .inside label.deleted{color:red;}#poststuff .inside label.waiting{color:orange;}#poststuff .inside label.approved{color:green;}#postcustomstuff table{border-color:#dfdfdf;background-color:#F9F9F9;}#postcustomstuff thead th{background-color:#F1F1F1;}#postcustomstuff table input,#postcustomstuff table textarea{border-color:#dfdfdf;background-color:#fff;}.widefat{border-color:#dfdfdf;background-color:#fff;}div.dashboard-widget-error{background-color:#c43;}div.dashboard-widget-notice{background-color:#cfe1ef;}div.dashboard-widget-submit{border-top-color:#ccc;}div.tabs-panel,ul#category-tabs li.tabs{border-color:#dfdfdf;}ul#category-tabs li.tabs{background-color:#f1f1f1;}input.disabled,textarea.disabled{background-color:#ccc;}.login #backtoblog a:hover,#plugin-information .action-button a,#plugin-information .action-button a:hover,#plugin-information .action-button a:visited{color:#fff;}.widget .widget-top,.postbox h3,.stuffbox h3{background:#dfdfdf url("../images/gray-grad.png") repeat-x left top;text-shadow:#fff 0 1px 0;}.form-table th,.form-wrap label{color:#222;text-shadow:#fff 0 1px 0;}.description,.form-wrap p{color:#666;}strong .post-com-count span{background-color:#21759b;}.sorthelper{background-color:#ccf3fa;}.ac_match,.subsubsub a.current{color:#000;}.wrap h2{color:#464646;}.ac_over{background-color:#f0f0b8;}.ac_results{background-color:#fff;border-color:#808080;}.ac_results li{color:#101010;}.alternate,.alt{background-color:#f9f9f9;}.available-theme a.screenshot{background-color:#f1f1f1;border-color:#ddd;}.bar{background-color:#e8e8e8;border-right-color:#99d;}#media-upload,#media-upload .media-item .slidetoggle{background:#fff;}#media-upload .slidetoggle{border-top-color:#dfdfdf;}.error,.login #login_error{background-color:#ffebe8;border-color:#c00;}.error a{color:#c00;}.form-invalid{background-color:#ffebe8!important;}.form-invalid input,.form-invalid select{border-color:#c00!important;}.submit{border-color:#DFDFDF;}.highlight{background-color:#e4f2fd;color:#d54e21;}.howto,.nonessential,#edit-slug-box,.form-input-tip,.rss-widget span.rss-date,.subsubsub{color:#666;}.media-item{border-bottom-color:#dfdfdf;}#wpbody-content #media-items .describe{border-top-color:#dfdfdf;}.media-upload-form label.form-help,td.help{color:#9a9a9a;}.post-com-count{background-image:url(../images/bubble_bg.gif);color:#fff;}.post-com-count span{background-color:#bbb;color:#fff;}.post-com-count:hover span{background-color:#d54e21;}.quicktags,.search{background-color:#ccc;color:#000;}.side-info h5{border-bottom-color:#dadada;}.side-info ul{color:#666;}.button,.button-secondary,.submit input,input[type=button],input[type=submit]{border-color:#bbb;color:#464646;}.button:hover,.button-secondary:hover,.submit input:hover,input[type=button]:hover,input[type=submit]:hover{color:#000;border-color:#666;}.button,.submit input,.button-secondary{background:#f2f2f2 url(../images/white-grad.png) repeat-x scroll left top;text-shadow:rgba(255,255,255,1) 0 1px 0;}.button:active,.submit input:active,.button-secondary:active{background:#eee url(../images/white-grad-active.png) repeat-x scroll left top;}input.button-primary,button.button-primary,a.button-primary{border-color:#298cba;font-weight:bold;color:#fff;background:#21759B url(../images/button-grad.png) repeat-x scroll left top;text-shadow:rgba(0,0,0,0.3) 0 -1px 0;}input.button-primary:active,button.button-primary:active,a.button-primary:active{background:#21759b url(../images/button-grad-active.png) repeat-x scroll left top;color:#eaf2fa;}input.button-primary:hover,button.button-primary:hover,a.button-primary:hover,a.button-primary:focus,a.button-primary:active{border-color:#13455b;color:#eaf2fa;}.button-disabled,.button[disabled],.button:disabled,.button-secondary[disabled],.button-secondary:disabled,a.button.disabled{color:#aaa!important;border-color:#ddd!important;}.button-primary-disabled,.button-primary[disabled],.button-primary:disabled{color:#9FD0D5!important;background:#298CBA!important;}a:hover,a:active,a:focus{color:#d54e21;}#wphead #viewsite a:hover,#adminmenu a:hover,#adminmenu ul.wp-submenu a:hover,#the-comment-list .comment a:hover,#rightnow a:hover,#media-upload a.del-link:hover,div.dashboard-widget-submit input:hover,.subsubsub a:hover,.subsubsub a.current:hover,.ui-tabs-nav a:hover,.plugins .inactive a:hover,#all-plugins-table .plugins .inactive a:hover,#search-plugins-table .plugins .inactive a:hover{color:#d54e21;}#the-comment-list .comment-item,#dashboard-widgets #dashboard_quick_press form p.submit{border-color:#dfdfdf;}#side-sortables #category-tabs .tabs a{color:#333;}#rightnow .rbutton{background-color:#ebebeb;color:#264761;}.submitbox .submit{background-color:#464646;color:#ccc;}.plugins a.delete:hover,#all-plugins-table .plugins a.delete:hover,#search-plugins-table .plugins a.delete:hover,.submitbox .submitdelete{color:#f00;border-bottom-color:#f00;}.submitbox .submitdelete:hover,#media-items a.delete:hover{color:#fff;background-color:#f00;border-bottom-color:#f00;}#normal-sortables .submitbox .submitdelete:hover{color:#000;background-color:#f00;border-bottom-color:#f00;}.tablenav .dots{border-color:transparent;}.tablenav .next,.tablenav .prev{border-color:transparent;color:#21759b;}.tablenav .next:hover,.tablenav .prev:hover{border-color:transparent;color:#d54e21;}.updated,.login .message{background-color:#ffffe0;border-color:#e6db55;}.update-message{color:#000;}a.page-numbers{border-bottom-color:#B8D3E2;}.commentlist li{border-bottom-color:#ccc;}.widefat td,.widefat th,#install-plugins .plugins td,#install-plugins .plugins th{border-color:#dfdfdf;}.widefat th{text-shadow:rgba(255,255,255,0.8) 0 1px 0;}.widefat thead tr th,.widefat tfoot tr th,h3.dashboard-widget-title,h3.dashboard-widget-title span,h3.dashboard-widget-title small,.find-box-head{color:#333;background:#dfdfdf url(../images/gray-grad.png) repeat-x scroll left top;}h3.dashboard-widget-title small a{color:#d7d7d7;}h3.dashboard-widget-title small a:hover{color:#fff;}a,#adminmenu a,#poststuff #edButtonPreview,#poststuff #edButtonHTML,#the-comment-list p.comment-author strong a,#media-upload a.del-link,#media-items a.delete,.plugins a.delete,.ui-tabs-nav a{color:#21759b;}body.press-this .tabs a,body.press-this .tabs a:hover{background-color:#fff;border-color:#c6d9e9;border-bottom-color:#fff;color:#d54e21;}#adminmenu #awaiting-mod,#adminmenu .update-plugins,#sidemenu a .update-plugins,#rightnow .reallynow,#plugin-information .action-button{background-color:#d54e21;color:#fff;}#adminmenu li a:hover #awaiting-mod,#adminmenu li a:hover .update-plugins,#sidemenu li a:hover .update-plugins{background-color:#264761;color:#fff;}#adminmenu li.current a #awaiting-mod,#adminmenu li.current a .update-plugins,#adminmenu li.wp-has-current-submenu a .update-plugins,#adminmenu li.wp-has-current-submenu a .update-plugins{background-color:#ddd;color:#000;text-shadow:none;-moz-box-shadow:rgba(0,0,0,0.2) 0 -1px 0;-khtml-box-shadow:rgba(0,0,0,0.2) 0 -1px 0;-webkit-box-shadow:rgba(0,0,0,0.2) 0 -1px 0;box-shadow:rgba(0,0,0,0.2) 0 -1px 0;}#adminmenu li.current a:hover #awaiting-mod,#adminmenu li.current a:hover .update-plugins,#adminmenu li.wp-has-current-submenu a:hover #awaiting-mod,#adminmenu li.wp-has-current-submenu a:hover .update-plugins{background-color:#264761;color:#fff;}div#media-upload-header,div#plugin-information-header{background-color:#f9f9f9;border-bottom-color:#dfdfdf;}#currenttheme img{border-color:#666;}#dashboard_secondary div.dashboard-widget-content ul li a{background-color:#f9f9f9;}input.readonly,textarea.readonly{background-color:#ddd;}#ed_toolbar input,#ed_reply_toolbar input{background:#fff url("../images/fade-butt.png") repeat-x 0 -2px;}#editable-post-name{background-color:#fffbcc;}#edit-slug-box strong,.tablenav .displaying-num,#submitted-on{color:#777;}.login #nav a{color:#21759b!important;}.login #nav a:hover{color:#d54e21!important;}#footer,#footer-upgrade{background:#464646;color:#999;}#media-items,.imgedit-group{border-color:#dfdfdf;}.checkbox,.side-info,.plugins tr,#your-profile #rich_editing{background-color:#fff;}.plugins .inactive,.plugins .inactive th,.plugins .inactive td,tr.inactive+tr.plugin-update-tr .plugin-update{background-color:#eee;}.plugin-update-tr .update-message{background-color:#fffbe4;border-color:#dfdfdf;}.plugins .active,.plugins .active th,.plugins .active td{color:#000;}.plugins .inactive a{color:#579;}#the-comment-list tr.undo,#the-comment-list div.undo{background-color:#f4f4f4;}#the-comment-list .unapproved{background-color:#ffffe0;}#the-comment-list .approve a{color:#006505;}#the-comment-list .unapprove a{color:#d98500;}table.widefat span.delete a,table.widefat span.trash a,table.widefat span.spam a,#dashboard_recent_comments .delete a,#dashboard_recent_comments .trash a,#dashboard_recent_comments .spam a{color:#bc0b0b;}.widget,#widget-list .widget-top,.postbox,#titlediv,#poststuff .postarea,.stuffbox{border-color:#dfdfdf;}.widget,.postbox{background-color:#fff;}.ui-sortable .postbox h3{color:#464646;}.widget .widget-top,.ui-sortable .postbox h3:hover{color:#000;}.curtime #timestamp{background-image:url(../images/date-button.gif);}#quicktags #ed_link{color:#00f;}#rightnow .youhave{background-color:#f0f6fb;}#rightnow a{color:#448abd;}.tagchecklist span a,#bulk-titles div a{background:url(../images/xit.gif) no-repeat;}.tagchecklist span a:hover,#bulk-titles div a:hover{background:url(../images/xit.gif) no-repeat -10px 0;}#update-nag{background-color:#fffeeb;border-color:#ccc;color:#555;}.login #backtoblog a{color:#ccc;}#wphead{background-color:#464646;}body.login{border-top-color:#464646;}#wphead h1 a{color:#fff;}#user_info{color:#999;}#user_info a:link,#user_info a:visited,#footer a:link,#footer a:visited{color:#ccc;text-decoration:none;}#user_info a:hover,#footer a:hover{color:#fff;text-decoration:underline!important;}#user_info a:active,#footer a:active{color:#ccc!important;}div#media-upload-error,.file-error,abbr.required,.widget-control-remove:hover,table.widefat .delete a:hover,table.widefat .trash a:hover,table.widefat .spam a:hover,#dashboard_recent_comments .delete a:hover,#dashboard_recent_comments .trash a:hover #dashboard_recent_comments .spam a:hover{color:#f00;}#pass-strength-result{background-color:#eee;border-color:#ddd!important;}#pass-strength-result.bad{background-color:#ffb78c;border-color:#ff853c!important;}#pass-strength-result.good{background-color:#ffec8b;border-color:#fc0!important;}#pass-strength-result.short{background-color:#ffa0a0;border-color:#f04040!important;}#pass-strength-result.strong{background-color:#c3ff88;border-color:#8dff1c!important;}#quicktags{border-color:#dfdfdf;background-color:#dfdfdf;}#ed_toolbar input{border-color:#C3C3C3;}#ed_toolbar input:hover{border-color:#aaa;background:#ddd;}#poststuff .wp_themeSkin .mceStatusbar{border-color:#EDEDED;}#poststuff #edButtonPreview,#poststuff #edButtonHTML{background-color:#f1f1f1;border-color:#dfdfdf;color:#999;}#poststuff #editor-toolbar .active{border-bottom-color:#e9e9e9;background-color:#e9e9e9;color:#333;}#post-status-info{background-color:#EDEDED;}.wp_themeSkin *,.wp_themeSkin a:hover,.wp_themeSkin a:link,.wp_themeSkin a:visited,.wp_themeSkin a:active{color:#000;}.wp_themeSkin iframe{background:#fff;}.wp_themeSkin .mceStatusbar{color:#000;background-color:#f5f5f5;}.wp_themeSkin .mceButton{background-color:#e9e8e8;border-color:#B2B2B2;}.wp_themeSkin a.mceButtonEnabled:hover,.wp_themeSkin a.mceButtonActive,.wp_themeSkin a.mceButtonSelected{background-color:#d5d5d5;border-color:#777!important;}.wp_themeSkin .mceButtonDisabled{border-color:#ccc!important;}.wp_themeSkin .mceListBox .mceText,.wp_themeSkin .mceListBox .mceOpen{border-color:#B2B2B2;background-color:#d5d5d5;}.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen,.wp_themeSkin .mceListBoxHover .mceOpen,.wp_themeSkin .mceListBoxSelected .mceOpen,.wp_themeSkin .mceListBoxSelected .mceText{border-color:#777!important;background-color:#d5d5d5;}.wp_themeSkin table.mceListBoxEnabled:hover .mceText,.wp_themeSkin .mceListBoxHover .mceText{border-color:#777!important;}.wp_themeSkin select.mceListBox{border-color:#B2B2B2;background-color:#fff;}.wp_themeSkin .mceSplitButton a.mceAction,.wp_themeSkin .mceSplitButton a.mceOpen{border-color:#B2B2B2;}.wp_themeSkin .mceSplitButton a.mceOpen:hover,.wp_themeSkin .mceSplitButtonSelected a.mceOpen,.wp_themeSkin table.mceSplitButtonEnabled:hover a.mceAction,.wp_themeSkin .mceSplitButton a.mceAction:hover{background-color:#d5d5d5;border-color:#777!important;}.wp_themeSkin .mceSplitButtonActive{background-color:#B2B2B2;}.wp_themeSkin div.mceColorSplitMenu table{background-color:#ebebeb;border-color:#B2B2B2;}.wp_themeSkin .mceColorSplitMenu a{border-color:#B2B2B2;}.wp_themeSkin .mceColorSplitMenu a.mceMoreColors{border-color:#fff;}.wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover{border-color:#0A246A;background-color:#B6BDD2;}.wp_themeSkin a.mceMoreColors:hover{border-color:#0A246A;}.wp_themeSkin .mceMenu{border-color:#ddd;}.wp_themeSkin .mceMenu table{background-color:#ebeaeb;}.wp_themeSkin .mceMenu .mceText{color:#000;}.wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover,.wp_themeSkin .mceMenu .mceMenuItemActive{background-color:#f5f5f5;}.wp_themeSkin td.mceMenuItemSeparator{background-color:#aaa;}.wp_themeSkin .mceMenuItemTitle a{background-color:#ccc;border-bottom-color:#aaa;}.wp_themeSkin .mceMenuItemTitle span.mceText{color:#000;}.wp_themeSkin .mceMenuItemDisabled .mceText{color:#888;}.wp_themeSkin tr.mceFirst td.mceToolbar{background:#dfdfdf url("../images/ed-bg.gif") repeat-x scroll left top;border-color:#dfdfdf;}.wp-admin #mceModalBlocker{background:#000;}.wp-admin .clearlooks2 .mceFocus .mceTop .mceLeft{background:#444;border-left:1px solid #999;border-top:1px solid #999;-moz-border-radius:4px 0 0 0;-webkit-border-top-left-radius:4px;-khtml-border-top-left-radius:4px;border-top-left-radius:4px;}.wp-admin .clearlooks2 .mceFocus .mceTop .mceRight{background:#444;border-right:1px solid #999;border-top:1px solid #999;border-top-right-radius:4px;-khtml-border-top-right-radius:4px;-webkit-border-top-right-radius:4px;-moz-border-radius:0 4px 0 0;}.wp-admin .clearlooks2 .mceMiddle .mceLeft{background:#f1f1f1;border-left:1px solid #999;}.wp-admin .clearlooks2 .mceMiddle .mceRight{background:#f1f1f1;border-right:1px solid #999;}.wp-admin .clearlooks2 .mceBottom{background:#f1f1f1;border-bottom:1px solid #999;}.wp-admin .clearlooks2 .mceBottom .mceLeft{background:#f1f1f1;border-bottom:1px solid #999;border-left:1px solid #999;}.wp-admin .clearlooks2 .mceBottom .mceCenter{background:#f1f1f1;border-bottom:1px solid #999;}.wp-admin .clearlooks2 .mceBottom .mceRight{background:#f1f1f1;border-bottom:1px solid #999;border-right:1px solid #999;}.wp-admin .clearlooks2 .mceFocus .mceTop span{color:#e5e5e5;}#editorcontainer,#post-status-info,#titlediv #title,.editwidget .widget-inside{border-color:#dfdfdf;}#titlediv #title{background-color:#fff;}#tTips p#tTips_inside{background-color:#ddd;color:#333;}#timestampdiv input,#namediv input,#poststuff .inside .the-tagcloud{border-color:#ddd;}#adminmenu *{border-color:#e3e3e3;}#adminmenu li.wp-menu-separator{background:transparent url(../images/menu-arrows.gif) no-repeat scroll left 5px;}.folded #adminmenu li.wp-menu-separator{background:transparent url(../images/menu-arrows.gif) no-repeat scroll right -34px;}#adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle,#adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle{background:transparent url(../images/menu-bits.gif) no-repeat scroll left -207px;}#adminmenu .wp-has-submenu:hover .wp-menu-toggle,#adminmenu .wp-menu-open .wp-menu-toggle{background:transparent url(../images/menu-bits.gif) no-repeat scroll left -109px;}#adminmenu a.menu-top{background:#f1f1f1 url(../images/menu-bits.gif) repeat-x scroll left -379px;}#adminmenu .wp-submenu a{background:#FFF url(../images/menu-bits.gif) no-repeat scroll 0 -310px;}#adminmenu .wp-has-current-submenu ul li a{background:none;}#adminmenu .wp-has-current-submenu ul li a.current{background:url(../images/menu-dark.gif) top left no-repeat!important;}#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,#adminmenu .menu-top .current{background:#6d6d6d url(../images/menu-bits.gif) top left repeat-x;border-color:#6d6d6d;color:#fff;text-shadow:rgba(0,0,0,0.4) 0 -1px 0;}#adminmenu li.wp-has-current-submenu .wp-submenu,#adminmenu li.wp-has-current-submenu ul li a{border-color:#aaa!important;}#adminmenu li.wp-has-current-submenu ul li a{background:url(../images/menu-dark.gif) bottom left no-repeat!important;}#adminmenu li.wp-has-current-submenu ul{border-bottom-color:#aaa;}#adminmenu li.menu-top .current:hover{border-color:#B5B5B5;}#adminmenu .wp-submenu .current a.current{background:transparent url(../images/menu-bits.gif) no-repeat scroll 0 -289px;}#adminmenu .wp-submenu a:hover{background-color:#EAF2FA!important;color:#333!important;}#adminmenu .wp-submenu li.current,#adminmenu .wp-submenu li.current a,#adminmenu .wp-submenu li.current a:hover{color:#333;background-color:#f5f5f5;background-image:none;border-color:#e3e3e3;text-shadow:rgba(255,255,255,1) 0 1px 0;}#adminmenu .wp-submenu ul{background-color:#fff;}.folded #adminmenu li.menu-top,#adminmenu .wp-submenu .wp-submenu-head{background-color:#F1F1F1;}.folded #adminmenu li.wp-has-current-submenu,.folded #adminmenu li.menu-top.current{background-color:#e6e6e6;}#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head{background-color:#EAEAEA;border-color:#aaa;}#adminmenu div.wp-submenu{background-color:transparent;}#adminmenu #menu-dashboard div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -61px -33px;}#adminmenu #menu-dashboard:hover div.wp-menu-image,#adminmenu #menu-dashboard.wp-has-current-submenu div.wp-menu-image,#adminmenu #menu-dashboard.current div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -61px -1px;}#adminmenu #menu-posts div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -272px -33px;}#adminmenu #menu-posts:hover div.wp-menu-image,#adminmenu #menu-posts.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -272px -1px;}#adminmenu #menu-media div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -121px -33px;}#adminmenu #menu-media:hover div.wp-menu-image,#adminmenu #menu-media.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -121px -1px;}#adminmenu #menu-links div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -91px -33px;}#adminmenu #menu-links:hover div.wp-menu-image,#adminmenu #menu-links.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -91px -1px;}#adminmenu #menu-pages div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -151px -33px;}#adminmenu #menu-pages:hover div.wp-menu-image,#adminmenu #menu-pages.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -151px -1px;}#adminmenu #menu-comments div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -31px -33px;}#adminmenu #menu-comments:hover div.wp-menu-image,#adminmenu #menu-comments.wp-has-current-submenu div.wp-menu-image,#adminmenu #menu-comments.current div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -31px -1px;}#adminmenu #menu-appearance div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -1px -33px;}#adminmenu #menu-appearance:hover div.wp-menu-image,#adminmenu #menu-appearance.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -1px -1px;}#adminmenu #menu-plugins div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -181px -33px;}#adminmenu #menu-plugins:hover div.wp-menu-image,#adminmenu #menu-plugins.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -181px -1px;}#adminmenu #menu-users div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -301px -33px;}#adminmenu #menu-users:hover div.wp-menu-image,#adminmenu #menu-users.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -301px -1px;}#adminmenu #menu-tools div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -211px -33px;}#adminmenu #menu-tools:hover div.wp-menu-image,#adminmenu #menu-tools.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -211px -1px;}#adminmenu #menu-settings div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -241px -33px;}#adminmenu #menu-settings:hover div.wp-menu-image,#adminmenu #menu-settings.wp-has-current-submenu div.wp-menu-image{background:transparent url("../images/menu.png") no-repeat scroll -241px -1px;}table.diff .diff-deletedline{background-color:#fdd;}table.diff .diff-deletedline del{background-color:#f99;}table.diff .diff-addedline{background-color:#dfd;}table.diff .diff-addedline ins{background-color:#9f9;}#att-info{background-color:#E4F2FD;}#sidemenu a{background-color:#f9f9f9;border-color:#f9f9f9;border-bottom-color:#dfdfdf;}#sidemenu a.current{background-color:#fff;border-color:#dfdfdf #dfdfdf #fff;color:#D54E21;}#screen-options-wrap,#contextual-help-wrap{background-color:#f1f1f1;border-color:#dfdfdf;}#screen-meta-links a.show-settings{color:#606060;}#screen-meta-links a.show-settings:hover{color:#000;}#replysubmit{background-color:#f1f1f1;border-top-color:#ddd;}#replyerror{border-color:#ddd;background-color:#f9f9f9;}#edithead,#replyhead{background-color:#f1f1f1;}#ed_reply_toolbar{background-color:#e9e9e9;}.vim-current,.vim-current th,.vim-current td{background-color:#E4F2FD!important;}.star-average,.star.star-rating{background-color:#fc0;}div.star.select:hover{background-color:#d00;}#plugin-information .fyi ul{background-color:#eaf3fa;}#plugin-information .fyi h2.mainheader{background-color:#cee1ef;}#plugin-information pre,#plugin-information code{background-color:#ededff;}#plugin-information pre{border:1px solid #ccc;}.inline-edit-row fieldset input[type="text"],.inline-edit-row fieldset textarea,#bulk-titles,#replyrow input{border-color:#ddd;}.inline-editor div.title{background-color:#EAF3FA;}.inline-editor ul.cat-checklist{background-color:#FFF;border-color:#ddd;}.inline-editor .categories .catshow,.inline-editor .categories .cathide{color:#21759b;}.inline-editor .quick-edit-save{background-color:#f1f1f1;}#replyrow #ed_reply_toolbar input:hover{border-color:#aaa;background:#ddd;}fieldset.inline-edit-col-right .inline-edit-col{border-color:#dfdfdf;}.attention{color:#D54E21;}.meta-box-sortables .postbox:hover .handlediv{background:transparent url(../images/menu-bits.gif) no-repeat scroll left -111px;}#major-publishing-actions{background:#eaf2fa;}.tablenav .tablenav-pages{color:#555;}.tablenav .tablenav-pages a{border-color:#e3e3e3;background:#eee url('../images/menu-bits.gif') repeat-x scroll left -379px;}.tablenav .tablenav-pages a:hover{color:#d54e21;border-color:#d54321;}.tablenav .tablenav-pages a:active{color:#fff!important;}.tablenav .tablenav-pages .current{background:#dfdfdf;border-color:#d3d3d3;}#availablethemes,#availablethemes td{border-color:#ddd;}#current-theme img{border-color:#999;}#TB_window #TB_title a.tb-theme-preview-link,#TB_window #TB_title a.tb-theme-preview-link:visited{color:#999;}#TB_window #TB_title a.tb-theme-preview-link:hover,#TB_window #TB_title a.tb-theme-preview-link:focus{color:#ccc;}.misc-pub-section{border-bottom-color:#eee;}#minor-publishing{border-bottom-color:#ddd;}#post-body .misc-pub-section{border-right-color:#eee;}.post-com-count span{background-color:#bbb;}.form-table .color-palette td{border-color:#fff;}.sortable-placeholder{border-color:#bbb;background-color:#f5f5f5;}#post-body ul#category-tabs li.tabs a{color:#333;}#wp_editimgbtn,#wp_delimgbtn,#wp_editgallery,#wp_delgallery{border-color:#999;background-color:#eee;}#wp_editimgbtn:hover,#wp_delimgbtn:hover,#wp_editgallery:hover,#wp_delgallery:hover{border-color:#555;background-color:#ccc;}#favorite-first{background:#797979 url(../images/fav.png) repeat-x left center;border-color:#777!important;border-bottom-color:#666!important;}#favorite-inside{border-color:#797979;background-color:#797979;}#favorite-toggle{background:transparent url(../images/fav-arrow.gif) no-repeat 0 -4px;}#favorite-actions a{color:#ddd;}#favorite-actions a:hover{color:#fff;}#favorite-inside a:hover{text-decoration:underline;}#favorite-actions .slide-down{border-bottom-color:#626262;}#screen-meta a.show-settings{background-color:transparent;text-shadow:rgba(255,255,255,0.7) 0 1px 0;}#icon-edit,#icon-post{background:transparent url(../images/icons32.png) no-repeat -552px -5px;}#icon-index{background:transparent url(../images/icons32.png) no-repeat -137px -5px;}#icon-upload{background:transparent url(../images/icons32.png) no-repeat -251px -5px;}#icon-link-manager,#icon-link,#icon-link-category{background:transparent url(../images/icons32.png) no-repeat -190px -5px;}#icon-edit-pages,#icon-page{background:transparent url(../images/icons32.png) no-repeat -312px -5px;}#icon-edit-comments{background:transparent url(../images/icons32.png) no-repeat -72px -5px;}#icon-themes{background:transparent url(../images/icons32.png) no-repeat -11px -5px;}#icon-plugins{background:transparent url(../images/icons32.png) no-repeat -370px -5px;}#icon-users,#icon-profile,#icon-user-edit{background:transparent url(../images/icons32.png) no-repeat -600px -5px;}#icon-tools,#icon-admin{background:transparent url(../images/icons32.png) no-repeat -432px -5px;}#icon-options-general{background:transparent url(../images/icons32.png) no-repeat -492px -5px;}.view-switch #view-switch-list{background:transparent url(../images/list.png) no-repeat 0 0;}.view-switch #view-switch-list.current{background:transparent url(../images/list.png) no-repeat -40px 0;}.view-switch #view-switch-excerpt{background:transparent url(../images/list.png) no-repeat -20px 0;}.view-switch #view-switch-excerpt.current{background:transparent url(../images/list.png) no-repeat -60px 0;}#header-logo{background:transparent url(../images/wp-logo.gif) no-repeat scroll center center;}#wphead #site-visit-button{background-color:#585858;background-image:url(../images/visit-site-button-grad.gif);color:#aaa;text-shadow:#3F3F3F 0 -1px 0;}#wphead a:hover #site-visit-button{color:#fff;}#wphead a:focus #site-visit-button,#wphead a:active #site-visit-button{background-position:0 -27px;}.popular-tags,.feature-filter{background-color:#FFF;border-color:#DFDFDF;}#theme-information .action-button{border-top-color:#DFDFDF;}.theme-listing br.line{border-bottom-color:#ccc;}div.widgets-sortables,#widgets-left .inactive{background-color:#f1f1f1;border-color:#ddd;}#available-widgets .widget-holder{background-color:#fff;border-color:#ddd;}#widgets-left .sidebar-name{background-color:#aaa;background-image:url(../images/ed-bg.gif);text-shadow:#FFF 0 1px 0;border-color:#dfdfdf;}#widgets-right .sidebar-name{background-image:url(../images/fav.png);text-shadow:#3f3f3f 0 -1px 0;background-color:#636363;border-color:#636363;color:#fff;}.sidebar-name:hover,#removing-widget{color:#d54e21;}#removing-widget span{color:black;}#widgets-left .sidebar-name-arrow{background:transparent url(../images/menu-bits.gif) no-repeat scroll left -109px;}#widgets-right .sidebar-name-arrow{background:transparent url(../images/fav-arrow.gif) no-repeat scroll 0 -1px;}.in-widget-title{color:#606060;}.deleting .widget-title *{color:#aaa;}.imgedit-menu div{border-color:#d5d5d5;background-color:#f1f1f1;}.imgedit-menu div:hover{border-color:#c1c1c1;background-color:#eaeaea;}.imgedit-menu div.disabled{border-color:#ccc;background-color:#ddd;filter:alpha(opacity=50);opacity:.5;}#dashboard_recent_comments div.undo{border-top-color:#dfdfdf;}.comment-ays,.comment-ays th{border-color:#ddd;}.comment-ays th{background-color:#f1f1f1;} \ No newline at end of file diff --git a/wp-admin/css/colors-fresh.dev.css b/wp-admin/css/colors-fresh.dev.css new file mode 100644 index 00000000..41a86aed --- /dev/null +++ b/wp-admin/css/colors-fresh.dev.css @@ -0,0 +1,1697 @@ +html { + background-color: #f9f9f9; +} + +* html input, +* html .widget { + border-color: #dfdfdf; +} + +textarea, +input[type="text"], +input[type="password"], +input[type="file"], +input[type="button"], +input[type="submit"], +input[type="reset"], +select { + border-color: #dfdfdf; + background-color: #fff; +} + +kbd, +code { + background: #eaeaea; +} + +input[readonly] { + background-color: #eee; +} + +.find-box-search { + border-color: #dfdfdf; + background-color: #f1f1f1; +} + +.find-box { + background-color: #f1f1f1; +} + +.find-box-inside { + background-color: #fff; +} + +a.page-numbers:hover { + border-color: #999; +} + +body, +#wpbody, +.form-table .pre { + color: #333; +} + +body > #upload-menu { + border-bottom-color: #fff; +} + +#postcustomstuff table, +#your-profile fieldset, +#rightnow, +div.dashboard-widget, +#dashboard-widgets p.dashboard-widget-links, +#replyrow #ed_reply_toolbar input { + border-color: #ccc; +} + +#poststuff .inside label.spam, +#poststuff .inside label.deleted { + color: red; +} + +#poststuff .inside label.waiting { + color: orange; +} + +#poststuff .inside label.approved { + color: green; +} + +#postcustomstuff table { + border-color: #dfdfdf; + background-color: #F9F9F9; +} + +#postcustomstuff thead th { + background-color: #F1F1F1; +} + +#postcustomstuff table input, +#postcustomstuff table textarea { + border-color: #dfdfdf; + background-color: #fff; +} + +.widefat { + border-color: #dfdfdf; + background-color: #fff; +} + +div.dashboard-widget-error { + background-color: #c43; +} + +div.dashboard-widget-notice { + background-color: #cfe1ef; +} + +div.dashboard-widget-submit { + border-top-color: #ccc; +} + +div.tabs-panel, +ul#category-tabs li.tabs { + border-color: #dfdfdf; +} + +ul#category-tabs li.tabs { + background-color: #f1f1f1; +} + +input.disabled, +textarea.disabled { + background-color: #ccc; +} +/* #upload-menu li a.upload-tab-link, */ +.login #backtoblog a:hover, +#plugin-information .action-button a, +#plugin-information .action-button a:hover, +#plugin-information .action-button a:visited { + color: #fff; +} + +.widget .widget-top, +.postbox h3, +.stuffbox h3 { + background: #dfdfdf url("../images/gray-grad.png") repeat-x left top; + text-shadow: #fff 0 1px 0; +} + +.form-table th, +.form-wrap label { + color: #222; + text-shadow: #fff 0 1px 0; +} + +.description, +.form-wrap p { + color: #666; +} + +strong .post-com-count span { + background-color: #21759b; +} + +.sorthelper { + background-color: #ccf3fa; +} + +.ac_match, +.subsubsub a.current { + color: #000; +} + +.wrap h2 { + color: #464646; +} + +.ac_over { + background-color: #f0f0b8; +} + +.ac_results { + background-color: #fff; + border-color: #808080; +} + +.ac_results li { + color: #101010; +} + +.alternate, +.alt { + background-color: #f9f9f9; +} + +.available-theme a.screenshot { + background-color: #f1f1f1; + border-color: #ddd; +} + +.bar { + background-color: #e8e8e8; + border-right-color: #99d; +} + +#media-upload, +#media-upload .media-item .slidetoggle { + background: #fff; +} + +#media-upload .slidetoggle { + border-top-color: #dfdfdf; +} + +.error, +.login #login_error { + background-color: #ffebe8; + border-color: #c00; +} + +.error a { + color: #c00; +} + +.form-invalid { + background-color: #ffebe8 !important; +} + +.form-invalid input, +.form-invalid select { + border-color: #c00 !important; +} + +.submit { + border-color: #DFDFDF; +} + +.highlight { + background-color: #e4f2fd; + color: #d54e21; +} + +.howto, +.nonessential, +#edit-slug-box, +.form-input-tip, +.rss-widget span.rss-date, +.subsubsub { + color: #666; +} + +.media-item { + border-bottom-color: #dfdfdf; +} + +#wpbody-content #media-items .describe { + border-top-color: #dfdfdf; +} + +.media-upload-form label.form-help, +td.help { + color: #9a9a9a; +} + +.post-com-count { + background-image: url(../images/bubble_bg.gif); + color: #fff; +} + +.post-com-count span { + background-color: #bbb; + color: #fff; +} + +.post-com-count:hover span { + background-color: #d54e21; +} + +.quicktags, .search { + background-color: #ccc; + color: #000; +} + +.side-info h5 { + border-bottom-color: #dadada; +} + +.side-info ul { + color: #666; +} + +.button, +.button-secondary, +.submit input, +input[type=button], +input[type=submit] { + border-color: #bbb; + color: #464646; +} + +.button:hover, +.button-secondary:hover, +.submit input:hover, +input[type=button]:hover, +input[type=submit]:hover { + color: #000; + border-color: #666; +} + +.button, +.submit input, +.button-secondary { + background: #f2f2f2 url(../images/white-grad.png) repeat-x scroll left top; + text-shadow: rgba(255,255,255,1) 0 1px 0; +} + +.button:active, +.submit input:active, +.button-secondary:active { + background: #eee url(../images/white-grad-active.png) repeat-x scroll left top; +} + +input.button-primary, +button.button-primary, +a.button-primary { + border-color: #298cba; + font-weight: bold; + color: #fff; + background: #21759B url(../images/button-grad.png) repeat-x scroll left top; + text-shadow: rgba(0,0,0,0.3) 0 -1px 0; +} + +input.button-primary:active, +button.button-primary:active, +a.button-primary:active { + background: #21759b url(../images/button-grad-active.png) repeat-x scroll left top; + color: #eaf2fa; +} + +input.button-primary:hover, +button.button-primary:hover, +a.button-primary:hover, +a.button-primary:focus, +a.button-primary:active { + border-color: #13455b; + color: #eaf2fa; +} + +.button-disabled, +.button[disabled], +.button:disabled, +.button-secondary[disabled], +.button-secondary:disabled, +a.button.disabled { + color: #aaa !important; + border-color: #ddd !important; +} + +.button-primary-disabled, +.button-primary[disabled], +.button-primary:disabled { + color: #9FD0D5 !important; + background: #298CBA !important; +} + +a:hover, +a:active, +a:focus { + color: #d54e21; +} + +#wphead #viewsite a:hover, +#adminmenu a:hover, +#adminmenu ul.wp-submenu a:hover, +#the-comment-list .comment a:hover, +#rightnow a:hover, +#media-upload a.del-link:hover, +div.dashboard-widget-submit input:hover, +.subsubsub a:hover, +.subsubsub a.current:hover, +.ui-tabs-nav a:hover, +.plugins .inactive a:hover, +#all-plugins-table .plugins .inactive a:hover, +#search-plugins-table .plugins .inactive a:hover { + color: #d54e21; +} + +#the-comment-list .comment-item, +#dashboard-widgets #dashboard_quick_press form p.submit { + border-color: #dfdfdf; +} + +#side-sortables #category-tabs .tabs a { + color: #333; +} + +#rightnow .rbutton { + background-color: #ebebeb; + color: #264761; +} + +.submitbox .submit { + background-color: #464646; + color: #ccc; +} + +.plugins a.delete:hover, +#all-plugins-table .plugins a.delete:hover, +#search-plugins-table .plugins a.delete:hover, +.submitbox .submitdelete { + color: #f00; + border-bottom-color: #f00; +} + +.submitbox .submitdelete:hover, +#media-items a.delete:hover { + color: #fff; + background-color: #f00; + border-bottom-color: #f00; +} + +#normal-sortables .submitbox .submitdelete:hover { + color: #000; + background-color: #f00; + border-bottom-color: #f00; +} + +.tablenav .dots { + border-color: transparent; +} + +.tablenav .next, +.tablenav .prev { + border-color: transparent; + color: #21759b; +} + +.tablenav .next:hover, +.tablenav .prev:hover { + border-color: transparent; + color: #d54e21; +} + +.updated, +.login .message { + background-color: #ffffe0; + border-color: #e6db55; +} + +.update-message { + color: #000000; +} + +a.page-numbers { + border-bottom-color: #B8D3E2; +} + +.commentlist li { + border-bottom-color: #ccc; +} + +.widefat td, +.widefat th, +#install-plugins .plugins td, +#install-plugins .plugins th { + border-color: #dfdfdf; +} + +.widefat th { + text-shadow: rgba(255,255,255,0.8) 0 1px 0; +} + +.widefat thead tr th, +.widefat tfoot tr th, +h3.dashboard-widget-title, +h3.dashboard-widget-title span, +h3.dashboard-widget-title small, +.find-box-head { + color: #333; + background: #dfdfdf url(../images/gray-grad.png) repeat-x scroll left top; +} + +h3.dashboard-widget-title small a { + color: #d7d7d7; +} + +h3.dashboard-widget-title small a:hover { + color: #fff; +} + +a, +#adminmenu a, +#poststuff #edButtonPreview, +#poststuff #edButtonHTML, +#the-comment-list p.comment-author strong a, +#media-upload a.del-link, +#media-items a.delete, +.plugins a.delete, +.ui-tabs-nav a { + color: #21759b; +} + +/* Because we don't want visited on these links */ +body.press-this .tabs a, +body.press-this .tabs a:hover { + background-color: #fff; + border-color: #c6d9e9; + border-bottom-color: #fff; + color: #d54e21; +} + +#adminmenu #awaiting-mod, +#adminmenu .update-plugins, +#sidemenu a .update-plugins, +#rightnow .reallynow, +#plugin-information .action-button { + background-color: #d54e21; + color: #fff; +} + +#adminmenu li a:hover #awaiting-mod, +#adminmenu li a:hover .update-plugins, +#sidemenu li a:hover .update-plugins { + background-color: #264761; + color: #fff; +} + +#adminmenu li.current a #awaiting-mod, +#adminmenu li.current a .update-plugins, +#adminmenu li.wp-has-current-submenu a .update-plugins, +#adminmenu li.wp-has-current-submenu a .update-plugins { + background-color: #ddd; + color: #000; + text-shadow: none; + -moz-box-shadow: rgba(0,0,0,0.2) 0 -1px 0; + -khtml-box-shadow: rgba(0,0,0,0.2) 0 -1px 0; + -webkit-box-shadow: rgba(0,0,0,0.2) 0 -1px 0; + box-shadow: rgba(0,0,0,0.2) 0 -1px 0; +} + +#adminmenu li.current a:hover #awaiting-mod, +#adminmenu li.current a:hover .update-plugins, +#adminmenu li.wp-has-current-submenu a:hover #awaiting-mod, +#adminmenu li.wp-has-current-submenu a:hover .update-plugins { + background-color: #264761; + color: #fff; +} + +div#media-upload-header, +div#plugin-information-header { + background-color: #f9f9f9; + border-bottom-color: #dfdfdf; +} + +#currenttheme img { + border-color: #666; +} + +#dashboard_secondary div.dashboard-widget-content ul li a { + background-color: #f9f9f9; +} + +input.readonly, textarea.readonly { + background-color: #ddd; +} + +#ed_toolbar input, +#ed_reply_toolbar input { + background: #fff url("../images/fade-butt.png") repeat-x 0 -2px; +} + +#editable-post-name { + background-color: #fffbcc; +} + +#edit-slug-box strong, +.tablenav .displaying-num, +#submitted-on { + color: #777; +} + +.login #nav a { + color: #21759b !important; +} + +.login #nav a:hover { + color: #d54e21 !important; +} + +#footer, +#footer-upgrade { + background: #464646; + color: #999; +} + +#media-items, +.imgedit-group { + border-color: #dfdfdf; +} + +.checkbox, +.side-info, +.plugins tr, +#your-profile #rich_editing { + background-color: #fff; +} + +.plugins .inactive, +.plugins .inactive th, +.plugins .inactive td, +tr.inactive + tr.plugin-update-tr .plugin-update { + background-color: #eee; +} + +.plugin-update-tr .update-message { + background-color: #fffbe4; + border-color: #dfdfdf; +} + +.plugins .active, +.plugins .active th, +.plugins .active td { + color: #000; +} + +.plugins .inactive a { + color: #557799; +} + +#the-comment-list tr.undo, +#the-comment-list div.undo { + background-color: #f4f4f4; +} + +#the-comment-list .unapproved { + background-color: #ffffe0; +} + +#the-comment-list .approve a { + color: #006505; +} + +#the-comment-list .unapprove a { + color: #d98500; +} + +table.widefat span.delete a, +table.widefat span.trash a, +table.widefat span.spam a, +#dashboard_recent_comments .delete a, +#dashboard_recent_comments .trash a, +#dashboard_recent_comments .spam a { + color: #bc0b0b; +} + +.widget, +#widget-list .widget-top, +.postbox, +#titlediv, +#poststuff .postarea, +.stuffbox { + border-color: #dfdfdf; +} + +.widget, +.postbox { + background-color: #fff; +} + +.ui-sortable .postbox h3 { + color: #464646; +} + +.widget .widget-top, +.ui-sortable .postbox h3:hover { + color: #000; +} + +.curtime #timestamp { + background-image: url(../images/date-button.gif); +} + +#quicktags #ed_link { + color: #00f; +} + +#rightnow .youhave { + background-color: #f0f6fb; +} + +#rightnow a { + color: #448abd; +} + +.tagchecklist span a, +#bulk-titles div a { + background: url(../images/xit.gif) no-repeat; +} + +.tagchecklist span a:hover, +#bulk-titles div a:hover { + background: url(../images/xit.gif) no-repeat -10px 0; +} + +#update-nag { + background-color: #fffeeb; + border-color: #ccc; + color: #555; +} + +.login #backtoblog a { + color: #ccc; +} + +#wphead { + background-color: #464646; +} + +body.login { + border-top-color: #464646; +} + +#wphead h1 a { + color: #fff; +} + +#user_info { + color: #999; +} + +#user_info a:link, +#user_info a:visited, +#footer a:link, +#footer a:visited { + color: #ccc; + text-decoration: none; +} + +#user_info a:hover, +#footer a:hover { + color: #fff; + text-decoration: underline !important; +} + +#user_info a:active, +#footer a:active { + color: #ccc !important; +} + +div#media-upload-error, +.file-error, +abbr.required, +.widget-control-remove:hover, +table.widefat .delete a:hover, +table.widefat .trash a:hover, +table.widefat .spam a:hover, +#dashboard_recent_comments .delete a:hover, +#dashboard_recent_comments .trash a:hover +#dashboard_recent_comments .spam a:hover { + color: #f00; +} + +#pass-strength-result { + background-color: #eee; + border-color: #ddd !important; +} + +#pass-strength-result.bad { + background-color: #ffb78c; + border-color: #ff853c !important; +} + +#pass-strength-result.good { + background-color: #ffec8b; + border-color: #fc0 !important; +} + +#pass-strength-result.short { + background-color: #ffa0a0; + border-color: #f04040 !important; +} + +#pass-strength-result.strong { + background-color: #c3ff88; + border-color: #8dff1c !important; +} + +/* editors */ +#quicktags { + border-color: #dfdfdf; + background-color: #dfdfdf; +} + +#ed_toolbar input { + border-color: #C3C3C3; +} + +#ed_toolbar input:hover { + border-color: #aaa; + background: #ddd; +} + +#poststuff .wp_themeSkin .mceStatusbar { + border-color: #EDEDED; +} + +#poststuff #edButtonPreview, +#poststuff #edButtonHTML { + background-color: #f1f1f1; + border-color: #dfdfdf; + color: #999; +} + +#poststuff #editor-toolbar .active { + border-bottom-color: #e9e9e9; + background-color: #e9e9e9; + color: #333; +} + +/* TinyMCE */ +#post-status-info { + background-color: #EDEDED; +} + +.wp_themeSkin *, +.wp_themeSkin a:hover, +.wp_themeSkin a:link, +.wp_themeSkin a:visited, +.wp_themeSkin a:active { + color: #000; +} + +/* Containers */ +.wp_themeSkin iframe { + background: #fff; +} + +/* Layout */ +.wp_themeSkin .mceStatusbar { + color: #000; + background-color: #f5f5f5; +} + +/* Button */ +.wp_themeSkin .mceButton { + background-color: #e9e8e8; + border-color: #B2B2B2; +} + +.wp_themeSkin a.mceButtonEnabled:hover, +.wp_themeSkin a.mceButtonActive, +.wp_themeSkin a.mceButtonSelected { + background-color: #d5d5d5; + border-color: #777 !important; +} + +.wp_themeSkin .mceButtonDisabled { + border-color: #ccc !important; +} + +/* ListBox */ +.wp_themeSkin .mceListBox .mceText, +.wp_themeSkin .mceListBox .mceOpen { + border-color: #B2B2B2; + background-color: #d5d5d5; +} + +.wp_themeSkin table.mceListBoxEnabled:hover .mceOpen, +.wp_themeSkin .mceListBoxHover .mceOpen, +.wp_themeSkin .mceListBoxSelected .mceOpen, +.wp_themeSkin .mceListBoxSelected .mceText { + border-color: #777 !important; + background-color: #d5d5d5; +} + +.wp_themeSkin table.mceListBoxEnabled:hover .mceText, +.wp_themeSkin .mceListBoxHover .mceText { + border-color: #777 !important; +} + +.wp_themeSkin select.mceListBox { + border-color: #B2B2B2; + background-color: #fff; +} + +/* SplitButton */ +.wp_themeSkin .mceSplitButton a.mceAction, +.wp_themeSkin .mceSplitButton a.mceOpen { + border-color: #B2B2B2; +} + +.wp_themeSkin .mceSplitButton a.mceOpen:hover, +.wp_themeSkin .mceSplitButtonSelected a.mceOpen, +.wp_themeSkin table.mceSplitButtonEnabled:hover a.mceAction, +.wp_themeSkin .mceSplitButton a.mceAction:hover { + background-color: #d5d5d5; + border-color: #777 !important; +} + +.wp_themeSkin .mceSplitButtonActive { + background-color: #B2B2B2; +} + +/* ColorSplitButton */ +.wp_themeSkin div.mceColorSplitMenu table { + background-color: #ebebeb; + border-color: #B2B2B2; +} + +.wp_themeSkin .mceColorSplitMenu a { + border-color: #B2B2B2; +} + +.wp_themeSkin .mceColorSplitMenu a.mceMoreColors { + border-color: #fff; +} + +.wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover { + border-color: #0A246A; + background-color: #B6BDD2; +} + +.wp_themeSkin a.mceMoreColors:hover { + border-color: #0A246A; +} + +/* Menu */ +.wp_themeSkin .mceMenu { + border-color: #ddd; +} + +.wp_themeSkin .mceMenu table { + background-color: #ebeaeb; +} + +.wp_themeSkin .mceMenu .mceText { + color: #000; +} + +.wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover, +.wp_themeSkin .mceMenu .mceMenuItemActive { + background-color: #f5f5f5; +} +.wp_themeSkin td.mceMenuItemSeparator { + background-color: #aaa; +} +.wp_themeSkin .mceMenuItemTitle a { + background-color: #ccc; + border-bottom-color: #aaa; +} +.wp_themeSkin .mceMenuItemTitle span.mceText { + color: #000; +} +.wp_themeSkin .mceMenuItemDisabled .mceText { + color: #888; +} + +.wp_themeSkin tr.mceFirst td.mceToolbar { + background: #dfdfdf url("../images/ed-bg.gif") repeat-x scroll left top; + border-color: #dfdfdf; +} + +.wp-admin #mceModalBlocker { + background: #000; +} + +.wp-admin .clearlooks2 .mceFocus .mceTop .mceLeft { + background: #444444; + border-left: 1px solid #999; + border-top: 1px solid #999; + -moz-border-radius: 4px 0 0 0; + -webkit-border-top-left-radius: 4px; + -khtml-border-top-left-radius: 4px; + border-top-left-radius: 4px; +} + +.wp-admin .clearlooks2 .mceFocus .mceTop .mceRight { + background: #444444; + border-right: 1px solid #999; + border-top: 1px solid #999; + border-top-right-radius: 4px; + -khtml-border-top-right-radius: 4px; + -webkit-border-top-right-radius: 4px; + -moz-border-radius: 0 4px 0 0; +} + +.wp-admin .clearlooks2 .mceMiddle .mceLeft { + background: #f1f1f1; + border-left: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceMiddle .mceRight { + background: #f1f1f1; + border-right: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceBottom { + background: #f1f1f1; + border-bottom: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceBottom .mceLeft { + background: #f1f1f1; + border-bottom: 1px solid #999; + border-left: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceBottom .mceCenter { + background: #f1f1f1; + border-bottom: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceBottom .mceRight { + background: #f1f1f1; + border-bottom: 1px solid #999; + border-right: 1px solid #999; +} + +.wp-admin .clearlooks2 .mceFocus .mceTop span { + color: #e5e5e5; +} +/* end TinyMCE */ + +#editorcontainer, +#post-status-info, +#titlediv #title, +.editwidget .widget-inside { + border-color: #dfdfdf; +} + +#titlediv #title { + background-color: #fff; +} + +#tTips p#tTips_inside { + background-color: #ddd; + color: #333; +} + +#timestampdiv input, +#namediv input, +#poststuff .inside .the-tagcloud { + border-color: #ddd; +} + +/* menu */ +#adminmenu * { + border-color: #e3e3e3; +} + +#adminmenu li.wp-menu-separator { + background: transparent url(../images/menu-arrows.gif) no-repeat scroll left 5px; +} + +.folded #adminmenu li.wp-menu-separator { + background: transparent url(../images/menu-arrows.gif) no-repeat scroll right -34px; +} + +#adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle, +#adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle { + background: transparent url(../images/menu-bits.gif) no-repeat scroll left -207px; +} + +#adminmenu .wp-has-submenu:hover .wp-menu-toggle, +#adminmenu .wp-menu-open .wp-menu-toggle { + background: transparent url(../images/menu-bits.gif) no-repeat scroll left -109px; +} + +#adminmenu a.menu-top { + background: #f1f1f1 url(../images/menu-bits.gif) repeat-x scroll left -379px; +} + +#adminmenu .wp-submenu a { + background: #FFFFFF url(../images/menu-bits.gif) no-repeat scroll 0 -310px; +} + +#adminmenu .wp-has-current-submenu ul li a { + background: none; +} + +#adminmenu .wp-has-current-submenu ul li a.current { + background: url(../images/menu-dark.gif) top left no-repeat !important; +} + +#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, +#adminmenu .menu-top .current { + background: #6d6d6d url(../images/menu-bits.gif) top left repeat-x; + border-color: #6d6d6d; + color: #fff; + text-shadow: rgba(0,0,0,0.4) 0px -1px 0px; +} + +#adminmenu li.wp-has-current-submenu .wp-submenu, +#adminmenu li.wp-has-current-submenu ul li a { + border-color: #aaa !important; +} + +#adminmenu li.wp-has-current-submenu ul li a { + background: url(../images/menu-dark.gif) bottom left no-repeat !important; +} + +#adminmenu li.wp-has-current-submenu ul { + border-bottom-color: #aaa; +} + +#adminmenu li.menu-top .current:hover { + border-color: #B5B5B5; +} + +#adminmenu .wp-submenu .current a.current { + background: transparent url(../images/menu-bits.gif) no-repeat scroll 0 -289px; +} + +#adminmenu .wp-submenu a:hover { + background-color: #EAF2FA !important; + color: #333 !important; +} + +#adminmenu .wp-submenu li.current, +#adminmenu .wp-submenu li.current a, +#adminmenu .wp-submenu li.current a:hover { + color: #333; + background-color: #f5f5f5; + background-image: none; + border-color: #e3e3e3; + text-shadow: rgba(255,255,255,1) 0px 1px 0px; +} + +#adminmenu .wp-submenu ul { + background-color: #fff; +} + +.folded #adminmenu li.menu-top, +#adminmenu .wp-submenu .wp-submenu-head { + background-color: #F1F1F1; +} + +.folded #adminmenu li.wp-has-current-submenu, +.folded #adminmenu li.menu-top.current { + background-color: #e6e6e6; +} + +#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head { + background-color: #EAEAEA; + border-color: #aaa; +} + +#adminmenu div.wp-submenu { + background-color: transparent; +} + +/* menu icons */ +#adminmenu #menu-dashboard div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -61px -33px; +} + +#adminmenu #menu-dashboard:hover div.wp-menu-image, +#adminmenu #menu-dashboard.wp-has-current-submenu div.wp-menu-image, +#adminmenu #menu-dashboard.current div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -61px -1px; +} + +#adminmenu #menu-posts div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -272px -33px; +} + +#adminmenu #menu-posts:hover div.wp-menu-image, +#adminmenu #menu-posts.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -272px -1px; +} + +#adminmenu #menu-media div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -121px -33px; +} + +#adminmenu #menu-media:hover div.wp-menu-image, +#adminmenu #menu-media.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -121px -1px; +} + +#adminmenu #menu-links div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -91px -33px; +} + +#adminmenu #menu-links:hover div.wp-menu-image, +#adminmenu #menu-links.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -91px -1px; +} + +#adminmenu #menu-pages div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -151px -33px; +} + +#adminmenu #menu-pages:hover div.wp-menu-image, +#adminmenu #menu-pages.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -151px -1px; +} + +#adminmenu #menu-comments div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -31px -33px; +} + +#adminmenu #menu-comments:hover div.wp-menu-image, +#adminmenu #menu-comments.wp-has-current-submenu div.wp-menu-image, +#adminmenu #menu-comments.current div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -31px -1px; +} + +#adminmenu #menu-appearance div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -1px -33px; +} + +#adminmenu #menu-appearance:hover div.wp-menu-image, +#adminmenu #menu-appearance.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -1px -1px; +} + +#adminmenu #menu-plugins div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -181px -33px; +} + +#adminmenu #menu-plugins:hover div.wp-menu-image, +#adminmenu #menu-plugins.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -181px -1px; +} + +#adminmenu #menu-users div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -301px -33px; +} + +#adminmenu #menu-users:hover div.wp-menu-image, +#adminmenu #menu-users.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -301px -1px; +} + +#adminmenu #menu-tools div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -211px -33px; +} + +#adminmenu #menu-tools:hover div.wp-menu-image, +#adminmenu #menu-tools.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -211px -1px; +} + +#adminmenu #menu-settings div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -241px -33px; +} + +#adminmenu #menu-settings:hover div.wp-menu-image, +#adminmenu #menu-settings.wp-has-current-submenu div.wp-menu-image { + background: transparent url("../images/menu.png") no-repeat scroll -241px -1px; +} +/* end menu */ + + +/* Diff */ +table.diff .diff-deletedline { + background-color: #ffdddd; +} + +table.diff .diff-deletedline del { + background-color: #ff9999; +} + +table.diff .diff-addedline { + background-color: #ddffdd; +} + +table.diff .diff-addedline ins { + background-color: #99ff99; +} + +#att-info { + background-color: #E4F2FD; +} + +/* edit image */ +#sidemenu a { + background-color: #f9f9f9; + border-color: #f9f9f9; + border-bottom-color: #dfdfdf; +} + +#sidemenu a.current { + background-color: #fff; + border-color: #dfdfdf #dfdfdf #fff; + color: #D54E21; +} + +#screen-options-wrap, +#contextual-help-wrap { + background-color: #f1f1f1; + border-color: #dfdfdf; +} + +#screen-meta-links a.show-settings { + color: #606060; +} + +#screen-meta-links a.show-settings:hover { + color: #000; +} + +#replysubmit { + background-color: #f1f1f1; + border-top-color: #ddd; +} + +#replyerror { + border-color: #ddd; + background-color: #f9f9f9; +} + +#edithead, +#replyhead { + background-color: #f1f1f1; +} + +#ed_reply_toolbar { + background-color: #e9e9e9; +} + +/* table vim shortcuts */ +.vim-current, +.vim-current th, +.vim-current td { + background-color: #E4F2FD !important; +} + +/* Install Plugins */ +.star-average, +.star.star-rating { + background-color: #fc0; +} + +div.star.select:hover { + background-color: #d00; +} + +#plugin-information .fyi ul { + background-color: #eaf3fa; +} + +#plugin-information .fyi h2.mainheader { + background-color: #cee1ef; +} + +#plugin-information pre, +#plugin-information code { + background-color: #ededff; +} + +#plugin-information pre { + border: 1px solid #ccc; +} + +/* inline editor */ +.inline-edit-row fieldset input[type="text"], +.inline-edit-row fieldset textarea, +#bulk-titles, +#replyrow input { + border-color: #ddd; +} + +.inline-editor div.title { + background-color: #EAF3FA; +} + +.inline-editor ul.cat-checklist { + background-color: #FFFFFF; + border-color: #ddd; +} + +.inline-editor .categories .catshow, +.inline-editor .categories .cathide { + color: #21759b; +} + +.inline-editor .quick-edit-save { + background-color: #f1f1f1; +} + +#replyrow #ed_reply_toolbar input:hover { + border-color: #aaa; + background: #ddd; +} + +fieldset.inline-edit-col-right .inline-edit-col { + border-color: #dfdfdf; +} + +.attention { + color: #D54E21; +} + +.meta-box-sortables .postbox:hover .handlediv { + background: transparent url(../images/menu-bits.gif) no-repeat scroll left -111px; +} + +#major-publishing-actions { + background: #eaf2fa; +} + +.tablenav .tablenav-pages { + color: #555; +} + +.tablenav .tablenav-pages a { + border-color: #e3e3e3; + background: #eee url('../images/menu-bits.gif') repeat-x scroll left -379px; +} + +.tablenav .tablenav-pages a:hover { + color: #d54e21; + border-color: #d54321; +} + +.tablenav .tablenav-pages a:active { + color: #fff !important; +} + +.tablenav .tablenav-pages .current { + background: #dfdfdf; + border-color: #d3d3d3; +} + +#availablethemes, +#availablethemes td { + border-color: #ddd; +} + +#current-theme img { + border-color: #999; +} + +#TB_window #TB_title a.tb-theme-preview-link, +#TB_window #TB_title a.tb-theme-preview-link:visited { + color: #999; +} + +#TB_window #TB_title a.tb-theme-preview-link:hover, +#TB_window #TB_title a.tb-theme-preview-link:focus { + color: #ccc; +} + +.misc-pub-section { + border-bottom-color: #eee; +} + +#minor-publishing { + border-bottom-color: #ddd; +} + +#post-body .misc-pub-section { + border-right-color: #eee; +} + +.post-com-count span { + background-color: #bbb; +} + +.form-table .color-palette td { + border-color: #fff; +} + +.sortable-placeholder { + border-color: #bbb; + background-color: #f5f5f5; +} + +#post-body ul#category-tabs li.tabs a { + color: #333; +} + +#wp_editimgbtn, +#wp_delimgbtn, +#wp_editgallery, +#wp_delgallery { + border-color: #999; + background-color: #eee; +} + +#wp_editimgbtn:hover, +#wp_delimgbtn:hover, +#wp_editgallery:hover, +#wp_delgallery:hover { + border-color: #555; + background-color: #ccc; +} + +#favorite-first { + background: #797979 url(../images/fav.png) repeat-x left center; + border-color: #777 !important; + border-bottom-color: #666 !important; +} + +#favorite-inside { + border-color: #797979; + background-color: #797979; +} + +#favorite-toggle { + background: transparent url(../images/fav-arrow.gif) no-repeat 0 -4px; +} + +#favorite-actions a { + color: #ddd; +} + +#favorite-actions a:hover { + color: #fff; +} + +#favorite-inside a:hover { + text-decoration: underline; +} + +#favorite-actions .slide-down { + border-bottom-color: #626262; +} + +#screen-meta a.show-settings { + background-color: transparent; + text-shadow: rgba(255,255,255,0.7) 0 1px 0; +} + +#icon-edit, +#icon-post { + background: transparent url(../images/icons32.png) no-repeat -552px -5px; +} + +#icon-index { + background: transparent url(../images/icons32.png) no-repeat -137px -5px; +} + +#icon-upload { + background: transparent url(../images/icons32.png) no-repeat -251px -5px; +} + +#icon-link-manager, +#icon-link, +#icon-link-category { + background: transparent url(../images/icons32.png) no-repeat -190px -5px; +} + +#icon-edit-pages, +#icon-page { + background: transparent url(../images/icons32.png) no-repeat -312px -5px; +} + +#icon-edit-comments { + background: transparent url(../images/icons32.png) no-repeat -72px -5px; +} + +#icon-themes { + background: transparent url(../images/icons32.png) no-repeat -11px -5px; +} + +#icon-plugins { + background: transparent url(../images/icons32.png) no-repeat -370px -5px; +} + +#icon-users, +#icon-profile, +#icon-user-edit { + background: transparent url(../images/icons32.png) no-repeat -600px -5px; +} + +#icon-tools, +#icon-admin { + background: transparent url(../images/icons32.png) no-repeat -432px -5px; +} + +#icon-options-general { + background: transparent url(../images/icons32.png) no-repeat -492px -5px; +} + +.view-switch #view-switch-list { + background: transparent url(../images/list.png) no-repeat 0 0; +} + +.view-switch #view-switch-list.current { + background: transparent url(../images/list.png) no-repeat -40px 0; +} + +.view-switch #view-switch-excerpt { + background: transparent url(../images/list.png) no-repeat -20px 0; +} + +.view-switch #view-switch-excerpt.current { + background: transparent url(../images/list.png) no-repeat -60px 0; +} + +#header-logo { + background: transparent url(../images/wp-logo.gif) no-repeat scroll center center; +} + +#wphead #site-visit-button { + background-color:#585858; + background-image: url(../images/visit-site-button-grad.gif); + color:#aaa; + text-shadow: #3F3F3F 0 -1px 0; +} + +#wphead a:hover #site-visit-button { + color:#fff; +} + +#wphead a:focus #site-visit-button, +#wphead a:active #site-visit-button { + background-position:0 -27px; +} + +.popular-tags, +.feature-filter { + background-color: #FFFFFF; + border-color: #DFDFDF; +} + +#theme-information .action-button { + border-top-color: #DFDFDF; +} + +.theme-listing br.line { + border-bottom-color: #ccc; +} + +div.widgets-sortables, +#widgets-left .inactive { + background-color: #f1f1f1; + border-color: #ddd; +} + +#available-widgets .widget-holder { + background-color: #fff; + border-color: #ddd; +} + +#widgets-left .sidebar-name { + background-color: #aaa; + background-image: url(../images/ed-bg.gif); + text-shadow: #FFFFFF 0 1px 0; + border-color: #dfdfdf; +} + +#widgets-right .sidebar-name { + background-image: url(../images/fav.png); + text-shadow: #3f3f3f 0 -1px 0; + background-color: #636363; + border-color: #636363; + color: #fff; +} + +.sidebar-name:hover, +#removing-widget { + color: #d54e21; +} + +#removing-widget span { + color: black; +} + +#widgets-left .sidebar-name-arrow { + background: transparent url(../images/menu-bits.gif) no-repeat scroll left -109px; +} + +#widgets-right .sidebar-name-arrow { + background: transparent url(../images/fav-arrow.gif) no-repeat scroll 0 -1px; +} + +.in-widget-title { + color: #606060; +} + +.deleting .widget-title * { + color: #aaa; +} + +.imgedit-menu div { + border-color: #d5d5d5; + background-color: #f1f1f1; +} + +.imgedit-menu div:hover { + border-color: #c1c1c1; + background-color: #eaeaea; +} + +.imgedit-menu div.disabled { + border-color: #ccc; + background-color: #ddd; + filter: alpha(opacity=50); + opacity: 0.5; +} + +#dashboard_recent_comments div.undo { + border-top-color: #dfdfdf; +} + +.comment-ays, +.comment-ays th { + border-color: #ddd; +} + +.comment-ays th { + background-color: #f1f1f1; +} diff --git a/wp-admin/css/dashboard.css b/wp-admin/css/dashboard.css index 2784301e..51a8ea9d 100644 --- a/wp-admin/css/dashboard.css +++ b/wp-admin/css/dashboard.css @@ -1,390 +1 @@ -.postbox p, .postbox ul, .postbox ol, .postbox blockquote, #wp-version-message { font-size: 11px; } - -.edit-box { - display: none; -} - -h3:hover .edit-box { - display: inline; -} - -form .input-text-wrap { - border-style: solid; - border-width: 1px; - padding: 2px 3px; - border-color: #ccc; -} - -#dashboard-widgets form .input-text-wrap input { - border: 0 none; - outline: none; - margin: 0; - padding: 0; - width: 99%; - color: #333; -} - -form .textarea-wrap { - border-style: solid; - border-width: 1px; - padding: 2px; - border-color: #ccc; -} - -#dashboard-widgets form .textarea-wrap textarea { - border: 0 none; - padding: 0; - outline: none; - width: 99%; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} - -#dashboard-widgets .postbox form .submit { - float: none; - margin: .5em 0 0; - padding: 0; - border: none; -} - -#dashboard-widgets-wrap #dashboard-widgets .postbox form .submit input { - margin: 0; -} - -#dashboard-widgets-wrap #dashboard-widgets .postbox form .submit #publish { - min-width: 0; -} - -div.postbox div.inside { - margin: 10px; - position: relative; -} - -#dashboard-widgets a { - text-decoration: none; -} - -#dashboard-widgets h3 a { - text-decoration: underline; -} - -#dashboard-widgets h3 .postbox-title-action { - position: absolute; - right: 30px; - padding: 0; -} - -#dashboard-widgets h4 { - font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; - font-size: 13px; - margin: 0 0 .2em; - padding: 0; -} - -/* Right Now */ - -#dashboard_right_now p.sub, -#dashboard_right_now .table, #dashboard_right_now .versions { - margin: -12px; -} - -#dashboard_right_now .inside { - font-size: 12px; -} - -#dashboard_right_now p.sub { - font-style: italic; - font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; - padding: 5px 10px 15px; - color: #777; - font-size: 13px; -} - -#dashboard_right_now .table { - background: #f9f9f9; - border-top: #ececec 1px solid; - border-bottom: #ececec 1px solid; - margin: 0 -9px 10px; - padding: 0 10px; -} - -#dashboard_right_now table { - width: 100%; -} - -#dashboard_right_now table td { - border-top: #ececec 1px solid; - padding: 3px 0; - white-space: nowrap; -} - -#dashboard_right_now table tr.first td { - border-top: none; -} - -#dashboard_right_now td.b { - padding-right: 6px; - text-align: right; - font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; - font-size: 14px; -} - -#dashboard_right_now td.b a { - font-size: 18px; -} - -#dashboard_right_now td.b a:hover { - color: #d54e21; -} - -#dashboard_right_now .t { - font-size: 12px; - padding-right: 12px; - padding-top: 6px; - color: #777; -} - -#dashboard_right_now td.first, -#dashboard_right_now td.last { - width: 1px; -} - -#dashboard_right_now .spam { - color: red; -} - -#dashboard_right_now .waiting { - color: #e66f00; -} - -#dashboard_right_now .approved { - color: green; -} - -#dashboard_right_now .versions { - padding: 6px 10px 12px; -} - -#dashboard_right_now .versions .b { - font-weight: bold; -} - -#dashboard_right_now a.button { - float: right; - clear: right; - position: relative; - top: -5px; -} - -/* Recent Comments */ - -#dashboard_recent_comments h3 { - margin-bottom: 0; -} - -#dashboard_recent_comments .inside { - margin-top: 0; -} - -#dashboard_recent_comments .comment-meta .approve { - font-style: italic; - font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; - font-size: 10px; -} - -#the-comment-list { - position: relative; -} - -#the-comment-list .comment-item { - padding: 1em 10px; - border-top: 1px solid; -} - -#the-comment-list .pingback { - padding-left: 9px !important; -} - -#the-comment-list .comment-item, -#the-comment-list #replyrow { - margin: 0 -10px; -} - -#the-comment-list .comment-item:first-child { - border-top: none; -} - -#the-comment-list .comment-item .avatar { - float: left; - margin: 0 10px 5px 0; -} - -#the-comment-list .comment-item h4 { - line-height: 1.4; - margin-top: -.2em; - font-weight: normal; - color: #999; -} - -#the-comment-list .comment-item h4 cite { - font-style: normal; - font-weight: normal; -} - -#the-comment-list .comment-item blockquote, -#the-comment-list .comment-item blockquote p { - margin: 0; - padding: 0; - display: inline; -} - -#dashboard_recent_comments #the-comment-list .trackback blockquote, -#dashboard_recent_comments #the-comment-list .pingback blockquote { - display: block; -} - -#the-comment-list .comment-item p.row-actions { - margin: 3px 0 0; - padding: 0; - font-size: 10px; -} - -/* QuickPress */ - -#dashboard_quick_press h4 { - font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; - float: left; - width: 5.5em; - clear: both; - font-weight: normal; - text-align: right; - padding-top: 5px; - font-size: 12px; -} - -#dashboard_quick_press h4 label { - margin-right: 10px; -} - -#dashboard_quick_press .input-text-wrap, -#dashboard_quick_press .textarea-wrap { - margin: 0 0 1em 5em; -} - -#dashboard_quick_press #media-buttons { - margin: 0 0 .5em 5em; - padding: 0 0 0 10px; - font-size: 11px; -} - -#dashboard_quick_press #media-buttons a { - vertical-align: bottom; -} - -#dashboard-widgets #dashboard_quick_press form p.submit { - margin-left: 4.6em; -} - -#dashboard-widgets #dashboard_quick_press form p.submit input { - float: left; -} - -#dashboard-widgets #dashboard_quick_press form p.submit #save-post { - margin: 0 1em 0 10px; -} - -#dashboard-widgets #dashboard_quick_press form p.submit #publish { - float: right; -} - -/* Recent Drafts */ -#dashboard_recent_drafts ul { - margin: 0; - padding: 0; - list-style: none; -} - -#dashboard_recent_drafts ul li { - margin-bottom: 0.6em; -} - -#dashboard_recent_drafts h4 { - font-weight: normal; -} - -#dashboard_recent_drafts h4 abbr { - font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; - font-size: 11px; - color: #999; - margin-left: 3px; -} - -#dashboard_recent_drafts p { - margin: 0; - padding: 0; -} - -/* Feeds */ - -.rss-widget ul { - margin: 0; - padding: 0; - list-style: none; -} - -a.rsswidget { - font-size: 13px; - font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; - line-height: 1.7em; -} - -.rss-widget ul li { - line-height: 1.5em; - margin-bottom: 12px; -} - -.rss-widget span.rss-date { - margin-left: 3px; -} - -.rss-widget cite { - display: block; - text-align: right; - margin: 0 0 1em; - padding: 0; -} - -.rss-widget cite:before { - content: '\2014'; -} - -/* Plugins */ - -#dashboard_plugins h4 { - font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; -} - -#dashboard_plugins h5 { - font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; - font-size: 13px !important; - margin: 0; - display: inline; - line-height: 1.4em; -} - -#dashboard_plugins h5 a { - font-weight: normal; - line-height: 1.7em; -} - -#dashboard_plugins p { - margin: 0 0 1.4em; - line-height: 1.4em; -} - -.dashboard-comment-wrap { - overflow: hidden; - word-wrap: break-word; -} - +.postbox p,.postbox ul,.postbox ol,.postbox blockquote,#wp-version-message{font-size:11px;}.edit-box{display:none;}h3:hover .edit-box{display:inline;}form .input-text-wrap{border-style:solid;border-width:1px;padding:2px 3px;border-color:#ccc;}#dashboard-widgets form .input-text-wrap input{border:0 none;outline:none;margin:0;padding:0;width:99%;color:#333;}form .textarea-wrap{border-style:solid;border-width:1px;padding:2px;border-color:#ccc;}#dashboard-widgets form .textarea-wrap textarea{border:0 none;padding:0;outline:none;width:99%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;}#dashboard-widgets .postbox form .submit{float:none;margin:.5em 0 0;padding:0;border:none;}#dashboard-widgets-wrap #dashboard-widgets .postbox form .submit input{margin:0;}#dashboard-widgets-wrap #dashboard-widgets .postbox form .submit #publish{min-width:0;}div.postbox div.inside{margin:10px;position:relative;}#dashboard-widgets a{text-decoration:none;}#dashboard-widgets h3 a{text-decoration:underline;}#dashboard-widgets h3 .postbox-title-action{position:absolute;right:30px;padding:0;}#dashboard-widgets h4{font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-size:13px;margin:0 0 .2em;padding:0;}#dashboard_right_now p.sub,#dashboard_right_now .table,#dashboard_right_now .versions{margin:-12px;}#dashboard_right_now .inside{font-size:12px;}#dashboard_right_now p.sub{font-style:italic;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;padding:5px 10px 15px;color:#777;font-size:13px;}#dashboard_right_now .table{background:#f9f9f9;border-top:#ececec 1px solid;border-bottom:#ececec 1px solid;margin:0 -9px 10px;padding:0 10px;}#dashboard_right_now table{width:100%;}#dashboard_right_now table td{border-top:#ececec 1px solid;padding:3px 0;white-space:nowrap;}#dashboard_right_now table tr.first td{border-top:none;}#dashboard_right_now td.b{padding-right:6px;text-align:right;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-size:14px;}#dashboard_right_now td.b a{font-size:18px;}#dashboard_right_now td.b a:hover{color:#d54e21;}#dashboard_right_now .t{font-size:12px;padding-right:12px;padding-top:6px;color:#777;}#dashboard_right_now .t a{white-space:nowrap;}#dashboard_right_now td.first,#dashboard_right_now td.last{width:1%;}#dashboard_right_now .spam{color:red;}#dashboard_right_now .waiting{color:#e66f00;}#dashboard_right_now .approved{color:green;}#dashboard_right_now .versions{padding:6px 10px 12px;}#dashboard_right_now .versions .b{font-weight:bold;}#dashboard_right_now a.button{float:right;clear:right;position:relative;top:-5px;}#dashboard_recent_comments h3{margin-bottom:0;}#dashboard_recent_comments .inside{margin-top:0;}#dashboard_recent_comments .comment-meta .approve{font-style:italic;font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;font-size:10px;}#the-comment-list{position:relative;}#the-comment-list .comment-item{padding:1em 10px;border-top:1px solid;}#the-comment-list .pingback{padding-left:9px!important;}#the-comment-list .comment-item,#the-comment-list #replyrow{margin:0 -10px;}#the-comment-list .comment-item:first-child{border-top:none;}#the-comment-list .comment-item .avatar{float:left;margin:0 10px 5px 0;}#the-comment-list .comment-item h4{line-height:1.4;margin-top:-.2em;font-weight:normal;color:#999;}#the-comment-list .comment-item h4 cite{font-style:normal;font-weight:normal;}#the-comment-list .comment-item blockquote,#the-comment-list .comment-item blockquote p{margin:0;padding:0;display:inline;}#dashboard_recent_comments #the-comment-list .trackback blockquote,#dashboard_recent_comments #the-comment-list .pingback blockquote{display:block;}#the-comment-list .comment-item p.row-actions{margin:3px 0 0;padding:0;font-size:10px;}#dashboard_quick_press h4{font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;float:left;width:5.5em;clear:both;font-weight:normal;text-align:right;padding-top:5px;font-size:12px;}#dashboard_quick_press h4 label{margin-right:10px;}#dashboard_quick_press .input-text-wrap,#dashboard_quick_press .textarea-wrap{margin:0 0 1em 5em;}#dashboard_quick_press #media-buttons{margin:0 0 .5em 5em;padding:0 0 0 10px;font-size:11px;}#dashboard_quick_press #media-buttons a{vertical-align:bottom;}#dashboard-widgets #dashboard_quick_press form p.submit{margin-left:4.6em;}#dashboard-widgets #dashboard_quick_press form p.submit input{float:left;}#dashboard-widgets #dashboard_quick_press form p.submit #save-post{margin:0 1em 0 10px;}#dashboard-widgets #dashboard_quick_press form p.submit #publish{float:right;}#dashboard_recent_drafts ul{margin:0;padding:0;list-style:none;}#dashboard_recent_drafts ul li{margin-bottom:.6em;}#dashboard_recent_drafts h4{font-weight:normal;}#dashboard_recent_drafts h4 abbr{font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;font-size:11px;color:#999;margin-left:3px;}#dashboard_recent_drafts p{margin:0;padding:0;}.rss-widget ul{margin:0;padding:0;list-style:none;}a.rsswidget{font-size:13px;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;line-height:1.7em;}.rss-widget ul li{line-height:1.5em;margin-bottom:12px;}.rss-widget span.rss-date{margin-left:3px;}.rss-widget cite{display:block;text-align:right;margin:0 0 1em;padding:0;}.rss-widget cite:before{content:'\2014';}#dashboard_plugins h4{font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;}#dashboard_plugins h5{font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-size:13px!important;margin:0;display:inline;line-height:1.4em;}#dashboard_plugins h5 a{font-weight:normal;line-height:1.7em;}#dashboard_plugins p{margin:0 0 1.4em;line-height:1.4em;}.dashboard-comment-wrap{overflow:hidden;word-wrap:break-word;} \ No newline at end of file diff --git a/wp-admin/css/dashboard.dev.css b/wp-admin/css/dashboard.dev.css new file mode 100644 index 00000000..fe477b1c --- /dev/null +++ b/wp-admin/css/dashboard.dev.css @@ -0,0 +1,394 @@ +.postbox p, .postbox ul, .postbox ol, .postbox blockquote, #wp-version-message { font-size: 11px; } + +.edit-box { + display: none; +} + +h3:hover .edit-box { + display: inline; +} + +form .input-text-wrap { + border-style: solid; + border-width: 1px; + padding: 2px 3px; + border-color: #ccc; +} + +#dashboard-widgets form .input-text-wrap input { + border: 0 none; + outline: none; + margin: 0; + padding: 0; + width: 99%; + color: #333; +} + +form .textarea-wrap { + border-style: solid; + border-width: 1px; + padding: 2px; + border-color: #ccc; +} + +#dashboard-widgets form .textarea-wrap textarea { + border: 0 none; + padding: 0; + outline: none; + width: 99%; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} + +#dashboard-widgets .postbox form .submit { + float: none; + margin: .5em 0 0; + padding: 0; + border: none; +} + +#dashboard-widgets-wrap #dashboard-widgets .postbox form .submit input { + margin: 0; +} + +#dashboard-widgets-wrap #dashboard-widgets .postbox form .submit #publish { + min-width: 0; +} + +div.postbox div.inside { + margin: 10px; + position: relative; +} + +#dashboard-widgets a { + text-decoration: none; +} + +#dashboard-widgets h3 a { + text-decoration: underline; +} + +#dashboard-widgets h3 .postbox-title-action { + position: absolute; + right: 30px; + padding: 0; +} + +#dashboard-widgets h4 { + font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; + font-size: 13px; + margin: 0 0 .2em; + padding: 0; +} + +/* Right Now */ + +#dashboard_right_now p.sub, +#dashboard_right_now .table, #dashboard_right_now .versions { + margin: -12px; +} + +#dashboard_right_now .inside { + font-size: 12px; +} + +#dashboard_right_now p.sub { + font-style: italic; + font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; + padding: 5px 10px 15px; + color: #777; + font-size: 13px; +} + +#dashboard_right_now .table { + background: #f9f9f9; + border-top: #ececec 1px solid; + border-bottom: #ececec 1px solid; + margin: 0 -9px 10px; + padding: 0 10px; +} + +#dashboard_right_now table { + width: 100%; +} + +#dashboard_right_now table td { + border-top: #ececec 1px solid; + padding: 3px 0; + white-space: nowrap; +} + +#dashboard_right_now table tr.first td { + border-top: none; +} + +#dashboard_right_now td.b { + padding-right: 6px; + text-align: right; + font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; + font-size: 14px; +} + +#dashboard_right_now td.b a { + font-size: 18px; +} + +#dashboard_right_now td.b a:hover { + color: #d54e21; +} + +#dashboard_right_now .t { + font-size: 12px; + padding-right: 12px; + padding-top: 6px; + color: #777; +} + +#dashboard_right_now .t a { + white-space: nowrap; +} + +#dashboard_right_now td.first, +#dashboard_right_now td.last { + width: 1%; +} + +#dashboard_right_now .spam { + color: red; +} + +#dashboard_right_now .waiting { + color: #e66f00; +} + +#dashboard_right_now .approved { + color: green; +} + +#dashboard_right_now .versions { + padding: 6px 10px 12px; +} + +#dashboard_right_now .versions .b { + font-weight: bold; +} + +#dashboard_right_now a.button { + float: right; + clear: right; + position: relative; + top: -5px; +} + +/* Recent Comments */ + +#dashboard_recent_comments h3 { + margin-bottom: 0; +} + +#dashboard_recent_comments .inside { + margin-top: 0; +} + +#dashboard_recent_comments .comment-meta .approve { + font-style: italic; + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; + font-size: 10px; +} + +#the-comment-list { + position: relative; +} + +#the-comment-list .comment-item { + padding: 1em 10px; + border-top: 1px solid; +} + +#the-comment-list .pingback { + padding-left: 9px !important; +} + +#the-comment-list .comment-item, +#the-comment-list #replyrow { + margin: 0 -10px; +} + +#the-comment-list .comment-item:first-child { + border-top: none; +} + +#the-comment-list .comment-item .avatar { + float: left; + margin: 0 10px 5px 0; +} + +#the-comment-list .comment-item h4 { + line-height: 1.4; + margin-top: -.2em; + font-weight: normal; + color: #999; +} + +#the-comment-list .comment-item h4 cite { + font-style: normal; + font-weight: normal; +} + +#the-comment-list .comment-item blockquote, +#the-comment-list .comment-item blockquote p { + margin: 0; + padding: 0; + display: inline; +} + +#dashboard_recent_comments #the-comment-list .trackback blockquote, +#dashboard_recent_comments #the-comment-list .pingback blockquote { + display: block; +} + +#the-comment-list .comment-item p.row-actions { + margin: 3px 0 0; + padding: 0; + font-size: 10px; +} + +/* QuickPress */ + +#dashboard_quick_press h4 { + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; + float: left; + width: 5.5em; + clear: both; + font-weight: normal; + text-align: right; + padding-top: 5px; + font-size: 12px; +} + +#dashboard_quick_press h4 label { + margin-right: 10px; +} + +#dashboard_quick_press .input-text-wrap, +#dashboard_quick_press .textarea-wrap { + margin: 0 0 1em 5em; +} + +#dashboard_quick_press #media-buttons { + margin: 0 0 .5em 5em; + padding: 0 0 0 10px; + font-size: 11px; +} + +#dashboard_quick_press #media-buttons a { + vertical-align: bottom; +} + +#dashboard-widgets #dashboard_quick_press form p.submit { + margin-left: 4.6em; +} + +#dashboard-widgets #dashboard_quick_press form p.submit input { + float: left; +} + +#dashboard-widgets #dashboard_quick_press form p.submit #save-post { + margin: 0 1em 0 10px; +} + +#dashboard-widgets #dashboard_quick_press form p.submit #publish { + float: right; +} + +/* Recent Drafts */ +#dashboard_recent_drafts ul { + margin: 0; + padding: 0; + list-style: none; +} + +#dashboard_recent_drafts ul li { + margin-bottom: 0.6em; +} + +#dashboard_recent_drafts h4 { + font-weight: normal; +} + +#dashboard_recent_drafts h4 abbr { + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; + font-size: 11px; + color: #999; + margin-left: 3px; +} + +#dashboard_recent_drafts p { + margin: 0; + padding: 0; +} + +/* Feeds */ + +.rss-widget ul { + margin: 0; + padding: 0; + list-style: none; +} + +a.rsswidget { + font-size: 13px; + font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; + line-height: 1.7em; +} + +.rss-widget ul li { + line-height: 1.5em; + margin-bottom: 12px; +} + +.rss-widget span.rss-date { + margin-left: 3px; +} + +.rss-widget cite { + display: block; + text-align: right; + margin: 0 0 1em; + padding: 0; +} + +.rss-widget cite:before { + content: '\2014'; +} + +/* Plugins */ + +#dashboard_plugins h4 { + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; +} + +#dashboard_plugins h5 { + font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; + font-size: 13px !important; + margin: 0; + display: inline; + line-height: 1.4em; +} + +#dashboard_plugins h5 a { + font-weight: normal; + line-height: 1.7em; +} + +#dashboard_plugins p { + margin: 0 0 1.4em; + line-height: 1.4em; +} + +.dashboard-comment-wrap { + overflow: hidden; + word-wrap: break-word; +} + diff --git a/wp-admin/css/global-rtl.css b/wp-admin/css/global-rtl.css index 78b2c408..f5f7632e 100644 --- a/wp-admin/css/global-rtl.css +++ b/wp-admin/css/global-rtl.css @@ -78,6 +78,5 @@ body, td, textarea, input, select { .screen-reader-text, .screen-reader-text span { left:auto; - right:-1000em; -} + text-indent:-1000em; } \ No newline at end of file diff --git a/wp-admin/css/global.css b/wp-admin/css/global.css index 0ca08320..cb69b96f 100644 --- a/wp-admin/css/global.css +++ b/wp-admin/css/global.css @@ -1,487 +1 @@ -/* http://meyerweb.com/eric/tools/css/reset/ */ -/* v1.0 | 20080212 */ - -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, font, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td { - margin: 0; - padding: 0; - border: 0; - outline: 0; -/* font-size: 100%; - vertical-align: baseline; */ - background: transparent; -} -body { - line-height: 1; -} -ol, ul { - list-style: none; -} -blockquote, q { - quotes: none; -} -blockquote:before, blockquote:after, -q:before, q:after { - content: ''; - content: none; -} - -/* remember to define focus styles! */ -/* -:focus { - outline: 0; -} -*/ -/* remember to highlight inserts somehow! */ -ins { - text-decoration: none; -} -del { - text-decoration: line-through; -} - -/* tables still need 'cellspacing="0"' in the markup */ -/* -table { - border-collapse: collapse; - border-spacing: 0; -} -*/ -/* end reset css */ - - -/* 2 column liquid layout */ -#wpwrap { - height: auto; - min-height: 100%; - width: 100%; -} - -#wpcontent { - height: 100%; - padding-bottom: 50px; -} - -#wpbody { - clear: both; - margin-left: 175px; -} - -.folded #wpbody { - margin-left: 60px; -} - -#wpbody-content { - float: left; - width: 100%; -} - -#adminmenu { - float: left; - clear: left; - width: 145px; - margin-top: 15px; - margin-right: 5px; - margin-bottom: 15px; - margin-left: -160px; - position: relative; - padding: 0; - list-style: none; -} - -.folded #adminmenu { - margin-left: -45px; -} - -.folded #adminmenu, -.folded #adminmenu li.menu-top { - width: 28px; -} - -#footer { - clear: both; - position: relative; - width: 100%; -} - -/* inner 2 column liquid layout */ -.inner-sidebar { - float: right; - clear: right; - display: none; - width: 281px; - position: relative; -} - -.inner-sidebar #side-sortables { - width: 280px; - min-height: 300px; -} - -.has-right-sidebar .inner-sidebar { - display: block; -} - -.has-right-sidebar #post-body { - float: left; - clear: left; - width: 100%; - margin-right: -340px; -} - -.has-right-sidebar #post-body-content { - margin-right: 300px; -} - -/* 2 columns main area */ - -#col-container { - overflow: hidden; - padding: 0; - margin: 0; -} - -#col-left { - padding: 0; - margin: 0; - overflow: hidden; - width: 39%; -} - -#col-right { - float: right; - clear: right; - overflow: hidden; - padding: 0; - margin: 0; - width: 59%; -} - -/* utility classes */ -.alignleft { - float: left; -} - -.alignright { - float: right; -} - -.textleft { - text-align: left; -} - -.textright { - text-align: right; -} - -.clear { - clear: both; -} - -/* Hide visually but not from screen readers */ -.screen-reader-text, -.screen-reader-text span { - position: absolute; - left: -1000em; - height: 1px; - width: 1px; - overflow: hidden; -} - -.hidden, -.js .closed .inside, -.js .hide-if-js, -.no-js .hide-if-no-js { - display: none; -} - -/* include margin and padding in the width calculation of input and textarea */ -input[type="text"], -input[type="password"], -textarea { - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - -ms-box-sizing: border-box; /* ie8 only */ - box-sizing: border-box; -} - -input[type="checkbox"], -input[type="radio"] { - vertical-align: middle; -} - -/* styles for use by people extending the WordPress interface */ -html, -body { - height: 100%; -} - -body, -td, -textarea, -input, -select { - font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; - font-size: 13px; -} - -body, -textarea { - line-height: 1.4em; -} - -input, -select { - line-height: 1em; -} - -p { - margin: 1em 0; -} - -blockquote { - margin: 1em; -} - -label { - cursor: pointer; -} - -li, -dd { - margin-bottom: 6px; -} - -p, -li, -dl, -dd, -dt { - line-height: 140%; -} - -textarea, -input, -select { - margin: 1px; - padding: 3px; -} - -h1 { - display: block; - font-size: 2em; - font-weight: bold; - margin: .67em 0; -} - -h2 { - display: block; - font-size: 1.5em; - font-weight: bold; - margin: .83em 0; -} - -h3 { - display: block; - font-size: 1.17em; - font-weight: bold; - margin: 1em 0; -} - -h4 { - display: block; - font-size: 1em; - font-weight: bold; - margin: 1.33em 0; -} - -h5 { - display: block; - font-size: 0.83em; - font-weight: bold; - margin: 1.67em 0; -} - -h6 { - display: block; - font-size: 0.67em; - font-weight: bold; - margin: 2.33em 0; -} - -ul.ul-disc { - list-style: disc outside; -} - -ul.ul-square { - list-style: square outside; -} - -ol.ol-decimal { - list-style: decimal outside; -} - -ul.ul-disc, -ul.ul-square, -ol.ol-decimal { - margin-left: 1.8em; -} - -ul.ul-disc > li, -ul.ul-square > li, -ol.ol-decimal > li { - margin: 0 0 0.5em; -} - -.subsubsub { - list-style: none; - margin: 8px 0 5px; - padding: 0; - white-space: nowrap; - font-size: 11px; - float: left; -} - -.subsubsub a { - line-height: 2; - padding: .2em; - text-decoration: none; -} - -.subsubsub a .count, .subsubsub a.current .count { - color: #999; - font-weight: normal; -} - -.subsubsub a.current { - font-weight: bold; - background: none; - border: none; -} - -.subsubsub li { - display: inline; - margin: 0; - padding: 0; -} - -.widefat { - border-width: 1px; - border-style: solid; - border-spacing: 0; - width: 100%; - clear: both; - margin: 0; - -moz-border-radius: 4px; - -khtml-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; -} - -.widefat * { - word-wrap: break-word; -} - -.widefat a { - text-decoration: none; -} - -.widefat td, -.widefat th { - border-bottom-width: 1px; - border-bottom-style: solid; - font-size: 11px; - vertical-align: text-top; -} - -.widefat td { - padding: 3px 7px; - vertical-align: top; -} - -.widefat td p, -.widefat td ol, -.widefat td ul { - font-size: 11px; -} - -.widefat th { - padding: 7px 7px 8px; - text-align: left; - line-height: 1.3em; -} - -.widefat th input { - margin: 0 0 0 8px; - padding: 0; - vertical-align: text-top; -} - -.widefat .check-column { - width: 2.2em; - padding: 0; - -} - -.widefat tbody th.check-column { - padding: 7px 0 22px; -} - -.widefat .num, -.column-comments, -.column-links, -.column-posts, -.column-parent { - text-align: center; -} - -.widefat th#comments { - vertical-align: middle; -} - -.wrap { - margin: 0 15px 0 5px; -} - -.updated, -.error { - border-width: 1px; - border-style: solid; - padding: 0 0.6em; - margin: 5px 15px 2px; - -moz-border-radius: 3px; - -khtml-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; -} - -.updated p, -.error p { - margin: 0.5em 0; - line-height: 1; - padding: 2px; -} - -.wrap .updated, -.wrap .error { - margin: 5px 0 15px; -} - -.wrap h2 { - font: italic normal normal 24px/29px Georgia, "Times New Roman", "Bitstream Charter", Times, serif; - margin: 0; - padding: 14px 15px 3px 0; - line-height: 35px; - text-shadow: rgba(255,255,255,1) 0px 1px 0px; -} - -.wrap h2.long-header { - padding-right: 0; -} +html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;background:transparent;}body{line-height:1;}ol,ul{list-style:none;}blockquote,q{quotes:none;}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}ins{text-decoration:none;}del{text-decoration:line-through;}#wpwrap{height:auto;min-height:100%;width:100%;}#wpcontent{height:100%;padding-bottom:50px;}#wpbody{clear:both;margin-left:175px;}.folded #wpbody{margin-left:60px;}#wpbody-content{float:left;width:100%;}#adminmenu{float:left;clear:left;width:145px;margin-top:15px;margin-right:5px;margin-bottom:15px;margin-left:-160px;position:relative;padding:0;list-style:none;}.folded #adminmenu{margin-left:-45px;}.folded #adminmenu,.folded #adminmenu li.menu-top{width:28px;}#footer{clear:both;position:relative;width:100%;}.inner-sidebar{float:right;clear:right;display:none;width:281px;position:relative;}.inner-sidebar #side-sortables{width:280px;min-height:300px;}.has-right-sidebar .inner-sidebar{display:block;}.has-right-sidebar #post-body{float:left;clear:left;width:100%;margin-right:-340px;}.has-right-sidebar #post-body-content{margin-right:300px;}#col-container{overflow:hidden;padding:0;margin:0;}#col-left{padding:0;margin:0;overflow:hidden;width:39%;}#col-right{float:right;clear:right;overflow:hidden;padding:0;margin:0;width:59%;}.alignleft{float:left;}.alignright{float:right;}.textleft{text-align:left;}.textright{text-align:right;}.clear{clear:both;}.screen-reader-text,.screen-reader-text span{position:absolute;left:-1000em;height:1px;width:1px;overflow:hidden;}.hidden,.js .closed .inside,.js .hide-if-js,.no-js .hide-if-no-js{display:none;}input[type="text"],input[type="password"],textarea{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;}input[type="checkbox"],input[type="radio"]{vertical-align:middle;}html,body{height:100%;}body,td,textarea,input,select{font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;font-size:13px;}body,textarea{line-height:1.4em;}input,select{line-height:1em;}p{margin:1em 0;}blockquote{margin:1em;}label{cursor:pointer;}li,dd{margin-bottom:6px;}p,li,dl,dd,dt{line-height:140%;}textarea,input,select{margin:1px;padding:3px;}h1{display:block;font-size:2em;font-weight:bold;margin:.67em 0;}h2{display:block;font-size:1.5em;font-weight:bold;margin:.83em 0;}h3{display:block;font-size:1.17em;font-weight:bold;margin:1em 0;}h4{display:block;font-size:1em;font-weight:bold;margin:1.33em 0;}h5{display:block;font-size:.83em;font-weight:bold;margin:1.67em 0;}h6{display:block;font-size:.67em;font-weight:bold;margin:2.33em 0;}ul.ul-disc{list-style:disc outside;}ul.ul-square{list-style:square outside;}ol.ol-decimal{list-style:decimal outside;}ul.ul-disc,ul.ul-square,ol.ol-decimal{margin-left:1.8em;}ul.ul-disc>li,ul.ul-square>li,ol.ol-decimal>li{margin:0 0 .5em;}.subsubsub{list-style:none;margin:8px 0 5px;padding:0;white-space:nowrap;font-size:11px;float:left;}.subsubsub a{line-height:2;padding:.2em;text-decoration:none;}.subsubsub a .count,.subsubsub a.current .count{color:#999;font-weight:normal;}.subsubsub a.current{font-weight:bold;background:none;border:none;}.subsubsub li{display:inline;margin:0;padding:0;}.widefat{border-width:1px;border-style:solid;border-spacing:0;width:100%;clear:both;margin:0;-moz-border-radius:4px;-khtml-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;}.widefat *{word-wrap:break-word;}.widefat a{text-decoration:none;}.widefat td,.widefat th{border-bottom-width:1px;border-bottom-style:solid;font-size:11px;}.widefat td{padding:3px 7px;vertical-align:top;}.widefat td p,.widefat td ol,.widefat td ul{font-size:11px;}.widefat th{padding:7px 7px 8px;text-align:left;line-height:1.3em;}.widefat th input{margin:0 0 0 8px;padding:0;vertical-align:text-top;}.widefat .check-column{width:2.2em;padding:0;}.widefat tbody th.check-column{padding:7px 0 22px;}.widefat .num,.column-comments,.column-links,.column-posts{text-align:center;}.widefat th#comments{vertical-align:middle;}.wrap{margin:0 15px 0 5px;}.updated,.error{border-width:1px;border-style:solid;padding:0 .6em;margin:5px 15px 2px;-moz-border-radius:3px;-khtml-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;}.updated p,.error p{margin:.5em 0;line-height:1;padding:2px;}.wrap .updated,.wrap .error{margin:5px 0 15px;}.wrap h2{font:italic normal normal 24px/29px Georgia,"Times New Roman","Bitstream Charter",Times,serif;margin:0;padding:14px 15px 3px 0;line-height:35px;text-shadow:rgba(255,255,255,1) 0 1px 0;}.wrap h2.long-header{padding-right:0;} \ No newline at end of file diff --git a/wp-admin/css/global.dev.css b/wp-admin/css/global.dev.css new file mode 100644 index 00000000..8975db5a --- /dev/null +++ b/wp-admin/css/global.dev.css @@ -0,0 +1,485 @@ +/* http://meyerweb.com/eric/tools/css/reset/ */ +/* v1.0 | 20080212 */ + +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, font, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td { + margin: 0; + padding: 0; + border: 0; + outline: 0; +/* font-size: 100%; + vertical-align: baseline; */ + background: transparent; +} +body { + line-height: 1; +} +ol, ul { + list-style: none; +} +blockquote, q { + quotes: none; +} +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} + +/* remember to define focus styles! */ +/* +:focus { + outline: 0; +} +*/ +/* remember to highlight inserts somehow! */ +ins { + text-decoration: none; +} +del { + text-decoration: line-through; +} + +/* tables still need 'cellspacing="0"' in the markup */ +/* +table { + border-collapse: collapse; + border-spacing: 0; +} +*/ +/* end reset css */ + + +/* 2 column liquid layout */ +#wpwrap { + height: auto; + min-height: 100%; + width: 100%; +} + +#wpcontent { + height: 100%; + padding-bottom: 50px; +} + +#wpbody { + clear: both; + margin-left: 175px; +} + +.folded #wpbody { + margin-left: 60px; +} + +#wpbody-content { + float: left; + width: 100%; +} + +#adminmenu { + float: left; + clear: left; + width: 145px; + margin-top: 15px; + margin-right: 5px; + margin-bottom: 15px; + margin-left: -160px; + position: relative; + padding: 0; + list-style: none; +} + +.folded #adminmenu { + margin-left: -45px; +} + +.folded #adminmenu, +.folded #adminmenu li.menu-top { + width: 28px; +} + +#footer { + clear: both; + position: relative; + width: 100%; +} + +/* inner 2 column liquid layout */ +.inner-sidebar { + float: right; + clear: right; + display: none; + width: 281px; + position: relative; +} + +.inner-sidebar #side-sortables { + width: 280px; + min-height: 300px; +} + +.has-right-sidebar .inner-sidebar { + display: block; +} + +.has-right-sidebar #post-body { + float: left; + clear: left; + width: 100%; + margin-right: -340px; +} + +.has-right-sidebar #post-body-content { + margin-right: 300px; +} + +/* 2 columns main area */ + +#col-container { + overflow: hidden; + padding: 0; + margin: 0; +} + +#col-left { + padding: 0; + margin: 0; + overflow: hidden; + width: 39%; +} + +#col-right { + float: right; + clear: right; + overflow: hidden; + padding: 0; + margin: 0; + width: 59%; +} + +/* utility classes */ +.alignleft { + float: left; +} + +.alignright { + float: right; +} + +.textleft { + text-align: left; +} + +.textright { + text-align: right; +} + +.clear { + clear: both; +} + +/* Hide visually but not from screen readers */ +.screen-reader-text, +.screen-reader-text span { + position: absolute; + left: -1000em; + height: 1px; + width: 1px; + overflow: hidden; +} + +.hidden, +.js .closed .inside, +.js .hide-if-js, +.no-js .hide-if-no-js { + display: none; +} + +/* include margin and padding in the width calculation of input and textarea */ +input[type="text"], +input[type="password"], +textarea { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + -ms-box-sizing: border-box; /* ie8 only */ + box-sizing: border-box; +} + +input[type="checkbox"], +input[type="radio"] { + vertical-align: middle; +} + +/* styles for use by people extending the WordPress interface */ +html, +body { + height: 100%; +} + +body, +td, +textarea, +input, +select { + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; + font-size: 13px; +} + +body, +textarea { + line-height: 1.4em; +} + +input, +select { + line-height: 1em; +} + +p { + margin: 1em 0; +} + +blockquote { + margin: 1em; +} + +label { + cursor: pointer; +} + +li, +dd { + margin-bottom: 6px; +} + +p, +li, +dl, +dd, +dt { + line-height: 140%; +} + +textarea, +input, +select { + margin: 1px; + padding: 3px; +} + +h1 { + display: block; + font-size: 2em; + font-weight: bold; + margin: .67em 0; +} + +h2 { + display: block; + font-size: 1.5em; + font-weight: bold; + margin: .83em 0; +} + +h3 { + display: block; + font-size: 1.17em; + font-weight: bold; + margin: 1em 0; +} + +h4 { + display: block; + font-size: 1em; + font-weight: bold; + margin: 1.33em 0; +} + +h5 { + display: block; + font-size: 0.83em; + font-weight: bold; + margin: 1.67em 0; +} + +h6 { + display: block; + font-size: 0.67em; + font-weight: bold; + margin: 2.33em 0; +} + +ul.ul-disc { + list-style: disc outside; +} + +ul.ul-square { + list-style: square outside; +} + +ol.ol-decimal { + list-style: decimal outside; +} + +ul.ul-disc, +ul.ul-square, +ol.ol-decimal { + margin-left: 1.8em; +} + +ul.ul-disc > li, +ul.ul-square > li, +ol.ol-decimal > li { + margin: 0 0 0.5em; +} + +.subsubsub { + list-style: none; + margin: 8px 0 5px; + padding: 0; + white-space: nowrap; + font-size: 11px; + float: left; +} + +.subsubsub a { + line-height: 2; + padding: .2em; + text-decoration: none; +} + +.subsubsub a .count, .subsubsub a.current .count { + color: #999; + font-weight: normal; +} + +.subsubsub a.current { + font-weight: bold; + background: none; + border: none; +} + +.subsubsub li { + display: inline; + margin: 0; + padding: 0; +} + +.widefat { + border-width: 1px; + border-style: solid; + border-spacing: 0; + width: 100%; + clear: both; + margin: 0; + -moz-border-radius: 4px; + -khtml-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; +} + +.widefat * { + word-wrap: break-word; +} + +.widefat a { + text-decoration: none; +} + +.widefat td, +.widefat th { + border-bottom-width: 1px; + border-bottom-style: solid; + font-size: 11px; +} + +.widefat td { + padding: 3px 7px; + vertical-align: top; +} + +.widefat td p, +.widefat td ol, +.widefat td ul { + font-size: 11px; +} + +.widefat th { + padding: 7px 7px 8px; + text-align: left; + line-height: 1.3em; +} + +.widefat th input { + margin: 0 0 0 8px; + padding: 0; + vertical-align: text-top; +} + +.widefat .check-column { + width: 2.2em; + padding: 0; + +} + +.widefat tbody th.check-column { + padding: 7px 0 22px; +} + +.widefat .num, +.column-comments, +.column-links, +.column-posts { + text-align: center; +} + +.widefat th#comments { + vertical-align: middle; +} + +.wrap { + margin: 0 15px 0 5px; +} + +.updated, +.error { + border-width: 1px; + border-style: solid; + padding: 0 0.6em; + margin: 5px 15px 2px; + -moz-border-radius: 3px; + -khtml-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} + +.updated p, +.error p { + margin: 0.5em 0; + line-height: 1; + padding: 2px; +} + +.wrap .updated, +.wrap .error { + margin: 5px 0 15px; +} + +.wrap h2 { + font: italic normal normal 24px/29px Georgia, "Times New Roman", "Bitstream Charter", Times, serif; + margin: 0; + padding: 14px 15px 3px 0; + line-height: 35px; + text-shadow: rgba(255,255,255,1) 0px 1px 0px; +} + +.wrap h2.long-header { + padding-right: 0; +} diff --git a/wp-admin/css/ie-rtl.css b/wp-admin/css/ie-rtl.css index 1a6db486..067f59a0 100644 --- a/wp-admin/css/ie-rtl.css +++ b/wp-admin/css/ie-rtl.css @@ -89,3 +89,7 @@ p.submit { /* quick edit and reply in edit-comments.php */ form#widgets-filter { /* fix widget page */ position: static; } + +* html .meta-box-sortables .postbox .handlediv { + background: transparent url(../images/menu-bits-rtl-vs.gif) no-repeat scroll right -111px; +} diff --git a/wp-admin/css/ie.css b/wp-admin/css/ie.css index 3ced032d..7e84e0c5 100644 --- a/wp-admin/css/ie.css +++ b/wp-admin/css/ie.css @@ -21,6 +21,14 @@ input.button-highlighted { margin-bottom: -1px; } +* html .meta-box-sortables .postbox .handlediv { + background: transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -111px; +} + +* html .edit-box { + display: inline; +} + * html .inner-sidebar #side-sortables, * html .postbox-container .meta-box-sortables { height: 300px; @@ -317,6 +325,10 @@ div#dashboard-widgets { margin-top: 2px; } +.tablenav .actions select { + width: 155px; +} + table.ie-fixed { table-layout: fixed; } @@ -399,3 +411,34 @@ table.ie-fixed { position: relative; } +* html .media-item .pinkynail { + height: 32px; + width: 40px; +} + +#wpcontent .button-primary-disabled { + color: #9FD0D5; + background: #298CBA; +} + +#wpcontent #ajax-loading { + vertical-align: baseline; +} + +* html .describe .field input.text, +* html .describe .field textarea { + width: 440px; +} + +#the-comment-list .unapproved tr, +#the-comment-list .unapproved td { + background-color: #ffffe0; +} + +.imgedit-submit { + width: 300px; +} + +* html input { + border: 1px solid #dfdfdf; +} diff --git a/wp-admin/css/install.css b/wp-admin/css/install.css index 6be5ba75..834a3b18 100644 --- a/wp-admin/css/install.css +++ b/wp-admin/css/install.css @@ -1,133 +1 @@ -html { background: #f7f7f7; } - -body { - background: #fff; - color: #333; - font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; - margin: 2em auto 0 auto; - width: 700px; - padding: 1em 2em; - -moz-border-radius: 11px; - -khtml-border-radius: 11px; - -webkit-border-radius: 11px; - border-radius: 11px; - border: 1px solid #dfdfdf; -} - -a { color: #2583ad; text-decoration: none; } - -a:hover { color: #d54e21; } - -h1 { - border-bottom: 1px solid #dadada; - clear: both; - color: #666; - font: 24px Georgia, "Times New Roman", Times, serif; - margin: 5px 0 0 -4px; - padding: 0; - padding-bottom: 7px; -} - -h2 { font-size: 16px; } - -p, li { - padding-bottom: 2px; - font-size: 12px; - line-height: 18px; -} - -code { font-size: 13px; } - -ul, ol { padding: 5px 5px 5px 22px; } - -#logo { margin: 6px 0 14px 0; border-bottom: none;} - -.step { - margin: 20px 0 15px; -} - -.step, th { text-align: left; padding: 0; } - -.submit input, .button, .button-secondary { - font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; - text-decoration: none; - font-size: 14px !important; - line-height: 16px; - padding: 6px 12px; - cursor: pointer; - border: 1px solid #bbb; - color: #464646; - -moz-border-radius: 15px; - -khtml-border-radius: 15px; - -webkit-border-radius: 15px; - border-radius: 15px; - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; - -khtml-box-sizing: content-box; - box-sizing: content-box; -} - -.button:hover, .button-secondary:hover, .submit input:hover { - color: #000; - border-color: #666; -} - -.button, .submit input, .button-secondary { - background: #f2f2f2 url(../images/white-grad.png) repeat-x scroll left top; -} - -.button:active, .submit input:active, .button-secondary:active { - background: #eee url(../images/white-grad-active.png) repeat-x scroll left top; -} - -.form-table { - border-collapse: collapse; - margin-top: 1em; - width: 100%; -} - -.form-table td { - margin-bottom: 9px; - padding: 10px; - border-bottom: 8px solid #fff; - font-size: 12px; -} - -.form-table th { - font-size: 13px; - text-align: left; - padding: 16px 10px 10px 10px; - border-bottom: 8px solid #fff; - width: 110px; - vertical-align: top; -} - -.form-table tr { - background: #f3f3f3; -} - -.form-table code { - line-height: 18px; - font-size: 18px; -} - -.form-table p { - margin: 4px 0 0 0; - font-size: 11px; -} - -.form-table input { - line-height: 20px; - font-size: 15px; - padding: 2px; -} - -#error-page { margin-top: 50px; } - -#error-page p { - font-size: 12px; - line-height: 18px; - margin: 25px 0 20px; -} - -#error-page code { font-family: Consolas, Monaco, Courier, monospace; } +html{background:#f7f7f7;}body{background:#fff;color:#333;font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;margin:2em auto 0 auto;width:700px;padding:1em 2em;-moz-border-radius:11px;-khtml-border-radius:11px;-webkit-border-radius:11px;border-radius:11px;border:1px solid #dfdfdf;}a{color:#2583ad;text-decoration:none;}a:hover{color:#d54e21;}h1{border-bottom:1px solid #dadada;clear:both;color:#666;font:24px Georgia,"Times New Roman",Times,serif;margin:5px 0 0 -4px;padding:0;padding-bottom:7px;}h2{font-size:16px;}p,li{padding-bottom:2px;font-size:12px;line-height:18px;}code{font-size:13px;}ul,ol{padding:5px 5px 5px 22px;}#logo{margin:6px 0 14px 0;border-bottom:none;}.step{margin:20px 0 15px;}.step,th{text-align:left;padding:0;}.submit input,.button,.button-secondary{font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;text-decoration:none;font-size:14px!important;line-height:16px;padding:6px 12px;cursor:pointer;border:1px solid #bbb;color:#464646;-moz-border-radius:15px;-khtml-border-radius:15px;-webkit-border-radius:15px;border-radius:15px;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;-khtml-box-sizing:content-box;box-sizing:content-box;}.button:hover,.button-secondary:hover,.submit input:hover{color:#000;border-color:#666;}.button,.submit input,.button-secondary{background:#f2f2f2 url(../images/white-grad.png) repeat-x scroll left top;}.button:active,.submit input:active,.button-secondary:active{background:#eee url(../images/white-grad-active.png) repeat-x scroll left top;}.form-table{border-collapse:collapse;margin-top:1em;width:100%;}.form-table td{margin-bottom:9px;padding:10px;border-bottom:8px solid #fff;font-size:12px;}.form-table th{font-size:13px;text-align:left;padding:16px 10px 10px 10px;border-bottom:8px solid #fff;width:110px;vertical-align:top;}.form-table tr{background:#f3f3f3;}.form-table code{line-height:18px;font-size:18px;}.form-table p{margin:4px 0 0 0;font-size:11px;}.form-table input{line-height:20px;font-size:15px;padding:2px;}#error-page{margin-top:50px;}#error-page p{font-size:12px;line-height:18px;margin:25px 0 20px;}#error-page code{font-family:Consolas,Monaco,Courier,monospace;} \ No newline at end of file diff --git a/wp-admin/css/install.dev.css b/wp-admin/css/install.dev.css new file mode 100644 index 00000000..6be5ba75 --- /dev/null +++ b/wp-admin/css/install.dev.css @@ -0,0 +1,133 @@ +html { background: #f7f7f7; } + +body { + background: #fff; + color: #333; + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; + margin: 2em auto 0 auto; + width: 700px; + padding: 1em 2em; + -moz-border-radius: 11px; + -khtml-border-radius: 11px; + -webkit-border-radius: 11px; + border-radius: 11px; + border: 1px solid #dfdfdf; +} + +a { color: #2583ad; text-decoration: none; } + +a:hover { color: #d54e21; } + +h1 { + border-bottom: 1px solid #dadada; + clear: both; + color: #666; + font: 24px Georgia, "Times New Roman", Times, serif; + margin: 5px 0 0 -4px; + padding: 0; + padding-bottom: 7px; +} + +h2 { font-size: 16px; } + +p, li { + padding-bottom: 2px; + font-size: 12px; + line-height: 18px; +} + +code { font-size: 13px; } + +ul, ol { padding: 5px 5px 5px 22px; } + +#logo { margin: 6px 0 14px 0; border-bottom: none;} + +.step { + margin: 20px 0 15px; +} + +.step, th { text-align: left; padding: 0; } + +.submit input, .button, .button-secondary { + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; + text-decoration: none; + font-size: 14px !important; + line-height: 16px; + padding: 6px 12px; + cursor: pointer; + border: 1px solid #bbb; + color: #464646; + -moz-border-radius: 15px; + -khtml-border-radius: 15px; + -webkit-border-radius: 15px; + border-radius: 15px; + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + -khtml-box-sizing: content-box; + box-sizing: content-box; +} + +.button:hover, .button-secondary:hover, .submit input:hover { + color: #000; + border-color: #666; +} + +.button, .submit input, .button-secondary { + background: #f2f2f2 url(../images/white-grad.png) repeat-x scroll left top; +} + +.button:active, .submit input:active, .button-secondary:active { + background: #eee url(../images/white-grad-active.png) repeat-x scroll left top; +} + +.form-table { + border-collapse: collapse; + margin-top: 1em; + width: 100%; +} + +.form-table td { + margin-bottom: 9px; + padding: 10px; + border-bottom: 8px solid #fff; + font-size: 12px; +} + +.form-table th { + font-size: 13px; + text-align: left; + padding: 16px 10px 10px 10px; + border-bottom: 8px solid #fff; + width: 110px; + vertical-align: top; +} + +.form-table tr { + background: #f3f3f3; +} + +.form-table code { + line-height: 18px; + font-size: 18px; +} + +.form-table p { + margin: 4px 0 0 0; + font-size: 11px; +} + +.form-table input { + line-height: 20px; + font-size: 15px; + padding: 2px; +} + +#error-page { margin-top: 50px; } + +#error-page p { + font-size: 12px; + line-height: 18px; + margin: 25px 0 20px; +} + +#error-page code { font-family: Consolas, Monaco, Courier, monospace; } diff --git a/wp-admin/css/login.css b/wp-admin/css/login.css index bd89d91a..a880c037 100644 --- a/wp-admin/css/login.css +++ b/wp-admin/css/login.css @@ -1,111 +1 @@ -* { margin: 0; padding: 0; } - -body { - border-top-width: 30px; - border-top-style: solid; - font: 11px "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; -} - -form { - margin-left: 8px; - padding: 16px 16px 40px 16px; - font-weight: normal; - -moz-border-radius: 11px; - -khtml-border-radius: 11px; - -webkit-border-radius: 11px; - border-radius: 5px; - background: #fff; - border: 1px solid #e5e5e5; - -moz-box-shadow: rgba(200,200,200,1) 0 4px 18px; - -webkit-box-shadow: rgba(200,200,200,1) 0 4px 18px; - -khtml-box-shadow: rgba(200,200,200,1) 0 4px 18px; - box-shadow: rgba(200,200,200,1) 0 4px 18px; -} - -form .forgetmenot { font-weight: normal; float: left; margin-bottom: 0; } - -#login form .submit input { - font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; - padding: 3px 10px; - border: none; - font-size: 12px; - border-width: 1px; - border-style: solid; - -moz-border-radius: 11px; - -khtml-border-radius: 11px; - -webkit-border-radius: 11px; - border-radius: 11px; - cursor: pointer; - text-decoration: none; - margin-top: -3px; - text-shadow: rgba(0,0,0,0.3) 0 -1px 0; -} - -#login form p { - margin-bottom: 0; -} - -label { - color: #777; - font-size: 13px; -} - -form .forgetmenot label { - font-size: 11px; - line-height: 19px; -} - -form .submit { float: right; } - -form p { margin-bottom: 24px; } - -h1 a { - background: url(../images/logo-login.gif) no-repeat top center; - width: 326px; - height: 67px; - text-indent: -9999px; - overflow: hidden; - padding-bottom: 15px; - display: block; -} - -#nav { - text-shadow: rgba(255,255,255,1) 0 1px 0; -} - -#backtoblog a { - position: absolute; - top: 7px; - left: 15px; - text-decoration: none; -} - -#login { width: 320px; margin: 7em auto; } - -#login_error, .message { - margin: 0 0 16px 8px; - border-width: 1px; - border-style: solid; - padding: 12px; - -moz-border-radius: 3px; - -khtml-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; -} - -#nav { margin: 0 0 0 8px; padding: 16px; } - -#user_pass, #user_login, #user_email { - font-size: 24px; - width: 97%; - padding: 3px; - margin-top: 2px; - margin-right: 6px; - margin-bottom: 16px; - border: 1px solid #e5e5e5; - background: #fbfbfb; -} - -.clear { - clear: both; -} +*{margin:0;padding:0;}body{border-top-width:30px;border-top-style:solid;font:11px "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;}form{margin-left:8px;padding:16px 16px 40px 16px;font-weight:normal;-moz-border-radius:11px;-khtml-border-radius:11px;-webkit-border-radius:11px;border-radius:5px;background:#fff;border:1px solid #e5e5e5;-moz-box-shadow:rgba(200,200,200,1) 0 4px 18px;-webkit-box-shadow:rgba(200,200,200,1) 0 4px 18px;-khtml-box-shadow:rgba(200,200,200,1) 0 4px 18px;box-shadow:rgba(200,200,200,1) 0 4px 18px;}form .forgetmenot{font-weight:normal;float:left;margin-bottom:0;}.button-primary{font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;padding:3px 10px;border:none;font-size:12px;border-width:1px;border-style:solid;-moz-border-radius:11px;-khtml-border-radius:11px;-webkit-border-radius:11px;border-radius:11px;cursor:pointer;text-decoration:none;margin-top:-3px;}#login form p{margin-bottom:0;}label{color:#777;font-size:13px;}form .forgetmenot label{font-size:11px;line-height:19px;}form .submit,.alignright{float:right;}form p{margin-bottom:24px;}h1 a{background:url(../images/logo-login.gif) no-repeat top center;width:326px;height:67px;text-indent:-9999px;overflow:hidden;padding-bottom:15px;display:block;}#nav{text-shadow:rgba(255,255,255,1) 0 1px 0;}#backtoblog a{position:absolute;top:7px;left:15px;text-decoration:none;}#login{width:320px;margin:7em auto;}#login_error,.message{margin:0 0 16px 8px;border-width:1px;border-style:solid;padding:12px;-moz-border-radius:3px;-khtml-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;}#nav{margin:0 0 0 8px;padding:16px;}#user_pass,#user_login,#user_email{font-size:24px;width:97%;padding:3px;margin-top:2px;margin-right:6px;margin-bottom:16px;border:1px solid #e5e5e5;background:#fbfbfb;}input{color:#555;}.clear{clear:both;} \ No newline at end of file diff --git a/wp-admin/css/login.dev.css b/wp-admin/css/login.dev.css new file mode 100644 index 00000000..842debc1 --- /dev/null +++ b/wp-admin/css/login.dev.css @@ -0,0 +1,129 @@ +* { margin: 0; padding: 0; } + +body { + border-top-width: 30px; + border-top-style: solid; + font: 11px "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; +} + +form { + margin-left: 8px; + padding: 16px 16px 40px 16px; + font-weight: normal; + -moz-border-radius: 11px; + -khtml-border-radius: 11px; + -webkit-border-radius: 11px; + border-radius: 5px; + background: #fff; + border: 1px solid #e5e5e5; + -moz-box-shadow: rgba(200,200,200,1) 0 4px 18px; + -webkit-box-shadow: rgba(200,200,200,1) 0 4px 18px; + -khtml-box-shadow: rgba(200,200,200,1) 0 4px 18px; + box-shadow: rgba(200,200,200,1) 0 4px 18px; +} + +form .forgetmenot { + font-weight: normal; + float: left; + margin-bottom: 0; +} + +.button-primary { + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; + padding: 3px 10px; + border: none; + font-size: 12px; + border-width: 1px; + border-style: solid; + -moz-border-radius: 11px; + -khtml-border-radius: 11px; + -webkit-border-radius: 11px; + border-radius: 11px; + cursor: pointer; + text-decoration: none; + margin-top: -3px; +} + +#login form p { + margin-bottom: 0; +} + +label { + color: #777; + font-size: 13px; +} + +form .forgetmenot label { + font-size: 11px; + line-height: 19px; +} + +form .submit, +.alignright { + float: right; +} + +form p { + margin-bottom: 24px; +} + +h1 a { + background: url(../images/logo-login.gif) no-repeat top center; + width: 326px; + height: 67px; + text-indent: -9999px; + overflow: hidden; + padding-bottom: 15px; + display: block; +} + +#nav { + text-shadow: rgba(255,255,255,1) 0 1px 0; +} + +#backtoblog a { + position: absolute; + top: 7px; + left: 15px; + text-decoration: none; +} + +#login { width: 320px; margin: 7em auto; } + +#login_error, +.message { + margin: 0 0 16px 8px; + border-width: 1px; + border-style: solid; + padding: 12px; + -moz-border-radius: 3px; + -khtml-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} + +#nav { + margin: 0 0 0 8px; + padding: 16px; +} + +#user_pass, +#user_login, +#user_email { + font-size: 24px; + width: 97%; + padding: 3px; + margin-top: 2px; + margin-right: 6px; + margin-bottom: 16px; + border: 1px solid #e5e5e5; + background: #fbfbfb; +} + +input { + color: #555; +} + +.clear { + clear: both; +} diff --git a/wp-admin/css/media-rtl.css b/wp-admin/css/media-rtl.css index 5aeab26f..fed86444 100644 --- a/wp-admin/css/media-rtl.css +++ b/wp-admin/css/media-rtl.css @@ -47,15 +47,7 @@ button.dismiss { border-right-style: none; 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; diff --git a/wp-admin/css/media.css b/wp-admin/css/media.css index f3ccaf08..3ab802f9 100644 --- a/wp-admin/css/media.css +++ b/wp-admin/css/media.css @@ -1,400 +1 @@ -div#media-upload-header { - margin: 0; - padding: 0 5px; - font-weight: bold; - position: relative; - border-bottom-width: 1px; - border-bottom-style: solid; - height: 2.5em; -} - -body#media-upload ul#sidemenu { - font-weight: normal; - margin: 0 5px; - position: absolute; - left: 0px; - bottom: -1px; -} - -div#media-upload-error { - margin: 1em; - font-weight: bold; -} - -form { - margin: 1em; -} - -#search-filter { - text-align: right; -} - -.media-upload-form label, -.media-upload-form legend { - display: block; - font-weight: bold; - font-size: 13px; - margin-bottom: 0.5em; - margin: 0 0 0.5em 0; -} - -th { - position: relative; -} - -.media-upload-form label.form-help, td.help { - font-family: "Lucida Grande", "Bitstream Vera Sans", Verdana, Arial, sans-serif; - font-style: italic; - font-weight: normal; -} - -.media-upload-form p.help { - margin: 0; - padding: 0; -} - -.media-upload-form fieldset { - width: 100%; - border: none; - text-align: justify; - margin: 0 0 1em 0; - padding: 0; -} - -/* specific to the image upload form */ -.align .field label { - display: inline; - padding: 0 0 0 28px; - margin: 0 1em 0 0; -} - -.image-align-none-label { - background: url(../images/align-none.png) no-repeat center left; -} - -.image-align-left-label { - background: url(../images/align-left.png) no-repeat center left; -} - -.image-align-center-label { - background: url(../images/align-center.png) no-repeat center left; -} - -.image-align-right-label { - background: url(../images/align-right.png) no-repeat center left; -} - -tr.image-size td { - width: 460px; -} - -tr.image-size div.image-size-item { - float: left; - width: 25%; - margin: 0; -} - -tr.image-size label { - display: inline; - margin: 0 0 0 1em; -} - -.pinkynail { - max-width: 40px; - max-height: 40px; -} - -#library-form .progress, -#gallery-form .progress, -#flash-upload-ui, -.insert-gallery, -.describe.startopen, -.describe.startclosed { - display: none; -} - -.media-item .thumbnail { - max-width: 128px; - max-height: 128px; -} - -.media-item .pinkynail { - float: left; - margin: 2px; - height: 32px; - max-width: 40px; -} - -thead.media-item-info tr { - background-color: transparent; -} - -thead.media-item-info th, -thead.media-item-info td { - border: none; - margin: 0; -} - -.form-table thead.media-item-info { - border: 8px solid #fff; -} - -abbr.required { - text-decoration: none; - border: none; -} - -.describe label { - display: inline; -} - -.describe td { - vertical-align: middle; - padding: 0 5px 0 0; -} - -.describe td.A1 { - width: 132px; -} - -.describe input[type="text"], -.describe textarea { - width: 460px; - border-width: 1px; - border-style: solid; -} - -.describe-toggle-on, -.describe-toggle-off { - display: block; - line-height: 36px; - float: right; - margin-right: 20px; -} - -.describe-toggle-off { - display: none; -} - -.hidden { - height: 0; - width: 0; - overflow: hidden; - border: none; -} - -/* Specific to Uploader */ - -#media-upload .media-upload-form p { - margin: 0 1em 1em 0; -} - -#media-upload p.ml-submit { - padding: 1em 0; -} - -#media-upload p.help, -#media-upload label.help { - font-family: "Lucida Grande", "Bitstream Vera Sans", Verdana, Arial, sans-serif; - font-style: italic; - font-weight: normal; -} - -#media-upload tr.image-size td.field { - text-align: center; -} - -#media-upload #media-items { - border-width: 1px; - border-style: solid; - border-bottom: none; - width: 623px; -} - -#media-upload .media-item { - border-bottom-width: 1px; - border-bottom-style: solid; - min-height: 36px; - width: 100%; -} - -#media-upload .ui-sortable .media-item { - cursor: move; -} - -.filename { - line-height: 36px; - padding: 0 10px; - overflow: hidden; -} - -#media-upload .describe { - padding: 5px; - width: 100%; - clear: both; - cursor: default; -} - -#media-upload .slidetoggle { - border-top-width: 1px; - border-top-style: solid; -} - -#media-upload .describe th.label { - padding-top: .5em; - text-align: left; - min-width: 120px; -} - -#media-upload tr.align td.field { - text-align: center; -} - -#media-upload tr.image-size { - margin-bottom: 1em; - height: 3em; -} - -#media-upload #filter { - width: 623px; -} - -#media-upload #filter .subsubsub { - margin: 8px 0; -} - -#filter .tablenav select { - border-style: solid; - border-width: 1px; - padding: 2px; - vertical-align: top; - width: auto; -} - -#media-upload .del-attachment { - display: none; - margin: 5px 0; -} - -.menu_order { - float: right; - font-size: 11px; - margin: 10px 10px 0; -} - -.menu_order_input { - border: 1px solid #ddd; - font-size: 10px; - padding: 1px; - width: 23px; -} - -.ui-sortable-helper { - background-color: #fff; - border: 1px solid #aaa; - opacity: 0.6; - filter: alpha(opacity=60); -} - -#media-upload th.order-head { - width: 25%; - text-align: center; -} - -#media-upload .widefat { - width: 626px; - border-style: solid solid none; -} - -.sorthelper { - height: 37px; - width: 623px; - display: block; -} - -#gallery-settings th.label { - width: 160px; -} - -#gallery-settings #basic th.label { - padding: 5px 5px 5px 0; -} - -#gallery-settings .title { - clear: both; - padding: 0 0 3px; - border-bottom-style: solid; - border-bottom-width: 1px; - font-family: Georgia,"Times New Roman",Times,serif; - font-size: 1.6em; - border-bottom-color: #DADADA; - color: #5A5A5A; -} - -h3.media-title { - color: #5A5A5A; - font-family: Georgia,"Times New Roman",Times,serif; - font-size: 1.6em; - font-weight: normal; -} - -#gallery-settings .describe td { - vertical-align: middle; - height: 3.5em; -} - -#gallery-settings .describe th.label { - padding-top: .5em; - text-align: left; -} - -#gallery-settings .describe { - padding: 5px; - width: 615px; - clear: both; - cursor: default; -} - -#gallery-settings .describe select { - width: 15em; - border: 1px solid #dfdfdf; -} - -#gallery-settings label, -#gallery-settings legend { - font-size: 13px; - color: #464646; - margin-right: 15px; -} - -#gallery-settings .align .field label { - margin: 0 1.5em 0 0; -} - -#gallery-settings p.ml-submit { - border-top: 1px solid #dfdfdf; -} - -#gallery-settings select#columns { - width: 6em; -} - -#sort-buttons { - font-size: 0.8em; - margin: 3px 25px -8px 0; - text-align: right; - max-width: 625px; -} - -#sort-buttons a { - text-decoration: none; -} - -#sort-buttons #asc, -#sort-buttons #showall { - padding-left: 5px; -} - -#sort-buttons span { - margin-right: 25px; -} +div#media-upload-header{margin:0;padding:0 5px;font-weight:bold;position:relative;border-bottom-width:1px;border-bottom-style:solid;height:2.5em;}body#media-upload ul#sidemenu{font-weight:normal;margin:0 5px;position:absolute;left:0;bottom:-1px;}div#media-upload-error{margin:1em;font-weight:bold;}form{margin:1em;}#search-filter{text-align:right;}th{position:relative;}.media-upload-form label.form-help,td.help{font-family:"Lucida Grande","Bitstream Vera Sans",Verdana,Arial,sans-serif;font-style:italic;font-weight:normal;}.media-upload-form p.help{margin:0;padding:0;}.media-upload-form fieldset{width:100%;border:none;text-align:justify;margin:0 0 1em 0;padding:0;}.image-align-none-label{background:url(../images/align-none.png) no-repeat center left;}.image-align-left-label{background:url(../images/align-left.png) no-repeat center left;}.image-align-center-label{background:url(../images/align-center.png) no-repeat center left;}.image-align-right-label{background:url(../images/align-right.png) no-repeat center left;}tr.image-size td{width:460px;}tr.image-size div.image-size-item{float:left;width:25%;margin:0;}#library-form .progress,#gallery-form .progress,#flash-upload-ui,.insert-gallery,.describe.startopen,.describe.startclosed{display:none;}.media-item .thumbnail{max-width:128px;max-height:128px;}thead.media-item-info tr{background-color:transparent;}thead.media-item-info th,thead.media-item-info td{border:none;margin:0;}.form-table thead.media-item-info{border:8px solid #fff;}abbr.required{text-decoration:none;border:none;}.describe label{display:inline;}.describe td{vertical-align:middle;padding:0 5px 8px 0;}.describe td.error{padding:2px 8px;}.describe td.A1{width:132px;}.describe input[type="text"],.describe textarea{width:460px;border-width:1px;border-style:solid;}.hidden{height:0;width:0;overflow:hidden;border:none;}#media-upload p.ml-submit{padding:1em 0;}#media-upload p.help,#media-upload label.help{font-family:"Lucida Grande","Bitstream Vera Sans",Verdana,Arial,sans-serif;font-style:italic;font-weight:normal;}#media-upload tr.image-size td.field{text-align:center;}#media-upload #media-items{border-width:1px;border-style:solid;border-bottom:none;width:623px;}#media-upload .media-item{border-bottom-width:1px;border-bottom-style:solid;min-height:36px;width:100%;}#media-upload .ui-sortable .media-item{cursor:move;}.filename{line-height:36px;padding:0 10px;overflow:hidden;}#media-upload .describe{padding:5px;width:100%;clear:both;cursor:default;}#media-upload .slidetoggle{border-top-width:1px;border-top-style:solid;}#media-upload .describe th.label{padding-top:.2em;text-align:left;min-width:120px;}#media-upload tr.align td.field{text-align:center;}#media-upload tr.image-size{margin-bottom:1em;height:3em;}#media-upload #filter{width:623px;}#media-upload #filter .subsubsub{margin:8px 0;}#filter .tablenav select{border-style:solid;border-width:1px;padding:2px;vertical-align:top;width:auto;}#media-upload .del-attachment{display:none;margin:5px 0;}.menu_order{float:right;font-size:11px;margin:10px 10px 0;}.menu_order_input{border:1px solid #ddd;font-size:10px;padding:1px;width:23px;}.ui-sortable-helper{background-color:#fff;border:1px solid #aaa;opacity:.6;filter:alpha(opacity=60);}#media-upload th.order-head{width:20%;text-align:center;}#media-upload th.actions-head{width:25%;text-align:center;}#media-upload a.wp-post-thumbnail{margin:0 20px;}#media-items a.delete{display:block;float:right;}#media-upload .widefat{width:626px;border-style:solid solid none;}.sorthelper{height:37px;width:623px;display:block;}#gallery-settings th.label{width:160px;}#gallery-settings #basic th.label{padding:5px 5px 5px 0;}#gallery-settings .title{clear:both;padding:0 0 3px;font-size:1.6em;border-bottom:1px solid #DADADA;}h3.media-title{font-size:1.6em;}h4.media-sub-title{border-bottom:1px solid #DADADA;font-size:1.3em;margin:12px;padding:0 0 3px;}#gallery-settings .title,h3.media-title,h4.media-sub-title{font-family:Georgia,"Times New Roman",Times,serif;font-weight:normal;color:#5A5A5A;}#gallery-settings .describe td{vertical-align:middle;height:3em;}#gallery-settings .describe th.label{padding-top:.5em;text-align:left;}#gallery-settings .describe{padding:5px;width:615px;clear:both;cursor:default;}#gallery-settings .describe select{width:15em;}#gallery-settings .describe select option,#gallery-settings .describe td{padding:0;}#gallery-settings label,#gallery-settings legend{font-size:13px;color:#464646;margin-right:15px;}#gallery-settings .align .field label{margin:0 1.5em 0 0;}#gallery-settings p.ml-submit{border-top:1px solid #dfdfdf;}#gallery-settings select#columns{width:6em;}#sort-buttons{font-size:.8em;margin:3px 25px -8px 0;text-align:right;max-width:625px;}#sort-buttons a{text-decoration:none;}#sort-buttons #asc,#sort-buttons #showall{padding-left:5px;}#sort-buttons span{margin-right:25px;} \ No newline at end of file diff --git a/wp-admin/css/media.dev.css b/wp-admin/css/media.dev.css new file mode 100644 index 00000000..1c5e6921 --- /dev/null +++ b/wp-admin/css/media.dev.css @@ -0,0 +1,384 @@ +div#media-upload-header { + margin: 0; + padding: 0 5px; + font-weight: bold; + position: relative; + border-bottom-width: 1px; + border-bottom-style: solid; + height: 2.5em; +} + +body#media-upload ul#sidemenu { + font-weight: normal; + margin: 0 5px; + position: absolute; + left: 0px; + bottom: -1px; +} + +div#media-upload-error { + margin: 1em; + font-weight: bold; +} + +form { + margin: 1em; +} + +#search-filter { + text-align: right; +} + +th { + position: relative; +} + +.media-upload-form label.form-help, td.help { + font-family: "Lucida Grande", "Bitstream Vera Sans", Verdana, Arial, sans-serif; + font-style: italic; + font-weight: normal; +} + +.media-upload-form p.help { + margin: 0; + padding: 0; +} + +.media-upload-form fieldset { + width: 100%; + border: none; + text-align: justify; + margin: 0 0 1em 0; + padding: 0; +} + +/* specific to the image upload form */ + + +.image-align-none-label { + background: url(../images/align-none.png) no-repeat center left; +} + +.image-align-left-label { + background: url(../images/align-left.png) no-repeat center left; +} + +.image-align-center-label { + background: url(../images/align-center.png) no-repeat center left; +} + +.image-align-right-label { + background: url(../images/align-right.png) no-repeat center left; +} + +tr.image-size td { + width: 460px; +} + +tr.image-size div.image-size-item { + float: left; + width: 25%; + margin: 0; +} + +#library-form .progress, +#gallery-form .progress, +#flash-upload-ui, +.insert-gallery, +.describe.startopen, +.describe.startclosed { + display: none; +} + +.media-item .thumbnail { + max-width: 128px; + max-height: 128px; +} + +thead.media-item-info tr { + background-color: transparent; +} + +thead.media-item-info th, +thead.media-item-info td { + border: none; + margin: 0; +} + +.form-table thead.media-item-info { + border: 8px solid #fff; +} + +abbr.required { + text-decoration: none; + border: none; +} + +.describe label { + display: inline; +} + +.describe td { + vertical-align: middle; + padding: 0 5px 8px 0; +} + +.describe td.error { + padding: 2px 8px; +} + +.describe td.A1 { + width: 132px; +} + +.describe input[type="text"], +.describe textarea { + width: 460px; + border-width: 1px; + border-style: solid; +} + +.hidden { + height: 0; + width: 0; + overflow: hidden; + border: none; +} + +/* Specific to Uploader */ + +#media-upload p.ml-submit { + padding: 1em 0; +} + +#media-upload p.help, +#media-upload label.help { + font-family: "Lucida Grande", "Bitstream Vera Sans", Verdana, Arial, sans-serif; + font-style: italic; + font-weight: normal; +} + +#media-upload tr.image-size td.field { + text-align: center; +} + +#media-upload #media-items { + border-width: 1px; + border-style: solid; + border-bottom: none; + width: 623px; +} + +#media-upload .media-item { + border-bottom-width: 1px; + border-bottom-style: solid; + min-height: 36px; + width: 100%; +} + +#media-upload .ui-sortable .media-item { + cursor: move; +} + +.filename { + line-height: 36px; + padding: 0 10px; + overflow: hidden; +} + +#media-upload .describe { + padding: 5px; + width: 100%; + clear: both; + cursor: default; +} + +#media-upload .slidetoggle { + border-top-width: 1px; + border-top-style: solid; +} + +#media-upload .describe th.label { + padding-top: .2em; + text-align: left; + min-width: 120px; +} + +#media-upload tr.align td.field { + text-align: center; +} + +#media-upload tr.image-size { + margin-bottom: 1em; + height: 3em; +} + +#media-upload #filter { + width: 623px; +} + +#media-upload #filter .subsubsub { + margin: 8px 0; +} + +#filter .tablenav select { + border-style: solid; + border-width: 1px; + padding: 2px; + vertical-align: top; + width: auto; +} + +#media-upload .del-attachment { + display: none; + margin: 5px 0; +} + +.menu_order { + float: right; + font-size: 11px; + margin: 10px 10px 0; +} + +.menu_order_input { + border: 1px solid #ddd; + font-size: 10px; + padding: 1px; + width: 23px; +} + +.ui-sortable-helper { + background-color: #fff; + border: 1px solid #aaa; + opacity: 0.6; + filter: alpha(opacity=60); +} + +#media-upload th.order-head { + width: 20%; + text-align: center; +} + +#media-upload th.actions-head { + width: 25%; + text-align: center; +} + +#media-upload a.wp-post-thumbnail { + margin: 0 20px; +} + +#media-items a.delete { + display: block; + float: right; +} + +#media-upload .widefat { + width: 626px; + border-style: solid solid none; +} + +.sorthelper { + height: 37px; + width: 623px; + display: block; +} + +#gallery-settings th.label { + width: 160px; +} + +#gallery-settings #basic th.label { + padding: 5px 5px 5px 0; +} + +#gallery-settings .title { + clear: both; + padding: 0 0 3px; + font-size: 1.6em; + border-bottom: 1px solid #DADADA; +} + +h3.media-title { + font-size: 1.6em; +} + +h4.media-sub-title { + border-bottom: 1px solid #DADADA; + font-size: 1.3em; + margin: 12px; + padding: 0 0 3px; +} + +#gallery-settings .title, +h3.media-title, +h4.media-sub-title { + font-family: Georgia,"Times New Roman",Times,serif; + font-weight: normal; + color: #5A5A5A; +} + +#gallery-settings .describe td { + vertical-align: middle; + height: 3em; +} + +#gallery-settings .describe th.label { + padding-top: .5em; + text-align: left; +} + +#gallery-settings .describe { + padding: 5px; + width: 615px; + clear: both; + cursor: default; +} + +#gallery-settings .describe select { + width: 15em; +} + +#gallery-settings .describe select option, +#gallery-settings .describe td { + padding: 0; +} + +#gallery-settings label, +#gallery-settings legend { + font-size: 13px; + color: #464646; + margin-right: 15px; +} + +#gallery-settings .align .field label { + margin: 0 1.5em 0 0; +} + +#gallery-settings p.ml-submit { + border-top: 1px solid #dfdfdf; +} + +#gallery-settings select#columns { + width: 6em; +} + +#sort-buttons { + font-size: 0.8em; + margin: 3px 25px -8px 0; + text-align: right; + max-width: 625px; +} + +#sort-buttons a { + text-decoration: none; +} + +#sort-buttons #asc, +#sort-buttons #showall { + padding-left: 5px; +} + +#sort-buttons span { + margin-right: 25px; +} diff --git a/wp-admin/css/plugin-install.css b/wp-admin/css/plugin-install.css index 87fc417c..defbb4f2 100644 --- a/wp-admin/css/plugin-install.css +++ b/wp-admin/css/plugin-install.css @@ -1,148 +1 @@ -/* NOTE: the following CSS rules(.star*) are taken more or less straight from the bbPress rating plugin. */ -div.star-holder { - position: relative; - height: 19px; - width: 100px; - font-size: 19px; -} - -div.star { - height: 100%; - position: absolute; - top: 0; - left: 0; - background-color: transparent; - letter-spacing: 1ex; - border: none; -} - -.star1 { width: 20%; } -.star2 { width: 40%; } -.star3 { width: 60%; } -.star4 { width: 80%; } -.star5 { width: 100%; } - -.star img, div.star a, div.star a:hover, div.star a:visited { - display: block; - position: absolute; - right: 0; - border: none; - text-decoration: none; -} - -div.star img { - width: 19px; - height: 19px; - border-left: 1px solid #fff; - border-right: 1px solid #fff; -} - -/* Start custom CSS */ -/* Header on thickbox */ -#plugin-information-header { - margin: 0; - padding: 0 5px; - font-weight: bold; - position: relative; - border-bottom-width: 1px; - border-bottom-style: solid; - height: 2.5em; -} -#plugin-information ul#sidemenu { - font-weight: normal; - margin: 0 5px; - position: absolute; - left: 0; - bottom: -1px; -} - -/* Install sidemenu */ -#plugin-information p.action-button { - width: 100%; - padding-bottom: 0; - margin-bottom: 0; - margin-top: 10px; - -moz-border-radius: 3px 0 0 3px; - -webkit-border-top-left-radius: 3px; - -khtml-border-top-left-radius: 3px; - border-top-left-radius: 3px; - -webkit-border-bottom-left-radius: 3px; - -khtml-border-bottom-left-radius: 3px; - border-bottom-left-radius: 3px; -} - -#plugin-information .action-button a { - text-align: center; - font-weight: bold; - text-decoration: none; - display: block; - line-height: 2em; -} - -#plugin-information h2 { - clear: none !important; - margin-right: 200px; -} - -#plugin-information .fyi { - margin: 0 10px 50px; - width: 210px; -} - -#plugin-information .fyi h2 { - font-size: 0.9em; - margin-bottom: 0; - margin-right: 0; -} - -#plugin-information .fyi h2.mainheader { - padding: 5px; - -moz-border-radius-topleft: 3px; - -webkit-border-top-left-radius: 3px; - -khtml-border-top-left-radius: 3px; - border-top-left-radius: 3px; -} - -#plugin-information .fyi ul { - padding: 10px 5px 10px 7px; - margin: 0; - list-style: none; - -moz-border-radius-bottomleft: 3px; - -webkit-border-bottom-left-radius: 3px; - -khtml-border-bottom-left-radius: 3px; - border-bottom-left-radius: 3px; -} - -#plugin-information .fyi li { - margin-right: 0; -} - -#plugin-information #section-holder { - padding: 10px; -} - -#plugin-information .section ul, -#plugin-information .section ol { - margin-left: 16px; - list-style-type: square; - list-style-image: none; -} - -#plugin-information #section-screenshots li img { - vertical-align: text-top; -} - -#plugin-information #section-screenshots li p { - font-style: italic; - padding-left: 20px; - padding-bottom: 2em; -} - -#plugin-information .updated, -#plugin-information pre { - margin-right: 215px; -} - -#plugin-information pre { - padding: 7px; -} +div.star-holder{position:relative;height:19px;width:100px;font-size:19px;}div.star{height:100%;position:absolute;top:0;left:0;background-color:transparent;letter-spacing:1ex;border:none;}.star1{width:20%;}.star2{width:40%;}.star3{width:60%;}.star4{width:80%;}.star5{width:100%;}.star img,div.star a,div.star a:hover,div.star a:visited{display:block;position:absolute;right:0;border:none;text-decoration:none;}div.star img{width:19px;height:19px;border-left:1px solid #fff;border-right:1px solid #fff;}#plugin-information-header{margin:0;padding:0 5px;font-weight:bold;position:relative;border-bottom-width:1px;border-bottom-style:solid;height:2.5em;}#plugin-information ul#sidemenu{font-weight:normal;margin:0 5px;position:absolute;left:0;bottom:-1px;}#plugin-information p.action-button{width:100%;padding-bottom:0;margin-bottom:0;margin-top:10px;-moz-border-radius:3px 0 0 3px;-webkit-border-top-left-radius:3px;-khtml-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;-khtml-border-bottom-left-radius:3px;border-bottom-left-radius:3px;}#plugin-information .action-button a{text-align:center;font-weight:bold;text-decoration:none;display:block;line-height:2em;}#plugin-information h2{clear:none!important;margin-right:200px;}#plugin-information .fyi{margin:0 10px 50px;width:210px;}#plugin-information .fyi h2{font-size:.9em;margin-bottom:0;margin-right:0;}#plugin-information .fyi h2.mainheader{padding:5px;-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;-khtml-border-top-left-radius:3px;border-top-left-radius:3px;}#plugin-information .fyi ul{padding:10px 5px 10px 7px;margin:0;list-style:none;-moz-border-radius-bottomleft:3px;-webkit-border-bottom-left-radius:3px;-khtml-border-bottom-left-radius:3px;border-bottom-left-radius:3px;}#plugin-information .fyi li{margin-right:0;}#plugin-information #section-holder{padding:10px;}#plugin-information .section ul,#plugin-information .section ol{margin-left:16px;list-style-type:square;list-style-image:none;}#plugin-information #section-screenshots li img{vertical-align:text-top;}#plugin-information #section-screenshots li p{font-style:italic;padding-left:20px;padding-bottom:2em;}#plugin-information .updated,#plugin-information pre{margin-right:215px;}#plugin-information pre{padding:7px;} \ No newline at end of file diff --git a/wp-admin/css/plugin-install.dev.css b/wp-admin/css/plugin-install.dev.css new file mode 100644 index 00000000..87fc417c --- /dev/null +++ b/wp-admin/css/plugin-install.dev.css @@ -0,0 +1,148 @@ +/* NOTE: the following CSS rules(.star*) are taken more or less straight from the bbPress rating plugin. */ +div.star-holder { + position: relative; + height: 19px; + width: 100px; + font-size: 19px; +} + +div.star { + height: 100%; + position: absolute; + top: 0; + left: 0; + background-color: transparent; + letter-spacing: 1ex; + border: none; +} + +.star1 { width: 20%; } +.star2 { width: 40%; } +.star3 { width: 60%; } +.star4 { width: 80%; } +.star5 { width: 100%; } + +.star img, div.star a, div.star a:hover, div.star a:visited { + display: block; + position: absolute; + right: 0; + border: none; + text-decoration: none; +} + +div.star img { + width: 19px; + height: 19px; + border-left: 1px solid #fff; + border-right: 1px solid #fff; +} + +/* Start custom CSS */ +/* Header on thickbox */ +#plugin-information-header { + margin: 0; + padding: 0 5px; + font-weight: bold; + position: relative; + border-bottom-width: 1px; + border-bottom-style: solid; + height: 2.5em; +} +#plugin-information ul#sidemenu { + font-weight: normal; + margin: 0 5px; + position: absolute; + left: 0; + bottom: -1px; +} + +/* Install sidemenu */ +#plugin-information p.action-button { + width: 100%; + padding-bottom: 0; + margin-bottom: 0; + margin-top: 10px; + -moz-border-radius: 3px 0 0 3px; + -webkit-border-top-left-radius: 3px; + -khtml-border-top-left-radius: 3px; + border-top-left-radius: 3px; + -webkit-border-bottom-left-radius: 3px; + -khtml-border-bottom-left-radius: 3px; + border-bottom-left-radius: 3px; +} + +#plugin-information .action-button a { + text-align: center; + font-weight: bold; + text-decoration: none; + display: block; + line-height: 2em; +} + +#plugin-information h2 { + clear: none !important; + margin-right: 200px; +} + +#plugin-information .fyi { + margin: 0 10px 50px; + width: 210px; +} + +#plugin-information .fyi h2 { + font-size: 0.9em; + margin-bottom: 0; + margin-right: 0; +} + +#plugin-information .fyi h2.mainheader { + padding: 5px; + -moz-border-radius-topleft: 3px; + -webkit-border-top-left-radius: 3px; + -khtml-border-top-left-radius: 3px; + border-top-left-radius: 3px; +} + +#plugin-information .fyi ul { + padding: 10px 5px 10px 7px; + margin: 0; + list-style: none; + -moz-border-radius-bottomleft: 3px; + -webkit-border-bottom-left-radius: 3px; + -khtml-border-bottom-left-radius: 3px; + border-bottom-left-radius: 3px; +} + +#plugin-information .fyi li { + margin-right: 0; +} + +#plugin-information #section-holder { + padding: 10px; +} + +#plugin-information .section ul, +#plugin-information .section ol { + margin-left: 16px; + list-style-type: square; + list-style-image: none; +} + +#plugin-information #section-screenshots li img { + vertical-align: text-top; +} + +#plugin-information #section-screenshots li p { + font-style: italic; + padding-left: 20px; + padding-bottom: 2em; +} + +#plugin-information .updated, +#plugin-information pre { + margin-right: 215px; +} + +#plugin-information pre { + padding: 7px; +} diff --git a/wp-admin/css/press-this.css b/wp-admin/css/press-this.css index 2b453567..46590f3c 100644 --- a/wp-admin/css/press-this.css +++ b/wp-admin/css/press-this.css @@ -1,559 +1 @@ -body { - font: 13px "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; - color: #333; - margin: 0; - padding: 0; -} - -img { - border: none; -} - -/* Header */ -#wphead { - border-top: none; - padding-top: 4px; - background: #444 !important; -} - -.tagchecklist span a { -background: transparent url(../images/xit.gif) no-repeat 0 0; -} - -#poststuff #edButtonPreview, -#poststuff #edButtonHTML { - -moz-border-radius: 3px 3px 0 0; - -webkit-border-top-right-radius: 3px; - -webkit-border-top-left-radius: 3px; - -khtml-border-top-right-radius: 3px; - -khtml-border-top-left-radius: 3px; - border-top-right-radius: 3px; - border-top-left-radius: 3px; - border-style: solid; - border-width: 1px; - cursor: pointer; - display: block; - height: 18px; - margin: 0 5px 0 0; - padding: 0 5px 0; - font-size: 10px; - line-height: 18px; - float: left; -} - -.howto { - margin-top: 2px; - margin-bottom: 3px; - font-size: 11px; - font-style: italic; - display: block; -} - -input.text { - outline-color: -moz-use-text-color; - outline-style: none; - outline-width: medium; - width: 100%; -} - -#message { - -moz-border-radius: 6px; - -khtml-border-radius: 6px; - -webkit-border-radius: 6px; - border-radius: 6px; -} - -/* Editor/Main Column */ -div#poststuff { - padding-left: 10px; - margin-top: 10px; -} - -div.zerosize { - border: 0 none; - height: 0; - margin: 0; - overflow: hidden; - padding: 0; - position: absolute; - width: 0; -} - -#poststuff #edButtonPreview.active, -#poststuff #edButtonHTML.active { - display: none; -} - -.posting { - margin-right: 228px; - position: relative; - left: 0; -} - -#side-info-column { - float: right; - width: 218px; - position: absolute; - right: 0; - margin-right: 10px; -} - -#side-info-column .sleeve { - padding-top: 5px; - padding-left: 10px; -} - -#poststuff .inside { - font-size: 11px; - margin: 0 12px 12px; -} - -#poststuff h2, #poststuff h3 { - font-size: 12px; - font-weight: bold; - line-height: 1; - margin: 0 0 10px; - padding: 7px 9px; -} - -h3.tb { - text-shadow: 0 1px 0 #fff; - font-weight: bold; - font-size: 12px; - margin-left: 5px; -} - -#TB_window { - border: 1px solid #333; - -moz-border-radius: 6px; - -khtml-border-radius: 6px; - -webkit-border-radius: 6px; - border-radius: 6px; -} - -.postbox, -.stuffbox { - margin-bottom: 10px; - border-width: 1px; - border-style: solid; - line-height: 1; - -moz-border-radius: 6px; - -khtml-border-radius: 6px; - -webkit-border-radius: 6px; - border-radius: 6px; -} - -#title, -.tbtitle { - -moz-border-radius: 6px; - -khtml-border-radius: 6px; - -webkit-border-radius: 6px; - border-radius: 6px; - border-style: solid; - border-width: 1px; - font-size: 1.7em; - outline: none; - padding: 3px 4px; - border-color: #dfdfdf; -} - -.tbtitle { - font-size: 12px; - padding: 3px; -} - -#title { - width: 98%; -} - -.editor-container { - -moz-border-radius: 6px; - -khtml-border-radius: 6px; - -webkit-border-radius: 6px; - border-radius: 6px; - border: 1px solid #dfdfdf; - background-color: #fff; -} - -.postdivrich { - position: relative; - padding-top: 25px; -} - -#actions { - clear: both; - float: right; - margin-top: -19px; - position: relative; -} - -#extra_fields #actions { - clear: both; - position: relative; - right: 0px; - margin: -24px 0 0; -} - -#actions li { - float: left; - list-style: none; - margin-right: 10px; -} - -#extra_fields .button { - margin-right: 5px; - padding: 3px 6px; - border-radius: 10px; - -webkit-border-radius: 10px; - -khtml-border-radius: 10px; - -moz-border-radius: 10px; -} - -/* Photo Styles */ -.photolist { - margin-top: -10px; -} - -#photo_saving { - margin: 0 8px 8px; - vertical-align: middle; -} - -#img_container { - background-color: #fff; -} -#img_container_container { - overflow: auto; -} - -#extra_fields { - margin-top: 10px; - position: relative; -} - -#extra_fields .postbox { - margin-bottom: 5px; -} - -#extra_fields .titlewrap { - padding: 0; - overflow: auto; - height: 100px; -} - -#img_container { - position: relative; -} - -#img_container a { - display: block; - float: left; - overflow: hidden; - vertical-align: center; -} - -#img_container img, -#img_container a { - width: 68px; - height: 68px; -} - -#img_container img { - border: none; - background-color: #f4f4f4; - cursor: pointer; -} - -#img_container a, -#img_container a:link, -#img_container a:visited { - border: 1px solid #ccc; - display: block; - position: relative; -} - -#img_container a:hover, -#img_container a:active { - border-color: #000; - z-index: 1000; - border-width: 2px; - margin: -1px; -} - -/* Video */ -#embed-code { - width: 100%; - height: 98px; -} - -/* Submit Column */ -#viewsite { - padding: 0; - margin: 0 0 20px 0; - font-size: 10px; - clear: both; -} - -#viewsite .button { - margin: 0; - display: block; -} - -.wp-hidden-children -.wp-hidden-child { - display: none; -} - -#category-adder { - padding: 4px 0; -} - -#category-adder h4 { - margin: 0 0 8px; -} - -#category-add input { - width: 94%; - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 13px; - margin: 1px; - padding: 3px; -} - -#category-add select { - width: 70%; - -x-system-font: none; - border-style: solid; - border-width: 1px; - font-family: "Lucida Grande", "Bitstream Vera Sans", Verdana, Arial, sans-serif; - font-size: 12px; - height: 2em; - line-height: 20px; - padding: 2px; - margin: 1px; - vertical-align: top; -} - -#category-add input, -#category-add-sumbit { - width: auto; -} - -/* Categories */ -#categorydiv ul, -#linkcategorydiv ul { - list-style: none; - padding: 0; - margin: 0; -} - -#categorydiv ul.categorychecklist ul { - margin-left: 18px; -} - -#categorydiv div.tabs-panel { - height: 140px; - overflow: auto; -} - -ul.categorychecklist li { - margin: 0; - padding: 0; - line-height: 19px; -} - -/* Tags */ -.tagsdiv .newtag { - margin-right: 5px; -} - -.jaxtag { - clear: both; - margin: 0; -} - -.tagadd { - margin-left: 3px; -} - -.tagchecklist { - margin-top: 3px; - margin-bottom: 1em; - font-size: 12px; - overflow: auto; -} - -.tagchecklist strong { - position: absolute; - font-size: .75em; -} - -.tagchecklist span { - margin-right: .5em; - margin-left: 10px; - display: block; - float: left; - font-size: 11px; - line-height: 1.8em; - white-space: nowrap; - cursor: default; -} - -.tagchecklist span a { - margin: 6px 0 0 -9px; - cursor: pointer; - width: 10px; - height: 10px; - display: block; - float: left; - text-indent: -9999px; - overflow: hidden; - position: absolute; -} - -#content { - width: 96% !important; - margin-left: 1%; - margin-bottom: 10px; - border: 0 none; - height: 365px; -} - -/* Submit */ - -#saving { - display: inline; - vertical-align: middle; -} - -.submit input, -.button, -.button-primary, -.button-secondary, -.button-highlighted, -#postcustomstuff .submit input { - font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; - text-decoration: none; - font-size: 11px !important; - line-height: 16px; - padding: 2px 8px; - cursor: pointer; - border-width: 1px; - border-style: solid; - -moz-border-radius: 11px; - -khtml-border-radius: 11px; - -webkit-border-radius: 11px; - border-radius: 11px; -} - -.button-primary { - background: #21759B url(../images/button-grad.png) repeat-x scroll left top; - border-color: #21759B; - color: #fff; -} - -.ac_results { - padding: 0; - margin: 0; - list-style: none; - position: absolute; - z-index: 10000; - display: none; - border-width: 1px; - border-style: solid; -} - -.ac_results li { - padding: 2px 5px; - white-space: nowrap; - text-align: left; -} - -.ac_over { - cursor: pointer; -} - -.ac_match { - text-decoration: underline; -} - -#TB_ajaxContent #options { - position: absolute; - top: 20px; - right: 25px; - padding: 5px; -} - -#TB_ajaxContent h3 { - margin-bottom: .25em; -} - -.updated { - margin: 10px 0; - padding: 0; - border-width: 1px; - border-style: solid; - width: 99%; -} - -.updated p, -.error p { - margin: 0.6em 0; - padding: 0 0.6em; -} - -.error a { - text-decoration: underline; -} - -.updated a { - text-decoration: none; - padding-bottom: 2px; -} - -#post_status { - margin-left: 10px; - margin-bottom: 1em; - display: block; -} - -/* Footer */ -#footer { - height: 65px; - display: block; - width: 640px; - padding: 10px 0 0 60px; - margin: 0; - position: absolute; - bottom: 0; - font-size: 12px; -} - -#footer p { - margin: 0; - padding: 7px 0; -} - -#footer p a { - text-decoration: none; -} -#footer p a:hover { - text-decoration: underline; -} - -/* Utility Classes */ -.centered { - text-align: center; -} - -.hidden { - display: none; -} - -.postbox input[type="text"], -.postbox textarea, -.stuffbox input[type="text"], -.stuffbox textarea { - border-width: 1px; - border-style: solid; -} +body{font:13px "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;color:#333;margin:0;padding:0;min-width:675px;min-height:400px;}img{border:none;}#wphead{border-top:none;padding-top:4px;background:#444!important;}.tagchecklist span a{background:transparent url(../images/xit.gif) no-repeat 0 0;}#poststuff #edButtonPreview,#poststuff #edButtonHTML{-moz-border-radius:3px 3px 0 0;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;-khtml-border-top-right-radius:3px;-khtml-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;border-style:solid;border-width:1px;cursor:pointer;display:block;height:18px;margin:0 5px 0 0;padding:0 5px 0;font-size:10px;line-height:18px;float:left;}.howto{margin-top:2px;margin-bottom:3px;font-size:11px;font-style:italic;display:block;}input.text{outline-color:-moz-use-text-color;outline-style:none;outline-width:medium;width:100%;}#message{-moz-border-radius:6px;-khtml-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;}div#poststuff{margin:10px;}div.zerosize{border:0 none;height:0;margin:0;overflow:hidden;padding:0;width:0;}#poststuff #edButtonPreview.active,#poststuff #edButtonHTML.active{display:none;}.posting{margin-right:212px;position:relative;}#side-info-column{float:right;width:200px;position:relative;right:0;}#side-info-column .sleeve{padding-top:5px;}#poststuff .inside{font-size:11px;margin:8px;}#poststuff h2,#poststuff h3{font-size:12px;font-weight:bold;line-height:1;margin:0;padding:7px 9px;}#tagsdiv-post_tag h3,#categorydiv h3{cursor:pointer;}h3.tb{text-shadow:0 1px 0 #fff;font-weight:bold;font-size:12px;margin-left:5px;}#TB_window{border:1px solid #333;-moz-border-radius:6px;-khtml-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;}.postbox,.stuffbox{margin-bottom:10px;border-width:1px;border-style:solid;line-height:1;-moz-border-radius:6px;-khtml-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;}.stuffbox:hover .handlediv{background:transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -111px;}.handlediv{float:right;height:26px;width:23px;}#title,.tbtitle{-moz-border-radius:6px;-khtml-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;border-style:solid;border-width:1px;font-size:1.7em;outline:none;padding:3px 4px;border-color:#dfdfdf;}.tbtitle{font-size:12px;padding:3px;}#title{width:97%;}.editor-container{-moz-border-radius:6px;-khtml-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;border:1px solid #dfdfdf;background-color:#fff;}.postdivrich{padding-top:25px;position:relative;}.actions{float:right;margin:-19px 0 0;}#extra-fields .actions{margin:-15px -5px 0 0;}.actions li{float:left;list-style:none;margin-right:10px;}#extra-fields .button{margin-right:5px;padding:3px 6px;border-radius:10px;-webkit-border-radius:10px;-khtml-border-radius:10px;-moz-border-radius:10px;}.photolist{margin-top:-10px;}#photo_saving{margin:0 8px 8px;vertical-align:middle;}#img_container{background-color:#fff;}#img_container_container{overflow:auto;}#extra-fields{margin-top:10px;position:relative;}#waiting{margin-top:10px;}#extra-fields .postbox{margin-bottom:5px;}#extra-fields .titlewrap{padding:0;overflow:auto;height:100px;}#img_container a{display:block;float:left;overflow:hidden;vertical-align:center;}#img_container img,#img_container a{width:68px;height:68px;}#img_container img{border:none;background-color:#f4f4f4;cursor:pointer;}#img_container a,#img_container a:link,#img_container a:visited{border:1px solid #ccc;display:block;position:relative;}#img_container a:hover,#img_container a:active{border-color:#000;z-index:1000;border-width:2px;margin:-1px;}#embed-code{width:100%;height:98px;}#viewsite{padding:0;margin:0 0 20px 5px;font-size:10px;clear:both;}.wp-hidden-children .wp-hidden-child{display:none;}#category-adder{padding:4px 0;}#category-adder h4{margin:0 0 8px;}#category-add input{width:94%;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px;margin:1px;padding:3px;}#category-add select{width:70%;-x-system-font:none;border-style:solid;border-width:1px;font-family:"Lucida Grande","Bitstream Vera Sans",Verdana,Arial,sans-serif;font-size:12px;height:2em;line-height:20px;padding:2px;margin:1px;vertical-align:top;}#category-add input,#category-add-sumbit{width:auto;}#categorydiv ul,#linkcategorydiv ul{list-style:none;padding:0;margin:0;}#categorydiv ul.categorychecklist ul{margin-left:18px;}#categorydiv div.tabs-panel{height:140px;overflow:auto;}ul.categorychecklist li{margin:0;padding:0;line-height:19px;}.screen-reader-text{display:none;}.tagsdiv .newtag{margin-right:5px;}.jaxtag{clear:both;margin:0;}.tagadd{margin-left:3px;}.tagchecklist{margin-top:3px;margin-bottom:1em;font-size:12px;overflow:auto;}.tagchecklist strong{position:absolute;font-size:.75em;}.tagchecklist span{margin-right:.5em;margin-left:10px;display:block;float:left;font-size:11px;line-height:1.8em;white-space:nowrap;cursor:default;}.tagchecklist span a{margin:6px 0 0 -9px;cursor:pointer;width:10px;height:10px;display:block;float:left;text-indent:-9999px;overflow:hidden;position:absolute;}#content{margin:5px 0;padding:0 5px;border:0 none;height:365px;width:97%!important;}* html .postdivrich{zoom:1;}#saving{display:inline;vertical-align:middle;}.submit input,.button,.button-primary,.button-secondary,.button-highlighted,#postcustomstuff .submit input{font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;text-decoration:none;font-size:11px!important;line-height:16px;padding:2px 8px;cursor:pointer;border-width:1px;border-style:solid;-moz-border-radius:11px;-khtml-border-radius:11px;-webkit-border-radius:11px;border-radius:11px;}.button-primary{background:#21759B url(../images/button-grad.png) repeat-x scroll left top;border-color:#21759B;color:#fff;}.ac_results{padding:0;margin:0;list-style:none;position:absolute;z-index:10000;display:none;border-width:1px;border-style:solid;}.ac_results li{padding:2px 5px;white-space:nowrap;text-align:left;}.ac_over{cursor:pointer;}.ac_match{text-decoration:underline;}#TB_ajaxContent #options{position:absolute;top:20px;right:25px;padding:5px;}#TB_ajaxContent h3{margin-bottom:.25em;}.updated{margin:10px 0;padding:0;border-width:1px;border-style:solid;width:99%;}.updated p,.error p{margin:.6em 0;padding:0 .6em;}.error a{text-decoration:underline;}.updated a{text-decoration:none;padding-bottom:2px;}#post_status{margin-left:10px;margin-bottom:1em;display:block;}#footer{height:65px;display:block;width:640px;padding:10px 0 0 60px;margin:0;position:absolute;bottom:0;font-size:12px;}#footer p{margin:0;padding:7px 0;}#footer p a{text-decoration:none;}#footer p a:hover{text-decoration:underline;}.centered{text-align:center;}.hidden{display:none;}.postbox input[type="text"],.postbox textarea,.stuffbox input[type="text"],.stuffbox textarea{border-width:1px;border-style:solid;}.taghint{color:#aaa;margin:-17px 0 0 7px;visibility:hidden;}input.newtag ~ div.taghint{visibility:visible;}input.newtag:focus ~ div.taghint{visibility:hidden;} \ No newline at end of file diff --git a/wp-admin/css/press-this.dev.css b/wp-admin/css/press-this.dev.css new file mode 100644 index 00000000..4bb4d5c1 --- /dev/null +++ b/wp-admin/css/press-this.dev.css @@ -0,0 +1,586 @@ + +body { + font: 13px "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif; + color: #333; + margin: 0; + padding: 0; + min-width: 675px; + min-height: 400px; +} + +img { + border: none; +} + +/* Header */ +#wphead { + border-top: none; + padding-top: 4px; + background: #444 !important; +} + +.tagchecklist span a { + background: transparent url(../images/xit.gif) no-repeat 0 0; +} + +#poststuff #edButtonPreview, +#poststuff #edButtonHTML { + -moz-border-radius: 3px 3px 0 0; + -webkit-border-top-right-radius: 3px; + -webkit-border-top-left-radius: 3px; + -khtml-border-top-right-radius: 3px; + -khtml-border-top-left-radius: 3px; + border-top-right-radius: 3px; + border-top-left-radius: 3px; + border-style: solid; + border-width: 1px; + cursor: pointer; + display: block; + height: 18px; + margin: 0 5px 0 0; + padding: 0 5px 0; + font-size: 10px; + line-height: 18px; + float: left; +} + +.howto { + margin-top: 2px; + margin-bottom: 3px; + font-size: 11px; + font-style: italic; + display: block; +} + +input.text { + outline-color: -moz-use-text-color; + outline-style: none; + outline-width: medium; + width: 100%; +} + +#message { + -moz-border-radius: 6px; + -khtml-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; +} + +/* Editor/Main Column */ +div#poststuff { + margin: 10px; +} + +div.zerosize { + border: 0 none; + height: 0; + margin: 0; + overflow: hidden; + padding: 0; + width: 0; +} + +#poststuff #edButtonPreview.active, +#poststuff #edButtonHTML.active { + display: none; +} + +.posting { + margin-right: 212px; + position: relative; +} + +#side-info-column { + float: right; + width: 200px; + position: relative; + right: 0; +} + +#side-info-column .sleeve { + padding-top: 5px; +} + +#poststuff .inside { + font-size: 11px; + margin: 8px; +} + +#poststuff h2,#poststuff h3 { + font-size: 12px; + font-weight: bold; + line-height: 1; + margin: 0; + padding: 7px 9px; +} + +#tagsdiv-post_tag h3, +#categorydiv h3 { + cursor: pointer; +} + +h3.tb { + text-shadow: 0 1px 0 #fff; + font-weight: bold; + font-size: 12px; + margin-left: 5px; +} + +#TB_window { + border: 1px solid #333; + -moz-border-radius: 6px; + -khtml-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; +} + +.postbox, +.stuffbox { + margin-bottom: 10px; + border-width: 1px; + border-style: solid; + line-height: 1; + -moz-border-radius: 6px; + -khtml-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; +} + +.stuffbox:hover .handlediv { + background: transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -111px; +} + +.handlediv { + float: right; + height: 26px; + width: 23px; +} + +#title, +.tbtitle { + -moz-border-radius: 6px; + -khtml-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; + border-style: solid; + border-width: 1px; + font-size: 1.7em; + outline: none; + padding: 3px 4px; + border-color: #dfdfdf; +} + +.tbtitle { + font-size: 12px; + padding: 3px; +} + +#title { + width: 97%; +} + +.editor-container { + -moz-border-radius: 6px; + -khtml-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; + border: 1px solid #dfdfdf; + background-color: #fff; +} + +.postdivrich { + padding-top: 25px; + position: relative; +} + +.actions { + float: right; + margin: -19px 0 0; +} + +#extra-fields .actions { + margin: -15px -5px 0 0; +} + +.actions li { + float: left; + list-style: none; + margin-right: 10px; +} + +#extra-fields .button { + margin-right: 5px; + padding: 3px 6px; + border-radius: 10px; + -webkit-border-radius: 10px; + -khtml-border-radius: 10px; + -moz-border-radius: 10px; +} + +/* Photo Styles */ +.photolist { + margin-top: -10px; +} + +#photo_saving { + margin: 0 8px 8px; + vertical-align: middle; +} + +#img_container { + background-color: #fff; +} + +#img_container_container { + overflow: auto; +} + +#extra-fields { + margin-top: 10px; + position: relative; +} + +#waiting { + margin-top: 10px; +} + +#extra-fields .postbox { + margin-bottom: 5px; +} + +#extra-fields .titlewrap { + padding: 0; + overflow: auto; + height: 100px; +} + +#img_container a { + display: block; + float: left; + overflow: hidden; + vertical-align: center; +} + +#img_container img, +#img_container a { + width: 68px; + height: 68px; +} + +#img_container img { + border: none; + background-color: #f4f4f4; + cursor: pointer; +} + +#img_container a, +#img_container a:link, +#img_container a:visited { + border: 1px solid #ccc; + display: block; + position: relative; +} + +#img_container a:hover, +#img_container a:active { + border-color: #000; + z-index: 1000; + border-width: 2px; + margin: -1px; +} + +/* Video */ +#embed-code { + width: 100%; + height: 98px; +} + +/* Submit Column */ +#viewsite { + padding: 0; + margin: 0 0 20px 5px; + font-size: 10px; + clear: both; +} + +.wp-hidden-children +.wp-hidden-child { + display: none; +} + +#category-adder { + padding: 4px 0; +} + +#category-adder h4 { + margin: 0 0 8px; +} + +#category-add input { + width: 94%; + font-family: Verdana,Arial,Helvetica,sans-serif; + font-size: 13px; + margin: 1px; + padding: 3px; +} + +#category-add select { + width: 70%; + -x-system-font: none; + border-style: solid; + border-width: 1px; + font-family: "Lucida Grande","Bitstream Vera Sans",Verdana,Arial,sans-serif; + font-size: 12px; + height: 2em; + line-height: 20px; + padding: 2px; + margin: 1px; + vertical-align: top; +} + +#category-add input, +#category-add-sumbit { + width: auto; +} + +/* Categories */ +#categorydiv ul, +#linkcategorydiv ul { + list-style: none; + padding: 0; + margin: 0; +} + +#categorydiv ul.categorychecklist ul { + margin-left: 18px; +} + +#categorydiv div.tabs-panel { + height: 140px; + overflow: auto; +} + +ul.categorychecklist li { + margin: 0; + padding: 0; + line-height: 19px; +} + +/* Tags */ +.screen-reader-text { + display: none; +} + +.tagsdiv .newtag { + margin-right: 5px; +} + +.jaxtag { + clear: both; + margin: 0; +} + +.tagadd { + margin-left: 3px; +} + +.tagchecklist { + margin-top: 3px; + margin-bottom: 1em; + font-size: 12px; + overflow: auto; +} + +.tagchecklist strong { + position: absolute; + font-size: .75em; +} + +.tagchecklist span { + margin-right: .5em; + margin-left: 10px; + display: block; + float: left; + font-size: 11px; + line-height: 1.8em; + white-space: nowrap; + cursor: default; +} + +.tagchecklist span a { + margin: 6px 0 0 -9px; + cursor: pointer; + width: 10px; + height: 10px; + display: block; + float: left; + text-indent: -9999px; + overflow: hidden; + position: absolute; +} + +#content { + margin: 5px 0; + padding: 0 5px; + border: 0 none; + height: 365px; + width: 97% !important; +} + +* html .postdivrich { + zoom: 1; +} + +/* Submit */ +#saving { + display: inline; + vertical-align: middle; +} + +.submit input, +.button, +.button-primary, +.button-secondary, +.button-highlighted, +#postcustomstuff .submit input { + font-family: "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif; + text-decoration: none; + font-size: 11px !important; + line-height: 16px; + padding: 2px 8px; + cursor: pointer; + border-width: 1px; + border-style: solid; + -moz-border-radius: 11px; + -khtml-border-radius: 11px; + -webkit-border-radius: 11px; + border-radius: 11px; +} + +.button-primary { + background: #21759B url(../images/button-grad.png) repeat-x scroll left top; + border-color: #21759B; + color: #fff; +} + +.ac_results { + padding: 0; + margin: 0; + list-style: none; + position: absolute; + z-index: 10000; + display: none; + border-width: 1px; + border-style: solid; +} + +.ac_results li { + padding: 2px 5px; + white-space: nowrap; + text-align: left; +} + +.ac_over { + cursor: pointer; +} + +.ac_match { + text-decoration: underline; +} + +#TB_ajaxContent #options { + position: absolute; + top: 20px; + right: 25px; + padding: 5px; +} + +#TB_ajaxContent h3 { + margin-bottom: .25em; +} + +.updated { + margin: 10px 0; + padding: 0; + border-width: 1px; + border-style: solid; + width: 99%; +} + +.updated p, +.error p { + margin: 0.6em 0; + padding: 0 0.6em; +} + +.error a { + text-decoration: underline; +} + +.updated a { + text-decoration: none; + padding-bottom: 2px; +} + +#post_status { + margin-left: 10px; + margin-bottom: 1em; + display: block; +} + +/* Footer */ +#footer { + height: 65px; + display: block; + width: 640px; + padding: 10px 0 0 60px; + margin: 0; + position: absolute; + bottom: 0; + font-size: 12px; +} + +#footer p { + margin: 0; + padding: 7px 0; +} + +#footer p a { + text-decoration: none; +} + +#footer p a:hover { + text-decoration: underline; +} + +/* Utility Classes */ +.centered { + text-align: center; +} + +.hidden { + display: none; +} + +.postbox input[type="text"], +.postbox textarea, +.stuffbox input[type="text"], +.stuffbox textarea { + border-width: 1px; + border-style: solid; +} + +/* tag hints */ +.taghint { + color: #aaa; + margin: -17px 0 0 7px; + visibility: hidden; +} + +input.newtag ~ div.taghint { + visibility: visible; +} + +input.newtag:focus ~ div.taghint { + visibility: hidden; +} diff --git a/wp-admin/css/theme-editor.css b/wp-admin/css/theme-editor.css index 0a2a554e..c0bb2dcb 100644 --- a/wp-admin/css/theme-editor.css +++ b/wp-admin/css/theme-editor.css @@ -1,60 +1 @@ -#template textarea { - font-family: Consolas, Monaco, Courier, monospace; - font-size: 12px; - width: 97%; -} - -#template p { - width: 97%; -} - -#templateside { - float: right; - width: 190px; - word-wrap: break-word; -} - -#templateside h3, -#postcustomstuff p.submit { - margin: 0; -} - -#templateside h4 { - margin: 1em 0 0; -} - -#templateside ol, -#templateside ul { - margin: .5em; - padding: 0; -} - -#templateside li { - margin: 4px 0; -} - -.nonessential { - font-size: small; -} - -.highlight { - padding: 1px; -} - -div.tablenav { - margin-right: 210px; -} - -#documentation { - margin-top: 10px; -} -#documentation label { - line-height: 22px; - vertical-align: top; - font-weight: bold; -} - -.fileedit-sub { - padding: 10px 0 8px; - line-height: 180%; -} +#template textarea{font-family:Consolas,Monaco,Courier,monospace;font-size:12px;width:97%;}#template p{width:97%;}#templateside{float:right;width:190px;word-wrap:break-word;}#templateside h3,#postcustomstuff p.submit{margin:0;}#templateside h4{margin:1em 0 0;}#templateside ol,#templateside ul{margin:.5em;padding:0;}#templateside li{margin:4px 0;}.nonessential{font-size:small;}.highlight{padding:1px;}div.tablenav{margin-right:210px;}#documentation{margin-top:10px;}#documentation label{line-height:22px;vertical-align:top;font-weight:bold;}.fileedit-sub{padding:10px 0 8px;line-height:180%;} \ No newline at end of file diff --git a/wp-admin/css/theme-editor.dev.css b/wp-admin/css/theme-editor.dev.css new file mode 100644 index 00000000..0a2a554e --- /dev/null +++ b/wp-admin/css/theme-editor.dev.css @@ -0,0 +1,60 @@ +#template textarea { + font-family: Consolas, Monaco, Courier, monospace; + font-size: 12px; + width: 97%; +} + +#template p { + width: 97%; +} + +#templateside { + float: right; + width: 190px; + word-wrap: break-word; +} + +#templateside h3, +#postcustomstuff p.submit { + margin: 0; +} + +#templateside h4 { + margin: 1em 0 0; +} + +#templateside ol, +#templateside ul { + margin: .5em; + padding: 0; +} + +#templateside li { + margin: 4px 0; +} + +.nonessential { + font-size: small; +} + +.highlight { + padding: 1px; +} + +div.tablenav { + margin-right: 210px; +} + +#documentation { + margin-top: 10px; +} +#documentation label { + line-height: 22px; + vertical-align: top; + font-weight: bold; +} + +.fileedit-sub { + padding: 10px 0 8px; + line-height: 180%; +} diff --git a/wp-admin/css/theme-install.css b/wp-admin/css/theme-install.css index 576dec4b..6ce9918b 100644 --- a/wp-admin/css/theme-install.css +++ b/wp-admin/css/theme-install.css @@ -1,142 +1 @@ -/* NOTE: the following CSS rules(.star*) are taken more or less straight from the bbPress rating plugin. */ -div.star-holder { - position: relative; - height: 19px; - width: 100px; - font-size: 19px; -} - -div.star { - height: 100%; - position: absolute; - top: 0; - left: 0; - background-color: transparent; - letter-spacing: 1ex; - border: none; -} - -.star1 { width: 20%; } -.star2 { width: 40%; } -.star3 { width: 60%; } -.star4 { width: 80%; } -.star5 { width: 100%; } - -.star img, div.star a, div.star a:hover, div.star a:visited { - display: block; - position: absolute; - right: 0; - border: none; - text-decoration: none; -} - -div.star img { - width: 19px; - height: 19px; - border-left: 1px solid #fff; - border-right: 1px solid #fff; -} - -.theme-listing .theme-item { - display: inline-block; - width: 200px; - border: thin solid #ccc; - vertical-align: top; -} - -.theme-listing .theme-item h3 { - text-align: center; - font-size: 14px; - font-style: italic; - margin: 0; - padding: 0; -} - -.theme-listing .theme-item img { - max-width: 150px; - max-height: 150px; -} - -.theme-listing .theme-item-info span { - display: none; -} -.theme-listing .theme-item:hover .theme-item-info span { - display: inline; -} -.theme-listing .theme-item:hover .theme-item-info span.dots { - display: none; -} -.theme-listing .theme-item-info span.action-links { - font-weight: bold; - text-align: center; -} - -.theme-listing br.line { - border-bottom-width: 1px; - border-bottom-style: solid; - margin-bottom: 3px; -} - -.available-theme { - padding: 20px 15px; -} - -#theme-information .theme-preview-img { - float: left; - margin: 5px 25px 10px 15px; - width: 300px; -} - -#theme-information .action-button { - border-top-width: 1px; - border-top-style: solid; - margin: 10px 5px 20px; -} - -#theme-information .action-button #cancel { - float: left; - margin: 10px 15px; -} - -#theme-information .action-button #install { - float: right; - margin: 10px 15px; -} - -#theme-information .available-theme h3 { - margin: 1em 0; -} - -body#theme-information { - height: auto; -} - -.feature-filter { - -moz-border-radius: 8px; - -khtml-border-radius: 8px; - -webkit-border-radius: 8px; - border-radius: 8px; - border-width: 1px; - border-style: solid; - padding: 8px 12px 0; -} - -.feature-filter .feature-group { - float: left; - margin-bottom: 20px; - width: 695px; -} - -.feature-filter .feature-name { - float: left; - text-align: right; - width: 95px; -} - -.feature-filter .feature-group li { - display: inline; - float: left; - list-style-type: none; - padding-right: 25px; - min-width: 145px; -} +div.star-holder{position:relative;height:19px;width:100px;font-size:19px;}div.star{height:100%;position:absolute;top:0;left:0;background-color:transparent;letter-spacing:1ex;border:none;}.star1{width:20%;}.star2{width:40%;}.star3{width:60%;}.star4{width:80%;}.star5{width:100%;}.star img,div.star a,div.star a:hover,div.star a:visited{display:block;position:absolute;right:0;border:none;text-decoration:none;}div.star img{width:19px;height:19px;border-left:1px solid #fff;border-right:1px solid #fff;}.theme-listing .theme-item{display:inline-block;width:200px;border:thin solid #ccc;vertical-align:top;}.theme-listing .theme-item h3{text-align:center;font-size:14px;font-style:italic;margin:0;padding:0;}.theme-listing .theme-item img{max-width:150px;max-height:150px;}.theme-listing .theme-item-info span{display:none;}.theme-listing .theme-item:hover .theme-item-info span{display:inline;}.theme-listing .theme-item:hover .theme-item-info span.dots{display:none;}.theme-listing .theme-item-info span.action-links{font-weight:bold;text-align:center;}.theme-listing br.line{border-bottom-width:1px;border-bottom-style:solid;margin-bottom:3px;}.available-theme{padding:20px 15px;}#theme-information .theme-preview-img{float:left;margin:5px 25px 10px 15px;width:300px;}#theme-information .action-button{border-top-width:1px;border-top-style:solid;margin:10px 5px 20px;}#theme-information .action-button #cancel{float:left;margin:10px 15px;}#theme-information .action-button #install{float:right;margin:10px 15px;}#theme-information .available-theme h3{margin:1em 0;}body#theme-information{height:auto;}.feature-filter{-moz-border-radius:8px;-khtml-border-radius:8px;-webkit-border-radius:8px;border-radius:8px;border-width:1px;border-style:solid;padding:8px 12px 0;}.feature-filter .feature-group{float:left;margin-bottom:20px;width:695px;}.feature-filter .feature-name{float:left;text-align:right;width:95px;}.feature-filter .feature-group li{display:inline;float:left;list-style-type:none;padding-right:25px;min-width:145px;} \ No newline at end of file diff --git a/wp-admin/css/theme-install.dev.css b/wp-admin/css/theme-install.dev.css new file mode 100644 index 00000000..576dec4b --- /dev/null +++ b/wp-admin/css/theme-install.dev.css @@ -0,0 +1,142 @@ +/* NOTE: the following CSS rules(.star*) are taken more or less straight from the bbPress rating plugin. */ +div.star-holder { + position: relative; + height: 19px; + width: 100px; + font-size: 19px; +} + +div.star { + height: 100%; + position: absolute; + top: 0; + left: 0; + background-color: transparent; + letter-spacing: 1ex; + border: none; +} + +.star1 { width: 20%; } +.star2 { width: 40%; } +.star3 { width: 60%; } +.star4 { width: 80%; } +.star5 { width: 100%; } + +.star img, div.star a, div.star a:hover, div.star a:visited { + display: block; + position: absolute; + right: 0; + border: none; + text-decoration: none; +} + +div.star img { + width: 19px; + height: 19px; + border-left: 1px solid #fff; + border-right: 1px solid #fff; +} + +.theme-listing .theme-item { + display: inline-block; + width: 200px; + border: thin solid #ccc; + vertical-align: top; +} + +.theme-listing .theme-item h3 { + text-align: center; + font-size: 14px; + font-style: italic; + margin: 0; + padding: 0; +} + +.theme-listing .theme-item img { + max-width: 150px; + max-height: 150px; +} + +.theme-listing .theme-item-info span { + display: none; +} +.theme-listing .theme-item:hover .theme-item-info span { + display: inline; +} +.theme-listing .theme-item:hover .theme-item-info span.dots { + display: none; +} +.theme-listing .theme-item-info span.action-links { + font-weight: bold; + text-align: center; +} + +.theme-listing br.line { + border-bottom-width: 1px; + border-bottom-style: solid; + margin-bottom: 3px; +} + +.available-theme { + padding: 20px 15px; +} + +#theme-information .theme-preview-img { + float: left; + margin: 5px 25px 10px 15px; + width: 300px; +} + +#theme-information .action-button { + border-top-width: 1px; + border-top-style: solid; + margin: 10px 5px 20px; +} + +#theme-information .action-button #cancel { + float: left; + margin: 10px 15px; +} + +#theme-information .action-button #install { + float: right; + margin: 10px 15px; +} + +#theme-information .available-theme h3 { + margin: 1em 0; +} + +body#theme-information { + height: auto; +} + +.feature-filter { + -moz-border-radius: 8px; + -khtml-border-radius: 8px; + -webkit-border-radius: 8px; + border-radius: 8px; + border-width: 1px; + border-style: solid; + padding: 8px 12px 0; +} + +.feature-filter .feature-group { + float: left; + margin-bottom: 20px; + width: 695px; +} + +.feature-filter .feature-name { + float: left; + text-align: right; + width: 95px; +} + +.feature-filter .feature-group li { + display: inline; + float: left; + list-style-type: none; + padding-right: 25px; + min-width: 145px; +} diff --git a/wp-admin/css/widgets.css b/wp-admin/css/widgets.css index c896f5b0..bd15ffa4 100644 --- a/wp-admin/css/widgets.css +++ b/wp-admin/css/widgets.css @@ -1,365 +1 @@ -html, -body { - min-width: 950px; -} - -/* 2 column liquid layout */ -div.widget-liquid-left { - float: left; - clear: left; - width: 100%; - margin-right: -325px; -} - -div#widgets-left { - margin-left: 5px; - margin-right: 325px; -} - -div#widgets-right { - width: 285px; - margin: 0 auto; -} - -div.widget-liquid-right { - float: right; - clear: right; - width: 300px; -} - -.widget-liquid-right .widget, -#wp_inactive_widgets .widget { - width: 250px; - margin: 0 auto 20px; - overflow: hidden; -} - -#wp_inactive_widgets .widget { - margin: 0 10px 20px; - float: left; -} - -div.sidebar-name h3 { - margin: 0; - padding: 5px 12px; - font-size: 13px; - height: 19px; - overflow: hidden; - white-space: nowrap; -} - -div.sidebar-name { - background-repeat: repeat-x; - background-position: 0 0; - cursor: pointer; - font-size: 13px; - border-width: 1px; - border-style: solid; - -moz-border-radius-topleft: 8px; - -moz-border-radius-topright: 8px; - -webkit-border-top-right-radius: 8px; - -webkit-border-top-left-radius: 8px; - -khtml-border-top-right-radius: 8px; - -khtml-border-top-left-radius: 8px; - border-top-right-radius: 8px; - border-top-left-radius: 8px; -} - -.js .closed .sidebar-name { - -moz-border-radius-bottomleft: 8px; - -moz-border-radius-bottomright: 8px; - -webkit-border-bottom-right-radius: 8px; - -webkit-border-bottom-left-radius: 8px; - -khtml-border-bottom-right-radius: 8px; - -khtml-border-bottom-left-radius: 8px; - border-bottom-right-radius: 8px; - border-bottom-left-radius: 8px; -} - -.widget-liquid-right .widgets-sortables, -#widgets-left .widget-holder { - border-width: 0 1px 1px; - border-style: none solid solid; - -moz-border-radius-bottomleft: 8px; - -moz-border-radius-bottomright: 8px; - -webkit-border-bottom-right-radius: 8px; - -webkit-border-bottom-left-radius: 8px; - -khtml-border-bottom-right-radius: 8px; - -khtml-border-bottom-left-radius: 8px; - border-bottom-right-radius: 8px; - border-bottom-left-radius: 8px; -} - -.js .closed .widgets-sortables, -.js .closed .widget-holder { - display: none; -} - -.widget-liquid-right .widgets-sortables { - padding: 15px 0 0; -} - -#available-widgets .widget-holder { - padding: 7px 5px 0; -} - -#wp_inactive_widgets { - padding: 5px 5px 0; -} - -#widget-list .widget { - width: 250px; - margin: 0 10px 15px; - border: 0 none; - float: left; -} - -#widget-list .widget-description { - padding: 5px 8px; -} - -#widget-list .widget-top { - border-width: 1px; - border-style: solid; - -moz-border-radius: 6px; - -khtml-border-radius: 6px; - -webkit-border-radius: 6px; - border-radius: 6px; -} - -.widget-placeholder { - border-width: 1px; - border-style: dashed; - margin: 0 auto 20px; - height: 26px; - width: 250px; -} - -#wp_inactive_widgets .widget-placeholder { - margin: 0 10px 20px; - float: left; -} - -div.widgets-holder-wrap { - padding: 0; - margin: 10px 0 20px; -} - -#widgets-left #available-widgets { - background-color: transparent; - border: 0 none; -} - -ul#widget-list { - list-style: none; - margin: 0; - padding: 0; - min-height: 100px; -} - -.widget .widget-top { - font-size: 12px; - font-weight: bold; - height: 26px; - overflow: hidden; -} - -.widget-top .widget-title { - padding: 5px 9px; -} - -.widget-top .widget-title-action { - float: right; -} - -a.widget-action { - display: block; - width: 24px; - height: 26px; -} - -#available-widgets a.widget-action { - display: none; -} - -.widget-top a.widget-action { - background: url("../images/menu-bits.gif") no-repeat scroll 0 -110px; -} - -.widget .widget-inside, -.widget .widget-description { - padding: 12px 12px 10px; - font-size: 11px; - line-height: 16px; -} - -.widget-inside, -.widget-description { - display: none; -} - -#available-widgets .widget-description { - display: block; -} - -.widget .widget-inside p { - margin: 0 0 1em; - padding: 0; -} - -.widget-title h4 { - margin: 0; - line-height: 1.3; - overflow: hidden; - white-space: nowrap; -} - -.widgets-sortables { - min-height: 90px; -} - -.widget-control-actions { - margin-top: 8px; -} - -.widget-control-actions a { - text-decoration: none; -} - -.widget-control-actions a:hover { - text-decoration: underline; -} - -.widget-control-actions .ajax-feedback { - padding-bottom: 3px; -} - -.widget-control-actions div.alignleft { - margin-top: 6px; -} - -div#sidebar-info { - padding: 0 1em; - margin-bottom: 1em; - font-size: 11px; -} - -.widget-title a, -.widget-title a:hover { - text-decoration: none; - border-bottom: none; -} - -.widget-control-edit { - display: block; - font-size: 11px; - font-weight: normal; - line-height: 26px; - padding: 0 8px 0 0; -} - -a.widget-control-edit { - text-decoration: none; -} - -.widget-control-edit .add, -.widget-control-edit .edit { - display: none; -} - -#available-widgets .widget-control-edit .add, -#widgets-right .widget-control-edit .edit, -#wp_inactive_widgets .widget-control-edit .edit { - display: inline; -} - -.editwidget { - margin: 0 auto 15px; -} - -.editwidget .widget-inside { - display: block; - border-width: 1px; - border-style: solid; - padding: 10px; - -moz-border-radius: 6px; - -khtml-border-radius: 6px; - -webkit-border-radius: 6px; - border-radius: 6px; -} - -.inactive p.description { - margin: 5px 15px 8px; -} - -#available-widgets p.description { - margin: 0 12px 12px; -} - -.widget-position { - margin-top: 8px; -} - -.inactive { - padding-top: 2px; -} - -.sidebar-name-arrow { - float: right; - height: 29px; - width: 26px; -} - -.widget-title .in-widget-title { - font-size: 11px; - white-space: nowrap; -} - -#removing-widget { - display: none; - font-weight: normal; - padding-left: 15px; - font-size: 12px; -} - -.widget-control-noform, -#access-off, -.widgets_access .widget-action, -.widgets_access .sidebar-name-arrow, -.widgets_access #access-on, -.widgets_access .widget-holder .description { - display: none; -} - -.widgets_access .widget-holder, -.widgets_access #widget-list { - padding-top: 10px; -} - -.widgets_access #access-off { - display: inline; -} - -.widgets_access #wpbody-content .widget-title-action, -.widgets_access #wpbody-content .widget-control-edit, -.widgets_access .closed .widgets-sortables, -.widgets_access .closed .widget-holder { - display: block; -} - -.widgets_access .closed .sidebar-name { - -moz-border-radius-bottomleft: 0; - -moz-border-radius-bottomright: 0; - -webkit-border-bottom-right-radius: 0; - -webkit-border-bottom-left-radius: 0; - -khtml-border-bottom-right-radius: 0; - -khtml-border-bottom-left-radius: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} - -.widgets_access .sidebar-name, -.widgets_access .widget .widget-top { - cursor: default; -} - +html,body{min-width:950px;}div.widget-liquid-left{float:left;clear:left;width:100%;margin-right:-325px;}div#widgets-left{margin-left:5px;margin-right:325px;}div#widgets-right{width:285px;margin:0 auto;}div.widget-liquid-right{float:right;clear:right;width:300px;}.widget-liquid-right .widget,#wp_inactive_widgets .widget,.widget-liquid-right .sidebar-description{width:250px;margin:0 auto 20px;overflow:hidden;}.widget-liquid-right .sidebar-description{margin-bottom:10px;}#wp_inactive_widgets .widget{margin:0 10px 20px;float:left;}div.sidebar-name h3{margin:0;padding:5px 12px;font-size:13px;height:19px;overflow:hidden;white-space:nowrap;}div.sidebar-name{background-repeat:repeat-x;background-position:0 0;cursor:pointer;font-size:13px;border-width:1px;border-style:solid;-moz-border-radius-topleft:8px;-moz-border-radius-topright:8px;-webkit-border-top-right-radius:8px;-webkit-border-top-left-radius:8px;-khtml-border-top-right-radius:8px;-khtml-border-top-left-radius:8px;border-top-right-radius:8px;border-top-left-radius:8px;}.js .closed .sidebar-name{-moz-border-radius-bottomleft:8px;-moz-border-radius-bottomright:8px;-webkit-border-bottom-right-radius:8px;-webkit-border-bottom-left-radius:8px;-khtml-border-bottom-right-radius:8px;-khtml-border-bottom-left-radius:8px;border-bottom-right-radius:8px;border-bottom-left-radius:8px;}.widget-liquid-right .widgets-sortables,#widgets-left .widget-holder{border-width:0 1px 1px;border-style:none solid solid;-moz-border-radius-bottomleft:8px;-moz-border-radius-bottomright:8px;-webkit-border-bottom-right-radius:8px;-webkit-border-bottom-left-radius:8px;-khtml-border-bottom-right-radius:8px;-khtml-border-bottom-left-radius:8px;border-bottom-right-radius:8px;border-bottom-left-radius:8px;}.js .closed .widgets-sortables,.js .closed .widget-holder{display:none;}.widget-liquid-right .widgets-sortables{padding:15px 0 0;}#available-widgets .widget-holder{padding:7px 5px 0;}#wp_inactive_widgets{padding:5px 5px 0;}#widget-list .widget{width:250px;margin:0 10px 15px;border:0 none;float:left;}#widget-list .widget-description{padding:5px 8px;}#widget-list .widget-top{border-width:1px;border-style:solid;-moz-border-radius:6px;-khtml-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;}.widget-placeholder{border-width:1px;border-style:dashed;margin:0 auto 20px;height:26px;width:250px;}#wp_inactive_widgets .widget-placeholder{margin:0 10px 20px;float:left;}div.widgets-holder-wrap{padding:0;margin:10px 0 20px;}#widgets-left #available-widgets{background-color:transparent;border:0 none;}ul#widget-list{list-style:none;margin:0;padding:0;min-height:100px;}.widget .widget-top{font-size:12px;font-weight:bold;height:26px;overflow:hidden;}.widget-top .widget-title{padding:5px 9px;}.widget-top .widget-title-action{float:right;}a.widget-action{display:block;width:24px;height:26px;}#available-widgets a.widget-action{display:none;}.widget-top a.widget-action{background:url("../images/menu-bits.gif") no-repeat scroll 0 -110px;}.widget .widget-inside,.widget .widget-description{padding:12px 12px 10px;font-size:11px;line-height:16px;}.widget-inside,.widget-description{display:none;}#available-widgets .widget-description{display:block;}.widget .widget-inside p{margin:0 0 1em;padding:0;}.widget-title h4{margin:0;line-height:1.3;overflow:hidden;white-space:nowrap;}.widgets-sortables{min-height:90px;}.widget-control-actions{margin-top:8px;}.widget-control-actions a{text-decoration:none;}.widget-control-actions a:hover{text-decoration:underline;}.widget-control-actions .ajax-feedback{padding-bottom:3px;}.widget-control-actions div.alignleft{margin-top:6px;}div#sidebar-info{padding:0 1em;margin-bottom:1em;font-size:11px;}.widget-title a,.widget-title a:hover{text-decoration:none;border-bottom:none;}.widget-control-edit{display:block;font-size:11px;font-weight:normal;line-height:26px;padding:0 8px 0 0;}a.widget-control-edit{text-decoration:none;}.widget-control-edit .add,.widget-control-edit .edit{display:none;}#available-widgets .widget-control-edit .add,#widgets-right .widget-control-edit .edit,#wp_inactive_widgets .widget-control-edit .edit{display:inline;}.editwidget{margin:0 auto 15px;}.editwidget .widget-inside{display:block;border-width:1px;border-style:solid;padding:10px;-moz-border-radius:6px;-khtml-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;}.inactive p.description{margin:5px 15px 8px;}#available-widgets p.description{margin:0 12px 12px;}.widget-position{margin-top:8px;}.inactive{padding-top:2px;}.sidebar-name-arrow{float:right;height:29px;width:26px;}.widget-title .in-widget-title{font-size:11px;white-space:nowrap;}#removing-widget{display:none;font-weight:normal;padding-left:15px;font-size:12px;}.widget-control-noform,#access-off,.widgets_access .widget-action,.widgets_access .sidebar-name-arrow,.widgets_access #access-on,.widgets_access .widget-holder .description{display:none;}.widgets_access .widget-holder,.widgets_access #widget-list{padding-top:10px;}.widgets_access #access-off{display:inline;}.widgets_access #wpbody-content .widget-title-action,.widgets_access #wpbody-content .widget-control-edit,.widgets_access .closed .widgets-sortables,.widgets_access .closed .widget-holder{display:block;}.widgets_access .closed .sidebar-name{-moz-border-radius-bottomleft:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-khtml-border-bottom-right-radius:0;-khtml-border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0;}.widgets_access .sidebar-name,.widgets_access .widget .widget-top{cursor:default;} \ No newline at end of file diff --git a/wp-admin/css/widgets.dev.css b/wp-admin/css/widgets.dev.css new file mode 100644 index 00000000..4fa2f7d9 --- /dev/null +++ b/wp-admin/css/widgets.dev.css @@ -0,0 +1,370 @@ +html, +body { + min-width: 950px; +} + +/* 2 column liquid layout */ +div.widget-liquid-left { + float: left; + clear: left; + width: 100%; + margin-right: -325px; +} + +div#widgets-left { + margin-left: 5px; + margin-right: 325px; +} + +div#widgets-right { + width: 285px; + margin: 0 auto; +} + +div.widget-liquid-right { + float: right; + clear: right; + width: 300px; +} + +.widget-liquid-right .widget, +#wp_inactive_widgets .widget, +.widget-liquid-right .sidebar-description { + width: 250px; + margin: 0 auto 20px; + overflow: hidden; +} + +.widget-liquid-right .sidebar-description { + margin-bottom: 10px; +} + +#wp_inactive_widgets .widget { + margin: 0 10px 20px; + float: left; +} + +div.sidebar-name h3 { + margin: 0; + padding: 5px 12px; + font-size: 13px; + height: 19px; + overflow: hidden; + white-space: nowrap; +} + +div.sidebar-name { + background-repeat: repeat-x; + background-position: 0 0; + cursor: pointer; + font-size: 13px; + border-width: 1px; + border-style: solid; + -moz-border-radius-topleft: 8px; + -moz-border-radius-topright: 8px; + -webkit-border-top-right-radius: 8px; + -webkit-border-top-left-radius: 8px; + -khtml-border-top-right-radius: 8px; + -khtml-border-top-left-radius: 8px; + border-top-right-radius: 8px; + border-top-left-radius: 8px; +} + +.js .closed .sidebar-name { + -moz-border-radius-bottomleft: 8px; + -moz-border-radius-bottomright: 8px; + -webkit-border-bottom-right-radius: 8px; + -webkit-border-bottom-left-radius: 8px; + -khtml-border-bottom-right-radius: 8px; + -khtml-border-bottom-left-radius: 8px; + border-bottom-right-radius: 8px; + border-bottom-left-radius: 8px; +} + +.widget-liquid-right .widgets-sortables, +#widgets-left .widget-holder { + border-width: 0 1px 1px; + border-style: none solid solid; + -moz-border-radius-bottomleft: 8px; + -moz-border-radius-bottomright: 8px; + -webkit-border-bottom-right-radius: 8px; + -webkit-border-bottom-left-radius: 8px; + -khtml-border-bottom-right-radius: 8px; + -khtml-border-bottom-left-radius: 8px; + border-bottom-right-radius: 8px; + border-bottom-left-radius: 8px; +} + +.js .closed .widgets-sortables, +.js .closed .widget-holder { + display: none; +} + +.widget-liquid-right .widgets-sortables { + padding: 15px 0 0; +} + +#available-widgets .widget-holder { + padding: 7px 5px 0; +} + +#wp_inactive_widgets { + padding: 5px 5px 0; +} + +#widget-list .widget { + width: 250px; + margin: 0 10px 15px; + border: 0 none; + float: left; +} + +#widget-list .widget-description { + padding: 5px 8px; +} + +#widget-list .widget-top { + border-width: 1px; + border-style: solid; + -moz-border-radius: 6px; + -khtml-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; +} + +.widget-placeholder { + border-width: 1px; + border-style: dashed; + margin: 0 auto 20px; + height: 26px; + width: 250px; +} + +#wp_inactive_widgets .widget-placeholder { + margin: 0 10px 20px; + float: left; +} + +div.widgets-holder-wrap { + padding: 0; + margin: 10px 0 20px; +} + +#widgets-left #available-widgets { + background-color: transparent; + border: 0 none; +} + +ul#widget-list { + list-style: none; + margin: 0; + padding: 0; + min-height: 100px; +} + +.widget .widget-top { + font-size: 12px; + font-weight: bold; + height: 26px; + overflow: hidden; +} + +.widget-top .widget-title { + padding: 5px 9px; +} + +.widget-top .widget-title-action { + float: right; +} + +a.widget-action { + display: block; + width: 24px; + height: 26px; +} + +#available-widgets a.widget-action { + display: none; +} + +.widget-top a.widget-action { + background: url("../images/menu-bits.gif") no-repeat scroll 0 -110px; +} + +.widget .widget-inside, +.widget .widget-description { + padding: 12px 12px 10px; + font-size: 11px; + line-height: 16px; +} + +.widget-inside, +.widget-description { + display: none; +} + +#available-widgets .widget-description { + display: block; +} + +.widget .widget-inside p { + margin: 0 0 1em; + padding: 0; +} + +.widget-title h4 { + margin: 0; + line-height: 1.3; + overflow: hidden; + white-space: nowrap; +} + +.widgets-sortables { + min-height: 90px; +} + +.widget-control-actions { + margin-top: 8px; +} + +.widget-control-actions a { + text-decoration: none; +} + +.widget-control-actions a:hover { + text-decoration: underline; +} + +.widget-control-actions .ajax-feedback { + padding-bottom: 3px; +} + +.widget-control-actions div.alignleft { + margin-top: 6px; +} + +div#sidebar-info { + padding: 0 1em; + margin-bottom: 1em; + font-size: 11px; +} + +.widget-title a, +.widget-title a:hover { + text-decoration: none; + border-bottom: none; +} + +.widget-control-edit { + display: block; + font-size: 11px; + font-weight: normal; + line-height: 26px; + padding: 0 8px 0 0; +} + +a.widget-control-edit { + text-decoration: none; +} + +.widget-control-edit .add, +.widget-control-edit .edit { + display: none; +} + +#available-widgets .widget-control-edit .add, +#widgets-right .widget-control-edit .edit, +#wp_inactive_widgets .widget-control-edit .edit { + display: inline; +} + +.editwidget { + margin: 0 auto 15px; +} + +.editwidget .widget-inside { + display: block; + border-width: 1px; + border-style: solid; + padding: 10px; + -moz-border-radius: 6px; + -khtml-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; +} + +.inactive p.description { + margin: 5px 15px 8px; +} + +#available-widgets p.description { + margin: 0 12px 12px; +} + +.widget-position { + margin-top: 8px; +} + +.inactive { + padding-top: 2px; +} + +.sidebar-name-arrow { + float: right; + height: 29px; + width: 26px; +} + +.widget-title .in-widget-title { + font-size: 11px; + white-space: nowrap; +} + +#removing-widget { + display: none; + font-weight: normal; + padding-left: 15px; + font-size: 12px; +} + +.widget-control-noform, +#access-off, +.widgets_access .widget-action, +.widgets_access .sidebar-name-arrow, +.widgets_access #access-on, +.widgets_access .widget-holder .description { + display: none; +} + +.widgets_access .widget-holder, +.widgets_access #widget-list { + padding-top: 10px; +} + +.widgets_access #access-off { + display: inline; +} + +.widgets_access #wpbody-content .widget-title-action, +.widgets_access #wpbody-content .widget-control-edit, +.widgets_access .closed .widgets-sortables, +.widgets_access .closed .widget-holder { + display: block; +} + +.widgets_access .closed .sidebar-name { + -moz-border-radius-bottomleft: 0; + -moz-border-radius-bottomright: 0; + -webkit-border-bottom-right-radius: 0; + -webkit-border-bottom-left-radius: 0; + -khtml-border-bottom-right-radius: 0; + -khtml-border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} + +.widgets_access .sidebar-name, +.widgets_access .widget .widget-top { + cursor: default; +} + diff --git a/wp-admin/edit-attachment-rows.php b/wp-admin/edit-attachment-rows.php index 4922eed2..eef8f0cf 100644 --- a/wp-admin/edit-attachment-rows.php +++ b/wp-admin/edit-attachment-rows.php @@ -30,12 +30,18 @@ add_filter('the_title','esc_html'); $alt = ''; $posts_columns = get_column_headers('upload'); $hidden = get_hidden_columns('upload'); -while (have_posts()) : the_post(); + +while ( have_posts() ) : the_post(); + +if ( $is_trash && $post->post_status != 'trash' ) + continue; +elseif ( !$is_trash && $post->post_status == 'trash' ) + continue; + $alt = ( 'alternate' == $alt ) ? '' : 'alternate'; global $current_user; $post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' ); $att_title = _draft_or_post_title(); - ?> post_status ); ?>' valign="top"> @@ -53,7 +59,7 @@ foreach ($posts_columns as $column_name => $column_display_name ) { case 'cb': ?> - + ID) ) { ?> $column_display_name ) { ?> >ID, array(80, 60), true ) ) { + if ( $is_trash ) echo $thumb; + else { ?> - $column_display_name ) { case 'media': ?> - >
    + >
    ID))); ?>

    ID) ) + if ( current_user_can('edit_post', $post->ID) && !$is_trash ) $actions['edit'] = '' . __('Edit') . ''; - if ( current_user_can('delete_post', $post->ID) ) - $actions['delete'] = "ID) . "' onclick=\"if ( confirm('" . esc_js(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this attachment '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this attachment '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . ""; - $actions['view'] = '' . __('View') . ''; + if ( current_user_can('delete_post', $post->ID) ) { + if ( $is_trash ) + $actions['untrash'] = "ID) . "'>" . __('Restore') . ""; + elseif ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) + $actions['trash'] = "ID) . "'>" . __('Trash') . ""; + if ( $is_trash || !EMPTY_TRASH_DAYS || !MEDIA_TRASH ) + $actions['delete'] = "ID) . "'>" . __('Delete Permanently') . ""; + } + if ( !$is_trash ) + $actions['view'] = '' . __('View') . ''; + $actions = apply_filters( 'media_row_actions', $actions, $post ); $action_count = count($actions); $i = 0; echo '

    '; @@ -158,7 +174,8 @@ foreach ($posts_columns as $column_name => $column_display_name ) { - >  + >
    + $column_display_name ) { + diff --git a/wp-admin/edit-category-form.php b/wp-admin/edit-category-form.php index 27417f6b..53c60b57 100644 --- a/wp-admin/edit-category-form.php +++ b/wp-admin/edit-category-form.php @@ -57,7 +57,6 @@ _fill_empty_category($category);
    - @@ -67,14 +66,14 @@ _fill_empty_category($category); - 0, 'name' => 'category_parent', 'orderby' => 'name', 'selected' => $category->parent, 'hierarchical' => true, 'show_option_none' => __('None'))); ?>
    + 0, 'name' => 'category_parent', 'orderby' => 'name', 'selected' => $category->parent, 'exclude' => $category->term_id, 'hierarchical' => true, 'show_option_none' => __('None'))); ?>

    - + diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index dd5f867a..ee23b3e3 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -17,40 +17,33 @@ enqueue_comment_hotkeys_js(); $post_id = isset($_REQUEST['p']) ? (int) $_REQUEST['p'] : 0; -if ( ( isset( $_REQUEST['delete_all_spam'] ) || isset( $_REQUEST['delete_all_spam2'] ) ) && !empty( $_REQUEST['pagegen_timestamp'] ) ) { - check_admin_referer('bulk-spam-delete', '_spam_nonce'); +if ( isset($_REQUEST['doaction']) || isset($_REQUEST['doaction2']) || isset($_REQUEST['delete_all']) || isset($_REQUEST['delete_all2']) ) { + check_admin_referer('bulk-comments'); - $delete_time = $wpdb->escape( $_REQUEST['pagegen_timestamp'] ); - if ( current_user_can('moderate_comments')) { - $deleted_spam = $wpdb->query( "DELETE FROM $wpdb->comments WHERE comment_approved = 'spam' AND '$delete_time' > comment_date_gmt" ); + if ( (isset($_REQUEST['delete_all']) || isset($_REQUEST['delete_all2'])) && !empty($_REQUEST['pagegen_timestamp']) ) { + $comment_status = $wpdb->escape($_REQUEST['comment_status']); + $delete_time = $wpdb->escape($_REQUEST['pagegen_timestamp']); + $comment_ids = $wpdb->get_col( "SELECT comment_ID FROM $wpdb->comments WHERE comment_approved = '$comment_status' AND '$delete_time' > comment_date_gmt" ); + $doaction = 'delete'; + } elseif ( ($_REQUEST['action'] != -1 || $_REQUEST['action2'] != -1) && isset($_REQUEST['delete_comments']) ) { + $comment_ids = $_REQUEST['delete_comments']; + $doaction = ($_REQUEST['action'] != -1) ? $_REQUEST['action'] : $_REQUEST['action2']; + } elseif ( $_REQUEST['doaction'] == 'undo' && isset($_REQUEST['ids']) ) { + $comment_ids = array_map( 'absint', explode(',', $_REQUEST['ids']) ); + $doaction = $_REQUEST['action']; } else { - $deleted_spam = 0; + wp_redirect($_SERVER['HTTP_REFERER']); } - $redirect_to = 'edit-comments.php?comment_status=spam&deleted=' . (int) $deleted_spam; - if ( $post_id ) - $redirect_to = add_query_arg( 'p', absint( $post_id ), $redirect_to ); - wp_redirect( $redirect_to ); -} elseif ( isset($_REQUEST['delete_comments']) && isset($_REQUEST['action']) && ( -1 != $_REQUEST['action'] || -1 != $_REQUEST['action2'] ) ) { - check_admin_referer('bulk-comments'); - $doaction = ( -1 != $_REQUEST['action'] ) ? $_REQUEST['action'] : $_REQUEST['action2']; - $deleted = $approved = $unapproved = $spammed = 0; - foreach ( (array) $_REQUEST['delete_comments'] as $comment_id) : // Check the permissions on each - $comment_id = (int) $comment_id; + $approved = $unapproved = $spammed = $unspammed = $trashed = $untrashed = $deleted = 0; + + foreach ($comment_ids as $comment_id) { // Check the permissions on each $_post_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = %d", $comment_id) ); if ( !current_user_can('edit_post', $_post_id) ) continue; switch( $doaction ) { - case 'markspam' : - wp_set_comment_status($comment_id, 'spam'); - $spammed++; - break; - case 'delete' : - wp_set_comment_status($comment_id, 'delete'); - $deleted++; - break; case 'approve' : wp_set_comment_status($comment_id, 'approve'); $approved++; @@ -59,10 +52,48 @@ if ( ( isset( $_REQUEST['delete_all_spam'] ) || isset( $_REQUEST['delete_all_spa wp_set_comment_status($comment_id, 'hold'); $unapproved++; break; + case 'spam' : + wp_spam_comment($comment_id); + $spammed++; + break; + case 'unspam' : + wp_unspam_comment($comment_id); + $unspammed++; + break; + case 'trash' : + wp_trash_comment($comment_id); + $trashed++; + break; + case 'untrash' : + wp_untrash_comment($comment_id); + $untrashed++; + break; + case 'delete' : + wp_delete_comment($comment_id); + $deleted++; + break; } - endforeach; + } + + $redirect_to = 'edit-comments.php'; + + if ( $approved ) + $redirect_to = add_query_arg( 'approved', $approved, $redirect_to ); + if ( $unapproved ) + $redirect_to = add_query_arg( 'unapproved', $unapproved, $redirect_to ); + if ( $spammed ) + $redirect_to = add_query_arg( 'spammed', $spammed, $redirect_to ); + if ( $unspammed ) + $redirect_to = add_query_arg( 'unspammed', $unspammed, $redirect_to ); + if ( $trashed ) + $redirect_to = add_query_arg( 'trashed', $trashed, $redirect_to ); + if ( $untrashed ) + $redirect_to = add_query_arg( 'untrashed', $untrashed, $redirect_to ); + if ( $deleted ) + $redirect_to = add_query_arg( 'deleted', $deleted, $redirect_to ); + if ( $trashed || $spammed ) + $redirect_to = add_query_arg( 'ids', join(',', $comment_ids), $redirect_to ); - $redirect_to = 'edit-comments.php?deleted=' . $deleted . '&approved=' . $approved . '&spam=' . $spammed . '&unapproved=' . $unapproved; if ( $post_id ) $redirect_to = add_query_arg( 'p', absint( $post_id ), $redirect_to ); if ( isset($_REQUEST['apage']) ) @@ -89,7 +120,7 @@ require_once('admin-header.php'); $mode = ( ! isset($_GET['mode']) || empty($_GET['mode']) ) ? 'detail' : esc_attr($_GET['mode']); $comment_status = isset($_REQUEST['comment_status']) ? $_REQUEST['comment_status'] : 'all'; -if ( !in_array($comment_status, array('all', 'moderated', 'approved', 'spam')) ) +if ( !in_array($comment_status, array('all', 'moderated', 'approved', 'spam', 'trash')) ) $comment_status = 'all'; $comment_type = !empty($_GET['comment_type']) ? esc_attr($_GET['comment_type']) : ''; @@ -105,26 +136,41 @@ if ( isset($_GET['s']) && $_GET['s'] ) 0 || $deleted > 0 || $spam > 0 ) { +if ( isset($_GET['approved']) || isset($_GET['deleted']) || isset($_GET['trashed']) || isset($_GET['untrashed']) || isset($_GET['spammed']) || isset($_GET['unspammed']) ) { + $approved = isset($_GET['approved']) ? (int) $_GET['approved'] : 0; + $deleted = isset($_GET['deleted']) ? (int) $_GET['deleted'] : 0; + $trashed = isset($_GET['trashed']) ? (int) $_GET['trashed'] : 0; + $untrashed = isset($_GET['untrashed']) ? (int) $_GET['untrashed'] : 0; + $spammed = isset($_GET['spammed']) ? (int) $_GET['spammed'] : 0; + $unspammed = isset($_GET['unspammed']) ? (int) $_GET['unspammed'] : 0; + + if ( $approved > 0 || $deleted > 0 || $trashed > 0 || $untrashed > 0 || $spammed > 0 || $unspammed > 0 ) { echo '

    '; if ( $approved > 0 ) { printf( _n( '%s comment approved', '%s comments approved', $approved ), $approved ); echo '
    '; } - - if ( $deleted > 0 ) { - printf( _n( '%s comment deleted', '%s comments deleted', $deleted ), $deleted ); + if ( $spammed > 0 ) { + printf( _n( '%s comment marked as spam.', '%s comments marked as spam.', $spammed ), $spammed ); + $ids = isset($_GET['ids']) ? $_GET['ids'] : 0; + echo ' ' . __('Undo') . '
    '; + } + if ( $unspammed > 0 ) { + printf( _n( '%s comment restored from the spam', '%s comments restored from the spam', $unspammed ), $unspammed ); echo '
    '; } - - if ( $spam > 0 ) { - printf( _n( '%s comment marked as spam', '%s comments marked as spam', $spam ), $spam ); + if ( $trashed > 0 ) { + printf( _n( '%s comment moved to the trash.', '%s comments moved to the trash.', $trashed ), $trashed ); + $ids = isset($_GET['ids']) ? $_GET['ids'] : 0; + echo ' ' . __('Undo') . '
    '; + } + if ( $untrashed > 0 ) { + printf( _n( '%s comment restored from the trash', '%s comments restored from the trash', $untrashed ), $untrashed ); + echo '
    '; + } + if ( $deleted > 0 ) { + printf( _n( '%s comment permanently deleted', '%s comments permanently deleted', $deleted ), $deleted ); echo '
    '; } @@ -142,13 +188,19 @@ $num_comments = ( $post_id ) ? wp_count_comments( $post_id ) : wp_count_comments //, number_format_i18n($num_comments->spam) ), "" . number_format_i18n($num_comments->spam) . "") $stati = array( 'all' => _n_noop('All', 'All'), // singular not used - 'moderated' => _n_noop('Pending (%s)', 'Pending (%s)'), + 'moderated' => _n_noop('Pending (%s)', 'Pending (%s)'), 'approved' => _n_noop('Approved', 'Approved'), // singular not used - 'spam' => _n_noop('Spam (%s)', 'Spam (%s)') + 'spam' => _n_noop('Spam (%s)', 'Spam (%s)'), + 'trash' => _n_noop('Trash (%s)', 'Trash (%s)') ); + +if ( !EMPTY_TRASH_DAYS ) + unset($stati['trash']); + $link = 'edit-comments.php'; if ( !empty($comment_type) && 'all' != $comment_type ) $link = add_query_arg( 'comment_type', $comment_type, $link ); + foreach ( $stati as $status => $label ) { $class = ''; @@ -184,10 +236,10 @@ unset($status_links);

    - - + + + + + + + + + + + + - @@ -281,11 +342,13 @@ $page_links = paginate_links( array( - - + + + +
    @@ -339,15 +402,26 @@ if ( $page_links ) - - + + + + + + + + + + + + - - - + + + +
    @@ -383,4 +457,5 @@ if ( $page_links ) diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index dadf6c07..bc435ebf 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -18,22 +18,48 @@ if ( !defined('ABSPATH') ) $post_ID = isset($post_ID) ? (int) $post_ID : 0; $action = isset($action) ? $action : ''; -if ( isset($_GET['message']) ) + +$message = false; +if ( isset($_GET['message']) ) { $_GET['message'] = absint( $_GET['message'] ); -$messages[1] = sprintf(__('Post updated. View post'), get_permalink($post_ID)); -$messages[2] = __('Custom field updated.'); -$messages[3] = __('Custom field deleted.'); -$messages[4] = __('Post updated.'); -$messages[6] = sprintf(__('Post published. View post'), get_permalink($post_ID)); -$messages[7] = __('Post saved.'); -$messages[8] = sprintf(__('Post submitted. Preview post'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ); -if ( isset($_GET['revision']) ) - $messages[5] = sprintf( __('Post restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ); + switch ( $_GET['message'] ) { + case 1: + $message = sprintf( __('Post updated. View post'), get_permalink($post_ID) ); + break; + case 2: + $message = __('Custom field updated.'); + break; + case 3: + $message = __('Custom field deleted.'); + break; + case 4: + $message = __('Post updated.'); + break; + case 5: + if ( isset($_GET['revision']) ) + $message = sprintf( __('Post restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ); + break; + case 6: + $message = sprintf( __('Post published. View post'), get_permalink($post_ID) ); + break; + case 7: + $message = __('Post saved.'); + break; + case 8: + $message = sprintf( __('Post submitted. Preview post'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ); + break; + case 9: + // translators: Publish box date formt, see http://php.net/date - Same as in meta-boxes.php + $message = sprintf( __('Post scheduled for: %1$s. Preview post'), date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), get_permalink($post_ID) ); + break; + case 10: + $message = sprintf( __('Post draft updated. Preview post'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ); + break; + } +} $notice = false; -$notices[1] = __( 'There is an autosave of this post that is more recent than the version below. View the autosave.' ); - if ( 0 == $post_ID ) { $form_action = 'post'; $temp_ID = -1 * time(); // don't change this formula without looking at wp_write_post() @@ -48,7 +74,7 @@ if ( 0 == $post_ID ) { if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt, false ) > mysql2date( 'U', $post->post_modified_gmt, false ) ) { foreach ( _wp_post_revision_fields() as $autosave_field => $_autosave_field ) { if ( normalize_whitespace( $autosave->$autosave_field ) != normalize_whitespace( $post->$autosave_field ) ) { - $notice = sprintf( $notices[1], get_edit_post_link( $autosave->ID ) ); + $notice = sprintf( __( 'There is an autosave of this post that is more recent than the version below. View the autosave.' ), get_edit_post_link( $autosave->ID ) ); break; } } @@ -57,246 +83,10 @@ if ( 0 == $post_ID ) { } // All meta boxes should be defined and added before the first do_meta_boxes() call (or potentially during the do_meta_boxes action). +require_once('includes/meta-boxes.php'); -/** - * Display post submit form fields. - * - * @since 2.7.0 - * - * @param object $post - */ -function post_submit_meta_box($post) { - global $action; - - $can_publish = current_user_can('publish_posts'); -?> -
    - -
    - - -
    - -
    - -
    -
    -post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?> -post_status ) { ?>style="display:none" type="submit" name="save" id="save-post" value="" tabindex="4" class="button button-highlighted" /> -post_status && $can_publish ) { ?> - - -
    - -
    -post_status ) { - $preview_link = esc_url(get_permalink($post->ID)); - $preview_button = __('Preview Changes'); -} else { - $preview_link = esc_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); - $preview_button = __('Preview'); -} -?> - - -
    - -
    -
    - -
    - -
    - -post_status ) { - case 'private': - _e('Privately Published'); - break; - case 'publish': - _e('Published'); - break; - case 'future': - _e('Scheduled'); - break; - case 'pending': - _e('Pending Review'); - break; - case 'draft': - _e('Draft'); - break; -} -?> - -post_status || 'private' == $post->post_status || $can_publish ) { ?> -post_status ) { ?>style="display:none;" class="edit-post-status hide-if-no-js" tabindex='4'> - -
    - - - - -
    - - -
    - -
    - post_status ) { - $post->post_password = ''; - $visibility = 'private'; - $visibility_trans = __('Private'); -} elseif ( !empty( $post->post_password ) ) { - $visibility = 'password'; - $visibility_trans = __('Password protected'); -} elseif ( is_sticky( $post->ID ) ) { - $visibility = 'public'; - $visibility_trans = __('Public, Sticky'); -} else { - $visibility = 'public'; - $visibility_trans = __('Public'); -} - -?> - -
    - -ID)); ?> /> - - - - />
    -ID)); ?> tabindex="4" />
    - />
    -
    - />
    - -

    - - -

    -
    - - -
    - - -ID ) { - if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date - $stamp = __('Scheduled for: %1$s'); - } else if ( 'publish' == $post->post_status || 'private' == $post->post_status ) { // already published - $stamp = __('Published on: %1$s'); - } else if ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified - $stamp = __('Publish immediately'); - } else if ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // draft, 1 or more saves, future date specified - $stamp = __('Schedule for: %1$s'); - } else { // draft, 1 or more saves, date specified - $stamp = __('Publish on: %1$s'); - } - $date = date_i18n( $datef, strtotime( $post->post_date ) ); -} else { // draft (no saves, and thus no date specified) - $stamp = __('Publish immediately'); - $date = date_i18n( $datef, strtotime( current_time('mysql') ) ); -} - -if ( $can_publish ) : // Contributors don't get to choose the date of publish ?> -
    - - - -
    -
    - - -
    -
    -
    - -
    - - - -
    -post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) { - if ( current_user_can('publish_posts') ) : - if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?> - - - - - - - - - - - - -
    -
    -
    -
    - -helps) ? esc_attr($taxonomy->helps) : __('Separate tags with commas.'); -?> -
    -
    -
    -

    -
    - - - - - -
    -

    -
    -
    - - -
      -
    • -
    • -
    - - - -
    -
      -ID, false, false, $popular_ids) ?> -
    -
    - - -
    -

    -

    - - 0, 'name' => 'newcat_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category'), 'tab_index' => 3 ) ); ?> - - -

    -
    - -

    -

    -

    -

    - - -

    Learn more about manual excerpts.'); ?>

    -to_ping) ) .'" />'; - if ('' != $post->pinged) { - $pings = '

    '. __('Already pinged:') . '

      '; - $already_pinged = explode("\n", trim($post->pinged)); - foreach ($already_pinged as $pinged_url) { - $pings .= "\n\t
    • " . esc_html($pinged_url) . "
    • "; - } - $pings .= '
    '; - } - -?> -


    ()

    -

    pingbacks, no other action necessary.'); ?>

    - -
    -
    -ID); -list_meta($metadata); -meta_form(); ?> -
    -

    use in your theme.'); ?>

    - - -

    -
    -

    -get_var($wpdb->prepare("SELECT count(1) FROM $wpdb->comments WHERE comment_post_ID = '%d' AND ( comment_approved = '0' OR comment_approved = '1')", $post_ID)); - - if ( 1 > $total ) { - echo '

    ' . __('No comments yet.') . '

    '; - return; - } - - wp_nonce_field( 'get-comments', 'add_comment_nonce', false ); -?> - - - - - - - - -

    - - -post_status || 'private' == $post->post_status ) add_meta_box('commentsdiv', __('Comments'), 'post_comment_meta_box', 'post', 'normal', 'core'); -/** - * Display post slug form fields. - * - * @since 2.6.0 - * - * @param object $post - */ -function post_slug_meta_box($post) { -?> - -post_status && !current_user_can( 'publish_posts' ) ) ) add_meta_box('slugdiv', __('Post Slug'), 'post_slug_meta_box', 'post', 'normal', 'core'); $authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM if ( $post->post_author && !in_array($post->post_author, $authors) ) $authors[] = $post->post_author; -if ( $authors && count( $authors ) > 1 ) : -/** - * Display form field with list of authors. - * - * @since 2.6.0 - * - * @param object $post - */ -function post_author_meta_box($post) { - global $current_user, $user_ID; - $authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM - if ( $post->post_author && !in_array($post->post_author, $authors) ) - $authors[] = $post->post_author; -?> - $authors, 'name' => 'post_author_override', 'selected' => empty($post->ID) ? $user_ID : $post->post_author) ); ?> - 1 ) + add_meta_box('authordiv', __('Post Author'), 'post_author_meta_box', 'post', 'normal', 'core'); -if ( 0 < $post_ID && wp_get_post_revisions( $post_ID ) ) : -/** - * Display list of post revisions. - * - * @since 2.6.0 - * - * @param object $post - */ -function post_revisions_meta_box($post) { - wp_list_post_revisions(); -} -add_meta_box('revisionsdiv', __('Post Revisions'), 'post_revisions_meta_box', 'post', 'normal', 'core'); -endif; +if ( 0 < $post_ID && wp_get_post_revisions( $post_ID ) ) + add_meta_box('revisionsdiv', __('Post Revisions'), 'post_revisions_meta_box', 'post', 'normal', 'core'); do_action('do_meta_boxes', 'post', 'normal', $post); do_action('do_meta_boxes', 'post', 'advanced', $post); @@ -547,18 +129,14 @@ require_once('admin-header.php'); ?> - - - -

    - -

    + +

    comment_date ) );
    -comment_ID&_wp_original_http_referer=" . urlencode(wp_get_referer()), 'delete-comment_' . $comment->comment_ID) . "' onclick=\"if ( confirm('" . esc_js(__("You are about to delete this comment. \n 'Cancel' to stop, 'OK' to delete.")) . "') ){return true;}return false;\">" . __('Delete') . "\n"; ?> +comment_ID&_wp_original_http_referer=" . urlencode(wp_get_referer()), 'delete-comment_' . $comment->comment_ID) . "'>" . ( !EMPTY_TRASH_DAYS ? __('Delete Permanently') : __('Move to Trash') ) . "\n"; ?>
    diff --git a/wp-admin/edit-link-categories.php b/wp-admin/edit-link-categories.php index 691f3266..90dcce66 100644 --- a/wp-admin/edit-link-categories.php +++ b/wp-admin/edit-link-categories.php @@ -18,13 +18,14 @@ if ( isset($_GET['action']) && isset($_GET['delete']) ) { wp_die(__('Cheatin’ uh?')); if ( 'delete' == $doaction ) { - 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'); + $cats = (array) $_GET['delete']; + $default_cat_id = get_option('default_link_category'); + foreach( $cats as $cat_ID ) { + $cat_ID = (int) $cat_ID; // Don't delete the default cats. if ( $cat_ID == $default_cat_id ) - wp_die(sprintf(__("Can’t delete the %s category: this is the default one"), $cat_name)); + wp_die( sprintf( __("Can’t delete the %s category: this is the default one"), get_term_field('name', $cat_ID, 'link_category') ) ); wp_delete_term($cat_ID, 'link_category', array('default' => $default_cat_id)); } @@ -209,6 +210,7 @@ if ( $page_links )
    +

    diff --git a/wp-admin/edit-link-category-form.php b/wp-admin/edit-link-category-form.php index df1727d6..17db6ef6 100644 --- a/wp-admin/edit-link-category-form.php +++ b/wp-admin/edit-link-category-form.php @@ -79,7 +79,8 @@ _fill_empty_link_category($category); - +
    + diff --git a/wp-admin/edit-link-form.php b/wp-admin/edit-link-form.php index 11ec684b..7d0c3edc 100644 --- a/wp-admin/edit-link-form.php +++ b/wp-admin/edit-link-form.php @@ -22,319 +22,12 @@ if ( ! empty($link_id) ) { $nonce_action = 'add-bookmark'; } -/** - * Display checked checkboxes attribute for xfn microformat options. - * - * @since 1.0.1 - * - * @param string $class - * @param string $value - * @param mixed $deprecated Not used. - */ -function xfn_check($class, $value = '', $deprecated = '') { - global $link; - - $link_rel = isset( $link->link_rel ) ? $link->link_rel : ''; // In PHP 5.3: $link_rel = $link->link_rel ?: ''; - $rels = preg_split('/\s+/', $link_rel); - - if ('' != $value && in_array($value, $rels) ) { - echo ' checked="checked"'; - } - - if ('' == $value) { - if ('family' == $class && strpos($link_rel, 'child') === false && strpos($link_rel, 'parent') === false && strpos($link_rel, 'sibling') === false && strpos($link_rel, 'spouse') === false && strpos($link_rel, 'kin') === false) echo ' checked="checked"'; - if ('friendship' == $class && strpos($link_rel, 'friend') === false && strpos($link_rel, 'acquaintance') === false && strpos($link_rel, 'contact') === false) echo ' checked="checked"'; - if ('geographical' == $class && strpos($link_rel, 'co-resident') === false && strpos($link_rel, 'neighbor') === false) echo ' checked="checked"'; - if ('identity' == $class && in_array('me', $rels) ) echo ' checked="checked"'; - } -} - -/** - * Display link create form fields. - * - * @since 2.7.0 - * - * @param object $link - */ -function link_submit_meta_box($link) { -?> - - -
      -
    • -
    • -
    - -
    -
      - link_id) ) - wp_link_category_checklist($link->link_id); - else - wp_link_category_checklist(); - ?> -
    -
    - - - -
    -

    - -
    - -
    -

    -

    -

    -
    -

    - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - -
    - -
    - - -
    - - - -
    - - - - - - -
    - - - - -
    -
    -

    XFN.'); ?>

    - - - - - - - - - - - - - - - - - - -
      -
    -View page'), get_permalink($post_ID)); -$messages[2] = __('Custom field updated.'); -$messages[3] = __('Custom field deleted.'); -$messages[5] = sprintf(__('Page published. View page'), get_permalink($post_ID)); -$messages[6] = sprintf(__('Page submitted. Preview page'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ); -if ( isset($_GET['revision']) ) - $messages[5] = sprintf( __('Page restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ); + switch ( $_GET['message'] ) { + case 1: + $message = sprintf( __('Page updated. View page'), get_permalink($post_ID) ); + break; + case 2: + $message = __('Custom field updated.'); + break; + case 3: + $message = __('Custom field deleted.'); + break; + case 4: + $message = sprintf( __('Page published. View page'), get_permalink($post_ID) ); + break; + case 5: + if ( isset($_GET['revision']) ) + $message = sprintf( __('Page restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ); + break; + case 6: + $message = sprintf( __('Page submitted. Preview page'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ); + break; + case 7: + // translators: Publish box date formt, see http://php.net/date - Same as in meta-boxes.php + $message = sprintf( __('Page scheduled for: %1$s. Preview page'), date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), get_permalink($post_ID) ); + break; + case 8: + $message = sprintf( __('Page draft updated. Preview page'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ); + break; + } +} $notice = false; -$notices[1] = __( 'There is an autosave of this page that is more recent than the version below. View the autosave.' ); - if ( 0 == $post_ID) { $form_action = 'post'; $nonce_action = 'add-page'; @@ -46,351 +67,30 @@ if ( 0 == $post_ID) { $form_extra = ""; $autosave = wp_get_post_autosave( $post_ID ); if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt, false ) > mysql2date( 'U', $post->post_modified_gmt, false ) ) - $notice = sprintf( $notices[1], get_edit_post_link( $autosave->ID ) ); + $notice = sprintf( __( 'There is an autosave of this page that is more recent than the version below. View the autosave.' ), get_edit_post_link( $autosave->ID ) ); } $temp_ID = (int) $temp_ID; $user_ID = (int) $user_ID; -/** - * Display submit form fields. - * - * @since 2.7.0 - * - * @param object $post - */ -function page_submit_meta_box($post) { - global $action; - - $can_publish = current_user_can('publish_pages'); -?> -
    - -
    - - -
    - -
    - -
    -
    -post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?> -post_status ) { ?>style="display:none" type="submit" name="save" id="save-post" value="" tabindex="4" class="button button-highlighted" /> -post_status && $can_publish ) { ?> - - -
    - -
    -post_status ) { - $preview_link = esc_url(get_permalink($post->ID)); - $preview_button = __('Preview Changes'); -} else { - $preview_link = esc_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); - $preview_button = __('Preview'); -} -?> - - -
    - -
    -
    - -
    - -
    - -post_status ) { - case 'private': - _e('Privately Published'); - break; - case 'publish': - _e('Published'); - break; - case 'future': - _e('Scheduled'); - break; - case 'pending': - _e('Pending Review'); - break; - case 'draft': - _e('Draft'); - break; -} -?> - -post_status || 'private' == $post->post_status || $can_publish ) { ?> -post_status ) { ?>style="display:none;" class="edit-post-status hide-if-no-js" tabindex='4'> - -
    - - - - - -
    +require_once('includes/meta-boxes.php'); - -
    - -
    - post_status ) { - $post->post_password = ''; - $visibility = 'private'; - $visibility_trans = __('Private'); -} elseif ( !empty( $post->post_password ) ) { - $visibility = 'password'; - $visibility_trans = __('Password protected'); -} else { - $visibility = 'public'; - $visibility_trans = __('Public'); -} - -echo esc_html( $visibility_trans ); ?> - - - -
    - - - - />
    - />
    -
    - />
    - -

    -

    -
    - - -
    - -ID ) { - if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date - $stamp = __('Scheduled for: %1$s'); - } else if ( 'publish' == $post->post_status || 'private' == $post->post_status ) { // already published - $stamp = __('Published on: %1$s'); - } else if ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified - $stamp = __('Publish immediately'); - } else if ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // draft, 1 or more saves, future date specified - $stamp = __('Schedule for: %1$s'); - } else { // draft, 1 or more saves, date specified - $stamp = __('Publish on: %1$s'); - } - $date = date_i18n( $datef, strtotime( $post->post_date ) ); -} else { // draft (no saves, and thus no date specified) - $stamp = __('Publish immediately'); - $date = date_i18n( $datef, strtotime( current_time('mysql') ) ); -} - -if ( $can_publish ) : // Contributors don't get to choose the date of publish ?> -
    - - -
    -
    - -
    -
    -
    - -
    - - - -
    -post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) { ?> -post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?> - - - - - - - - - - - - -
    -
    -
    -
    - -

    -

    -

    -

    - -
    - - $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('Main Page (no parent)'), 'sort_column'=> 'menu_order, post_title')); ?> -

    - -
    - -

    - -
    -

    -

    - -
    -ID); - list_meta($metadata); - meta_form(); ?> -
    -
    -

    use in your theme.'); ?>

    - - -

    -

    -

    trackbacks and pingbacks.'); ?>

    - - -id, true, 'page' ); // TODO: ROLE SYSTEM if ( $post->post_author && !in_array($post->post_author, $authors) ) $authors[] = $post->post_author; -if ( $authors && count( $authors ) > 1 ) { - /** - * Display page author form fields, when more than one author exists. - * - * @since 2.6.0 - * - * @param object $post - */ - function page_author_meta_box($post){ - global $current_user, $user_ID; - $authors = get_editable_user_ids( $current_user->id, true, 'page' ); // TODO: ROLE SYSTEM - if ( $post->post_author && !in_array($post->post_author, $authors) ) - $authors[] = $post->post_author; -?> - $authors, 'name' => 'post_author_override', 'selected' => empty($post->ID) ? $user_ID : $post->post_author) ); ?> - 1 ) + add_meta_box('pageauthordiv', __('Page Author'), 'post_author_meta_box', 'page', 'normal', 'core'); -if ( 0 < $post_ID && wp_get_post_revisions( $post_ID ) ) : -/** - * Display list of page revisions. - * - * @since 2.6.0 - * - * @param object $post - */ -function page_revisions_meta_box($post) { - wp_list_post_revisions(); -} -add_meta_box('revisionsdiv', __('Page Revisions'), 'page_revisions_meta_box', 'page', 'normal', 'core'); -endif; +if ( 0 < $post_ID && wp_get_post_revisions( $post_ID ) ) + add_meta_box('revisionsdiv', __('Page Revisions'), 'post_revisions_meta_box', 'page', 'normal', 'core'); do_action('do_meta_boxes', 'page', 'normal', $post); do_action('do_meta_boxes', 'page', 'advanced', $post); @@ -407,16 +107,12 @@ require_once('admin-header.php');

    - -

    + +

    - -if (isset($mode) && 'bookmarklet' == $mode) - echo ''; -?> diff --git a/wp-admin/edit-pages.php b/wp-admin/edit-pages.php index b2fa38b8..afab9553 100644 --- a/wp-admin/edit-pages.php +++ b/wp-admin/edit-pages.php @@ -13,58 +13,86 @@ if ( !current_user_can('edit_pages') ) wp_die(__('Cheatin’ uh?')); // Handle bulk actions -if ( isset($_GET['action']) && ( -1 != $_GET['action'] || -1 != $_GET['action2'] ) ) { - $doaction = ( -1 != $_GET['action'] ) ? $_GET['action'] : $_GET['action2']; +if ( isset($_GET['doaction']) || isset($_GET['doaction2']) || isset($_GET['delete_all']) || isset($_GET['delete_all2']) || isset($_GET['bulk_edit']) ) { + check_admin_referer('bulk-pages'); + $sendback = remove_query_arg( array('trashed', 'untrashed', 'deleted', 'ids'), wp_get_referer() ); + + if ( strpos($sendback, 'page.php') !== false ) + $sendback = admin_url('page-new.php'); + + if ( isset($_GET['delete_all']) || isset($_GET['delete_all2']) ) { + $post_status = preg_replace('/[^a-z0-9_-]+/i', '', $_GET['post_status']); + $post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_status = %s", $post_status ) ); + $doaction = 'delete'; + } elseif ( ( $_GET['action'] != -1 || $_GET['action2'] != -1 ) && ( isset($_GET['post']) || isset($_GET['ids']) ) ) { + $post_ids = isset($_GET['post']) ? array_map( 'intval', (array) $_GET['post'] ) : explode(',', $_GET['ids']); + $doaction = ($_GET['action'] != -1) ? $_GET['action'] : $_GET['action2']; + } else { + wp_redirect( admin_url('edit-pages.php') ); + } switch ( $doaction ) { - case 'delete': - if ( isset($_GET['post']) && ! isset($_GET['bulk_edit']) && (isset($_GET['doaction']) || isset($_GET['doaction2'])) ) { - check_admin_referer('bulk-pages'); - $deleted = 0; - foreach( (array) $_GET['post'] as $post_id_del ) { - $post_del = & get_post($post_id_del); - - if ( !current_user_can('delete_page', $post_id_del) ) - wp_die( __('You are not allowed to delete this page.') ); - - if ( $post_del->post_type == 'attachment' ) { - if ( ! wp_delete_attachment($post_id_del) ) - wp_die( __('Error in deleting...') ); - } else { - if ( !wp_delete_post($post_id_del) ) - wp_die( __('Error in deleting...') ); - } - $deleted++; - } + case 'trash': + $trashed = 0; + foreach( (array) $post_ids as $post_id ) { + if ( !current_user_can('delete_page', $post_id) ) + wp_die( __('You are not allowed to move this page to the trash.') ); + + if ( !wp_trash_post($post_id) ) + wp_die( __('Error in moving to trash...') ); + + $trashed++; } + $sendback = add_query_arg( array('trashed' => $trashed, 'ids' => join(',', $post_ids)), $sendback ); break; - case 'edit': - if ( isset($_GET['post']) && isset($_GET['bulk_edit']) ) { - check_admin_referer('bulk-pages'); + case 'untrash': + $untrashed = 0; + foreach( (array) $post_ids as $post_id ) { + if ( !current_user_can('delete_page', $post_id) ) + wp_die( __('You are not allowed to restore this page from the trash.') ); + + if ( !wp_untrash_post($post_id) ) + wp_die( __('Error in restoring from trash...') ); - if ( -1 == $_GET['_status'] ) { - $_GET['post_status'] = null; - unset($_GET['_status'], $_GET['post_status']); + $untrashed++; + } + $sendback = add_query_arg('untrashed', $untrashed, $sendback); + break; + case 'delete': + $deleted = 0; + foreach( (array) $post_ids as $post_id ) { + $post_del = & get_post($post_id); + + if ( !current_user_can('delete_page', $post_id) ) + wp_die( __('You are not allowed to delete this page.') ); + + if ( $post_del->post_type == 'attachment' ) { + if ( ! wp_delete_attachment($post_id) ) + wp_die( __('Error in deleting...') ); } else { - $_GET['post_status'] = $_GET['_status']; + if ( !wp_delete_post($post_id) ) + wp_die( __('Error in deleting...') ); } - - $done = bulk_edit_posts($_GET); + $deleted++; + } + $sendback = add_query_arg('deleted', $deleted, $sendback); + break; + case 'edit': + $_GET['post_type'] = 'page'; + $done = bulk_edit_posts($_GET); + + if ( is_array($done) ) { + $done['updated'] = count( $done['updated'] ); + $done['skipped'] = count( $done['skipped'] ); + $done['locked'] = count( $done['locked'] ); + $sendback = add_query_arg( $done, $sendback ); } break; } - $sendback = wp_get_referer(); - if (strpos($sendback, 'page.php') !== false) $sendback = admin_url('page-new.php'); - elseif (strpos($sendback, 'attachments.php') !== false) $sendback = admin_url('attachments.php'); - if ( isset($done) ) { - $done['updated'] = count( $done['updated'] ); - $done['skipped'] = count( $done['skipped'] ); - $done['locked'] = count( $done['locked'] ); - $sendback = add_query_arg( $done, $sendback ); - } - if ( isset($deleted) ) - $sendback = add_query_arg('deleted', $deleted, $sendback); + if ( isset($_GET['action']) ) + $sendback = remove_query_arg( array('action', 'action2', 'post_parent', 'page_template', 'post_author', 'comment_status', 'ping_status', '_status', 'post', 'bulk_edit', 'post_view', 'post_type'), $sendback ); + wp_redirect($sendback); exit(); } elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) { @@ -82,9 +110,13 @@ $post_stati = array( // array( adj, noun ) 'future' => array(_x('Scheduled', 'page'), __('Scheduled pages'), _nx_noop('Scheduled (%s)', 'Scheduled (%s)', 'page')), 'pending' => array(_x('Pending Review', 'page'), __('Pending pages'), _nx_noop('Pending Review (%s)', 'Pending Review (%s)', 'page')), 'draft' => array(_x('Draft', 'page'), _x('Drafts', 'manage posts header'), _nx_noop('Draft (%s)', 'Drafts (%s)', 'page')), - 'private' => array(_x('Private', 'page'), __('Private pages'), _nx_noop('Private (%s)', 'Private (%s)', 'page')) + 'private' => array(_x('Private', 'page'), __('Private pages'), _nx_noop('Private (%s)', 'Private (%s)', 'page')), + 'trash' => array(_x('Trash', 'page'), __('Trash pages'), _nx_noop('Trash (%s)', 'Trash (%s)', 'page')) ); +if ( !EMPTY_TRASH_DAYS ) + unset($post_stati['trash']); + $post_stati = apply_filters('page_stati', $post_stati); $query = array('post_type' => 'page', 'orderby' => 'menu_order title', @@ -109,33 +141,40 @@ require_once('admin-header.php'); ?>
    -

    ' . __('Search results for “%s”') . '', esc_html( get_search_query() ) ); ?>

    - +

    ' . __('Undo') . '
    '; + unset($_GET['trashed']); +} +if ( isset($_GET['untrashed']) && (int) $_GET['untrashed'] ) { + printf( _n( 'Page restored from the trash.', '%s pages restored from the trash.', $_GET['untrashed'] ), number_format_i18n( $_GET['untrashed'] ) ); + unset($_GET['untrashed']); +} +$_SERVER['REQUEST_URI'] = remove_query_arg( array('locked', 'skipped', 'updated', 'deleted', 'trashed', 'untrashed'), $_SERVER['REQUEST_URI'] ); ?>

    @@ -145,7 +184,7 @@ $_SERVER['REQUEST_URI'] = remove_query_arg( array('locked', 'skipped', 'updated' - +
      trash; $class = empty($_GET['post_status']) ? ' class="current"' : ''; $status_links[] = "
    • " . sprintf( _nx( 'All (%s)', 'All (%s)', $total_posts, 'pages' ), number_format_i18n( $total_posts ) ) . ''; foreach ( $post_stati as $status => $label ) { $class = ''; - if ( !in_array($status, $avail_post_stati) ) + if ( !in_array($status, $avail_post_stati) || $num_posts->$status <= 0 ) continue; if ( isset( $_GET['post_status'] ) && $status == $_GET['post_status'] ) @@ -179,9 +218,7 @@ endif;

      - - - + @@ -191,9 +228,10 @@ endif; $pagenum = isset( $_GET['pagenum'] ) ? absint( $_GET['pagenum'] ) : 0; if ( empty($pagenum) ) $pagenum = 1; -$per_page = get_user_option('edit_pages_per_page'); -if ( empty( $per_page ) || $per_page < 0 ) +$per_page = (int) get_user_option( 'edit_pages_per_page', 0, false ); +if ( empty( $per_page ) || $per_page < 1 ) $per_page = 20; +$per_page = apply_filters( 'edit_pages_per_page', $per_page ); $num_pages = ceil($wp_query->post_count / $per_page); $page_links = paginate_links( array( @@ -205,6 +243,8 @@ $page_links = paginate_links( array( 'current' => $pagenum )); +$is_trash = isset($_GET['post_status']) && $_GET['post_status'] == 'trash'; + if ( $page_links ) : ?>
      ' . __( 'Displaying %s–%s of %s' ) . '%s', number_format_i18n( ( $pagenum - 1 ) * $per_page + 1 ), @@ -217,11 +257,21 @@ if ( $page_links ) : ?>
      + + +

      @@ -256,10 +306,20 @@ if ( $page_links )
      + + +

      diff --git a/wp-admin/edit-tag-form.php b/wp-admin/edit-tag-form.php index 250ba7a3..31f60942 100644 --- a/wp-admin/edit-tag-form.php +++ b/wp-admin/edit-tag-form.php @@ -33,8 +33,7 @@ do_action('edit_tag_form_pre', $tag); ?> - + diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php index 9f083b98..44b7a8b8 100644 --- a/wp-admin/edit-tags.php +++ b/wp-admin/edit-tags.php @@ -27,14 +27,14 @@ if ( isset( $_GET['action'] ) && isset($_GET['delete_tags']) && ( 'delete' == $_ switch($action) { -case 'addtag': +case 'add-tag': check_admin_referer('add-tag'); if ( !current_user_can('manage_categories') ) wp_die(__('Cheatin’ uh?')); - $ret = wp_insert_term($_POST['name'], $taxonomy, $_POST); + $ret = wp_insert_term($_POST['tag-name'], $taxonomy, $_POST); if ( $ret && !is_wp_error( $ret ) ) { wp_redirect('edit-tags.php?message=1#addtag'); } else { @@ -44,6 +44,11 @@ case 'addtag': break; case 'delete': + if ( !isset( $_GET['tag_ID'] ) ) { + wp_redirect("edit-tags.php?taxonomy=$taxonomy"); + exit; + } + $tag_ID = (int) $_GET['tag_ID']; check_admin_referer('delete-tag_' . $tag_ID); @@ -70,8 +75,8 @@ case 'bulk-delete': if ( !current_user_can('manage_categories') ) wp_die(__('Cheatin’ uh?')); - $tags = $_GET['delete_tags']; - foreach( (array) $tags as $tag_ID ) { + $tags = (array) $_GET['delete_tags']; + foreach( $tags as $tag_ID ) { wp_delete_term( $tag_ID, $taxonomy); } @@ -155,6 +160,7 @@ if ( isset($_GET['s']) && $_GET['s'] )

      +
      @@ -178,11 +184,11 @@ $pagenum = isset( $_GET['pagenum'] ) ? absint( $_GET['pagenum'] ) : 0; if ( empty($pagenum) ) $pagenum = 1; -$tags_per_page = get_user_option('edit_tags_per_page'); -if ( empty($tags_per_page) ) +$tags_per_page = (int) get_user_option( 'edit_tags_per_page', 0, false ); +if ( empty($tags_per_page) || $tags_per_page < 1 ) $tags_per_page = 20; -$tags_per_page = apply_filters('edit_tags_per_page', $tags_per_page); -$tags_per_page = apply_filters('tagsperpage', $tags_per_page); // Old filter +$tags_per_page = apply_filters( 'edit_tags_per_page', $tags_per_page ); +$tags_per_page = apply_filters( 'tagsperpage', $tags_per_page ); // Old filter $page_links = paginate_links( array( 'base' => add_query_arg( 'pagenum', '%#%' ), @@ -274,15 +280,14 @@ else

      -
      - - + + - +
      - - + +

      @@ -295,10 +300,10 @@ else
      -

      +

      -

      +

      diff --git a/wp-admin/edit.php b/wp-admin/edit.php index ae5bee9c..dc0d3f2d 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -21,58 +21,85 @@ if ( $_redirect = intval( max( @$_GET['p'], @$_GET['attachment_id'], @$_GET['pag } // Handle bulk actions -if ( isset($_GET['action']) && ( -1 != $_GET['action'] || -1 != $_GET['action2'] ) ) { - $doaction = ( -1 != $_GET['action'] ) ? $_GET['action'] : $_GET['action2']; +if ( isset($_GET['doaction']) || isset($_GET['doaction2']) || isset($_GET['delete_all']) || isset($_GET['delete_all2']) || isset($_GET['bulk_edit']) ) { + check_admin_referer('bulk-posts'); + $sendback = remove_query_arg( array('trashed', 'untrashed', 'deleted', 'ids'), wp_get_referer() ); + + if ( strpos($sendback, 'post.php') !== false ) + $sendback = admin_url('post-new.php'); + + if ( isset($_GET['delete_all']) || isset($_GET['delete_all2']) ) { + $post_status = preg_replace('/[^a-z0-9_-]+/i', '', $_GET['post_status']); + $post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type='post' AND post_status = %s", $post_status ) ); + $doaction = 'delete'; + } elseif ( ( $_GET['action'] != -1 || $_GET['action2'] != -1 ) && ( isset($_GET['post']) || isset($_GET['ids']) ) ) { + $post_ids = isset($_GET['post']) ? array_map( 'intval', (array) $_GET['post'] ) : explode(',', $_GET['ids']); + $doaction = ($_GET['action'] != -1) ? $_GET['action'] : $_GET['action2']; + } else { + wp_redirect( admin_url('edit.php') ); + } switch ( $doaction ) { - case 'delete': - if ( isset($_GET['post']) && ! isset($_GET['bulk_edit']) && (isset($_GET['doaction']) || isset($_GET['doaction2'])) ) { - check_admin_referer('bulk-posts'); - $deleted = 0; - foreach( (array) $_GET['post'] as $post_id_del ) { - $post_del = & get_post($post_id_del); - - if ( !current_user_can('delete_post', $post_id_del) ) - wp_die( __('You are not allowed to delete this post.') ); - - if ( $post_del->post_type == 'attachment' ) { - if ( ! wp_delete_attachment($post_id_del) ) - wp_die( __('Error in deleting...') ); - } else { - if ( !wp_delete_post($post_id_del) ) - wp_die( __('Error in deleting...') ); - } - $deleted++; - } + case 'trash': + $trashed = 0; + foreach( (array) $post_ids as $post_id ) { + if ( !current_user_can('delete_post', $post_id) ) + wp_die( __('You are not allowed to move this post to the trash.') ); + + if ( !wp_trash_post($post_id) ) + wp_die( __('Error in moving to trash...') ); + + $trashed++; } + $sendback = add_query_arg( array('trashed' => $trashed, 'ids' => join(',', $post_ids)), $sendback ); break; - case 'edit': - if ( isset($_GET['post']) && isset($_GET['bulk_edit']) ) { - check_admin_referer('bulk-posts'); + case 'untrash': + $untrashed = 0; + foreach( (array) $post_ids as $post_id ) { + if ( !current_user_can('delete_post', $post_id) ) + wp_die( __('You are not allowed to restore this post from the trash.') ); + + if ( !wp_untrash_post($post_id) ) + wp_die( __('Error in restoring from trash...') ); - if ( -1 == $_GET['_status'] ) { - $_GET['post_status'] = null; - unset($_GET['_status'], $_GET['post_status']); + $untrashed++; + } + $sendback = add_query_arg('untrashed', $untrashed, $sendback); + break; + case 'delete': + $deleted = 0; + foreach( (array) $post_ids as $post_id ) { + $post_del = & get_post($post_id); + + if ( !current_user_can('delete_post', $post_id) ) + wp_die( __('You are not allowed to delete this post.') ); + + if ( $post_del->post_type == 'attachment' ) { + if ( ! wp_delete_attachment($post_id) ) + wp_die( __('Error in deleting...') ); } else { - $_GET['post_status'] = $_GET['_status']; + if ( !wp_delete_post($post_id) ) + wp_die( __('Error in deleting...') ); } + $deleted++; + } + $sendback = add_query_arg('deleted', $deleted, $sendback); + break; + case 'edit': + $done = bulk_edit_posts($_GET); - $done = bulk_edit_posts($_GET); + if ( is_array($done) ) { + $done['updated'] = count( $done['updated'] ); + $done['skipped'] = count( $done['skipped'] ); + $done['locked'] = count( $done['locked'] ); + $sendback = add_query_arg( $done, $sendback ); } break; } - $sendback = wp_get_referer(); - if ( strpos($sendback, 'post.php') !== false ) $sendback = admin_url('post-new.php'); - elseif ( strpos($sendback, 'attachments.php') !== false ) $sendback = admin_url('attachments.php'); - if ( isset($done) ) { - $done['updated'] = count( $done['updated'] ); - $done['skipped'] = count( $done['skipped'] ); - $done['locked'] = count( $done['locked'] ); - $sendback = add_query_arg( $done, $sendback ); - } - if ( isset($deleted) ) - $sendback = add_query_arg('deleted', $deleted, $sendback); + if ( isset($_GET['action']) ) + $sendback = remove_query_arg( array('action', 'action2', 'cat', 'tags_input', 'post_author', 'comment_status', 'ping_status', '_status', 'post', 'bulk_edit', 'post_view', 'post_type'), $sendback ); + wp_redirect($sendback); exit(); } elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) { @@ -85,6 +112,14 @@ if ( empty($title) ) $parent_file = 'edit.php'; wp_enqueue_script('inline-edit-post'); +$user_posts = false; +if ( !current_user_can('edit_others_posts') ) { + $user_posts_count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(1) FROM $wpdb->posts WHERE post_type = 'post' AND post_status != 'trash' AND post_author = %d", $current_user->ID) ); + $user_posts = true; + if ( $user_posts_count && empty($_GET['post_status']) && empty($_GET['all_posts']) && empty($_GET['author']) ) + $_GET['author'] = $current_user->ID; +} + list($post_stati, $avail_post_stati) = wp_edit_posts_query(); require_once('admin-header.php'); @@ -99,7 +134,7 @@ else
      -

      ' . __('Search results for “%s”') . '', esc_html( get_search_query() ) ); ?>

      @@ -110,7 +145,7 @@ if ( isset($_GET['posted']) && $_GET['posted'] ) : $_GET['posted'] = (int) $_GET - +

      ' . __('Undo') . '
      '; + unset($_GET['trashed']); +} + +if ( isset($_GET['untrashed']) && (int) $_GET['untrashed'] ) { + printf( _n( 'Post restored from the trash.', '%s posts restored from the trash.', $_GET['untrashed'] ), number_format_i18n( $_GET['untrashed'] ) ); + unset($_GET['undeleted']); +} + +$_SERVER['REQUEST_URI'] = remove_query_arg( array('locked', 'skipped', 'updated', 'deleted', 'trashed', 'untrashed'), $_SERVER['REQUEST_URI'] ); ?>

      -
      +
      draft ) ? 'draft' : 'publish'; // Clean up content - $post_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $post_content); + $post_content = preg_replace_callback('|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $post_content); $post_content = str_replace('
      ', '
      ', $post_content); $post_content = str_replace('
      ', '
      ', $post_content); @@ -604,7 +609,7 @@ class Blogger_Import { $comment_content = addslashes( $this->no_apos( @html_entity_decode( $entry->content, ENT_COMPAT, get_option('blog_charset') ) ) ); // Clean up content - $comment_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $comment_content); + $comment_content = preg_replace_callback('|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $comment_content); $comment_content = str_replace('
      ', '
      ', $comment_content); $comment_content = str_replace('
      ', '
      ', $comment_content); @@ -617,6 +622,7 @@ class Blogger_Import { } else { $comment = compact('comment_post_ID', 'comment_author', 'comment_author_url', 'comment_date', 'comment_content'); + $comment = wp_filter_comment($comment); $comment_id = wp_insert_comment($comment); $this->blogs[$importing_blog]['comments'][$entry->old_permalink] = $comment_id; @@ -905,10 +911,19 @@ class AtomParser { var $entry; function AtomParser() { - $this->entry = new AtomEntry(); - $this->map_attrs_func = create_function('$k,$v', 'return "$k=\"$v\"";'); - $this->map_xmlns_func = create_function('$p,$n', '$xd = "xmlns"; if(strlen($n[0])>0) $xd .= ":{$n[0]}"; return "{$xd}=\"{$n[1]}\"";'); + } + + function _map_attrs_func( $k, $v ) { + return "$k=\"$v\""; + } + + function _map_xmlns_func( $p, $n ) { + $xd = "xmlns"; + if ( strlen( $n[0] ) > 0 ) + $xd .= ":{$n[0]}"; + + return "{$xd}=\"{$n[1]}\""; } function parse($xml) { @@ -950,12 +965,12 @@ class AtomParser { foreach($attrs as $key => $value) { $attrs_prefix[$this->ns_to_prefix($key)] = $this->xml_escape($value); } - $attrs_str = join(' ', array_map($this->map_attrs_func, array_keys($attrs_prefix), array_values($attrs_prefix))); + $attrs_str = join(' ', array_map( array( &$this, '_map_attrs_func' ), array_keys($attrs_prefix), array_values($attrs_prefix))); if(strlen($attrs_str) > 0) { $attrs_str = " " . $attrs_str; } - $xmlns_str = join(' ', array_map($this->map_xmlns_func, array_keys($this->ns_contexts[0]), array_values($this->ns_contexts[0]))); + $xmlns_str = join(' ', array_map( array( &$this, '_map_xmlns_func' ), array_keys($this->ns_contexts[0]), array_values($this->ns_contexts[0]))); if(strlen($xmlns_str) > 0) { $xmlns_str = " " . $xmlns_str; } diff --git a/wp-admin/import/blogware.php b/wp-admin/import/blogware.php index 500a08ba..531ceddc 100644 --- a/wp-admin/import/blogware.php +++ b/wp-admin/import/blogware.php @@ -42,6 +42,10 @@ class BW_Import { echo ''; } + function _normalize_tag( $matches ) { + return '<' . strtolower( $matches[1] ); + } + function import_posts() { global $wpdb, $current_user; @@ -89,7 +93,7 @@ class BW_Import { } // Clean up content - $post_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $post_content); + $post_content = preg_replace_callback('|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $post_content); $post_content = str_replace('
      ', '
      ', $post_content); $post_content = str_replace('
      ', '
      ', $post_content); $post_content = $wpdb->escape($post_content); @@ -129,7 +133,7 @@ class BW_Import { $comment_content = $this->unhtmlentities($comment_content); // Clean up content - $comment_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $comment_content); + $comment_content = preg_replace_callback('|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $comment_content); $comment_content = str_replace('
      ', '
      ', $comment_content); $comment_content = str_replace('
      ', '
      ', $comment_content); $comment_content = $wpdb->escape($comment_content); diff --git a/wp-admin/import/dotclear.php b/wp-admin/import/dotclear.php index d6552f76..fcde9b17 100644 --- a/wp-admin/import/dotclear.php +++ b/wp-admin/import/dotclear.php @@ -413,11 +413,7 @@ class Dotclear_Import { $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 = array( 'comment_post_ID' => $comment_post_ID, 'comment_author' => $name, 'comment_author_email' => $email, @@ -426,23 +422,16 @@ class Dotclear_Import { 'comment_date' => $comment_dt, 'comment_date_gmt' => $comment_dt, 'comment_content' => $message, - 'comment_approved' => $comment_approved) - ); - } - else - { + 'comment_approved' => $comment_approved); + $comment = wp_filter_comment($comment); + + if ( $cinfo = comment_exists($name, $comment_dt) ) { + // Update comments + $comment['comment_ID'] = $cinfo; + $ret_id = wp_update_comment($comment); + } 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) - ); + $ret_id = wp_insert_comment($comment); } $dccm2wpcm[$comment_ID] = $ret_id; } @@ -604,7 +593,7 @@ class Dotclear_Import { { 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 '

      '.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 Log in 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').'

      '; @@ -616,7 +605,7 @@ class Dotclear_Import { echo '
    • '.__('The WordPress support forums').'
    • '; echo '
    • '.__('The Codex (In other words, the WordPress Bible)').'
    • '; echo ''; - echo '

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

      '; + echo '

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

      '; } function db_form() diff --git a/wp-admin/import/greymatter.php b/wp-admin/import/greymatter.php index 7e06f67c..47c15d4b 100644 --- a/wp-admin/import/greymatter.php +++ b/wp-admin/import/greymatter.php @@ -63,7 +63,7 @@ class GM_Import { + so you need to enter the number of the last GM post here.
      (if you don’t know that number, just log in to your FTP and look it out
      in the entries’ folder)') ?>
      -


      - so you need to enter the number of the last GM post here.
      (if you don’t know that number, just log into your FTP and look it out
      in the entries’ folder)') ?>

      diff --git a/wp-admin/import/livejournal.php b/wp-admin/import/livejournal.php index bfebe718..7acfaa5f 100644 --- a/wp-admin/import/livejournal.php +++ b/wp-admin/import/livejournal.php @@ -324,6 +324,10 @@ class LJ_API_Import { echo '
'; } + function _normalize_tag( $matches ) { + return '<' . strtolower( $matches[1] ); + } + function import_post( $post ) { global $wpdb; @@ -350,7 +354,7 @@ class LJ_API_Import { // Clean up content $post_content = $post['event']; - $post_content = preg_replace_callback( '|<(/?[A-Z]+)|', create_function( '$match', 'return "<" . strtolower( $match[1] );' ), $post_content ); + $post_content = preg_replace_callback( '|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $post_content ); // XHTMLize some tags $post_content = str_replace( '
', '
', $post_content ); $post_content = str_replace( '
', '
', $post_content ); @@ -531,6 +535,7 @@ class LJ_API_Import { // Parse this comment into an array and insert $comment = $this->parse_comment( $comment ); + $comment = wp_filter_comment( $comment ); $id = wp_insert_comment( $comment ); // Clear cache @@ -581,7 +586,7 @@ class LJ_API_Import { $comment_content = wpautop( $comment_content ); $comment_content = str_replace( '
', '
', $comment_content ); $comment_content = str_replace( '
', '
', $comment_content ); - $comment_content = preg_replace_callback( '|<(/?[A-Z]+)|', create_function( '$match', 'return "<" . strtolower( $match[1] );' ), $comment_content ); + $comment_content = preg_replace_callback( '|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $comment_content ); $comment_content = $wpdb->escape( trim( $comment_content ) ); // Get and convert the date @@ -720,7 +725,7 @@ class LJ_API_Import { $this->protected_password = get_option( 'ljapi_protected_password' ); } - // Login to confirm the details are correct + // Log in to confirm the details are correct if ( empty( $this->username ) || empty( $this->password ) ) { ?>

and password so we can download your posts and comments.' ) ?>

diff --git a/wp-admin/import/mt.php b/wp-admin/import/mt.php index 7b750204..548e9ede 100644 --- a/wp-admin/import/mt.php +++ b/wp-admin/import/mt.php @@ -1,15 +1,15 @@ header(); ?>
-

mt-export.txt in your /wp-content/ directory and then click "Import mt-export.txt"'); ?>

+

mt-export.txt in your /wp-content/ directory and then click "Import mt-export.txt"'); ?>

@@ -510,5 +510,5 @@ class MT_Import { $mt_import = new MT_Import(); -register_importer('mt', __('Movable Type and TypePad'), __('Import posts and comments from a Movable Type or Typepad blog.'), array ($mt_import, 'dispatch')); +register_importer('mt', __('Movable Type and TypePad'), __('Import posts and comments from a Movable Type or TypePad blog.'), array ($mt_import, 'dispatch')); ?> diff --git a/wp-admin/import/rss.php b/wp-admin/import/rss.php index 9a85df36..0e0928cc 100644 --- a/wp-admin/import/rss.php +++ b/wp-admin/import/rss.php @@ -43,6 +43,10 @@ class RSS_Import { echo '
'; } + function _normalize_tag( $matches ) { + return '<' . strtolower( $matches[1] ); + } + function get_posts() { global $wpdb; @@ -103,7 +107,7 @@ class RSS_Import { } // Clean up content - $post_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $post_content); + $post_content = preg_replace_callback('|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $post_content); $post_content = str_replace('
', '
', $post_content); $post_content = str_replace('
', '
', $post_content); diff --git a/wp-admin/import/textpattern.php b/wp-admin/import/textpattern.php index 2cbf36e0..fb472139 100644 --- a/wp-admin/import/textpattern.php +++ b/wp-admin/import/textpattern.php @@ -397,33 +397,24 @@ class Textpattern_Import { $web = $wpdb->escape($web); $message = $wpdb->escape($message); - if($cinfo = comment_exists($name, $posted)) - { + $comment = array( + 'comment_post_ID' => $comment_post_ID, + 'comment_author' => $name, + 'comment_author_IP' => $ip, + 'comment_author_email' => $email, + 'comment_author_url' => $web, + 'comment_date' => $posted, + 'comment_content' => $message, + 'comment_approved' => $comment_approved); + $comment = wp_filter_comment($comment); + + if ( $cinfo = comment_exists($name, $posted) ) { // 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_date' => $posted, - 'comment_content' => $message, - 'comment_approved' => $comment_approved) - ); - } - else - { + $comment['comment_ID'] = $cinfo; + $ret_id = wp_update_comment($comment); + } 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' => $ip, - 'comment_date' => $posted, - 'comment_content' => $message, - 'comment_approved' => $comment_approved) - ); + $ret_id = wp_insert_comment($comment); } $txpcm2wpcm[$comment_ID] = $ret_id; } @@ -582,7 +573,7 @@ class Textpattern_Import { { echo '

'.__('Welcome to WordPress. We hope (and expect!) that you will find this platform incredibly rewarding! As a new WordPress user coming from Textpattern, 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 Textpattern, 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 Textpattern 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.'), get_bloginfo( 'wpurl' ) . '/wp-login.php').'

'; + 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 Textpattern, 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 Textpattern 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 log in and change it.'), get_bloginfo( 'wpurl' ) . '/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').'

'; @@ -594,7 +585,7 @@ class Textpattern_Import { echo '
  • '.__('The WordPress support forums').'
  • '; echo '
  • '.__('The Codex (In other words, the WordPress Bible)').'
  • '; echo ''; - echo '

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

    '; + echo '

    '.sprintf(__('That’s it! What are you waiting for? Go log in!'), get_bloginfo( 'wpurl' ) . '/wp-login.php').'

    '; } function db_form() diff --git a/wp-admin/import/wordpress.php b/wp-admin/import/wordpress.php index 388b1b6d..83c90acf 100644 --- a/wp-admin/import/wordpress.php +++ b/wp-admin/import/wordpress.php @@ -27,6 +27,7 @@ class WP_Import { var $author_ids = array (); var $tags = array (); var $categories = array (); + var $terms = array (); var $j = -1; var $fetch_attachments = false; @@ -122,6 +123,11 @@ class WP_Import { $this->tags[] = $tag[1]; continue; } + if ( false !== strpos($importline, '') ) { + preg_match('|(.*?)|is', $importline, $term); + $this->terms[] = $term[1]; + continue; + } if ( false !== strpos($importline, '') ) { $this->post = ''; $doing_entry = true; @@ -198,7 +204,6 @@ class WP_Import { function wp_authors_form() { ?> -

    admins entries.'); ?>

    get_wp_authors(); echo ''; wp_nonce_field('import-wordpress'); - echo '
      '; +?> +
        +allow_fetch_attachments() ) { ?>
      -

      @@ -337,6 +343,43 @@ class WP_Import { $tag_ID = wp_insert_term($tag_name, 'post_tag', $tagarr); } } + + function process_terms() { + global $wpdb, $wp_taxonomies; + + $custom_taxonomies = $wp_taxonomies; + // get rid of the standard taxonomies + unset( $custom_taxonomies['category'] ); + unset( $custom_taxonomies['post_tag'] ); + unset( $custom_taxonomies['link_category'] ); + + $custom_taxonomies = array_keys( $custom_taxonomies ); + $current_terms = (array) get_terms( $custom_taxonomies, 'get=all' ); + $taxonomies = array(); + foreach ( $current_terms as $term ) { + if ( isset( $_terms[$term->taxonomy] ) ) { + $taxonomies[$term->taxonomy] = array_merge( $taxonomies[$term->taxonomy], array($term->name) ); + } else { + $taxonomies[$term->taxonomy] = array($term->name); + } + } + + while ( $c = array_shift($this->terms) ) { + $term_name = trim($this->get_tag( $c, 'wp:term_name' )); + $term_taxonomy = trim($this->get_tag( $c, 'wp:term_taxonomy' )); + + // If the term exists in the taxonomy we leave it alone + if ( isset($taxonomies[$term_taxonomy] ) && in_array( $term_name, $taxonomies[$term_taxonomy] ) ) + continue; + + $slug = $this->get_tag( $c, 'wp:term_slug' ); + $description = $this->get_tag( $c, 'wp:term_description' ); + + $termarr = compact('slug', 'description'); + + $term_ID = wp_insert_term($term_name, $this->get_tag( $c, 'wp:term_taxonomy' ), $termarr); + } + } function process_author($post) { $author = $this->get_tag( $post, 'dc:creator' ); @@ -357,6 +400,10 @@ class WP_Import { echo '

      '.sprintf(__('All done.').' '.__('Have fun!').'', get_option('home')).'

      '; } + function _normalize_tag( $matches ) { + return '<' . strtolower( $matches[1] ); + } + function process_post($post) { global $wpdb; @@ -378,16 +425,17 @@ class WP_Import { $menu_order = $this->get_tag( $post, 'wp:menu_order' ); $post_type = $this->get_tag( $post, 'wp:post_type' ); $post_password = $this->get_tag( $post, 'wp:post_password' ); + $is_sticky = $this->get_tag( $post, 'wp:is_sticky' ); $guid = $this->get_tag( $post, 'guid' ); $post_author = $this->get_tag( $post, 'dc:creator' ); $post_excerpt = $this->get_tag( $post, 'excerpt:encoded' ); - $post_excerpt = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $post_excerpt); + $post_excerpt = preg_replace_callback('|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $post_excerpt); $post_excerpt = str_replace('
      ', '
      ', $post_excerpt); $post_excerpt = str_replace('
      ', '
      ', $post_excerpt); $post_content = $this->get_tag( $post, 'content:encoded' ); - $post_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $post_content); + $post_content = preg_replace_callback('|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $post_content); $post_content = str_replace('
      ', '
      ', $post_content); $post_content = str_replace('
      ', '
      ', $post_content); @@ -448,6 +496,9 @@ class WP_Import { else { printf(__('Importing post %s...'), stripslashes($post_title)); $comment_post_ID = $post_id = wp_insert_post($postdata); + if ( $post_id && $is_sticky == 1 ) + stick_post( $post_id ); + } if ( is_wp_error( $post_id ) ) @@ -508,25 +559,35 @@ class WP_Import { preg_match_all('|(.*?)|is', $post, $comments); $comments = $comments[1]; $num_comments = 0; - if ( $comments) { foreach ($comments as $comment) { - $comment_author = $this->get_tag( $comment, 'wp:comment_author'); - $comment_author_email = $this->get_tag( $comment, 'wp:comment_author_email'); - $comment_author_IP = $this->get_tag( $comment, 'wp:comment_author_IP'); - $comment_author_url = $this->get_tag( $comment, 'wp:comment_author_url'); - $comment_date = $this->get_tag( $comment, 'wp:comment_date'); - $comment_date_gmt = $this->get_tag( $comment, 'wp:comment_date_gmt'); - $comment_content = $this->get_tag( $comment, 'wp:comment_content'); - $comment_approved = $this->get_tag( $comment, 'wp:comment_approved'); - $comment_type = $this->get_tag( $comment, 'wp:comment_type'); - $comment_parent = $this->get_tag( $comment, 'wp:comment_parent'); - - // if this is a new post we can skip the comment_exists() check - if ( !$post_exists || !comment_exists($comment_author, $comment_date) ) { - $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_url', 'comment_author_email', 'comment_author_IP', 'comment_date', 'comment_date_gmt', 'comment_content', 'comment_approved', 'comment_type', 'comment_parent'); - wp_insert_comment($commentdata); - $num_comments++; + $inserted_comments = array(); + if ( $comments) { + foreach ($comments as $comment) { + $comment_id = $this->get_tag( $comment, 'wp:comment_id'); + $newcomments[$comment_id]['comment_post_ID'] = $comment_post_ID; + $newcomments[$comment_id]['comment_author'] = $this->get_tag( $comment, 'wp:comment_author'); + $newcomments[$comment_id]['comment_author_email'] = $this->get_tag( $comment, 'wp:comment_author_email'); + $newcomments[$comment_id]['comment_author_IP'] = $this->get_tag( $comment, 'wp:comment_author_IP'); + $newcomments[$comment_id]['comment_author_url'] = $this->get_tag( $comment, 'wp:comment_author_url'); + $newcomments[$comment_id]['comment_date'] = $this->get_tag( $comment, 'wp:comment_date'); + $newcomments[$comment_id]['comment_date_gmt'] = $this->get_tag( $comment, 'wp:comment_date_gmt'); + $newcomments[$comment_id]['comment_content'] = $this->get_tag( $comment, 'wp:comment_content'); + $newcomments[$comment_id]['comment_approved'] = $this->get_tag( $comment, 'wp:comment_approved'); + $newcomments[$comment_id]['comment_type'] = $this->get_tag( $comment, 'wp:comment_type'); + $newcomments[$comment_id]['comment_parent'] = $this->get_tag( $comment, 'wp:comment_parent'); } - } } + // Sort by comment ID, to make sure comment parents exist (if there at all) + ksort($newcomments); + foreach ($newcomments as $key => $comment) { + // if this is a new post we can skip the comment_exists() check + if ( !$post_exists || !comment_exists($comment['comment_author'], $comment['comment_date']) ) { + if (isset($inserted_comments[$comment['comment_parent']])) + $comment['comment_parent'] = $inserted_comments[$comment['comment_parent']]; + $comment = wp_filter_comment($comment); + $inserted_comments[$key] = wp_insert_comment($comment); + $num_comments++; + } + } + } if ( $num_comments ) printf(' '._n('(%s comment)', '(%s comments)', $num_comments), $num_comments); @@ -740,6 +801,7 @@ class WP_Import { $this->get_entries(); $this->process_categories(); $this->process_tags(); + $this->process_terms(); $result = $this->process_posts(); wp_suspend_cache_invalidation(false); $this->backfill_parents(); diff --git a/wp-admin/includes/class-ftp.php b/wp-admin/includes/class-ftp.php index 0bf25e9c..80703a95 100644 --- a/wp-admin/includes/class-ftp.php +++ b/wp-admin/includes/class-ftp.php @@ -278,7 +278,10 @@ class ftp_base { $dns=@gethostbyaddr($host); if(!$ip) $ip=$host; if(!$dns) $dns=$host; - if(ip2long($ip) === -1) { + // Validate the IPAddress PHP4 returns -1 for invalid, PHP5 false + // -1 === "255.255.255.255" which is the broadcast address which is also going to be invalid + $ipaslong = ip2long($ip); + if ( ($ipaslong == false) || ($ipaslong === -1) ) { $this->SendMSG("Wrong host name/address \"".$host."\""); return FALSE; } diff --git a/wp-admin/includes/class-pclzip.php b/wp-admin/includes/class-pclzip.php index 082442dd..5e6a619b 100644 --- a/wp-admin/includes/class-pclzip.php +++ b/wp-admin/includes/class-pclzip.php @@ -1,8 +1,8 @@ magic_quotes_status = -1; // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 1); return; } // -------------------------------------------------------------------------------- @@ -273,7 +270,6 @@ // -------------------------------------------------------------------------------- function create($p_filelist) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::create', "filelist='$p_filelist', ..."); $v_result=1; // ----- Reset the error handler @@ -285,7 +281,6 @@ // ----- Look for variable options arguments $v_size = func_num_args(); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method"); // ----- Look for arguments if ($v_size > 1) { @@ -298,7 +293,6 @@ // ----- Look for first arg if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Variable list of options detected"); // ----- Parse the options $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, @@ -315,7 +309,6 @@ //, PCLZIP_OPT_CRYPT => 'optional' )); if ($v_result != 1) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); return 0; } } @@ -324,7 +317,6 @@ // Here we need to support the first historic synopsis of the // method. else { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Static synopsis"); // ----- Get the first argument $v_options[PCLZIP_OPT_ADD_PATH] = $v_arg_list[0]; @@ -336,12 +328,11 @@ else if ($v_size > 2) { PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return 0; } } } - + // ----- Look for default option values $this->privOptionDefaultThreshold($v_options); @@ -350,16 +341,16 @@ $v_att_list = array(); $v_filedescr_list = array(); $p_result_list = array(); - + // ----- Look if the $p_filelist is really an array if (is_array($p_filelist)) { - + // ----- Look if the first element is also an array // This will mean that this is a file description entry if (isset($p_filelist[0]) && is_array($p_filelist[0])) { $v_att_list = $p_filelist; } - + // ----- The list is a list of string names else { $v_string_list = $p_filelist; @@ -375,10 +366,9 @@ // ----- Invalid variable type for $p_filelist else { PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_filelist"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); return 0; } - + // ----- Reformat the string list if (sizeof($v_string_list) != 0) { foreach ($v_string_list as $v_string) { @@ -386,11 +376,10 @@ $v_att_list[][PCLZIP_ATT_FILE_NAME] = $v_string; } else { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Ignore an empty filename"); } } } - + // ----- For each file in the list check the attributes $v_supported_attributes = array ( PCLZIP_ATT_FILE_NAME => 'mandatory' @@ -406,7 +395,6 @@ $v_options, $v_supported_attributes); if ($v_result != 1) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); return 0; } } @@ -414,19 +402,16 @@ // ----- Expand the filelist (expand directories) $v_result = $this->privFileDescrExpand($v_filedescr_list, $v_options); if ($v_result != 1) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); return 0; } // ----- Call the create fct $v_result = $this->privCreate($v_filedescr_list, $p_result_list, $v_options); if ($v_result != 1) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); return 0; } // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_result_list); return $p_result_list; } // -------------------------------------------------------------------------------- @@ -468,7 +453,6 @@ // -------------------------------------------------------------------------------- function add($p_filelist) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::add', "filelist='$p_filelist', ..."); $v_result=1; // ----- Reset the error handler @@ -480,7 +464,6 @@ // ----- Look for variable options arguments $v_size = func_num_args(); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method"); // ----- Look for arguments if ($v_size > 1) { @@ -493,7 +476,6 @@ // ----- Look for first arg if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Variable list of options detected"); // ----- Parse the options $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, @@ -512,7 +494,6 @@ //, PCLZIP_OPT_CRYPT => 'optional' )); if ($v_result != 1) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); return 0; } } @@ -521,7 +502,6 @@ // Here we need to support the first historic synopsis of the // method. else { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Static synopsis"); // ----- Get the first argument $v_options[PCLZIP_OPT_ADD_PATH] = $v_add_path = $v_arg_list[0]; @@ -535,7 +515,6 @@ PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments"); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return 0; } } @@ -549,16 +528,16 @@ $v_att_list = array(); $v_filedescr_list = array(); $p_result_list = array(); - + // ----- Look if the $p_filelist is really an array if (is_array($p_filelist)) { - + // ----- Look if the first element is also an array // This will mean that this is a file description entry if (isset($p_filelist[0]) && is_array($p_filelist[0])) { $v_att_list = $p_filelist; } - + // ----- The list is a list of string names else { $v_string_list = $p_filelist; @@ -574,17 +553,16 @@ // ----- Invalid variable type for $p_filelist else { PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type '".gettype($p_filelist)."' for p_filelist"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); return 0; } - + // ----- Reformat the string list if (sizeof($v_string_list) != 0) { foreach ($v_string_list as $v_string) { $v_att_list[][PCLZIP_ATT_FILE_NAME] = $v_string; } } - + // ----- For each file in the list check the attributes $v_supported_attributes = array ( PCLZIP_ATT_FILE_NAME => 'mandatory' @@ -600,7 +578,6 @@ $v_options, $v_supported_attributes); if ($v_result != 1) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); return 0; } } @@ -608,19 +585,16 @@ // ----- Expand the filelist (expand directories) $v_result = $this->privFileDescrExpand($v_filedescr_list, $v_options); if ($v_result != 1) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); return 0; } // ----- Call the create fct $v_result = $this->privAdd($v_filedescr_list, $p_result_list, $v_options); if ($v_result != 1) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); return 0; } // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_result_list); return $p_result_list; } // -------------------------------------------------------------------------------- @@ -668,7 +642,6 @@ // -------------------------------------------------------------------------------- function listContent() { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::listContent', ""); $v_result=1; // ----- Reset the error handler @@ -676,7 +649,6 @@ // ----- Check archive if (!$this->privCheckFormat()) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); return(0); } @@ -685,12 +657,10 @@ if (($v_result = $this->privList($p_list)) != 1) { unset($p_list); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo()); return(0); } // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_list); return $p_list; } // -------------------------------------------------------------------------------- @@ -729,7 +699,6 @@ // -------------------------------------------------------------------------------- function extract() { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::extract", ""); $v_result=1; // ----- Reset the error handler @@ -737,7 +706,6 @@ // ----- Check archive if (!$this->privCheckFormat()) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); return(0); } @@ -750,7 +718,6 @@ // ----- Look for variable options arguments $v_size = func_num_args(); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method"); // ----- Default values for option $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE; @@ -762,7 +729,6 @@ // ----- Look for first arg if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Variable list of options"); // ----- Parse the options $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, @@ -787,7 +753,6 @@ PCLZIP_OPT_TEMP_FILE_OFF => 'optional' )); if ($v_result != 1) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); return 0; } @@ -814,7 +779,6 @@ // Here we need to support the first historic synopsis of the // method. else { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Static synopsis"); // ----- Get the first argument $v_path = $v_arg_list[0]; @@ -828,7 +792,6 @@ PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments"); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo()); return 0; } } @@ -838,7 +801,6 @@ $this->privOptionDefaultThreshold($v_options); // ----- Trace - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "path='$v_path', remove_path='$v_remove_path', remove_all_path='".($v_remove_path?'true':'false')."'"); // ----- Call the extracting fct $p_list = array(); @@ -846,12 +808,10 @@ $v_remove_all_path, $v_options); if ($v_result < 1) { unset($p_list); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo()); return(0); } // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_list); return $p_list; } // -------------------------------------------------------------------------------- @@ -896,7 +856,6 @@ //function extractByIndex($p_index, options...) function extractByIndex($p_index) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::extractByIndex", "index='$p_index', ..."); $v_result=1; // ----- Reset the error handler @@ -904,7 +863,6 @@ // ----- Check archive if (!$this->privCheckFormat()) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); return(0); } @@ -917,7 +875,6 @@ // ----- Look for variable options arguments $v_size = func_num_args(); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method"); // ----- Default values for option $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE; @@ -933,7 +890,6 @@ // ----- Look for first arg if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Variable list of options"); // ----- Parse the options $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, @@ -953,7 +909,6 @@ PCLZIP_OPT_TEMP_FILE_OFF => 'optional' )); if ($v_result != 1) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); return 0; } @@ -976,10 +931,8 @@ } if (!isset($v_options[PCLZIP_OPT_EXTRACT_AS_STRING])) { $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Option PCLZIP_OPT_EXTRACT_AS_STRING not set."); } else { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Option PCLZIP_OPT_EXTRACT_AS_STRING set."); } } @@ -987,7 +940,6 @@ // Here we need to support the first historic synopsis of the // method. else { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Static synopsis"); // ----- Get the first argument $v_path = $v_arg_list[0]; @@ -1001,14 +953,12 @@ PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments"); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return 0; } } } // ----- Trace - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "index='$p_index', path='$v_path', remove_path='$v_remove_path', remove_all_path='".($v_remove_path?'true':'false')."'"); // ----- Trick // Here I want to reuse extractByRule(), so I need to parse the $p_index @@ -1018,7 +968,6 @@ $v_result = $this->privParseOptions($v_arg_trick, sizeof($v_arg_trick), $v_options_trick, array (PCLZIP_OPT_BY_INDEX => 'optional' )); if ($v_result != 1) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); return 0; } $v_options[PCLZIP_OPT_BY_INDEX] = $v_options_trick[PCLZIP_OPT_BY_INDEX]; @@ -1028,12 +977,10 @@ // ----- Call the extracting fct if (($v_result = $this->privExtractByRule($p_list, $v_path, $v_remove_path, $v_remove_all_path, $v_options)) < 1) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo()); return(0); } // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_list); return $p_list; } // -------------------------------------------------------------------------------- @@ -1049,7 +996,7 @@ // Options : // PCLZIP_OPT_BY_INDEX : // PCLZIP_OPT_BY_NAME : - // PCLZIP_OPT_BY_EREG : + // PCLZIP_OPT_BY_EREG : // PCLZIP_OPT_BY_PREG : // Return Values : // 0 on failure, @@ -1058,7 +1005,6 @@ // -------------------------------------------------------------------------------- function delete() { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::delete", ""); $v_result=1; // ----- Reset the error handler @@ -1066,7 +1012,6 @@ // ----- Check archive if (!$this->privCheckFormat()) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); return(0); } @@ -1075,7 +1020,6 @@ // ----- Look for variable options arguments $v_size = func_num_args(); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method"); // ----- Look for arguments if ($v_size > 0) { @@ -1089,7 +1033,6 @@ PCLZIP_OPT_BY_PREG => 'optional', PCLZIP_OPT_BY_INDEX => 'optional' )); if ($v_result != 1) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); return 0; } } @@ -1102,7 +1045,6 @@ if (($v_result = $this->privDeleteByRule($v_list, $v_options)) != 1) { $this->privSwapBackMagicQuotes(); unset($v_list); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo()); return(0); } @@ -1110,7 +1052,6 @@ $this->privSwapBackMagicQuotes(); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_list); return $v_list; } // -------------------------------------------------------------------------------- @@ -1123,12 +1064,10 @@ // -------------------------------------------------------------------------------- function deleteByIndex($p_index) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::deleteByIndex", "index='$p_index'"); - + $p_list = $this->delete(PCLZIP_OPT_BY_INDEX, $p_index); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_list); return $p_list; } // -------------------------------------------------------------------------------- @@ -1149,7 +1088,6 @@ // -------------------------------------------------------------------------------- function properties() { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::properties", ""); // ----- Reset the error handler $this->privErrorReset(); @@ -1160,7 +1098,6 @@ // ----- Check archive if (!$this->privCheckFormat()) { $this->privSwapBackMagicQuotes(); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); return(0); } @@ -1174,16 +1111,14 @@ if (@is_file($this->zipname)) { // ----- Open the zip file - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode"); if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0) { $this->privSwapBackMagicQuotes(); - + // ----- Error log PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode'); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), 0); return 0; } @@ -1192,7 +1127,6 @@ if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) { $this->privSwapBackMagicQuotes(); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); return 0; } @@ -1209,7 +1143,6 @@ $this->privSwapBackMagicQuotes(); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_prop); return $v_prop; } // -------------------------------------------------------------------------------- @@ -1228,7 +1161,6 @@ // -------------------------------------------------------------------------------- function duplicate($p_archive) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::duplicate", ""); $v_result = 1; // ----- Reset the error handler @@ -1237,7 +1169,6 @@ // ----- Look if the $p_archive is a PclZip object if ((is_object($p_archive)) && (get_class($p_archive) == 'pclzip')) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The parameter is valid PclZip object '".$p_archive->zipname."'"); // ----- Duplicate the archive $v_result = $this->privDuplicate($p_archive->zipname); @@ -1246,7 +1177,6 @@ // ----- Look if the $p_archive is a string (so a filename) else if (is_string($p_archive)) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The parameter is a filename '$p_archive'"); // ----- Check that $p_archive is a valid zip file // TBC : Should also check the archive format @@ -1270,7 +1200,6 @@ } // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -1291,7 +1220,6 @@ // -------------------------------------------------------------------------------- function merge($p_archive_to_add) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::merge", ""); $v_result = 1; // ----- Reset the error handler @@ -1299,14 +1227,12 @@ // ----- Check archive if (!$this->privCheckFormat()) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); return(0); } // ----- Look if the $p_archive_to_add is a PclZip object if ((is_object($p_archive_to_add)) && (get_class($p_archive_to_add) == 'pclzip')) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The parameter is valid PclZip object"); // ----- Merge the archive $v_result = $this->privMerge($p_archive_to_add); @@ -1315,7 +1241,6 @@ // ----- Look if the $p_archive_to_add is a string (so a filename) else if (is_string($p_archive_to_add)) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The parameter is a filename"); // ----- Create a temporary archive $v_object_archive = new PclZip($p_archive_to_add); @@ -1333,7 +1258,6 @@ } // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -1448,7 +1372,6 @@ // -------------------------------------------------------------------------------- function privCheckFormat($p_level=0) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCheckFormat", ""); $v_result = true; // ----- Reset the file system cache @@ -1461,7 +1384,6 @@ if (!is_file($this->zipname)) { // ----- Error log PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "Missing archive file '".$this->zipname."'"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, false, PclZip::errorInfo()); return(false); } @@ -1469,7 +1391,6 @@ if (!is_readable($this->zipname)) { // ----- Error log PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to read archive '".$this->zipname."'"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, false, PclZip::errorInfo()); return(false); } @@ -1483,7 +1404,6 @@ // TBC // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -1505,13 +1425,11 @@ // -------------------------------------------------------------------------------- function privParseOptions(&$p_options_list, $p_size, &$v_result_list, $v_requested_options=false) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privParseOptions", ""); $v_result=1; - + // ----- Read the options $i=0; while ($i<$p_size) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Looking for table index $i, option = '".PclZipUtilOptionText($p_options_list[$i])."(".$p_options_list[$i].")'"); // ----- Check if the option is supported if (!isset($v_requested_options[$p_options_list[$i]])) { @@ -1519,7 +1437,6 @@ PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid optional parameter '".$p_options_list[$i]."' for this method"); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } @@ -1535,13 +1452,11 @@ PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } // ----- Get the value $v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], FALSE); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'"); $i++; break; @@ -1549,28 +1464,24 @@ // ----- Check the number of parameters if (($i+1) >= $p_size) { PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } - + // ----- Check for incompatible options if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_OFF])) { PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_OFF'"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } - + // ----- Check the value $v_value = $p_options_list[$i+1]; if ((!is_integer($v_value)) || ($v_value<0)) { PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Integer expected for option '".PclZipUtilOptionText($p_options_list[$i])."'"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } // ----- Get the value (and convert it in bytes) $v_result_list[$p_options_list[$i]] = $v_value*1048576; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'"); $i++; break; @@ -1578,30 +1489,25 @@ // ----- Check for incompatible options if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_OFF])) { PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_OFF'"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } - + $v_result_list[$p_options_list[$i]] = true; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'"); break; case PCLZIP_OPT_TEMP_FILE_OFF : // ----- Check for incompatible options if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_ON])) { PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_ON'"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } // ----- Check for incompatible options if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_THRESHOLD])) { PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_THRESHOLD'"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } - + $v_result_list[$p_options_list[$i]] = true; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'"); break; case PCLZIP_OPT_EXTRACT_DIR_RESTRICTION : @@ -1611,7 +1517,6 @@ PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } @@ -1619,11 +1524,9 @@ if ( is_string($p_options_list[$i+1]) && ($p_options_list[$i+1] != '')) { $v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], FALSE); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'"); $i++; } else { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." set with an empty value is ignored."); } break; @@ -1635,7 +1538,6 @@ PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } @@ -1651,15 +1553,16 @@ PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } - ////--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'"); $i++; break; // ----- Look for options that request an EREG or PREG expression case PCLZIP_OPT_BY_EREG : + // ereg() is deprecated starting with PHP 5.3. Move PCLZIP_OPT_BY_EREG + // to PCLZIP_OPT_BY_PREG + $p_options_list[$i] = PCLZIP_OPT_BY_PREG; case PCLZIP_OPT_BY_PREG : //case PCLZIP_OPT_CRYPT : // ----- Check the number of parameters @@ -1668,7 +1571,6 @@ PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } @@ -1681,10 +1583,8 @@ PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'"); $i++; break; @@ -1701,7 +1601,6 @@ ."'"); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } @@ -1717,10 +1616,8 @@ ."'"); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'"); $i++; break; @@ -1732,14 +1629,12 @@ PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } // ----- Get the value $v_work_list = array(); if (is_string($p_options_list[$i+1])) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Index value is a string '".$p_options_list[$i+1]."'"); // ----- Remove spaces $p_options_list[$i+1] = strtr($p_options_list[$i+1], ' ', ''); @@ -1748,11 +1643,9 @@ $v_work_list = explode(",", $p_options_list[$i+1]); } else if (is_integer($p_options_list[$i+1])) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Index value is an integer '".$p_options_list[$i+1]."'"); $v_work_list[0] = $p_options_list[$i+1].'-'.$p_options_list[$i+1]; } else if (is_array($p_options_list[$i+1])) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Index value is an array"); $v_work_list = $p_options_list[$i+1]; } else { @@ -1760,10 +1653,9 @@ PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Value must be integer, string or array for option '".PclZipUtilOptionText($p_options_list[$i])."'"); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } - + // ----- Reduce the index list // each index item in the list must be a couple with a start and // an end value : [0,3], [5-5], [8-10], ... @@ -1774,10 +1666,10 @@ // ----- Explode the item $v_item_list = explode("-", $v_work_list[$j]); $v_size_item_list = sizeof($v_item_list); - + // ----- TBC : Here we might check that each item is a // real integer ... - + // ----- Look for single value if ($v_size_item_list == 1) { // ----- Set the option value @@ -1794,15 +1686,12 @@ PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Too many values in index range for option '".PclZipUtilOptionText($p_options_list[$i])."'"); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extracted index item = [".$v_result_list[$p_options_list[$i]][$j]['start'].",".$v_result_list[$p_options_list[$i]][$j]['end']."]"); // ----- Look for list sort if ($v_result_list[$p_options_list[$i]][$j]['start'] < $v_sort_value) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The list should be sorted ..."); $v_sort_flag=true; // ----- TBC : An automatic sort should be writen ... @@ -1810,16 +1699,14 @@ PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Invalid order of index range for option '".PclZipUtilOptionText($p_options_list[$i])."'"); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } $v_sort_value = $v_result_list[$p_options_list[$i]][$j]['start']; } - + // ----- Sort the items if ($v_sort_flag) { // TBC : To Be Completed - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "List sorting is not yet write ..."); } // ----- Next option @@ -1834,7 +1721,6 @@ case PCLZIP_OPT_REPLACE_NEWER : case PCLZIP_OPT_STOP_ON_ERROR : $v_result_list[$p_options_list[$i]] = true; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'"); break; // ----- Look for options that request an octal value @@ -1845,13 +1731,11 @@ PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } // ----- Get the value $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1]; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'"); $i++; break; @@ -1872,13 +1756,11 @@ PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } // ----- Get the value $v_function_name = $p_options_list[$i+1]; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "call-back ".PclZipUtilOptionText($p_options_list[$i])." = '".$v_function_name."'"); // ----- Check that the value is a valid existing function if (!function_exists($v_function_name)) { @@ -1886,7 +1768,6 @@ PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Function '".$v_function_name."()' is not an existing function for option '".PclZipUtilOptionText($p_options_list[$i])."'"); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } @@ -1902,7 +1783,6 @@ .$p_options_list[$i]."'"); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } @@ -1915,28 +1795,24 @@ for ($key=reset($v_requested_options); $key=key($v_requested_options); $key=next($v_requested_options)) { // ----- Look for mandatory option if ($v_requested_options[$key] == 'mandatory') { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Detect a mandatory option : ".PclZipUtilOptionText($key)."(".$key.")"); // ----- Look if present if (!isset($v_result_list[$key])) { // ----- Error log PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter ".PclZipUtilOptionText($key)."(".$key.")"); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } } } } - + // ----- Look for default values if (!isset($v_result_list[PCLZIP_OPT_TEMP_FILE_THRESHOLD])) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3,"Calculate auto threshold"); - + } // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -1949,21 +1825,18 @@ // -------------------------------------------------------------------------------- function privOptionDefaultThreshold(&$p_options) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privOptionDefaultThreshold", ""); $v_result=1; - + if (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]) || isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF])) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } - - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3,"Create an auto-threshold for use of temporay files"); + // ----- Get 'memory_limit' configuration value $v_memory_limit = ini_get('memory_limit'); $v_memory_limit = trim($v_memory_limit); $last = strtolower(substr($v_memory_limit, -1)); - + if($last == 'g') //$v_memory_limit = $v_memory_limit*1024*1024*1024; $v_memory_limit = $v_memory_limit*1073741824; @@ -1972,20 +1845,16 @@ $v_memory_limit = $v_memory_limit*1048576; if($last == 'k') $v_memory_limit = $v_memory_limit*1024; - + $p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] = floor($v_memory_limit*PCLZIP_TEMPORARY_FILE_RATIO); - - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3,"Current memory usage : ".memory_get_usage(TRUE)." bytes"); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3,"Threshold value is : ".$p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]." bytes"); + // ----- Sanity check : No threshold if value lower than 1M if ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] < 1048576) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3,"Unset the threshold (value ".$p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD].") because under 1Mo sanity check)"); unset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]); } - + // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -2000,19 +1869,17 @@ // -------------------------------------------------------------------------------- function privFileDescrParseAtt(&$p_file_list, &$p_filedescr, $v_options, $v_requested_options=false) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privFileDescrParseAtt", ""); $v_result=1; - + // ----- For each file in the list check the attributes foreach ($p_file_list as $v_key => $v_value) { - + // ----- Check if the option is supported if (!isset($v_requested_options[$v_key])) { // ----- Error log PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid file attribute '".$v_key."' for this file"); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } @@ -2021,16 +1888,13 @@ case PCLZIP_ATT_FILE_NAME : if (!is_string($v_value)) { PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } $p_filedescr['filename'] = PclZipUtilPathReduction($v_value); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($v_key)." = '".$v_value."'"); - + if ($p_filedescr['filename'] == '') { PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty filename for attribute '".PclZipUtilOptionText($v_key)."'"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } @@ -2039,16 +1903,13 @@ case PCLZIP_ATT_FILE_NEW_SHORT_NAME : if (!is_string($v_value)) { PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } $p_filedescr['new_short_name'] = PclZipUtilPathReduction($v_value); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($v_key)." = '".$v_value."'"); if ($p_filedescr['new_short_name'] == '') { PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty short filename for attribute '".PclZipUtilOptionText($v_key)."'"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } break; @@ -2056,16 +1917,13 @@ case PCLZIP_ATT_FILE_NEW_FULL_NAME : if (!is_string($v_value)) { PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } $p_filedescr['new_full_name'] = PclZipUtilPathReduction($v_value); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($v_key)." = '".$v_value."'"); if ($p_filedescr['new_full_name'] == '') { PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty full filename for attribute '".PclZipUtilOptionText($v_key)."'"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } break; @@ -2074,28 +1932,23 @@ case PCLZIP_ATT_FILE_COMMENT : if (!is_string($v_value)) { PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } $p_filedescr['comment'] = $v_value; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($v_key)." = '".$v_value."'"); break; case PCLZIP_ATT_FILE_MTIME : if (!is_integer($v_value)) { PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". Integer expected for attribute '".PclZipUtilOptionText($v_key)."'"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } $p_filedescr['mtime'] = $v_value; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($v_key)." = '".$v_value."'"); break; case PCLZIP_ATT_FILE_CONTENT : $p_filedescr['content'] = $v_value; - ////--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($v_key)." = '".$v_value."'"); break; default : @@ -2104,7 +1957,6 @@ "Unknown parameter '".$v_key."'"); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } @@ -2113,22 +1965,19 @@ for ($key=reset($v_requested_options); $key=key($v_requested_options); $key=next($v_requested_options)) { // ----- Look for mandatory option if ($v_requested_options[$key] == 'mandatory') { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Detect a mandatory option : ".PclZipUtilOptionText($key)."(".$key.")"); // ----- Look if present if (!isset($p_file_list[$key])) { PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter ".PclZipUtilOptionText($key)."(".$key.")"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } } } } - + // end foreach } - + // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -2140,7 +1989,7 @@ // or a string to be added as file. For any other type of files (link, other) // just ignore the item. // Then prepare the information that will be stored for that file. - // When its a folder, expand the folder with all the files that are in that + // When its a folder, expand the folder with all the files that are in that // folder (recursively). // Parameters : // Return Values : @@ -2149,70 +1998,59 @@ // -------------------------------------------------------------------------------- function privFileDescrExpand(&$p_filedescr_list, &$p_options) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privFileDescrExpand", ""); $v_result=1; - + // ----- Create a result list $v_result_list = array(); - + // ----- Look each entry for ($i=0; $iprivCalculateStoredFilename($v_descr, $p_options); - + // ----- Add the descriptor in result list $v_result_list[sizeof($v_result_list)] = $v_descr; - + // ----- Look for folder if ($v_descr['type'] == 'folder') { // ----- List of items in folder @@ -2220,20 +2058,20 @@ $v_dirlist_nb = 0; if ($v_folder_handler = @opendir($v_descr['filename'])) { while (($v_item_handler = @readdir($v_folder_handler)) !== false) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Looking for '".$v_item_handler."' in the directory"); // ----- Skip '.' and '..' if (($v_item_handler == '.') || ($v_item_handler == '..')) { continue; } - + // ----- Compose the full filename $v_dirlist_descr[$v_dirlist_nb]['filename'] = $v_descr['filename'].'/'.$v_item_handler; - + // ----- Look for different stored filename // Because the name of the folder was changed, the name of the // files/sub-folders also change - if ($v_descr['stored_filename'] != $v_descr['filename']) { + if (($v_descr['stored_filename'] != $v_descr['filename']) + && (!isset($p_options[PCLZIP_OPT_REMOVE_ALL_PATH]))) { if ($v_descr['stored_filename'] != '') { $v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_descr['stored_filename'].'/'.$v_item_handler; } @@ -2241,44 +2079,38 @@ $v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_item_handler; } } - + $v_dirlist_nb++; } - + @closedir($v_folder_handler); } else { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unable to open dir '".$v_descr['filename']."' in read mode. Skipped."); // TBC : unable to open folder in read mode } - + // ----- Expand each element of the list if ($v_dirlist_nb != 0) { // ----- Expand if (($v_result = $this->privFileDescrExpand($v_dirlist_descr, $p_options)) != 1) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } - + // ----- Concat the resulting list - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Merging result list (size '".sizeof($v_result_list)."') with dirlist (size '".sizeof($v_dirlist_descr)."')"); $v_result_list = array_merge($v_result_list, $v_dirlist_descr); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "merged result list is size '".sizeof($v_result_list)."'"); } else { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Nothing in this folder to expand."); } - + // ----- Free local array unset($v_dirlist_descr); } } - + // ----- Get the result list $p_filedescr_list = $v_result_list; // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -2291,10 +2123,9 @@ // -------------------------------------------------------------------------------- function privCreate($p_filedescr_list, &$p_result_list, &$p_options) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCreate", "list"); $v_result=1; $v_list_detail = array(); - + // ----- Magic quotes trick $this->privDisableMagicQuotes(); @@ -2302,7 +2133,6 @@ if (($v_result = $this->privOpenFd('wb')) != 1) { // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } @@ -2316,7 +2146,6 @@ $this->privSwapBackMagicQuotes(); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -2329,34 +2158,29 @@ // -------------------------------------------------------------------------------- function privAdd($p_filedescr_list, &$p_result_list, &$p_options) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAdd", "list"); $v_result=1; $v_list_detail = array(); // ----- Look if the archive exists or is empty if ((!is_file($this->zipname)) || (filesize($this->zipname) == 0)) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Archive does not exist, or is empty, create it."); // ----- Do a create $v_result = $this->privCreate($p_filedescr_list, $p_result_list, $p_options); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // ----- Magic quotes trick $this->privDisableMagicQuotes(); // ----- Open the zip file - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode"); if (($v_result=$this->privOpenFd('rb')) != 1) { // ----- Magic quotes trick $this->privSwapBackMagicQuotes(); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } @@ -2366,20 +2190,16 @@ { $this->privCloseFd(); $this->privSwapBackMagicQuotes(); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // ----- Go to beginning of File - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in file : ".ftell($this->zip_fd)."'"); @rewind($this->zip_fd); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in file : ".ftell($this->zip_fd)."'"); // ----- Creates a temporay file $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp'; // ----- Open the temporary file in write mode - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode"); if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0) { $this->privCloseFd(); @@ -2388,7 +2208,6 @@ PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode'); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } @@ -2398,7 +2217,6 @@ while ($v_size != 0) { $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); $v_buffer = fread($this->zip_fd, $v_read_size); @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); $v_size -= $v_read_size; @@ -2421,20 +2239,17 @@ $this->privSwapBackMagicQuotes(); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // ----- Store the offset of the central dir $v_offset = @ftell($this->zip_fd); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "New offset of central dir : $v_offset"); // ----- Copy the block of file headers from the old archive $v_size = $v_central_dir['size']; while ($v_size != 0) { $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); $v_buffer = @fread($v_zip_temp_fd, $v_read_size); @fwrite($this->zip_fd, $v_buffer, $v_read_size); $v_size -= $v_read_size; @@ -2452,7 +2267,6 @@ $this->privSwapBackMagicQuotes(); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } $v_count++; @@ -2485,7 +2299,6 @@ $this->privSwapBackMagicQuotes(); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } @@ -2513,7 +2326,6 @@ PclZipUtilRename($v_zip_temp_name, $this->zipname); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -2525,7 +2337,6 @@ // -------------------------------------------------------------------------------- function privOpenFd($p_mode) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privOpenFd", 'mode='.$p_mode); $v_result=1; // ----- Look if already open @@ -2535,24 +2346,20 @@ PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Zip file \''.$this->zipname.'\' already open'); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } // ----- Open the zip file - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Open file in '.$p_mode.' mode'); if (($this->zip_fd = @fopen($this->zipname, $p_mode)) == 0) { // ----- Error log PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in '.$p_mode.' mode'); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -2564,7 +2371,6 @@ // -------------------------------------------------------------------------------- function privCloseFd() { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCloseFd", ""); $v_result=1; if ($this->zip_fd != 0) @@ -2572,7 +2378,6 @@ $this->zip_fd = 0; // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -2593,7 +2398,6 @@ // function privAddList($p_list, &$p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_options) function privAddList($p_filedescr_list, &$p_result_list, &$p_options) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddList", "list"); $v_result=1; // ----- Add the files @@ -2601,7 +2405,6 @@ if (($v_result = $this->privAddFileList($p_filedescr_list, $v_header_list, $p_options)) != 1) { // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } @@ -2615,7 +2418,6 @@ if ($v_header_list[$i]['status'] == 'ok') { if (($v_result = $this->privWriteCentralFileHeader($v_header_list[$i])) != 1) { // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } $v_count++; @@ -2641,12 +2443,10 @@ unset($v_header_list); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -2655,42 +2455,36 @@ // Function : privAddFileList() // Description : // Parameters : - // $p_filedescr_list : An array containing the file description + // $p_filedescr_list : An array containing the file description // or directory names to add in the zip // $p_result_list : list of added files with their properties (specially the status field) // Return Values : // -------------------------------------------------------------------------------- function privAddFileList($p_filedescr_list, &$p_result_list, &$p_options) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddFileList", "filedescr_list"); $v_result=1; $v_header = array(); // ----- Recuperate the current number of elt in list $v_nb = sizeof($p_result_list); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Before add, list have ".$v_nb." elements"); // ----- Loop on the files for ($j=0; ($jprivAddFile($p_filedescr_list[$j], $v_header, $p_options); if ($v_result != 1) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } @@ -2717,10 +2510,8 @@ $p_result_list[$v_nb++] = $v_header; } } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "After add, list have ".$v_nb." elements"); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -2733,9 +2524,8 @@ // -------------------------------------------------------------------------------- function privAddFile($p_filedescr, &$p_header, &$p_options) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddFile", "filename='".$p_filedescr['filename']."'"); $v_result=1; - + // ----- Working variable $p_filename = $p_filedescr['filename']; @@ -2745,19 +2535,16 @@ PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid file list parameter (invalid or empty list)"); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } - - // ----- Look for a stored different filename + + // ----- Look for a stored different filename /* TBC : Removed if (isset($p_filedescr['stored_filename'])) { $v_stored_filename = $p_filedescr['stored_filename']; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, 'Stored filename is NOT the same "'.$v_stored_filename.'"'); } else { $v_stored_filename = $p_filedescr['stored_filename']; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, 'Stored filename is the same'); } */ @@ -2786,30 +2573,27 @@ $p_header['external'] = 0x00000000; $p_header['size'] = filesize($p_filename); } - + // ----- Look for regular folder else if ($p_filedescr['type']=='folder') { $p_header['external'] = 0x00000010; $p_header['mtime'] = filemtime($p_filename); $p_header['size'] = filesize($p_filename); } - + // ----- Look for virtual file else if ($p_filedescr['type'] == 'virtual_file') { $p_header['external'] = 0x00000000; $p_header['size'] = strlen($p_filedescr['content']); } - - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Header external extension '".sprintf("0x%X",$p_header['external'])."'"); + // ----- Look for filetime if (isset($p_filedescr['mtime'])) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3,"Overload mtime value with :'".$p_filedescr['mtime']."'"); $p_header['mtime'] = $p_filedescr['mtime']; } else if ($p_filedescr['type'] == 'virtual_file') { $p_header['mtime'] = time(); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Virtual file : use current time '".$p_header['mtime']."' for mtime value."); } else { $p_header['mtime'] = filemtime($p_filename); @@ -2827,7 +2611,6 @@ // ----- Look for pre-add callback if (isset($p_options[PCLZIP_CB_PRE_ADD])) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A pre-callback '".$p_options[PCLZIP_CB_PRE_ADD]."()') is defined for the extraction"); // ----- Generate a local information $v_local_header = array(); @@ -2836,7 +2619,7 @@ // ----- Call the callback // Here I do not use call_user_func() because I need to send a reference to the // header. - eval('$v_result = '.$p_options[PCLZIP_CB_PRE_ADD].'(PCLZIP_CB_PRE_ADD, $v_local_header);'); + $v_result = $p_options[PCLZIP_CB_PRE_ADD](PCLZIP_CB_PRE_ADD, $v_local_header); if ($v_result == 0) { // ----- Change the file status $p_header['status'] = "skipped"; @@ -2847,7 +2630,6 @@ // Only some fields can be modified if ($p_header['stored_filename'] != $v_local_header['stored_filename']) { $p_header['stored_filename'] = PclZipUtilPathReduction($v_local_header['stored_filename']); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "New stored filename is '".$p_header['stored_filename']."'"); } } @@ -2855,7 +2637,7 @@ if ($p_header['stored_filename'] == "") { $p_header['status'] = "filtered"; } - + // ----- Check the path length if (strlen($p_header['stored_filename']) > 0xFF) { $p_header['status'] = 'filename_too_long'; @@ -2867,7 +2649,7 @@ // ----- Look for a file if ($p_filedescr['type'] == 'file') { // ----- Look for using temporary file to zip - if ( (!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF])) + if ( (!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF])) && (isset($p_options[PCLZIP_OPT_TEMP_FILE_ON]) || (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]) && ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] <= $p_header['size'])) ) ) { @@ -2876,57 +2658,45 @@ return $v_result; } } - + // ----- Use "in memory" zip algo else { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2,"In memory compression."); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2,"Current memory usage : ".memory_get_usage(TRUE)." bytes"); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2,"Current memory peak : ".memory_get_peak_usage(TRUE)." bytes"); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "'".$p_filename."' is a file"); // ----- Open the source file if (($v_file = @fopen($p_filename, "rb")) == 0) { PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to open file '$p_filename' in binary read mode"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } // ----- Read the file content $v_content = @fread($v_file, $p_header['size']); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2,"Memory usage after reading file : ".memory_get_usage(TRUE)." bytes"); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2,"Memory peak after reading file : ".memory_get_peak_usage(TRUE)." bytes"); // ----- Close the file @fclose($v_file); // ----- Calculate the CRC $p_header['crc'] = @crc32($v_content); - + // ----- Look for no compression if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File will not be compressed"); // ----- Set header parameters $p_header['compressed_size'] = $p_header['size']; $p_header['compression'] = 0; } - + // ----- Look for normal compression else { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File will be compressed"); // ----- Compress the content $v_content = @gzdeflate($v_content); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2,"Memory usage after gzdeflate : ".memory_get_usage(TRUE)." bytes"); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2,"Memory peak after gzdeflate : ".memory_get_peak_usage(TRUE)." bytes"); // ----- Set header parameters $p_header['compressed_size'] = strlen($v_content); $p_header['compression'] = 8; } - + // ----- Call the header generation if (($v_result = $this->privWriteFileHeader($p_header)) != 1) { @fclose($v_file); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } @@ -2939,24 +2709,21 @@ // ----- Look for a virtual file (a file from string) else if ($p_filedescr['type'] == 'virtual_file') { - - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Add by string"); + $v_content = $p_filedescr['content']; // ----- Calculate the CRC $p_header['crc'] = @crc32($v_content); - + // ----- Look for no compression if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File will not be compressed"); // ----- Set header parameters $p_header['compressed_size'] = $p_header['size']; $p_header['compression'] = 0; } - + // ----- Look for normal compression else { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File will be compressed"); // ----- Compress the content $v_content = @gzdeflate($v_content); @@ -2964,11 +2731,10 @@ $p_header['compressed_size'] = strlen($v_content); $p_header['compression'] = 8; } - + // ----- Call the header generation if (($v_result = $this->privWriteFileHeader($p_header)) != 1) { @fclose($v_file); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } @@ -2978,7 +2744,6 @@ // ----- Look for a directory else if ($p_filedescr['type'] == 'folder') { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "'".$p_filename."' is a folder"); // ----- Look for directory last '/' if (@substr($p_header['stored_filename'], -1) != '/') { $p_header['stored_filename'] .= '/'; @@ -2992,7 +2757,6 @@ // ----- Call the header generation if (($v_result = $this->privWriteFileHeader($p_header)) != 1) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } } @@ -3000,7 +2764,6 @@ // ----- Look for post-add callback if (isset($p_options[PCLZIP_CB_POST_ADD])) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A post-callback '".$p_options[PCLZIP_CB_POST_ADD]."()') is defined for the extraction"); // ----- Generate a local information $v_local_header = array(); @@ -3009,7 +2772,7 @@ // ----- Call the callback // Here I do not use call_user_func() because I need to send a reference to the // header. - eval('$v_result = '.$p_options[PCLZIP_CB_POST_ADD].'(PCLZIP_CB_POST_ADD, $v_local_header);'); + $v_result = $p_options[PCLZIP_CB_POST_ADD](PCLZIP_CB_POST_ADD, $v_local_header); if ($v_result == 0) { // ----- Ignored $v_result = 1; @@ -3020,7 +2783,6 @@ } // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -3033,18 +2795,15 @@ // -------------------------------------------------------------------------------- function privAddFileUsingTempFile($p_filedescr, &$p_header, &$p_options) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddFileUsingTempFile", "filename='".$p_filedescr['filename']."'"); $v_result=PCLZIP_ERR_NO_ERROR; - + // ----- Working variable $p_filename = $p_filedescr['filename']; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "'".$p_filename."' is a file"); // ----- Open the source file if (($v_file = @fopen($p_filename, "rb")) == 0) { PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to open file '$p_filename' in binary read mode"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } @@ -3053,7 +2812,6 @@ if (($v_file_compressed = @gzopen($v_gzip_temp_name, "wb")) == 0) { fclose($v_file); PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary write mode'); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } @@ -3061,7 +2819,6 @@ $v_size = filesize($p_filename); while ($v_size != 0) { $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read ".$v_read_size." bytes"); $v_buffer = @fread($v_file, $v_read_size); //$v_binary_data = pack('a'.$v_read_size, $v_buffer); @gzputs($v_file_compressed, $v_buffer, $v_read_size); @@ -3073,17 +2830,14 @@ @gzclose($v_file_compressed); // ----- Check the minimum file size - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "gzip file size ".filesize($v_gzip_temp_name)); if (filesize($v_gzip_temp_name) < 18) { PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'gzip temporary file \''.$v_gzip_temp_name.'\' has invalid filesize - should be minimum 18 bytes'); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } // ----- Extract the compressed attributes if (($v_file_compressed = @fopen($v_gzip_temp_name, "rb")) == 0) { PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode'); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } @@ -3092,28 +2846,17 @@ $v_data_header = unpack('a1id1/a1id2/a1cm/a1flag/Vmtime/a1xfl/a1os', $v_binary_data); // ----- Check some parameters - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, '$v_data_header[id1]='.bin2hex($v_data_header['id1'])); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, '$v_data_header[id2]='.bin2hex($v_data_header['id2'])); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, '$v_data_header[cm]='.bin2hex($v_data_header['cm'])); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, '$v_data_header[flag]='.bin2hex($v_data_header['flag'])); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, '$v_data_header[mtime]='.$v_data_header['mtime']); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, '$v_data_header[xfl]='.bin2hex($v_data_header['xfl'])); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, '$v_data_header[os]='.bin2hex($v_data_header['os'])); $v_data_header['os'] = bin2hex($v_data_header['os']); // ----- Read the gzip file footer - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "File position after header ".ftell($v_file_compressed)); @fseek($v_file_compressed, filesize($v_gzip_temp_name)-8); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "File position at beginning of footer ".ftell($v_file_compressed)); $v_binary_data = @fread($v_file_compressed, 8); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "File position after footer ".ftell($v_file_compressed)); $v_data_footer = unpack('Vcrc/Vcompressed_size', $v_binary_data); // ----- Set the attributes $p_header['compression'] = ord($v_data_header['cm']); //$p_header['mtime'] = $v_data_header['mtime']; $p_header['crc'] = $v_data_footer['crc']; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Compressed size ".(filesize($v_gzip_temp_name)-18)); $p_header['compressed_size'] = filesize($v_gzip_temp_name)-18; // ----- Close the file @@ -3121,7 +2864,6 @@ // ----- Call the header generation if (($v_result = $this->privWriteFileHeader($p_header)) != 1) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } @@ -3129,19 +2871,15 @@ if (($v_file_compressed = @fopen($v_gzip_temp_name, "rb")) == 0) { PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode'); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks fseek($v_file_compressed, 10); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "File position before reading compressed data ".ftell($v_file_compressed)); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, ' '.$p_header['compressed_size'].' bytes to read'); $v_size = $p_header['compressed_size']; while ($v_size != 0) { $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read ".$v_read_size." bytes"); $v_buffer = @fread($v_file_compressed, $v_read_size); //$v_binary_data = pack('a'.$v_read_size, $v_buffer); @fwrite($this->zip_fd, $v_buffer, $v_read_size); @@ -3153,9 +2891,8 @@ // ----- Unlink the temporary file @unlink($v_gzip_temp_name); - + // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -3170,9 +2907,8 @@ // -------------------------------------------------------------------------------- function privCalculateStoredFilename(&$p_filedescr, &$p_options) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCalculateStoredFilename", "filename='".$p_filedescr['filename']."'"); $v_result=1; - + // ----- Working variables $p_filename = $p_filedescr['filename']; if (isset($p_options[PCLZIP_OPT_ADD_PATH])) { @@ -3187,7 +2923,6 @@ else { $p_remove_dir = ''; } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Remove path ='".$p_remove_dir."'"); if (isset($p_options[PCLZIP_OPT_REMOVE_ALL_PATH])) { $p_remove_all_dir = $p_options[PCLZIP_OPT_REMOVE_ALL_PATH]; } @@ -3195,13 +2930,13 @@ $p_remove_all_dir = 0; } + // ----- Look for full name change if (isset($p_filedescr['new_full_name'])) { // ----- Remove drive letter if any $v_stored_filename = PclZipUtilTranslateWinPath($p_filedescr['new_full_name']); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Changing full name of '".$p_filename."' for '".$v_stored_filename."'"); } - + // ----- Look for path and/or short name change else { @@ -3214,7 +2949,6 @@ $v_dir = $v_path_info['dirname'].'/'; } $v_stored_filename = $v_dir.$p_filedescr['new_short_name']; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Changing short name of '".$p_filename."' for '".$v_stored_filename."'"); } else { // ----- Calculate the stored filename @@ -3224,17 +2958,15 @@ // ----- Look for all path to remove if ($p_remove_all_dir) { $v_stored_filename = basename($p_filename); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Remove all path selected change '".$p_filename."' for '".$v_stored_filename."'"); } // ----- Look for partial path remove else if ($p_remove_dir != "") { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Partial path to remove"); if (substr($p_remove_dir, -1) != '/') $p_remove_dir .= "/"; if ( (substr($p_filename, 0, 2) == "./") || (substr($p_remove_dir, 0, 2) == "./")) { - + if ( (substr($p_filename, 0, 2) == "./") && (substr($p_remove_dir, 0, 2) != "./")) { $p_remove_dir = "./".$p_remove_dir; @@ -3250,37 +2982,31 @@ if ($v_compare > 0) { if ($v_compare == 2) { $v_stored_filename = ""; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Path to remove is the current folder"); } else { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Remove path '$p_remove_dir' in file '$v_stored_filename'"); $v_stored_filename = substr($v_stored_filename, strlen($p_remove_dir)); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Result is '$v_stored_filename'"); } } } - + // ----- Remove drive letter if any $v_stored_filename = PclZipUtilTranslateWinPath($v_stored_filename); - + // ----- Look for path to add if ($p_add_dir != "") { if (substr($p_add_dir, -1) == "/") $v_stored_filename = $p_add_dir.$v_stored_filename; else $v_stored_filename = $p_add_dir."/".$v_stored_filename; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Add path '$p_add_dir' in file '$p_filename' = '$v_stored_filename'"); } } // ----- Filename (reduce the path of stored name) $v_stored_filename = PclZipUtilPathReduction($v_stored_filename); $p_filedescr['stored_filename'] = $v_stored_filename; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Stored filename will be '".$p_filedescr['stored_filename']."', strlen ".strlen($p_filedescr['stored_filename'])); - + // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -3293,15 +3019,12 @@ // -------------------------------------------------------------------------------- function privWriteFileHeader(&$p_header) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privWriteFileHeader", 'file="'.$p_header['filename'].'", stored as "'.$p_header['stored_filename'].'"'); $v_result=1; // ----- Store the offset position of the file $p_header['offset'] = ftell($this->zip_fd); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, 'File offset of the header :'.$p_header['offset']); // ----- Transform UNIX mtime to DOS format mdate/mtime - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Date : \''.date("d/m/y H:i:s", $p_header['mtime']).'\''); $v_date = getdate($p_header['mtime']); $v_mtime = ($v_date['hours']<<11) + ($v_date['minutes']<<5) + $v_date['seconds']/2; $v_mdate = (($v_date['year']-1980)<<9) + ($v_date['mon']<<5) + $v_date['mday']; @@ -3329,7 +3052,6 @@ } // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -3342,21 +3064,17 @@ // -------------------------------------------------------------------------------- function privWriteCentralFileHeader(&$p_header) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privWriteCentralFileHeader", 'file="'.$p_header['filename'].'", stored as "'.$p_header['stored_filename'].'"'); $v_result=1; // TBC //for(reset($p_header); $key = key($p_header); next($p_header)) { - // //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "header[$key] = ".$p_header[$key]); //} // ----- Transform UNIX mtime to DOS format mdate/mtime - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Date : \''.date("d/m/y H:i:s", $p_header['mtime']).'\''); $v_date = getdate($p_header['mtime']); $v_mtime = ($v_date['hours']<<11) + ($v_date['minutes']<<5) + $v_date['seconds']/2; $v_mdate = (($v_date['year']-1980)<<9) + ($v_date['mon']<<5) + $v_date['mday']; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Comment size : \''.$p_header['comment_len'].'\''); // ----- Packed data $v_binary_data = pack("VvvvvvvVVVvvvvvVV", 0x02014b50, @@ -3387,7 +3105,6 @@ } // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -3400,7 +3117,6 @@ // -------------------------------------------------------------------------------- function privWriteCentralHeader($p_nb_entries, $p_size, $p_offset, $p_comment) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privWriteCentralHeader", 'nb_entries='.$p_nb_entries.', size='.$p_size.', offset='.$p_offset.', comment="'.$p_comment.'"'); $v_result=1; // ----- Packed data @@ -3418,7 +3134,6 @@ } // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -3431,24 +3146,21 @@ // -------------------------------------------------------------------------------- function privList(&$p_list) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privList", "list"); $v_result=1; // ----- Magic quotes trick $this->privDisableMagicQuotes(); // ----- Open the zip file - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode"); if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0) { // ----- Magic quotes trick $this->privSwapBackMagicQuotes(); - + // ----- Error log PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode'); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } @@ -3457,15 +3169,11 @@ if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) { $this->privSwapBackMagicQuotes(); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // ----- Go to beginning of Central Dir - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Offset : ".$v_central_dir['offset']."'"); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Position in file : ".ftell($this->zip_fd)."'"); @rewind($this->zip_fd); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Position in file : ".ftell($this->zip_fd)."'"); if (@fseek($this->zip_fd, $v_central_dir['offset'])) { $this->privSwapBackMagicQuotes(); @@ -3474,10 +3182,8 @@ PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Position in file : ".ftell($this->zip_fd)."'"); // ----- Read each entry for ($i=0; $i<$v_central_dir['entries']; $i++) @@ -3486,7 +3192,6 @@ if (($v_result = $this->privReadCentralFileHeader($v_header)) != 1) { $this->privSwapBackMagicQuotes(); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } $v_header['index'] = $i; @@ -3503,7 +3208,6 @@ $this->privSwapBackMagicQuotes(); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -3529,7 +3233,6 @@ // -------------------------------------------------------------------------------- function privConvertHeader2FileInfo($p_header, &$p_info) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privConvertHeader2FileInfo", "Filename='".$p_header['filename']."'"); $v_result=1; // ----- Get the interesting attributes @@ -3547,7 +3250,6 @@ $p_info['crc'] = $p_header['crc']; // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -3570,7 +3272,6 @@ // -------------------------------------------------------------------------------- function privExtractByRule(&$p_file_list, $p_path, $p_remove_path, $p_remove_all_path, &$p_options) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privExtractByRule", "path='$p_path', remove_path='$p_remove_path', remove_all_path='".($p_remove_all_path?'true':'false')."'"); $v_result=1; // ----- Magic quotes trick @@ -3589,9 +3290,7 @@ // ----- Look for the path end '/' while (substr($p_path, -1) == "/") { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Destination path [$p_path] ends by '/'"); $p_path = substr($p_path, 0, strlen($p_path)-1); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Modified to [$p_path]"); } } @@ -3603,11 +3302,9 @@ $p_remove_path_size = strlen($p_remove_path); // ----- Open the zip file - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode"); if (($v_result = $this->privOpenFd('rb')) != 1) { $this->privSwapBackMagicQuotes(); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } @@ -3619,7 +3316,6 @@ $this->privCloseFd(); $this->privSwapBackMagicQuotes(); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } @@ -3630,12 +3326,9 @@ $j_start = 0; for ($i=0, $v_nb_extracted=0; $i<$v_central_dir['entries']; $i++) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Read next file header entry : '$i'"); // ----- Read next Central dir entry - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Position before rewind : ".ftell($this->zip_fd)."'"); @rewind($this->zip_fd); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Position after rewind : ".ftell($this->zip_fd)."'"); if (@fseek($this->zip_fd, $v_pos_entry)) { // ----- Close the zip file @@ -3646,10 +3339,8 @@ PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Position after fseek : ".ftell($this->zip_fd)."'"); // ----- Read the file header $v_header = array(); @@ -3659,7 +3350,6 @@ $this->privCloseFd(); $this->privSwapBackMagicQuotes(); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } @@ -3675,49 +3365,43 @@ // ----- Look for extract by name rule if ( (isset($p_options[PCLZIP_OPT_BY_NAME])) && ($p_options[PCLZIP_OPT_BY_NAME] != 0)) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByName'"); // ----- Look if the filename is in the list for ($j=0; ($j strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) && (substr($v_header['stored_filename'], 0, strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) == $p_options[PCLZIP_OPT_BY_NAME][$j])) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The directory is in the file path"); $v_extract = true; } } // ----- Look for a filename elseif ($v_header['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The file is the right one."); $v_extract = true; } } } // ----- Look for extract by ereg rule + // ereg() is deprecated with PHP 5.3 + /* else if ( (isset($p_options[PCLZIP_OPT_BY_EREG])) && ($p_options[PCLZIP_OPT_BY_EREG] != "")) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract by ereg '".$p_options[PCLZIP_OPT_BY_EREG]."'"); if (ereg($p_options[PCLZIP_OPT_BY_EREG], $v_header['stored_filename'])) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename match the regular expression"); $v_extract = true; } } + */ // ----- Look for extract by preg rule else if ( (isset($p_options[PCLZIP_OPT_BY_PREG])) && ($p_options[PCLZIP_OPT_BY_PREG] != "")) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByEreg'"); if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header['stored_filename'])) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename match the regular expression"); $v_extract = true; } } @@ -3725,23 +3409,18 @@ // ----- Look for extract by index rule else if ( (isset($p_options[PCLZIP_OPT_BY_INDEX])) && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByIndex'"); - + // ----- Look if the index is in the list for ($j=$j_start; ($j=$p_options[PCLZIP_OPT_BY_INDEX][$j]['start']) && ($i<=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end'])) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Found as part of an index range"); $v_extract = true; } if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Do not look this index range for next loop"); $j_start = $j+1; } if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Index range is greater than index, stop loop"); break; } } @@ -3749,7 +3428,6 @@ // ----- Look for no rule, which means extract all the archive else { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with no rule (extract all)"); $v_extract = true; } @@ -3757,35 +3435,30 @@ if ( ($v_extract) && ( ($v_header['compression'] != 8) && ($v_header['compression'] != 0))) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unsupported compression method (".$v_header['compression'].")"); $v_header['status'] = 'unsupported_compression'; // ----- Look for PCLZIP_OPT_STOP_ON_ERROR if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_STOP_ON_ERROR is selected, extraction will be stopped"); $this->privSwapBackMagicQuotes(); - + PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_COMPRESSION, "Filename '".$v_header['stored_filename']."' is " ."compressed by an unsupported compression " ."method (".$v_header['compression'].") "); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } } - + // ----- Check encrypted files if (($v_extract) && (($v_header['flag'] & 1) == 1)) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unsupported file encryption"); $v_header['status'] = 'unsupported_encryption'; // ----- Look for PCLZIP_OPT_STOP_ON_ERROR if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_STOP_ON_ERROR is selected, extraction will be stopped"); $this->privSwapBackMagicQuotes(); @@ -3794,35 +3467,29 @@ ." filename '".$v_header['stored_filename'] ."'"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } } // ----- Look for real extraction if (($v_extract) && ($v_header['status'] != 'ok')) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "No need for extract"); $v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted++]); if ($v_result != 1) { $this->privCloseFd(); $this->privSwapBackMagicQuotes(); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } $v_extract = false; } - + // ----- Look for real extraction if ($v_extract) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting file '".$v_header['filename']."', index '$i'"); // ----- Go to the file position - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position before rewind : ".ftell($this->zip_fd)."'"); @rewind($this->zip_fd); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after rewind : ".ftell($this->zip_fd)."'"); if (@fseek($this->zip_fd, $v_header['offset'])) { // ----- Close the zip file @@ -3834,20 +3501,19 @@ PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after fseek : ".ftell($this->zip_fd)."'"); // ----- Look for extraction as string if ($p_options[PCLZIP_OPT_EXTRACT_AS_STRING]) { + $v_string = ''; + // ----- Extracting the file - $v_result1 = $this->privExtractFileAsString($v_header, $v_string); + $v_result1 = $this->privExtractFileAsString($v_header, $v_string, $p_options); if ($v_result1 < 1) { $this->privCloseFd(); $this->privSwapBackMagicQuotes(); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result1); return $v_result1; } @@ -3858,7 +3524,6 @@ $this->privCloseFd(); $this->privSwapBackMagicQuotes(); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } @@ -3867,7 +3532,7 @@ // ----- Next extracted file $v_nb_extracted++; - + // ----- Look for user callback abort if ($v_result1 == 2) { break; @@ -3881,7 +3546,6 @@ if ($v_result1 < 1) { $this->privCloseFd(); $this->privSwapBackMagicQuotes(); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result1); return $v_result1; } @@ -3889,7 +3553,6 @@ if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted++])) != 1) { $this->privCloseFd(); $this->privSwapBackMagicQuotes(); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } @@ -3908,7 +3571,6 @@ if ($v_result1 < 1) { $this->privCloseFd(); $this->privSwapBackMagicQuotes(); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result1); return $v_result1; } @@ -3919,7 +3581,6 @@ $this->privCloseFd(); $this->privSwapBackMagicQuotes(); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } @@ -3936,7 +3597,6 @@ $this->privSwapBackMagicQuotes(); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -3952,18 +3612,15 @@ // -------------------------------------------------------------------------------- function privExtractFile(&$p_entry, $p_path, $p_remove_path, $p_remove_all_path, &$p_options) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privExtractFile', "path='$p_path', remove_path='$p_remove_path', remove_all_path='".($p_remove_all_path?'true':'false')."'"); $v_result=1; // ----- Read the file header if (($v_result = $this->privReadFileHeader($v_header)) != 1) { // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Found file '".$v_header['filename']."', size '".$v_header['size']."'"); // ----- Check that the file header is coherent with $p_entry info if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) { @@ -3974,15 +3631,12 @@ if ($p_remove_all_path == true) { // ----- Look for folder entry that not need to be extracted if (($p_entry['external']&0x00000010)==0x00000010) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The entry is a folder : need to be filtered"); $p_entry['status'] = "filtered"; - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "All path is removed"); // ----- Get the basename of the path $p_entry['filename'] = basename($p_entry['filename']); } @@ -3990,28 +3644,23 @@ // ----- Look for path to remove else if ($p_remove_path != "") { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Look for some path to remove"); if (PclZipUtilPathInclusion($p_remove_path, $p_entry['filename']) == 2) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The folder is the same as the removed path '".$p_entry['filename']."'"); // ----- Change the file status $p_entry['status'] = "filtered"; // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } $p_remove_path_size = strlen($p_remove_path); if (substr($p_entry['filename'], 0, $p_remove_path_size) == $p_remove_path) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Found path '$p_remove_path' to remove in file '".$p_entry['filename']."'"); // ----- Remove the path $p_entry['filename'] = substr($p_entry['filename'], $p_remove_path_size); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Resulting file is '".$p_entry['filename']."'"); } } @@ -4019,28 +3668,24 @@ if ($p_path != '') { $p_entry['filename'] = $p_path."/".$p_entry['filename']; } - + // ----- Check a base_dir_restriction if (isset($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION])) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Check the extract directory restriction"); $v_inclusion = PclZipUtilPathInclusion($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION], - $p_entry['filename']); + $p_entry['filename']); if ($v_inclusion == 0) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_EXTRACT_DIR_RESTRICTION is selected, file is outside restriction"); PclZip::privErrorLog(PCLZIP_ERR_DIRECTORY_RESTRICTION, "Filename '".$p_entry['filename']."' is " ."outside PCLZIP_OPT_EXTRACT_DIR_RESTRICTION"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } } // ----- Look for pre-extract callback if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A pre-callback '".$p_options[PCLZIP_CB_PRE_EXTRACT]."()') is defined for the extraction"); // ----- Generate a local information $v_local_header = array(); @@ -4049,16 +3694,15 @@ // ----- Call the callback // Here I do not use call_user_func() because I need to send a reference to the // header. - eval('$v_result = '.$p_options[PCLZIP_CB_PRE_EXTRACT].'(PCLZIP_CB_PRE_EXTRACT, $v_local_header);'); + $v_result = $p_options[PCLZIP_CB_PRE_EXTRACT](PCLZIP_CB_PRE_EXTRACT, $v_local_header); if ($v_result == 0) { // ----- Change the file status $p_entry['status'] = "skipped"; $v_result = 1; } - + // ----- Look for abort result if ($v_result == 2) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction"); // ----- This status is internal and will be changed in 'skipped' $p_entry['status'] = "aborted"; $v_result = PCLZIP_ERR_USER_ABORTED; @@ -4067,10 +3711,8 @@ // ----- Update the informations // Only some fields can be modified $p_entry['filename'] = $v_local_header['filename']; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "New filename is '".$p_entry['filename']."'"); } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting file (with path) '".$p_entry['filename']."', size '$v_header[size]'"); // ----- Look if extraction should be done if ($p_entry['status'] == 'ok') { @@ -4078,35 +3720,30 @@ // ----- Look for specific actions while the file exist if (file_exists($p_entry['filename'])) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File '".$p_entry['filename']."' already exists"); // ----- Look if file is a directory if (is_dir($p_entry['filename'])) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Existing file '".$p_entry['filename']."' is a directory"); // ----- Change the file status $p_entry['status'] = "already_a_directory"; - + // ----- Look for PCLZIP_OPT_STOP_ON_ERROR // For historical reason first PclZip implementation does not stop // when this kind of error occurs. if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_STOP_ON_ERROR is selected, extraction will be stopped"); PclZip::privErrorLog(PCLZIP_ERR_ALREADY_A_DIRECTORY, "Filename '".$p_entry['filename']."' is " ."already used by an existing directory"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } } // ----- Look if file is write protected else if (!is_writeable($p_entry['filename'])) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Existing file '".$p_entry['filename']."' is write protected"); // ----- Change the file status $p_entry['status'] = "write_protected"; @@ -4116,13 +3753,11 @@ // when this kind of error occurs. if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_STOP_ON_ERROR is selected, extraction will be stopped"); PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, "Filename '".$p_entry['filename']."' exists " ."and is write protected"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } } @@ -4130,14 +3765,11 @@ // ----- Look if the extracted file is older else if (filemtime($p_entry['filename']) > $p_entry['mtime']) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Existing file '".$p_entry['filename']."' is newer (".date("l dS of F Y h:i:s A", filemtime($p_entry['filename'])).") than the extracted file (".date("l dS of F Y h:i:s A", $p_entry['mtime']).")"); // ----- Change the file status if ( (isset($p_options[PCLZIP_OPT_REPLACE_NEWER])) && ($p_options[PCLZIP_OPT_REPLACE_NEWER]===true)) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_REPLACE_NEWER is selected, file will be replaced"); } else { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File will not be replaced"); $p_entry['status'] = "newer_exist"; // ----- Look for PCLZIP_OPT_STOP_ON_ERROR @@ -4145,19 +3777,16 @@ // when this kind of error occurs. if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_STOP_ON_ERROR is selected, extraction will be stopped"); PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, "Newer version of '".$p_entry['filename']."' exists " ."and option PCLZIP_OPT_REPLACE_NEWER is not selected"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } } } else { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Existing file '".$p_entry['filename']."' is older than the extrated one - will be replaced by the extracted one (".date("l dS of F Y h:i:s A", filemtime($p_entry['filename'])).") than the extracted file (".date("l dS of F Y h:i:s A", $p_entry['mtime']).")"); } } @@ -4171,13 +3800,11 @@ $v_dir_to_check = dirname($p_entry['filename']); if (($v_result = $this->privDirCheck($v_dir_to_check, (($p_entry['external']&0x00000010)==0x00000010))) != 1) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unable to create path for '".$p_entry['filename']."'"); - + // ----- Change the file status $p_entry['status'] = "path_creation_fail"; - + // ----- Return - ////--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); //return $v_result; $v_result = 1; } @@ -4192,35 +3819,30 @@ { // ----- Look for not compressed file if ($p_entry['compression'] == 0) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting an un-compressed file"); // ----- Opening destination file if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Error while opening '".$p_entry['filename']."' in write binary mode"); // ----- Change the file status $p_entry['status'] = "write_error"; // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Read '".$p_entry['size']."' bytes"); // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks $v_size = $p_entry['compressed_size']; while ($v_size != 0) { $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Read $v_read_size bytes"); $v_buffer = @fread($this->zip_fd, $v_read_size); /* Try to speed up the code $v_binary_data = pack('a'.$v_read_size, $v_buffer); @fwrite($v_dest_file, $v_binary_data, $v_read_size); */ - @fwrite($v_dest_file, $v_buffer, $v_read_size); + @fwrite($v_dest_file, $v_buffer, $v_read_size); $v_size -= $v_read_size; } @@ -4229,23 +3851,20 @@ // ----- Change the file mtime touch($p_entry['filename'], $p_entry['mtime']); - + } else { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting a compressed file (Compression method ".$p_entry['compression'].")"); // ----- TBC // Need to be finished if (($p_entry['flag'] & 1) == 1) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File is encrypted"); PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION, 'File \''.$p_entry['filename'].'\' is encrypted. Encrypted files are not supported.'); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } // ----- Look for using temporary file to unzip - if ( (!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF])) + if ( (!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF])) && (isset($p_options[PCLZIP_OPT_TEMP_FILE_ON]) || (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]) && ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] <= $p_entry['size'])) ) ) { @@ -4254,47 +3873,42 @@ return $v_result; } } - + // ----- Look for extract in memory else { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Read '".$p_entry['compressed_size']."' compressed bytes"); - + // ----- Read the compressed file in a buffer (one shot) $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']); - + // ----- Decompress the file $v_file_content = @gzinflate($v_buffer); unset($v_buffer); if ($v_file_content === FALSE) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unable to inflate compressed file"); - + // ----- Change the file status // TBC $p_entry['status'] = "error"; - - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; } - + // ----- Opening destination file if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Error while opening '".$p_entry['filename']."' in write binary mode"); - + // ----- Change the file status $p_entry['status'] = "write_error"; - - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; } - + // ----- Write the uncompressed data @fwrite($v_dest_file, $v_file_content, $p_entry['size']); unset($v_file_content); - + // ----- Closing the destination file @fclose($v_dest_file); - + } // ----- Change the file mtime @@ -4303,24 +3917,21 @@ // ----- Look for chmod option if (isset($p_options[PCLZIP_OPT_SET_CHMOD])) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "chmod option activated '".$p_options[PCLZIP_OPT_SET_CHMOD]."'"); // ----- Change the mode of the file @chmod($p_entry['filename'], $p_options[PCLZIP_OPT_SET_CHMOD]); } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extraction done"); } } - // ----- Change abort status - if ($p_entry['status'] == "aborted") { - $p_entry['status'] = "skipped"; - } - + // ----- Change abort status + if ($p_entry['status'] == "aborted") { + $p_entry['status'] = "skipped"; + } + // ----- Look for post-extract callback elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A post-callback '".$p_options[PCLZIP_CB_POST_EXTRACT]."()') is defined for the extraction"); // ----- Generate a local information $v_local_header = array(); @@ -4329,17 +3940,15 @@ // ----- Call the callback // Here I do not use call_user_func() because I need to send a reference to the // header. - eval('$v_result = '.$p_options[PCLZIP_CB_POST_EXTRACT].'(PCLZIP_CB_POST_EXTRACT, $v_local_header);'); + $v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header); // ----- Look for abort result if ($v_result == 2) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction"); $v_result = PCLZIP_ERR_USER_ABORTED; } } // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -4352,19 +3961,16 @@ // -------------------------------------------------------------------------------- function privExtractFileUsingTempFile(&$p_entry, &$p_options) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privExtractFileUsingTempFile', "filename='".$p_entry['filename']."'"); $v_result=1; - + // ----- Creates a temporary file $v_gzip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.gz'; if (($v_dest_file = @fopen($v_gzip_temp_name, "wb")) == 0) { fclose($v_file); PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary write mode'); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Start extraction of '".$p_entry['filename']."'"); // ----- Write gz file format header $v_binary_data = pack('va1a1Va1a1', 0x8b1f, Chr($p_entry['compression']), Chr(0x00), time(), Chr(0x00), Chr(3)); @@ -4372,11 +3978,9 @@ // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks $v_size = $p_entry['compressed_size']; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Compressed Size :".$v_size.""); while ($v_size != 0) { $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Read ".$v_read_size." bytes"); $v_buffer = @fread($this->zip_fd, $v_read_size); //$v_binary_data = pack('a'.$v_read_size, $v_buffer); @fwrite($v_dest_file, $v_buffer, $v_read_size); @@ -4392,9 +3996,7 @@ // ----- Opening destination file if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Error while opening '".$p_entry['filename']."' in write binary mode"); $p_entry['status'] = "write_error"; - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } @@ -4403,19 +4005,14 @@ @fclose($v_dest_file); $p_entry['status'] = "read_error"; PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode'); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, 'File size is '.filesize($v_gzip_temp_name)); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Reading '".$p_entry['size']."' bytes"); // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks $v_size = $p_entry['size']; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Size :".$v_size.""); while ($v_size != 0) { $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Read ".$v_read_size." bytes"); $v_buffer = @gzread($v_src_file, $v_read_size); //$v_binary_data = pack('a'.$v_read_size, $v_buffer); @fwrite($v_dest_file, $v_buffer, $v_read_size); @@ -4426,9 +4023,8 @@ // ----- Delete the temporary file @unlink($v_gzip_temp_name); - + // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -4441,16 +4037,13 @@ // -------------------------------------------------------------------------------- function privExtractFileInOutput(&$p_entry, &$p_options) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privExtractFileInOutput', ""); $v_result=1; // ----- Read the file header if (($v_result = $this->privReadFileHeader($v_header)) != 1) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Found file '".$v_header['filename']."', size '".$v_header['size']."'"); // ----- Check that the file header is coherent with $p_entry info if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) { @@ -4459,7 +4052,6 @@ // ----- Look for pre-extract callback if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A pre-callback '".$p_options[PCLZIP_CB_PRE_EXTRACT]."()') is defined for the extraction"); // ----- Generate a local information $v_local_header = array(); @@ -4468,7 +4060,8 @@ // ----- Call the callback // Here I do not use call_user_func() because I need to send a reference to the // header. - eval('$v_result = '.$p_options[PCLZIP_CB_PRE_EXTRACT].'(PCLZIP_CB_PRE_EXTRACT, $v_local_header);'); +// eval('$v_result = '.$p_options[PCLZIP_CB_PRE_EXTRACT].'(PCLZIP_CB_PRE_EXTRACT, $v_local_header);'); + $v_result = $p_options[PCLZIP_CB_PRE_EXTRACT](PCLZIP_CB_PRE_EXTRACT, $v_local_header); if ($v_result == 0) { // ----- Change the file status $p_entry['status'] = "skipped"; @@ -4477,7 +4070,6 @@ // ----- Look for abort result if ($v_result == 2) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction"); // ----- This status is internal and will be changed in 'skipped' $p_entry['status'] = "aborted"; $v_result = PCLZIP_ERR_USER_ABORTED; @@ -4486,11 +4078,9 @@ // ----- Update the informations // Only some fields can be modified $p_entry['filename'] = $v_local_header['filename']; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "New filename is '".$p_entry['filename']."'"); } // ----- Trace - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting file (with path) '".$p_entry['filename']."', size '$v_header[size]'"); // ----- Look if extraction should be done if ($p_entry['status'] == 'ok') { @@ -4499,8 +4089,6 @@ if (!(($p_entry['external']&0x00000010)==0x00000010)) { // ----- Look for not compressed file if ($p_entry['compressed_size'] == $p_entry['size']) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting an un-compressed file"); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Reading '".$p_entry['size']."' bytes"); // ----- Read the file in a buffer (one shot) $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']); @@ -4510,12 +4098,10 @@ unset($v_buffer); } else { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting a compressed file"); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Reading '".$p_entry['size']."' bytes"); // ----- Read the compressed file in a buffer (one shot) $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']); - + // ----- Decompress the file $v_file_content = gzinflate($v_buffer); unset($v_buffer); @@ -4524,7 +4110,6 @@ echo $v_file_content; unset($v_file_content); } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extraction done"); } } @@ -4535,7 +4120,6 @@ // ----- Look for post-extract callback elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A post-callback '".$p_options[PCLZIP_CB_POST_EXTRACT]."()') is defined for the extraction"); // ----- Generate a local information $v_local_header = array(); @@ -4544,16 +4128,14 @@ // ----- Call the callback // Here I do not use call_user_func() because I need to send a reference to the // header. - eval('$v_result = '.$p_options[PCLZIP_CB_POST_EXTRACT].'(PCLZIP_CB_POST_EXTRACT, $v_local_header);'); + $v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header); // ----- Look for abort result if ($v_result == 2) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction"); $v_result = PCLZIP_ERR_USER_ABORTED; } } - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -4564,9 +4146,8 @@ // Parameters : // Return Values : // -------------------------------------------------------------------------------- - function privExtractFileAsString(&$p_entry, &$p_string) + function privExtractFileAsString(&$p_entry, &$p_string, &$p_options) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privExtractFileAsString', "p_entry['filename']='".$p_entry['filename']."'"); $v_result=1; // ----- Read the file header @@ -4574,52 +4155,108 @@ if (($v_result = $this->privReadFileHeader($v_header)) != 1) { // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Found file '".$v_header['filename']."', size '".$v_header['size']."'"); // ----- Check that the file header is coherent with $p_entry info if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) { // TBC } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting file in string (with path) '".$p_entry['filename']."', size '$v_header[size]'"); + // ----- Look for pre-extract callback + if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) { - // ----- Do the extraction (if not a folder) - if (!(($p_entry['external']&0x00000010)==0x00000010)) - { - // ----- Look for not compressed file -// if ($p_entry['compressed_size'] == $p_entry['size']) - if ($p_entry['compression'] == 0) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting an un-compressed file"); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Reading '".$p_entry['size']."' bytes"); - - // ----- Reading the file - $p_string = @fread($this->zip_fd, $p_entry['compressed_size']); + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_entry, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. + $v_result = $p_options[PCLZIP_CB_PRE_EXTRACT](PCLZIP_CB_PRE_EXTRACT, $v_local_header); + if ($v_result == 0) { + // ----- Change the file status + $p_entry['status'] = "skipped"; + $v_result = 1; } - else { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting a compressed file (compression method '".$p_entry['compression']."')"); - - // ----- Reading the file - $v_data = @fread($this->zip_fd, $p_entry['compressed_size']); - - // ----- Decompress the file - if (($p_string = @gzinflate($v_data)) === FALSE) { - // TBC + + // ----- Look for abort result + if ($v_result == 2) { + // ----- This status is internal and will be changed in 'skipped' + $p_entry['status'] = "aborted"; + $v_result = PCLZIP_ERR_USER_ABORTED; + } + + // ----- Update the informations + // Only some fields can be modified + $p_entry['filename'] = $v_local_header['filename']; + } + + + // ----- Look if extraction should be done + if ($p_entry['status'] == 'ok') { + + // ----- Do the extraction (if not a folder) + if (!(($p_entry['external']&0x00000010)==0x00000010)) { + // ----- Look for not compressed file + // if ($p_entry['compressed_size'] == $p_entry['size']) + if ($p_entry['compression'] == 0) { + + // ----- Reading the file + $p_string = @fread($this->zip_fd, $p_entry['compressed_size']); + } + else { + + // ----- Reading the file + $v_data = @fread($this->zip_fd, $p_entry['compressed_size']); + + // ----- Decompress the file + if (($p_string = @gzinflate($v_data)) === FALSE) { + // TBC + } } + + // ----- Trace + } + else { + // TBC : error : can not extract a folder in a string } - // ----- Trace - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extraction done"); } - else { - // TBC : error : can not extract a folder in a string + + // ----- Change abort status + if ($p_entry['status'] == "aborted") { + $p_entry['status'] = "skipped"; + } + + // ----- Look for post-extract callback + elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_entry, $v_local_header); + + // ----- Swap the content to header + $v_local_header['content'] = $p_string; + $p_string = ''; + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. + $v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header); + + // ----- Swap back the content to header + $p_string = $v_local_header['content']; + unset($v_local_header['content']); + + // ----- Look for abort result + if ($v_result == 2) { + $v_result = PCLZIP_ERR_USER_ABORTED; + } } // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -4632,25 +4269,20 @@ // -------------------------------------------------------------------------------- function privReadFileHeader(&$p_header) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privReadFileHeader", ""); $v_result=1; // ----- Read the 4 bytes signature $v_binary_data = @fread($this->zip_fd, 4); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary data is : '".sprintf("%08x", $v_binary_data)."'"); $v_data = unpack('Vid', $v_binary_data); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary signature is : '".sprintf("0x%08x", $v_data['id'])."'"); // ----- Check signature if ($v_data['id'] != 0x04034b50) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Invalid File header"); // ----- Error log PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid archive structure'); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } @@ -4662,53 +4294,36 @@ { $p_header['filename'] = ""; $p_header['status'] = "invalid_header"; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Invalid block size : ".strlen($v_binary_data)); // ----- Error log PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data)); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } // ----- Extract the values - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Header : '".$v_binary_data."'"); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Header (Hex) : '".bin2hex($v_binary_data)."'"); $v_data = unpack('vversion/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len', $v_binary_data); // ----- Get filename - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "File name length : ".$v_data['filename_len']); $p_header['filename'] = fread($this->zip_fd, $v_data['filename_len']); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Filename : \''.$p_header['filename'].'\''); // ----- Get extra_fields - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extra field length : ".$v_data['extra_len']); if ($v_data['extra_len'] != 0) { $p_header['extra'] = fread($this->zip_fd, $v_data['extra_len']); } else { $p_header['extra'] = ''; } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Extra field : \''.bin2hex($p_header['extra']).'\''); // ----- Extract properties $p_header['version_extracted'] = $v_data['version']; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Version need to extract : ('.$p_header['version_extracted'].') \''.($p_header['version_extracted']/10).'.'.($p_header['version_extracted']%10).'\''); $p_header['compression'] = $v_data['compression']; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Compression method : \''.$p_header['compression'].'\''); $p_header['size'] = $v_data['size']; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Size : \''.$p_header['size'].'\''); $p_header['compressed_size'] = $v_data['compressed_size']; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Compressed Size : \''.$p_header['compressed_size'].'\''); $p_header['crc'] = $v_data['crc']; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'CRC : \''.sprintf("0x%X", $p_header['crc']).'\''); $p_header['flag'] = $v_data['flag']; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Flag : \''.$p_header['flag'].'\''); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Flag bit 11 (from right) : \''.($p_header['flag']&0x0400).'\''); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Flag bit 11 (from left) : \''.($p_header['flag']&0x0020).'\''); $p_header['filename_len'] = $v_data['filename_len']; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Filename_len : \''.$p_header['filename_len'].'\''); // ----- Recuperate date in UNIX format $p_header['mdate'] = $v_data['mdate']; @@ -4728,17 +4343,14 @@ // ----- Get UNIX date format $p_header['mtime'] = @mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Date : \''.date("d/m/y H:i:s", $p_header['mtime']).'\''); } else { $p_header['mtime'] = time(); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Date is actual : \''.date("d/m/y H:i:s", $p_header['mtime']).'\''); } // TBC //for(reset($v_data); $key = key($v_data); next($v_data)) { - // //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Attribut[$key] = ".$v_data[$key]); //} // ----- Set the stored filename @@ -4748,7 +4360,6 @@ $p_header['status'] = "ok"; // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -4761,25 +4372,20 @@ // -------------------------------------------------------------------------------- function privReadCentralFileHeader(&$p_header) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privReadCentralFileHeader", ""); $v_result=1; // ----- Read the 4 bytes signature $v_binary_data = @fread($this->zip_fd, 4); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary data is : '".sprintf("%08x", $v_binary_data)."'"); $v_data = unpack('Vid', $v_binary_data); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary signature is : '".sprintf("0x%08x", $v_data['id'])."'"); // ----- Check signature if ($v_data['id'] != 0x02014b50) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Invalid Central Dir File signature"); // ----- Error log PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid archive structure'); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } @@ -4791,53 +4397,36 @@ { $p_header['filename'] = ""; $p_header['status'] = "invalid_header"; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Invalid block size : ".strlen($v_binary_data)); // ----- Error log PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data)); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } // ----- Extract the values - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Header : '".$v_binary_data."'"); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Header (Hex) : '".bin2hex($v_binary_data)."'"); $p_header = unpack('vversion/vversion_extracted/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len/vcomment_len/vdisk/vinternal/Vexternal/Voffset', $v_binary_data); // ----- Get filename - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "File name length : ".$p_header['filename_len']); if ($p_header['filename_len'] != 0) $p_header['filename'] = fread($this->zip_fd, $p_header['filename_len']); else $p_header['filename'] = ''; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Filename : \''.$p_header['filename'].'\''); // ----- Get extra - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Extra length : ".$p_header['extra_len']); if ($p_header['extra_len'] != 0) $p_header['extra'] = fread($this->zip_fd, $p_header['extra_len']); else $p_header['extra'] = ''; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Extra : \''.$p_header['extra'].'\''); // ----- Get comment - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Comment length : ".$p_header['comment_len']); if ($p_header['comment_len'] != 0) $p_header['comment'] = fread($this->zip_fd, $p_header['comment_len']); else $p_header['comment'] = ''; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Comment : \''.$p_header['comment'].'\''); // ----- Extract properties - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Version : \''.($p_header['version']/10).'.'.($p_header['version']%10).'\''); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Version need to extract : \''.($p_header['version_extracted']/10).'.'.($p_header['version_extracted']%10).'\''); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Size : \''.$p_header['size'].'\''); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Compressed Size : \''.$p_header['compressed_size'].'\''); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'CRC : \''.sprintf("0x%X", $p_header['crc']).'\''); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Flag : \''.$p_header['flag'].'\''); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Offset : \''.$p_header['offset'].'\''); // ----- Recuperate date in UNIX format //if ($p_header['mdate'] && $p_header['mtime']) @@ -4857,12 +4446,10 @@ // ----- Get UNIX date format $p_header['mtime'] = @mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Date : \''.date("d/m/y H:i:s", $p_header['mtime']).'\''); } else { $p_header['mtime'] = time(); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Date is actual : \''.date("d/m/y H:i:s", $p_header['mtime']).'\''); } // ----- Set the stored filename @@ -4872,18 +4459,13 @@ $p_header['status'] = 'ok'; // ----- Look if it is a directory - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Internal (Hex) : '".sprintf("Ox%04X", $p_header['internal'])."'"); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "External (Hex) : '".sprintf("Ox%04X", $p_header['external'])."' (".(($p_header['external']&0x00000010)==0x00000010?'is a folder':'is a file').')'); if (substr($p_header['filename'], -1) == '/') { //$p_header['external'] = 0x41FF0010; $p_header['external'] = 0x00000010; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Force folder external : \''.sprintf("Ox%04X", $p_header['external']).'\''); } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Header of filename : \''.$p_header['filename'].'\''); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -4898,44 +4480,31 @@ // -------------------------------------------------------------------------------- function privCheckFileHeaders(&$p_local_header, &$p_central_header) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCheckFileHeaders", ""); $v_result=1; // ----- Check the static values // TBC if ($p_local_header['filename'] != $p_central_header['filename']) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "filename" : TBC To Be Completed'); } if ($p_local_header['version_extracted'] != $p_central_header['version_extracted']) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "version_extracted" : TBC To Be Completed'); } if ($p_local_header['flag'] != $p_central_header['flag']) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "flag" : TBC To Be Completed'); } if ($p_local_header['compression'] != $p_central_header['compression']) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "compression" : TBC To Be Completed'); } if ($p_local_header['mtime'] != $p_central_header['mtime']) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "mtime" : TBC To Be Completed'); } if ($p_local_header['filename_len'] != $p_central_header['filename_len']) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "filename_len" : TBC To Be Completed'); } - + // ----- Look for flag bit 3 if (($p_local_header['flag'] & 8) == 8) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Purpose bit flag bit 3 set !'); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'File size, compression size and crc found in central header'); $p_local_header['size'] = $p_central_header['size']; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Size : \''.$p_local_header['size'].'\''); $p_local_header['compressed_size'] = $p_central_header['compressed_size']; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Compressed Size : \''.$p_local_header['compressed_size'].'\''); $p_local_header['crc'] = $p_central_header['crc']; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'CRC : \''.sprintf("0x%X", $p_local_header['crc']).'\''); } // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -4948,21 +4517,17 @@ // -------------------------------------------------------------------------------- function privReadEndCentralDir(&$p_central_dir) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privReadEndCentralDir", ""); $v_result=1; // ----- Go to the end of the zip file $v_size = filesize($this->zipname); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Size of the file :$v_size"); @fseek($this->zip_fd, $v_size); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Position at end of zip file : \''.ftell($this->zip_fd).'\''); if (@ftell($this->zip_fd) != $v_size) { // ----- Error log PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to go to the end of the archive \''.$this->zipname.'\''); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } @@ -4970,28 +4535,22 @@ // in this case the end of central dir is at 22 bytes of the file end $v_found = 0; if ($v_size > 26) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Look for central dir with no comment'); @fseek($this->zip_fd, $v_size-22); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Position after min central position : \''.ftell($this->zip_fd).'\''); if (($v_pos = @ftell($this->zip_fd)) != ($v_size-22)) { // ----- Error log PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\''); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } // ----- Read for bytes $v_binary_data = @fread($this->zip_fd, 4); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Binary data is : '".sprintf("%08x", $v_binary_data)."'"); $v_data = @unpack('Vid', $v_binary_data); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary signature is : '".sprintf("0x%08x", $v_data['id'])."'"); // ----- Check signature if ($v_data['id'] == 0x06054b50) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Found central dir at the default position."); $v_found = 1; } @@ -5000,7 +4559,6 @@ // ----- Go back to the maximum possible size of the Central Dir End Record if (!$v_found) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Start extended search of end central dir'); $v_maximum_size = 65557; // 0xFFFF + 22; if ($v_maximum_size > $v_size) $v_maximum_size = $v_size; @@ -5011,10 +4569,8 @@ PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\''); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Position after max central position : \''.ftell($this->zip_fd).'\''); // ----- Read byte per byte in order to find the signature $v_pos = ftell($this->zip_fd); @@ -5025,15 +4581,14 @@ $v_byte = @fread($this->zip_fd, 1); // ----- Add the byte - // $v_bytes = ($v_bytes << 8) | Ord($v_byte); - // Note we mask the old value down such that once shifted we can never end up with more than a 32bit number - // Otherwise on systems where we have 64bit integers the check below for the magic number will fail. - $v_bytes = ( ($v_bytes & 0xFFFFFF) << 8) | Ord($v_byte); + //$v_bytes = ($v_bytes << 8) | Ord($v_byte); + // Note we mask the old value down such that once shifted we can never end up with more than a 32bit number + // Otherwise on systems where we have 64bit integers the check below for the magic number will fail. + $v_bytes = ( ($v_bytes & 0xFFFFFF) << 8) | Ord($v_byte); // ----- Compare the bytes if ($v_bytes == 0x504b0506) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Found End Central Dir signature at position : \''.ftell($this->zip_fd).'\''); $v_pos++; break; } @@ -5044,13 +4599,11 @@ // ----- Look if not found end of central dir if ($v_pos == $v_size) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unable to find End of Central Dir Record signature"); // ----- Error log PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Unable to find End of Central Dir Record signature"); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } } @@ -5061,25 +4614,19 @@ // ----- Look for invalid block size if (strlen($v_binary_data) != 18) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Invalid End of Central Dir Record size : ".strlen($v_binary_data)); // ----- Error log PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid End of Central Dir Record size : ".strlen($v_binary_data)); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } // ----- Extract the values - ////--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Central Dir Record : '".$v_binary_data."'"); - ////--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Central Dir Record (Hex) : '".bin2hex($v_binary_data)."'"); $v_data = unpack('vdisk/vdisk_start/vdisk_entries/ventries/Vsize/Voffset/vcomment_size', $v_binary_data); // ----- Check the global size - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Comment length : ".$v_data['comment_size']); if (($v_pos + $v_data['comment_size'] + 18) != $v_size) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The central dir is not at the end of the archive. Some trailing bytes exists after the archive."); // ----- Removed in release 2.2 see readme file // The check of the file size is a little too strict. @@ -5092,40 +4639,29 @@ .' Some trailing bytes exists after the archive.'); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } } // ----- Get comment - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Comment size : \''.$v_data['comment_size'].'\''); if ($v_data['comment_size'] != 0) { $p_central_dir['comment'] = fread($this->zip_fd, $v_data['comment_size']); } else $p_central_dir['comment'] = ''; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Comment : \''.$p_central_dir['comment'].'\''); $p_central_dir['entries'] = $v_data['entries']; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Nb of entries : \''.$p_central_dir['entries'].'\''); $p_central_dir['disk_entries'] = $v_data['disk_entries']; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Nb of entries for this disk : \''.$p_central_dir['disk_entries'].'\''); $p_central_dir['offset'] = $v_data['offset']; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Offset of Central Dir : \''.$p_central_dir['offset'].'\''); $p_central_dir['size'] = $v_data['size']; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Size of Central Dir : \''.$p_central_dir['size'].'\''); $p_central_dir['disk'] = $v_data['disk']; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Disk number : \''.$p_central_dir['disk'].'\''); $p_central_dir['disk_start'] = $v_data['disk_start']; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Start disk number : \''.$p_central_dir['disk_start'].'\''); // TBC //for(reset($p_central_dir); $key = key($p_central_dir); next($p_central_dir)) { - // //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "central_dir[$key] = ".$p_central_dir[$key]); //} // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -5138,16 +4674,13 @@ // -------------------------------------------------------------------------------- function privDeleteByRule(&$p_result_list, &$p_options) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privDeleteByRule", ""); $v_result=1; $v_list_detail = array(); // ----- Open the zip file - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode"); if (($v_result=$this->privOpenFd('rb')) != 1) { // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } @@ -5156,21 +4689,16 @@ if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) { $this->privCloseFd(); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // ----- Go to beginning of File - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in file : ".ftell($this->zip_fd)."'"); @rewind($this->zip_fd); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in file : ".ftell($this->zip_fd)."'"); // ----- Scan all the files // ----- Start at beginning of Central Dir $v_pos_entry = $v_central_dir['offset']; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position before rewind : ".ftell($this->zip_fd)."'"); @rewind($this->zip_fd); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after rewind : ".ftell($this->zip_fd)."'"); if (@fseek($this->zip_fd, $v_pos_entry)) { // ----- Close the zip file @@ -5180,17 +4708,14 @@ PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after fseek : ".ftell($this->zip_fd)."'"); // ----- Read each entry $v_header_list = array(); $j_start = 0; for ($i=0, $v_nb_extracted=0; $i<$v_central_dir['entries']; $i++) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Read next file header entry (index '$i')"); // ----- Read the file header $v_header_list[$v_nb_extracted] = array(); @@ -5199,11 +4724,9 @@ // ----- Close the zip file $this->privCloseFd(); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename (index '$i') : '".$v_header_list[$v_nb_extracted]['stored_filename']."'"); // ----- Store the index $v_header_list[$v_nb_extracted]['index'] = $i; @@ -5214,54 +4737,47 @@ // ----- Look for extract by name rule if ( (isset($p_options[PCLZIP_OPT_BY_NAME])) && ($p_options[PCLZIP_OPT_BY_NAME] != 0)) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByName'"); // ----- Look if the filename is in the list for ($j=0; ($j strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) && (substr($v_header_list[$v_nb_extracted]['stored_filename'], 0, strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) == $p_options[PCLZIP_OPT_BY_NAME][$j])) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The directory is in the file path"); $v_found = true; } elseif ( (($v_header_list[$v_nb_extracted]['external']&0x00000010)==0x00000010) /* Indicates a folder */ && ($v_header_list[$v_nb_extracted]['stored_filename'].'/' == $p_options[PCLZIP_OPT_BY_NAME][$j])) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The entry is the searched directory"); $v_found = true; } } // ----- Look for a filename elseif ($v_header_list[$v_nb_extracted]['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The file is the right one."); $v_found = true; } } } // ----- Look for extract by ereg rule + // ereg() is deprecated with PHP 5.3 + /* else if ( (isset($p_options[PCLZIP_OPT_BY_EREG])) && ($p_options[PCLZIP_OPT_BY_EREG] != "")) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract by ereg '".$p_options[PCLZIP_OPT_BY_EREG]."'"); if (ereg($p_options[PCLZIP_OPT_BY_EREG], $v_header_list[$v_nb_extracted]['stored_filename'])) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename match the regular expression"); $v_found = true; } } + */ // ----- Look for extract by preg rule else if ( (isset($p_options[PCLZIP_OPT_BY_PREG])) && ($p_options[PCLZIP_OPT_BY_PREG] != "")) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByEreg'"); if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header_list[$v_nb_extracted]['stored_filename'])) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename match the regular expression"); $v_found = true; } } @@ -5269,41 +4785,33 @@ // ----- Look for extract by index rule else if ( (isset($p_options[PCLZIP_OPT_BY_INDEX])) && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByIndex'"); // ----- Look if the index is in the list for ($j=$j_start; ($j=$p_options[PCLZIP_OPT_BY_INDEX][$j]['start']) && ($i<=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end'])) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Found as part of an index range"); $v_found = true; } if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Do not look this index range for next loop"); $j_start = $j+1; } if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Index range is greater than index, stop loop"); break; } } } else { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "No argument mean remove all file"); $v_found = true; } // ----- Look for deletion if ($v_found) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File '".$v_header_list[$v_nb_extracted]['stored_filename']."', index '$i' need to be deleted"); unset($v_header_list[$v_nb_extracted]); } else { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File '".$v_header_list[$v_nb_extracted]['stored_filename']."', index '$i' will not be deleted"); $v_nb_extracted++; } } @@ -5318,24 +4826,18 @@ $v_temp_zip = new PclZip($v_zip_temp_name); // ----- Open the temporary zip file in write mode - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary write mode"); if (($v_result = $v_temp_zip->privOpenFd('wb')) != 1) { $this->privCloseFd(); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // ----- Look which file need to be kept for ($i=0; $izip_fd)."'"); @rewind($this->zip_fd); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after rewind : ".ftell($this->zip_fd)."'"); if (@fseek($this->zip_fd, $v_header_list[$i]['offset'])) { // ----- Close the zip file $this->privCloseFd(); @@ -5346,10 +4848,8 @@ PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after fseek : ".ftell($this->zip_fd)."'"); // ----- Read the file header $v_local_header = array(); @@ -5360,10 +4860,9 @@ @unlink($v_zip_temp_name); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } - + // ----- Check that local file header is same as central file header if ($this->privCheckFileHeaders($v_local_header, $v_header_list[$i]) != 1) { @@ -5379,10 +4878,8 @@ @unlink($v_zip_temp_name); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Offset for this file is '".$v_header_list[$i]['offset']."'"); // ----- Read/write the data block if (($v_result = PclZipUtilCopyBlock($this->zip_fd, $v_temp_zip->zip_fd, $v_header_list[$i]['compressed_size'])) != 1) { @@ -5392,27 +4889,22 @@ @unlink($v_zip_temp_name); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } } // ----- Store the offset of the central dir $v_offset = @ftell($v_temp_zip->zip_fd); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "New offset of central dir : $v_offset"); // ----- Re-Create the Central Dir files header - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Creates the new central directory"); for ($i=0; $iprivWriteCentralFileHeader($v_header_list[$i])) != 1) { $v_temp_zip->privCloseFd(); $this->privCloseFd(); @unlink($v_zip_temp_name); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } @@ -5420,7 +4912,6 @@ $v_temp_zip->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]); } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Creates the central directory footer"); // ----- Zip file comment $v_comment = ''; @@ -5440,7 +4931,6 @@ @unlink($v_zip_temp_name); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } @@ -5456,22 +4946,20 @@ // TBC : I should test the result ... //@rename($v_zip_temp_name, $this->zipname); PclZipUtilRename($v_zip_temp_name, $this->zipname); - + // ----- Destroy the temporary archive unset($v_temp_zip); } - + // ----- Remove every files : reset the file else if ($v_central_dir['entries'] != 0) { $this->privCloseFd(); if (($v_result = $this->privOpenFd('wb')) != 1) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } if (($v_result = $this->privWriteCentralHeader(0, 0, 0, '')) != 1) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } @@ -5479,7 +4967,6 @@ } // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -5499,25 +4986,21 @@ { $v_result = 1; - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privDirCheck", "entry='$p_dir', is_dir='".($p_is_dir?"true":"false")."'"); // ----- Remove the final '/' if (($p_is_dir) && (substr($p_dir, -1)=='/')) { $p_dir = substr($p_dir, 0, strlen($p_dir)-1); } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Looking for entry '$p_dir'"); // ----- Check the directory availability if ((is_dir($p_dir)) || ($p_dir == "")) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, "'$p_dir' is a directory"); return 1; } // ----- Extract parent directory $p_parent_dir = dirname($p_dir); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Parent directory is '$p_parent_dir'"); // ----- Just a check if ($p_parent_dir != $p_dir) @@ -5527,26 +5010,22 @@ { if (($v_result = $this->privDirCheck($p_parent_dir)) != 1) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } } } // ----- Create the directory - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Create directory '$p_dir'"); if (!@mkdir($p_dir, 0777)) { // ----- Error log PclZip::privErrorLog(PCLZIP_ERR_DIR_CREATE_FAIL, "Unable to create directory '$p_dir'"); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result, "Directory '$p_dir' created"); return $v_result; } // -------------------------------------------------------------------------------- @@ -5560,41 +5039,34 @@ // -------------------------------------------------------------------------------- function privMerge(&$p_archive_to_add) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privMerge", "archive='".$p_archive_to_add->zipname."'"); $v_result=1; // ----- Look if the archive_to_add exists if (!is_file($p_archive_to_add->zipname)) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Archive to add does not exist. End of merge."); // ----- Nothing to merge, so merge is a success $v_result = 1; // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // ----- Look if the archive exists if (!is_file($this->zipname)) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Archive does not exist, duplicate the archive_to_add."); // ----- Do a duplicate $v_result = $this->privDuplicate($p_archive_to_add->zipname); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // ----- Open the zip file - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode"); if (($v_result=$this->privOpenFd('rb')) != 1) { // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } @@ -5603,23 +5075,18 @@ if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) { $this->privCloseFd(); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // ----- Go to beginning of File - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in zip : ".ftell($this->zip_fd)."'"); @rewind($this->zip_fd); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in zip : ".ftell($this->zip_fd)."'"); // ----- Open the archive_to_add file - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open archive_to_add in binary read mode"); if (($v_result=$p_archive_to_add->privOpenFd('rb')) != 1) { $this->privCloseFd(); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } @@ -5630,20 +5097,16 @@ $this->privCloseFd(); $p_archive_to_add->privCloseFd(); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // ----- Go to beginning of File - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in archive_to_add : ".ftell($p_archive_to_add->zip_fd)."'"); @rewind($p_archive_to_add->zip_fd); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in archive_to_add : ".ftell($p_archive_to_add->zip_fd)."'"); // ----- Creates a temporay file $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp'; // ----- Open the temporary file in write mode - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode"); if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0) { $this->privCloseFd(); @@ -5652,7 +5115,6 @@ PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode'); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } @@ -5662,7 +5124,6 @@ while ($v_size != 0) { $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); $v_buffer = fread($this->zip_fd, $v_read_size); @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); $v_size -= $v_read_size; @@ -5673,7 +5134,6 @@ while ($v_size != 0) { $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); $v_buffer = fread($p_archive_to_add->zip_fd, $v_read_size); @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); $v_size -= $v_read_size; @@ -5681,14 +5141,12 @@ // ----- Store the offset of the central dir $v_offset = @ftell($v_zip_temp_fd); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "New offset of central dir : $v_offset"); // ----- Copy the block of file headers from the old archive $v_size = $v_central_dir['size']; while ($v_size != 0) { $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); $v_buffer = @fread($this->zip_fd, $v_read_size); @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); $v_size -= $v_read_size; @@ -5699,7 +5157,6 @@ while ($v_size != 0) { $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); $v_buffer = @fread($p_archive_to_add->zip_fd, $v_read_size); @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); $v_size -= $v_read_size; @@ -5730,7 +5187,6 @@ unset($v_header_list); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } @@ -5756,7 +5212,6 @@ PclZipUtilRename($v_zip_temp_name, $this->zipname); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -5769,33 +5224,27 @@ // -------------------------------------------------------------------------------- function privDuplicate($p_archive_filename) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privDuplicate", "archive_filename='$p_archive_filename'"); $v_result=1; // ----- Look if the $p_archive_filename exists if (!is_file($p_archive_filename)) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Archive to duplicate does not exist. End of duplicate."); // ----- Nothing to duplicate, so duplicate is a success. $v_result = 1; // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // ----- Open the zip file - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode"); if (($v_result=$this->privOpenFd('wb')) != 1) { // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // ----- Open the temporary file in write mode - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode"); if (($v_zip_temp_fd = @fopen($p_archive_filename, 'rb')) == 0) { $this->privCloseFd(); @@ -5803,7 +5252,6 @@ PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive file \''.$p_archive_filename.'\' in binary write mode'); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); return PclZip::errorCode(); } @@ -5813,7 +5261,6 @@ while ($v_size != 0) { $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Read $v_read_size bytes"); $v_buffer = fread($v_zip_temp_fd, $v_read_size); @fwrite($this->zip_fd, $v_buffer, $v_read_size); $v_size -= $v_read_size; @@ -5826,7 +5273,6 @@ @fclose($v_zip_temp_fd); // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -5873,36 +5319,28 @@ // -------------------------------------------------------------------------------- function privDisableMagicQuotes() { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privDisableMagicQuotes', ""); $v_result=1; // ----- Look if function exists if ( (!function_exists("get_magic_quotes_runtime")) || (!function_exists("set_magic_quotes_runtime"))) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Functions *et_magic_quotes_runtime are not supported"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // ----- Look if already done if ($this->magic_quotes_status != -1) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "magic_quote already disabled"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // ----- Get and memorize the magic_quote value $this->magic_quotes_status = @get_magic_quotes_runtime(); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Current magic_quotes_runtime status is '".($this->magic_quotes_status==0?'disable':'enable')."'"); // ----- Disable magic_quotes if ($this->magic_quotes_status == 1) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Disable magic_quotes"); @set_magic_quotes_runtime(0); } // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -5915,32 +5353,25 @@ // -------------------------------------------------------------------------------- function privSwapBackMagicQuotes() { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privSwapBackMagicQuotes', ""); $v_result=1; // ----- Look if function exists if ( (!function_exists("get_magic_quotes_runtime")) || (!function_exists("set_magic_quotes_runtime"))) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Functions *et_magic_quotes_runtime are not supported"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // ----- Look if something to do if ($this->magic_quotes_status != -1) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "magic_quote not modified"); - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // ----- Swap back magic_quotes if ($this->magic_quotes_status == 1) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Enable back magic_quotes"); @set_magic_quotes_runtime($this->magic_quotes_status); } // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -5957,7 +5388,6 @@ // -------------------------------------------------------------------------------- function PclZipUtilPathReduction($p_dir) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilPathReduction", "dir='$p_dir'"); $v_result = ""; // ----- Look for not empty path @@ -5984,7 +5414,6 @@ // ----- It is an invalid path, so the path is not modified // TBC $v_result = $p_dir; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Invalid path is unchanged"); $v_skip = 0; } } @@ -6008,7 +5437,7 @@ } } } - + // ----- Look for skip if ($v_skip > 0) { while ($v_skip > 0) { @@ -6019,7 +5448,6 @@ } // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -6041,19 +5469,16 @@ // -------------------------------------------------------------------------------- function PclZipUtilPathInclusion($p_dir, $p_path) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilPathInclusion", "dir='$p_dir', path='$p_path'"); $v_result = 1; - + // ----- Look for path beginning by ./ if ( ($p_dir == '.') || ((strlen($p_dir) >=2) && (substr($p_dir, 0, 2) == './'))) { $p_dir = PclZipUtilTranslateWinPath(getcwd(), FALSE).'/'.substr($p_dir, 1); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Replacing ./ by full path in p_dir '".$p_dir."'"); } if ( ($p_path == '.') || ((strlen($p_path) >=2) && (substr($p_path, 0, 2) == './'))) { $p_path = PclZipUtilTranslateWinPath(getcwd(), FALSE).'/'.substr($p_path, 1); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Replacing ./ by full path in p_path '".$p_path."'"); } // ----- Explode dir and path by directory separator @@ -6066,7 +5491,6 @@ $i = 0; $j = 0; while (($i < $v_list_dir_size) && ($j < $v_list_path_size) && ($v_result)) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Working on dir($i)='".$v_list_dir[$i]."' and path($j)='".$v_list_path[$j]."'"); // ----- Look for empty dir (path reduction) if ($v_list_dir[$i] == '') { @@ -6080,7 +5504,6 @@ // ----- Compare the items if (($v_list_dir[$i] != $v_list_path[$j]) && ($v_list_dir[$i] != '') && ( $v_list_path[$j] != '')) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Items ($i,$j) are different"); $v_result = 0; } @@ -6091,11 +5514,9 @@ // ----- Look if everything seems to be the same if ($v_result) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Look for tie break"); // ----- Skip all the empty items while (($j < $v_list_path_size) && ($v_list_path[$j] == '')) $j++; while (($i < $v_list_dir_size) && ($v_list_dir[$i] == '')) $i++; - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Looking on dir($i)='".($i < $v_list_dir_size?$v_list_dir[$i]:'')."' and path($j)='".($j < $v_list_path_size?$v_list_path[$j]:'')."'"); if (($i >= $v_list_dir_size) && ($j >= $v_list_path_size)) { // ----- There are exactly the same @@ -6108,7 +5529,6 @@ } // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -6126,30 +5546,23 @@ // -------------------------------------------------------------------------------- function PclZipUtilCopyBlock($p_src, $p_dest, $p_size, $p_mode=0) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilCopyBlock", "size=$p_size, mode=$p_mode"); $v_result = 1; if ($p_mode==0) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Src offset before read :".(@ftell($p_src))); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Dest offset before write :".(@ftell($p_dest))); while ($p_size != 0) { $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); $v_buffer = @fread($p_src, $v_read_size); @fwrite($p_dest, $v_buffer, $v_read_size); $p_size -= $v_read_size; } - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Src offset after read :".(@ftell($p_src))); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Dest offset after write :".(@ftell($p_dest))); } else if ($p_mode==1) { while ($p_size != 0) { $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); $v_buffer = @gzread($p_src, $v_read_size); @fwrite($p_dest, $v_buffer, $v_read_size); $p_size -= $v_read_size; @@ -6160,7 +5573,6 @@ while ($p_size != 0) { $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); $v_buffer = @fread($p_src, $v_read_size); @gzwrite($p_dest, $v_buffer, $v_read_size); $p_size -= $v_read_size; @@ -6171,7 +5583,6 @@ while ($p_size != 0) { $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE); - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); $v_buffer = @gzread($p_src, $v_read_size); @gzwrite($p_dest, $v_buffer, $v_read_size); $p_size -= $v_read_size; @@ -6179,7 +5590,6 @@ } // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -6198,26 +5608,21 @@ // -------------------------------------------------------------------------------- function PclZipUtilRename($p_src, $p_dest) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilRename", "source=$p_src, destination=$p_dest"); $v_result = 1; // ----- Try to rename the files if (!@rename($p_src, $p_dest)) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Fail to rename file, try copy+unlink"); // ----- Try to copy & unlink the src if (!@copy($p_src, $p_dest)) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Fail to copy file"); $v_result = 0; } else if (!@unlink($p_src)) { - //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Fail to unlink old filename"); $v_result = 0; } } // ----- Return - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- @@ -6233,8 +5638,7 @@ // -------------------------------------------------------------------------------- function PclZipUtilOptionText($p_option) { - //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilOptionText", "option='".$p_option."'"); - + $v_list = get_defined_constants(); for (reset($v_list); $v_key = key($v_list); next($v_list)) { $v_prefix = substr($v_key, 0, 10); @@ -6242,14 +5646,12 @@ || ($v_prefix == 'PCLZIP_CB_') || ($v_prefix == 'PCLZIP_ATT')) && ($v_list[$v_key] == $p_option)) { - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_key); return $v_key; } } - + $v_result = 'Unknown'; - //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); return $v_result; } // -------------------------------------------------------------------------------- diff --git a/wp-admin/includes/class-wp-filesystem-base.php b/wp-admin/includes/class-wp-filesystem-base.php index 2569a867..6b0d0981 100644 --- a/wp-admin/includes/class-wp-filesystem-base.php +++ b/wp-admin/includes/class-wp-filesystem-base.php @@ -210,7 +210,7 @@ class WP_Filesystem_Base { return trailingslashit($base . $last_path); } if ( $loop ) - return false;//Prevent tihs function looping again. + return false; //Prevent tihs function looping again. //As an extra last resort, Change back to / if the folder wasnt found. This comes into effect when the CWD is /home/user/ but WP is at /var/www/.... mainly dedicated setups. return $this->search_for_folder($folder, '/', true); @@ -242,7 +242,7 @@ class WP_Filesystem_Base { $info = 'd'; elseif (($perms & 0x2000) == 0x2000) // Character special $info = 'c'; - elseif (($perms & 0x1000) == 0x1000)// FIFO pipe + elseif (($perms & 0x1000) == 0x1000) // FIFO pipe $info = 'p'; else // Unknown $info = 'u'; diff --git a/wp-admin/includes/class-wp-filesystem-direct.php b/wp-admin/includes/class-wp-filesystem-direct.php index 03a79773..88e4a902 100644 --- a/wp-admin/includes/class-wp-filesystem-direct.php +++ b/wp-admin/includes/class-wp-filesystem-direct.php @@ -15,38 +15,84 @@ * @uses WP_Filesystem_Base Extends class */ class WP_Filesystem_Direct extends WP_Filesystem_Base { - var $permission = null; var $errors = null; + /** + * constructor + * + * @param $arg mixed ingored argument + */ function WP_Filesystem_Direct($arg) { $this->method = 'direct'; $this->errors = new WP_Error(); } + /** + * connect filesystem. + * + * @return bool Returns true on success or false on failure (always true for WP_Filesystem_Direct). + */ function connect() { return true; } - function setDefaultPermissions($perm) { - $this->permission = $perm; - } + /** + * Reads entire file into a string + * + * @param $file string Name of the file to read. + * @return string|bool The function returns the read data or false on failure. + */ function get_contents($file) { return @file_get_contents($file); } + /** + * Reads entire file into an array + * + * @param $file string Path to the file. + * @return array|bool the file contents in an array or false on failure. + */ function get_contents_array($file) { return @file($file); } + /** + * Write a string to a file + * + * @param $file string Path to the file where to write the data. + * @param $contents string The data to write. + * @param $mode int (optional) The file permissions as octal number, usually 0644. + * @param $type string (optional) Specifies additional type of access you require to the file. + * @return bool False upon failure. + */ function put_contents($file, $contents, $mode = false, $type = '') { if ( ! ($fp = @fopen($file, 'w' . $type)) ) return false; @fwrite($fp, $contents); @fclose($fp); - $this->chmod($file,$mode); + $this->chmod($file, $mode); return true; } + /** + * Gets the current working directory + * + * @return string|bool the current working directory on success, or false on failure. + */ function cwd() { return @getcwd(); } + /** + * Change directory + * + * @param $dir string The new current directory. + * @return bool Returns true on success or false on failure. + */ function chdir($dir) { return @chdir($dir); } + /** + * Changes file group + * + * @param $file string Path to the file. + * @param $group mixed A group name or number. + * @param $recursive bool (optional) If set True changes file group recursivly. Defaults to False. + * @return bool Returns true on success or false on failure. + */ function chgrp($file, $group, $recursive = false) { if ( ! $this->exists($file) ) return false; @@ -62,19 +108,25 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base { return true; } + /** + * Changes filesystem permissions + * + * @param $file string Path to the file. + * @param $mode int (optional) The permissions as octal number, usually 0644 for files, 0755 for dirs. + * @param $recursive bool (optional) If set True changes file group recursivly. Defaults to False. + * @return bool Returns true on success or false on failure. + */ function chmod($file, $mode = false, $recursive = false) { if ( ! $this->exists($file) ) return false; if ( ! $mode ) { - if ( $this->permission ) - $mode = $this->permission; - elseif ( $this->is_file($file) ) + if ( $this->is_file($file) ) $mode = FS_CHMOD_FILE; elseif ( $this->is_dir($file) ) $mode = FS_CHMOD_DIR; else - return false; + return false; } if ( ! $recursive ) @@ -89,6 +141,14 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base { return true; } + /** + * Changes file owner + * + * @param $file string Path to the file. + * @param $owner mixed A user name or number. + * @param $recursive bool (optional) If set True changes file owner recursivly. Defaults to False. + * @return bool Returns true on success or false on failure. + */ function chown($file, $owner, $recursive = false) { if ( ! $this->exists($file) ) return false; @@ -98,11 +158,17 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base { return @chown($file, $owner); //Is a directory, and we want recursive $filelist = $this->dirlist($file); - foreach ($filelist as $filename){ + foreach ($filelist as $filename) { $this->chown($file . '/' . $filename, $owner, $recursive); } return true; } + /** + * Gets file owner + * + * @param $file string Path to the file. + * @return string Username of the user. + */ function owner($file) { $owneruid = @fileowner($file); if ( ! $owneruid ) @@ -112,6 +178,14 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base { $ownerarray = posix_getpwuid($owneruid); return $ownerarray['name']; } + /** + * Gets file permissions + * + * FIXME does not handle errors in fileperms() + * + * @param $file string Path to the file. + * @return string Mode of the file (last 4 digits). + */ function getchmod($file) { return substr(decoct(@fileperms($file)),3); } @@ -133,7 +207,7 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base { function move($source, $destination, $overwrite = false) { //Possible to use rename()? - if ( $this->copy($source, $destination, $overwrite) && $this->exists($destination) ){ + if ( $this->copy($source, $destination, $overwrite) && $this->exists($destination) ) { $this->delete($source); return true; } else { @@ -197,7 +271,7 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base { return @filesize($file); } - function touch($file, $time = 0, $atime = 0){ + function touch($file, $time = 0, $atime = 0) { if ($time == 0) $time = time(); if ($atime == 0) @@ -205,7 +279,10 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base { return @touch($file, $time, $atime); } - function mkdir($path, $chmod = false, $chown = false, $chgrp = false){ + function mkdir($path, $chmod = false, $chown = false, $chgrp = false) { + if ( ! $chmod ) + $chmod = FS_CHMOD_DIR; + if ( ! @mkdir($path) ) return false; $this->chmod($path, $chmod); @@ -230,29 +307,34 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base { return @rmdir($path); } - function dirlist($path, $incdot = false, $recursive = false) { + function dirlist($path, $include_hidden = true, $recursive = false) { if ( $this->is_file($path) ) { - $limitFile = basename($path); + $limit_file = basename($path); $path = dirname($path); } else { - $limitFile = false; + $limit_file = false; } + if ( ! $this->is_dir($path) ) return false; - $ret = array(); $dir = @dir($path); if ( ! $dir ) return false; + + $ret = array(); + while (false !== ($entry = $dir->read()) ) { $struc = array(); $struc['name'] = $entry; if ( '.' == $struc['name'] || '..' == $struc['name'] ) - continue; //Do not care about these folders. - if ( '.' == $struc['name'][0] && !$incdot) continue; - if ( $limitFile && $struc['name'] != $limitFile) + + if ( ! $include_hidden && '.' == $struc['name'][0] ) + continue; + + if ( $limit_file && $struc['name'] != $limit_file) continue; $struc['perms'] = $this->gethchmod($path.'/'.$entry); @@ -268,7 +350,7 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base { if ( 'd' == $struc['type'] ) { if ( $recursive ) - $struc['files'] = $this->dirlist($path . '/' . $struc['name'], $incdot, $recursive); + $struc['files'] = $this->dirlist($path . '/' . $struc['name'], $include_hidden, $recursive); else $struc['files'] = array(); } diff --git a/wp-admin/includes/class-wp-filesystem-ftpext.php b/wp-admin/includes/class-wp-filesystem-ftpext.php index 24611c92..b8d5c9ae 100644 --- a/wp-admin/includes/class-wp-filesystem-ftpext.php +++ b/wp-admin/includes/class-wp-filesystem-ftpext.php @@ -16,12 +16,9 @@ */ class WP_Filesystem_FTPext extends WP_Filesystem_Base { var $link; - var $timeout = 5; var $errors = null; var $options = array(); - var $permission = null; - function WP_Filesystem_FTPext($opt='') { $this->method = 'ftpext'; $this->errors = new WP_Error(); @@ -33,6 +30,11 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { } // Set defaults: + //This Class uses the timeout on a per-connection basis, Others use it on a per-action basis. + + if ( ! defined('FS_TIMEOUT') ) + define('FS_TIMEOUT', 240); + if ( empty($opt['port']) ) $this->options['port'] = 21; else @@ -64,9 +66,9 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { function connect() { if ( isset($this->options['ssl']) && $this->options['ssl'] && function_exists('ftp_ssl_connect') ) - $this->link = @ftp_ssl_connect($this->options['hostname'], $this->options['port'], $this->timeout); + $this->link = @ftp_ssl_connect($this->options['hostname'], $this->options['port'], FS_CONNECT_TIMEOUT); else - $this->link = @ftp_connect($this->options['hostname'], $this->options['port'], $this->timeout); + $this->link = @ftp_connect($this->options['hostname'], $this->options['port'], FS_CONNECT_TIMEOUT); if ( ! $this->link ) { $this->errors->add('connect', sprintf(__('Failed to connect to FTP Server %1$s:%2$s'), $this->options['hostname'], $this->options['port'])); @@ -80,23 +82,21 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { //Set the Connection to use Passive FTP @ftp_pasv( $this->link, true ); + if ( @ftp_get_option($this->link, FTP_TIMEOUT_SEC) < FS_TIMEOUT ) + @ftp_set_option($this->link, FTP_TIMEOUT_SEC, FS_TIMEOUT); return true; } - function setDefaultPermissions($perm) { - $this->permission = $perm; - } - - function get_contents($file, $type = '', $resumepos = 0 ){ - if( empty($type) ) + function get_contents($file, $type = '', $resumepos = 0 ) { + if ( empty($type) ) $type = FTP_BINARY; $temp = tmpfile(); if ( ! $temp ) return false; - if( ! @ftp_fget($this->link, $temp, $file, $type, $resumepos) ) + if ( ! @ftp_fget($this->link, $temp, $file, $type, $resumepos) ) return false; fseek($temp, 0); //Skip back to the start of the file being written to @@ -112,7 +112,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { return explode("\n", $this->get_contents($file)); } function put_contents($file, $contents, $type = '' ) { - if( empty($type) ) + if ( empty($type) ) $type = $this->is_binary($contents) ? FTP_BINARY : FTP_ASCII; $temp = tmpfile(); @@ -129,23 +129,29 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { } function cwd() { $cwd = @ftp_pwd($this->link); - if( $cwd ) + if ( $cwd ) $cwd = trailingslashit($cwd); return $cwd; } function chdir($dir) { - return @ftp_chdir($dir); + return @ftp_chdir($this->link, $dir); } function chgrp($file, $group, $recursive = false ) { return false; } function chmod($file, $mode = false, $recursive = false) { - if( ! $mode ) - $mode = $this->permission; - if( ! $mode ) - return false; if ( ! $this->exists($file) && ! $this->is_dir($file) ) return false; + + if ( ! $mode ) { + if ( $this->is_file($file) ) + $mode = FS_CHMOD_FILE; + elseif ( $this->is_dir($file) ) + $mode = FS_CHMOD_DIR; + else + return false; + } + if ( ! $recursive || ! $this->is_dir($file) ) { if ( ! function_exists('ftp_chmod') ) return @ftp_site($this->link, sprintf('CHMOD %o %s', $mode, $file)); @@ -153,7 +159,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { } //Is a directory, and we want recursive $filelist = $this->dirlist($file); - foreach($filelist as $filename){ + foreach ( $filelist as $filename ) { $this->chmod($file . '/' . $filename, $mode, $recursive); } return true; @@ -174,10 +180,10 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { return $dir[$file]['group']; } function copy($source, $destination, $overwrite = false ) { - if( ! $overwrite && $this->exists($destination) ) + if ( ! $overwrite && $this->exists($destination) ) return false; $content = $this->get_contents($source); - if( false === $content) + if ( false === $content) return false; return $this->put_contents($destination, $content); } @@ -201,7 +207,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { } function exists($file) { - $list = @ftp_rawlist($this->link, $file, false); + $list = @ftp_nlist($this->link, $file); return !empty($list); //empty list = no file, so invert. } function is_file($file) { @@ -210,7 +216,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { function is_dir($path) { $cwd = $this->cwd(); $result = @ftp_chdir($this->link, trailingslashit($path) ); - if( $result && $path == $this->cwd() || $this->cwd() != $cwd ) { + if ( $result && $path == $this->cwd() || $this->cwd() != $cwd ) { @ftp_chdir($this->link, $cwd); return true; } @@ -237,13 +243,14 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { return false; } function mkdir($path, $chmod = false, $chown = false, $chgrp = false) { - if( !ftp_mkdir($this->link, $path) ) + if ( !ftp_mkdir($this->link, $path) ) return false; - if( $chmod ) - $this->chmod($path, $chmod); - if( $chown ) + if ( ! $chmod ) + $chmod = FS_CHMOD_DIR; + $this->chmod($path, $chmod); + if ( $chown ) $this->chown($path, $chown); - if( $chgrp ) + if ( $chgrp ) $this->chgrp($path, $chgrp); return true; } @@ -256,9 +263,9 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { if ( is_null($is_windows) ) $is_windows = strpos( strtolower(ftp_systype($this->link)), 'win') !== false; - if ($is_windows && preg_match("/([0-9]{2})-([0-9]{2})-([0-9]{2}) +([0-9]{2}):([0-9]{2})(AM|PM) +([0-9]+|) +(.+)/", $line, $lucifer)) { + if ( $is_windows && preg_match("/([0-9]{2})-([0-9]{2})-([0-9]{2}) +([0-9]{2}):([0-9]{2})(AM|PM) +([0-9]+|) +(.+)/", $line, $lucifer) ) { $b = array(); - if ($lucifer[3]<70) { $lucifer[3] +=2000; } else { $lucifer[3]+=1900; } // 4digit year fix + if ( $lucifer[3] < 70 ) { $lucifer[3] +=2000; } else { $lucifer[3] += 1900; } // 4digit year fix $b['isdir'] = ($lucifer[7]==""); if ( $b['isdir'] ) $b['type'] = 'd'; @@ -316,12 +323,12 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { return $b; } - function dirlist($path = '.', $incdot = false, $recursive = false) { - if( $this->is_file($path) ) { - $limitFile = basename($path); + function dirlist($path = '.', $include_hidden = true, $recursive = false) { + if ( $this->is_file($path) ) { + $limit_file = basename($path); $path = dirname($path) . '/'; } else { - $limitFile = false; + $limit_file = false; } $list = @ftp_rawlist($this->link, '-a ' . $path, false); @@ -335,7 +342,13 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { if ( empty($entry) ) continue; - if ( '.' == $entry["name"] || '..' == $entry["name"] ) + if ( '.' == $entry['name'] || '..' == $entry['name'] ) + continue; + + if ( ! $include_hidden && '.' == $entry['name'][0] ) + continue; + + if ( $limit_file && $entry['name'] != $limit_file) continue; $dirlist[ $entry['name'] ] = $entry; @@ -343,34 +356,23 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { if ( ! $dirlist ) return false; - if ( empty($dirlist) ) - return array(); $ret = array(); - foreach ( $dirlist as $struc ) { - + foreach ( (array)$dirlist as $struc ) { if ( 'd' == $struc['type'] ) { - $struc['files'] = array(); - - if ( $incdot ){ - //We're including the doted starts - if( '.' != $struc['name'] && '..' != $struc['name'] ){ //Ok, It isnt a special folder - if ($recursive) - $struc['files'] = $this->dirlist($path . '/' . $struc['name'], $incdot, $recursive); - } - } else { //No dots - if ($recursive) - $struc['files'] = $this->dirlist($path . '/' . $struc['name'], $incdot, $recursive); - } + if ( $recursive ) + $struc['files'] = $this->dirlist($path . '/' . $struc['name'], $include_hidden, $recursive); + else + $struc['files'] = array(); } - //File - $ret[$struc['name']] = $struc; + + $ret[ $struc['name'] ] = $struc; } return $ret; } - function __destruct(){ - if( $this->link ) + function __destruct() { + if ( $this->link ) ftp_close($this->link); } } diff --git a/wp-admin/includes/class-wp-filesystem-ftpsockets.php b/wp-admin/includes/class-wp-filesystem-ftpsockets.php index 759eaa82..a72abaa7 100644 --- a/wp-admin/includes/class-wp-filesystem-ftpsockets.php +++ b/wp-admin/includes/class-wp-filesystem-ftpsockets.php @@ -16,18 +16,15 @@ */ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { var $ftp = false; - var $timeout = 5; var $errors = null; var $options = array(); - var $permission = null; - function WP_Filesystem_ftpsockets($opt = '') { $this->method = 'ftpsockets'; $this->errors = new WP_Error(); //Check if possible to use ftp functions. - if( ! @include_once ABSPATH . 'wp-admin/includes/class-ftp.php' ) + if ( ! @include_once ABSPATH . 'wp-admin/includes/class-ftp.php' ) return false; $this->ftp = new ftp(); @@ -61,12 +58,13 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { if ( ! $this->ftp ) return false; - //$this->ftp->Verbose = true; + $this->ftp->setTimeout(FS_CONNECT_TIMEOUT); if ( ! $this->ftp->SetServer($this->options['hostname'], $this->options['port']) ) { $this->errors->add('connect', sprintf(__('Failed to connect to FTP Server %1$s:%2$s'), $this->options['hostname'], $this->options['port'])); return false; } + if ( ! $this->ftp->connect() ) { $this->errors->add('connect', sprintf(__('Failed to connect to FTP Server %1$s:%2$s'), $this->options['hostname'], $this->options['port'])); return false; @@ -79,18 +77,15 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { $this->ftp->SetType(FTP_AUTOASCII); $this->ftp->Passive(true); + $this->ftp->setTimeout(FS_TIMEOUT); return true; } - function setDefaultPermissions($perm) { - $this->permission = $perm; - } - function get_contents($file, $type = '', $resumepos = 0) { - if( ! $this->exists($file) ) + if ( ! $this->exists($file) ) return false; - if( empty($type) ) + if ( empty($type) ) $type = FTP_AUTOASCII; $this->ftp->SetType($type); @@ -121,13 +116,13 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { } function put_contents($file, $contents, $type = '' ) { - if( empty($type) ) + if ( empty($type) ) $type = $this->is_binary($contents) ? FTP_BINARY : FTP_ASCII; $this->ftp->SetType($type); $temp = wp_tempnam( $file ); - if ( ! $temphandle = fopen($temp, 'w+') ){ + if ( ! $temphandle = fopen($temp, 'w+') ) { unlink($temp); return false; } @@ -144,7 +139,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { function cwd() { $cwd = $this->ftp->pwd(); - if( $cwd ) + if ( $cwd ) $cwd = trailingslashit($cwd); return $cwd; } @@ -158,20 +153,25 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { } function chmod($file, $mode = false, $recursive = false ) { - if( ! $mode ) - $mode = $this->permission; - if( ! $mode ) - return false; - //if( ! $this->exists($file) ) - // return false; - if( ! $recursive || ! $this->is_dir($file) ) { - return $this->ftp->chmod($file,$mode); + + if ( ! $mode ) { + if ( $this->is_file($file) ) + $mode = FS_CHMOD_FILE; + elseif ( $this->is_dir($file) ) + $mode = FS_CHMOD_DIR; + else + return false; + } + + if ( ! $recursive || ! $this->is_dir($file) ) { + return $this->ftp->chmod($file, $mode); } + //Is a directory, and we want recursive $filelist = $this->dirlist($file); - foreach($filelist as $filename){ + foreach ( $filelist as $filename ) $this->chmod($file . '/' . $filename, $mode, $recursive); - } + return true; } @@ -195,7 +195,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { } function copy($source, $destination, $overwrite = false ) { - if( ! $overwrite && $this->exists($destination) ) + if ( ! $overwrite && $this->exists($destination) ) return false; $content = $this->get_contents($source); @@ -264,57 +264,57 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { } function mkdir($path, $chmod = false, $chown = false, $chgrp = false ) { - if( ! $this->ftp->mkdir($path) ) + if ( ! $this->ftp->mkdir($path) ) return false; - if( $chmod ) - $this->chmod($path, $chmod); - if( $chown ) + if ( ! $chmod ) + $chmod = FS_CHMOD_DIR; + $this->chmod($path, $chmod); + if ( $chown ) $this->chown($path, $chown); - if( $chgrp ) + if ( $chgrp ) $this->chgrp($path, $chgrp); return true; } function rmdir($path, $recursive = false ) { - if( ! $recursive ) + if ( ! $recursive ) return $this->ftp->rmdir($path); return $this->ftp->mdel($path); } - function dirlist($path = '.', $incdot = false, $recursive = false ) { - if( $this->is_file($path) ) { - $limitFile = basename($path); + function dirlist($path = '.', $include_hidden = true, $recursive = false ) { + if ( $this->is_file($path) ) { + $limit_file = basename($path); $path = dirname($path) . '/'; } else { - $limitFile = false; + $limit_file = false; } $list = $this->ftp->dirlist($path); - if( ! $list ) + if ( ! $list ) return false; - if( empty($list) ) - return array(); $ret = array(); foreach ( $list as $struc ) { + if ( '.' == $struc['name'] || '..' == $struc['name'] ) + continue; + + if ( ! $include_hidden && '.' == $struc['name'][0] ) + continue; + + if ( $limit_file && $struc['name'] != $limit_file ) + continue; + if ( 'd' == $struc['type'] ) { - $struc['files'] = array(); - - if ( $incdot ){ - //We're including the doted starts - if( '.' != $struc['name'] && '..' != $struc['name'] ){ //Ok, It isnt a special folder - if ($recursive) - $struc['files'] = $this->dirlist($path . '/' . $struc['name'], $incdot, $recursive); - } - } else { //No dots - if ($recursive) - $struc['files'] = $this->dirlist($path . '/' . $struc['name'], $incdot, $recursive); - } + if ( $recursive ) + $struc['files'] = $this->dirlist($path . '/' . $struc['name'], $include_hidden, $recursive); + else + $struc['files'] = array(); } - //File - $ret[$struc['name']] = $struc; + + $ret[ $struc['name'] ] = $struc; } return $ret; } diff --git a/wp-admin/includes/class-wp-filesystem-ssh2.php b/wp-admin/includes/class-wp-filesystem-ssh2.php index 89763df8..0337658c 100644 --- a/wp-admin/includes/class-wp-filesystem-ssh2.php +++ b/wp-admin/includes/class-wp-filesystem-ssh2.php @@ -45,19 +45,9 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base { var $link = false; var $sftp_link = false; var $keys = false; - /* - * This is the timeout value for ssh results. - * Slower servers might need this incressed, but this number otherwise should not change. - * - * @parm $timeout int - * - */ - var $timeout = 15; var $errors = array(); var $options = array(); - var $permission = 0644; - function WP_Filesystem_SSH2($opt='') { $this->method = 'ssh2'; $this->errors = new WP_Error(); @@ -148,7 +138,7 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base { $this->errors->add('command', sprintf(__('Unable to perform command: %s'), $command)); } else { stream_set_blocking( $stream, true ); - stream_set_timeout( $stream, $this->timeout ); + stream_set_timeout( $stream, FS_TIMEOUT ); $data = stream_get_contents( $stream ); fclose( $stream ); @@ -160,12 +150,6 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base { return false; } - function setDefaultPermissions($perm) { - $this->debug("setDefaultPermissions();"); - if ( $perm ) - $this->permission = $perm; - } - function get_contents($file, $type = '', $resumepos = 0 ) { $file = ltrim($file, '/'); return file_get_contents('ssh2.sftp://' . $this->sftp_link . '/' . $file); @@ -178,7 +162,7 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base { function put_contents($file, $contents, $type = '' ) { $file = ltrim($file, '/'); - return file_put_contents('ssh2.sftp://' . $this->sftp_link . '/' . $file, $contents); + return false !== file_put_contents('ssh2.sftp://' . $this->sftp_link . '/' . $file, $contents); } function cwd() { @@ -201,12 +185,18 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base { } function chmod($file, $mode = false, $recursive = false) { - if( ! $mode ) - $mode = $this->permission; - if( ! $mode ) - return false; if ( ! $this->exists($file) ) return false; + + if ( ! $mode ) { + if ( $this->is_file($file) ) + $mode = FS_CHMOD_FILE; + elseif ( $this->is_dir($file) ) + $mode = FS_CHMOD_DIR; + else + return false; + } + if ( ! $recursive || ! $this->is_dir($file) ) return $this->run_command(sprintf('chmod %o %s', $mode, escapeshellarg($file)), true); return $this->run_command(sprintf('chmod -R %o %s', $mode, escapeshellarg($file)), true); @@ -315,9 +305,10 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base { //Not implmented. } - function mkdir($path, $chmod = null, $chown = false, $chgrp = false) { + function mkdir($path, $chmod = false, $chown = false, $chgrp = false) { $path = untrailingslashit($path); - $chmod = !empty($chmod) ? $chmod : $this->permission; + if ( ! $chmod ) + $chmod = FS_CHMOD_DIR; if ( ! ssh2_sftp_mkdir($this->sftp_link, $path, $chmod, true) ) return false; if ( $chown ) @@ -331,29 +322,34 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base { return $this->delete($path, $recursive); } - function dirlist($path, $incdot = false, $recursive = false) { + function dirlist($path, $include_hidden = true, $recursive = false) { if ( $this->is_file($path) ) { - $limitFile = basename($path); + $limit_file = basename($path); $path = dirname($path); } else { - $limitFile = false; + $limit_file = false; } + if ( ! $this->is_dir($path) ) return false; $ret = array(); $dir = @dir('ssh2.sftp://' . $this->sftp_link .'/' . ltrim($path, '/') ); + if ( ! $dir ) return false; + while (false !== ($entry = $dir->read()) ) { $struc = array(); $struc['name'] = $entry; if ( '.' == $struc['name'] || '..' == $struc['name'] ) continue; //Do not care about these folders. - if ( '.' == $struc['name'][0] && !$incdot) + + if ( ! $include_hidden && '.' == $struc['name'][0] ) continue; - if ( $limitFile && $struc['name'] != $limitFile) + + if ( $limit_file && $struc['name'] != $limit_file ) continue; $struc['perms'] = $this->gethchmod($path.'/'.$entry); @@ -369,7 +365,7 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base { if ( 'd' == $struc['type'] ) { if ( $recursive ) - $struc['files'] = $this->dirlist($path . '/' . $struc['name'], $incdot, $recursive); + $struc['files'] = $this->dirlist($path . '/' . $struc['name'], $include_hidden, $recursive); else $struc['files'] = array(); } diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php index 76b11fe8..2be38f75 100644 --- a/wp-admin/includes/class-wp-upgrader.php +++ b/wp-admin/includes/class-wp-upgrader.php @@ -81,20 +81,28 @@ class WP_Upgrader { return new WP_Error('fs_error', $this->strings['fs_error'], $wp_filesystem->errors); foreach ( (array)$directories as $dir ) { - if ( ABSPATH == $dir && ! $wp_filesystem->abspath() ) - return new WP_Error('fs_no_root_dir', $this->strings['fs_no_root_dir']); - - elseif ( WP_CONTENT_DIR == $dir && ! $wp_filesystem->wp_content_dir() ) - return new WP_Error('fs_no_content_dir', $this->strings['fs_no_content_dir']); - - elseif ( WP_PLUGIN_DIR == $dir && ! $wp_filesystem->wp_plugins_dir() ) - return new WP_Error('fs_no_plugins_dir', $this->strings['fs_no_plugins_dir']); - - elseif ( WP_CONTENT_DIR . '/themes' == $dir && ! $wp_filesystem->find_folder(WP_CONTENT_DIR . '/themes') ) - return new WP_Error('fs_no_themes_dir', $this->strings['fs_no_themes_dir']); - - elseif ( ! $wp_filesystem->find_folder($dir) ) - return new WP_Error('fs_no_folder', sprintf($strings['fs_no_folder'], $dir)); + switch ( $dir ) { + case ABSPATH: + if ( ! $wp_filesystem->abspath() ) + return new WP_Error('fs_no_root_dir', $this->strings['fs_no_root_dir']); + break; + case WP_CONTENT_DIR: + if ( ! $wp_filesystem->wp_content_dir() ) + return new WP_Error('fs_no_content_dir', $this->strings['fs_no_content_dir']); + break; + case WP_PLUGIN_DIR: + if ( ! $wp_filesystem->wp_plugins_dir() ) + return new WP_Error('fs_no_plugins_dir', $this->strings['fs_no_plugins_dir']); + break; + case WP_CONTENT_DIR . '/themes': + if ( ! $wp_filesystem->find_folder(WP_CONTENT_DIR . '/themes') ) + return new WP_Error('fs_no_themes_dir', $this->strings['fs_no_themes_dir']); + break; + default: + if ( ! $wp_filesystem->find_folder($dir) ) + return new WP_Error('fs_no_folder', sprintf($this->strings['fs_no_folder'], $dir)); + break; + } } return true; } //end fs_connect(); @@ -202,24 +210,26 @@ class WP_Upgrader { $destination = trailingslashit($destination) . trailingslashit(basename($source)); } - //If we're not clearing the destination folder, and something exists there allready, Bail. - if ( ! $clear_destination && $wp_filesystem->exists($remote_destination) ) { - $wp_filesystem->delete($remote_source, true); //Clear out the source files. - return new WP_Error('folder_exists', $this->strings['folder_exists'], $remote_destination ); - } else if ( $clear_destination ) { - //We're going to clear the destination if theres something there - $this->skin->feedback('remove_old'); - - $removed = true; - if ( $wp_filesystem->exists($remote_destination) ) + if ( $wp_filesystem->exists($remote_destination) ) { + if ( $clear_destination ) { + //We're going to clear the destination if theres something there + $this->skin->feedback('remove_old'); $removed = $wp_filesystem->delete($remote_destination, true); - - $removed = apply_filters('upgrader_clear_destination', $removed, $local_destination, $remote_destination, $hook_extra); - - if ( is_wp_error($removed) ) - return $removed; - else if ( ! $removed ) - return new WP_Error('remove_old_failed', $this->strings['remove_old_failed']); + $removed = apply_filters('upgrader_clear_destination', $removed, $local_destination, $remote_destination, $hook_extra); + + if ( is_wp_error($removed) ) + return $removed; + else if ( ! $removed ) + return new WP_Error('remove_old_failed', $this->strings['remove_old_failed']); + } else { + //If we're not clearing the destination folder and something exists there allready, Bail. + //But first check to see if there are actually any files in the folder. + $_files = $wp_filesystem->dirlist($remote_destination); + if ( ! empty($_files) ) { + $wp_filesystem->delete($remote_source, true); //Clear out the source files. + return new WP_Error('folder_exists', $this->strings['folder_exists'], $remote_destination ); + } + } } //Create destination if needed @@ -261,6 +271,7 @@ class WP_Upgrader { 'destination' => '', //And this 'clear_destination' => false, 'clear_working' => true, + 'is_multi' => false, 'hook_extra' => array() //Pass any extra $hook_extra args here, this will be passed to any hooked filters. ); @@ -277,7 +288,9 @@ class WP_Upgrader { return $res; } - $this->skin->header(); + if ( !$is_multi ) // call $this->header separately if running multiple times + $this->skin->header(); + $this->skin->before(); //Download the package (Note, This just returns the filename of the file if the package is a local file) @@ -311,7 +324,10 @@ class WP_Upgrader { $this->skin->feedback('process_success'); } $this->skin->after(); - $this->skin->footer(); + + if ( !$is_multi ) + $this->skin->footer(); + return $result; } @@ -344,6 +360,8 @@ class WP_Upgrader { class Plugin_Upgrader extends WP_Upgrader { var $result; + var $bulk = false; + var $show_before = ''; function upgrade_strings() { $this->strings['up_to_date'] = __('The plugin is at the latest version.'); @@ -414,7 +432,7 @@ class Plugin_Upgrader extends WP_Upgrader { ) )); - //Cleanup our hooks, incase something else does a upgrade on this connection. + // Cleanup our hooks, incase something else does a upgrade on this connection. remove_filter('upgrader_pre_install', array(&$this, 'deactivate_plugin_before_upgrade')); remove_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin')); @@ -425,6 +443,76 @@ class Plugin_Upgrader extends WP_Upgrader { delete_transient('update_plugins'); } + function bulk_upgrade($plugins) { + + $this->init(); + $this->bulk = true; + $this->upgrade_strings(); + + $current = get_transient( 'update_plugins' ); + + add_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin'), 10, 4); + + $this->skin->header(); + + // Connect to the Filesystem first. + $res = $this->fs_connect( array(WP_CONTENT_DIR, WP_PLUGIN_DIR) ); + if ( ! $res ) { + $this->skin->footer(); + return false; + } + + $this->maintenance_mode(true); + + $all = count($plugins); + $i = 1; + foreach ( $plugins as $plugin ) { + + $this->show_before = sprintf( '

      ' . __('Updating plugin %1$d of %2$d...') . '

      ', $i, $all ); + $i++; + + if ( !isset( $current->response[ $plugin ] ) ) { + $this->skin->set_result(false); + $this->skin->error('up_to_date'); + $this->skin->after(); + $results[$plugin] = false; + continue; + } + + // Get the URL to the zip file + $r = $current->response[ $plugin ]; + + $this->skin->plugin_active = is_plugin_active($plugin); + + $result = $this->run(array( + 'package' => $r->package, + 'destination' => WP_PLUGIN_DIR, + 'clear_destination' => true, + 'clear_working' => true, + 'is_multi' => true, + 'hook_extra' => array( + 'plugin' => $plugin + ) + )); + + $results[$plugin] = $this->result; + + // Prevent credentials auth screen from displaying multiple times + if ( false === $result ) + break; + } + $this->maintenance_mode(false); + $this->skin->footer(); + + // Cleanup our hooks, incase something else does a upgrade on this connection. + remove_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin')); + + // Force refresh of plugin update information + delete_transient('update_plugins'); + + return $results; + } + //return plugin info. function plugin_info() { if ( ! is_array($this->result) ) @@ -560,7 +648,7 @@ class Theme_Upgrader extends WP_Upgrader { $this->skin->after(); return false; } - + $r = $current->response[ $theme ]; add_filter('upgrader_pre_install', array(&$this, 'current_before'), 10, 2); @@ -820,11 +908,15 @@ class Plugin_Upgrader_Skin extends WP_Upgrader_Skin { } function after() { + if ( $this->upgrader->bulk ) + return; + $this->plugin = $this->upgrader->plugin_info(); if( !empty($this->plugin) && !is_wp_error($this->result) && $this->plugin_active ){ show_message(__('Attempting reactivation of the plugin')); echo ''; } + $update_actions = array( 'activate_plugin' => '' . __('Activate Plugin') . '', 'plugins_page' => '' . __('Return to Plugins page') . '' @@ -838,6 +930,13 @@ class Plugin_Upgrader_Skin extends WP_Upgrader_Skin { if ( ! empty($update_actions) ) $this->feedback('' . __('Actions:') . ' ' . implode(' | ', (array)$update_actions)); } + + function before() { + if ( $this->upgrader->show_before ) { + echo $this->upgrader->show_before; + $this->upgrader->show_before = ''; + } + } } /** @@ -996,10 +1095,10 @@ class Theme_Upgrader_Skin extends WP_Upgrader_Skin { $name = $theme_info['Name']; $stylesheet = $this->upgrader->result['destination_name']; $template = !empty($theme_info['Template']) ? $theme_info['Template'] : $stylesheet; - + $preview_link = htmlspecialchars( add_query_arg( array('preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'TB_iframe' => 'true' ), trailingslashit(esc_url(get_option('home'))) ) ); $activate_link = wp_nonce_url("themes.php?action=activate&template=" . urlencode($template) . "&stylesheet=" . urlencode($stylesheet), 'switch-theme_' . $template); - + $update_actions = array( 'preview' => '' . __('Preview') . '', 'activate' => '' . __('Activate') . '', diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index 56c5581e..6137a93c 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -34,11 +34,12 @@ function wp_dashboard_setup() { // Incoming Links Widget if ( !isset( $widget_options['dashboard_incoming_links'] ) || !isset( $widget_options['dashboard_incoming_links']['home'] ) || $widget_options['dashboard_incoming_links']['home'] != get_option('home') ) { $update = true; + $num_items = isset($widget_options['dashboard_incoming_links']['items']) ? $widget_options['dashboard_incoming_links']['items'] : 10; $widget_options['dashboard_incoming_links'] = array( 'home' => get_option('home'), - 'link' => apply_filters( 'dashboard_incoming_links_link', 'http://blogsearch.google.com/blogsearch?hl=en&scoring=d&partner=wordpress&q=link:' . trailingslashit( get_option('home') ) ), - 'url' => isset($widget_options['dashboard_incoming_links']['url']) ? apply_filters( 'dashboard_incoming_links_feed', $widget_options['dashboard_incoming_links']['url'] ) : apply_filters( 'dashboard_incoming_links_feed', 'http://blogsearch.google.com/blogsearch_feeds?hl=en&scoring=d&ie=utf-8&num=20&output=rss&partner=wordpress&q=link:' . trailingslashit( get_option('home') ) ), - 'items' => isset($widget_options['dashboard_incoming_links']['items']) ? $widget_options['dashboard_incoming_links']['items'] : 10, + 'link' => apply_filters( 'dashboard_incoming_links_link', 'http://blogsearch.google.com/blogsearch?scoring=d&partner=wordpress&q=link:' . trailingslashit( get_option('home') ) ), + 'url' => isset($widget_options['dashboard_incoming_links']['url']) ? apply_filters( 'dashboard_incoming_links_feed', $widget_options['dashboard_incoming_links']['url'] ) : apply_filters( 'dashboard_incoming_links_feed', 'http://blogsearch.google.com/blogsearch_feeds?scoring=d&ie=utf-8&num=' . $num_items . '&output=rss&partner=wordpress&q=link:' . trailingslashit( get_option('home') ) ), + 'items' => $num_items, 'show_date' => isset($widget_options['dashboard_incoming_links']['show_date']) ? $widget_options['dashboard_incoming_links']['show_date'] : false ); } @@ -132,7 +133,7 @@ function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_ function _wp_dashboard_control_callback( $dashboard, $meta_box ) { echo ''; wp_dashboard_trigger_widget_control( $meta_box['id'] ); - echo "

      "; + echo '

      '; echo ''; } @@ -163,7 +164,7 @@ function wp_dashboard() { $hide2 = $hide3 = $hide4 = 'display:none;'; } ?> -
      +
      \n"; do_meta_boxes( 'dashboard', 'normal', '' ); @@ -179,7 +180,7 @@ function wp_dashboard() { ?>
      -
      +

      total_comments); + $num = '' . number_format_i18n($num_comm->total_comments) . ''; $text = _n( 'Comment', 'Comments', $num_comm->total_comments ); if ( current_user_can( 'moderate_comments' ) ) { $num = "$num"; @@ -258,7 +259,7 @@ function wp_dashboard_right_now() { echo '' . $text . ''; // Approved Comments - $num = number_format_i18n($num_comm->approved); + $num = '' . number_format_i18n($num_comm->approved) . ''; $text = _nc( 'Approved|Right Now', 'Approved', $num_comm->approved ); if ( current_user_can( 'moderate_comments' ) ) { $num = "$num"; @@ -280,10 +281,10 @@ function wp_dashboard_right_now() { echo '' . $text . ''; // Pending Comments - $num = number_format_i18n($num_comm->moderated); + $num = '' . number_format_i18n($num_comm->moderated) . ''; $text = _n( 'Pending', 'Pending', $num_comm->moderated ); if ( current_user_can( 'moderate_comments' ) ) { - $num = "$num"; + $num = "$num"; $text = "$text"; } echo '' . $num . ''; @@ -339,9 +340,9 @@ function wp_dashboard_right_now() { } else { if ( current_user_can( 'switch_themes' ) ) { echo '' . __('Change Theme') . ''; - printf('Theme %1$s', $ct->title); + printf( __('Theme %1$s'), $ct->title ); } else { - printf('Theme %1$s', $ct->title); + printf( __('Theme %1$s'), $ct->title ); } } echo '

      '; @@ -447,7 +448,7 @@ function wp_dashboard_recent_drafts( $drafts = false ) { foreach ( $drafts as $draft ) { $url = get_edit_post_link( $draft->ID ); $title = _draft_or_post_title( $draft->ID ); - $item = "

      $title " . get_the_time( get_option( 'date_format' ), $draft ) . '

      '; + $item = "

      " . esc_html($title) . " " . get_the_time( get_option( 'date_format' ), $draft ) . '

      '; if ( $the_content = preg_split( '#\s#', strip_tags( $draft->post_content ), 11, PREG_SPLIT_NO_EMPTY ) ) $item .= '

      ' . join( ' ', array_slice( $the_content, 0, 10 ) ) . ( 10 < count( $the_content ) ? '…' : '' ) . '

      '; $list[] = $item; @@ -480,7 +481,7 @@ function wp_dashboard_recent_comments() { $comments = array(); $start = 0; - while ( count( $comments ) < 5 && $possible = $wpdb->get_results( "SELECT * FROM $wpdb->comments ORDER BY comment_date_gmt DESC LIMIT $start, 50" ) ) { + while ( count( $comments ) < 5 && $possible = $wpdb->get_results( "SELECT * FROM $wpdb->comments c LEFT JOIN $wpdb->posts p ON c.comment_post_ID = p.ID WHERE p.post_status != 'trash' ORDER BY c.comment_date_gmt DESC LIMIT $start, 50" ) ) { foreach ( $possible as $comment ) { if ( count( $comments ) >= 5 ) @@ -509,6 +510,7 @@ function wp_dashboard_recent_comments() { @@ -527,24 +529,37 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) { $comment_post_link = "$comment_post_title"; $comment_link = '#'; - $delete_url = esc_url( wp_nonce_url( "comment.php?action=deletecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) ); - $approve_url = esc_url( wp_nonce_url( "comment.php?action=approvecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "approve-comment_$comment->comment_ID" ) ); - $unapprove_url = esc_url( wp_nonce_url( "comment.php?action=unapprovecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "unapprove-comment_$comment->comment_ID" ) ); - $spam_url = esc_url( wp_nonce_url( "comment.php?action=deletecomment&dt=spam&p=$comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) ); - - $actions = array(); - $actions_string = ''; if ( current_user_can('edit_post', $comment->comment_post_ID) ) { + // preorder it: Approve | Reply | Edit | Spam | Trash + $actions = array( + 'approve' => '', 'unapprove' => '', + 'reply' => '', + 'edit' => '', + 'spam' => '', + 'trash' => '', 'delete' => '' + ); + + $del_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "delete-comment_$comment->comment_ID" ) ); + $approve_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "approve-comment_$comment->comment_ID" ) ); + + $approve_url = esc_url( "comment.php?action=approvecomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$approve_nonce" ); + $unapprove_url = esc_url( "comment.php?action=unapprovecomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$approve_nonce" ); + $spam_url = esc_url( "comment.php?action=spamcomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); + $trash_url = esc_url( "comment.php?action=trashcomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); + $delete_url = esc_url( "comment.php?action=deletecomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); + $actions['approve'] = "" . __( 'Approve' ) . ''; $actions['unapprove'] = "" . __( 'Unapprove' ) . ''; $actions['edit'] = "". __('Edit') . ''; - //$actions['quickedit'] = '' . __('Quick Edit') . ''; $actions['reply'] = '' . __('Reply') . ''; $actions['spam'] = "" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . ''; - $actions['delete'] = "" . __('Delete') . ''; + if ( !EMPTY_TRASH_DAYS ) + $actions['delete'] = "" . __('Delete Permanently') . ''; + else + $actions['trash'] = "" . _x('Trash', 'verb') . ''; - $actions = apply_filters( 'comment_row_actions', $actions, $comment ); + $actions = apply_filters( 'comment_row_actions', array_filter($actions), $comment ); $i = 0; foreach ( $actions as $action => $link ) { @@ -567,7 +582,7 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
      -

      ' . get_comment_author_link() . '', $comment_post_link." ".$comment_link, ' ' . __( '[Pending]' ) . '' ); ?>

      +

      ' . get_comment_author_link() . '', $comment_post_link.' '.$comment_link, ' ' . __( '[Pending]' ) . '' ); ?>

      -

      $type", $comment_post_link ); ?>

      +

      $type", $comment_post_link." ".$comment_link ); ?>

      - -
      get_item_quantity() ) { echo '

      ' . __('This dashboard widget queries Google Blog Search so that when another blog links to your site it will show up here. It has found no incoming links… yet. It’s okay — there is no rush.') . "

      \n"; + $rss->__destruct(); + unset($rss); return; } @@ -682,7 +691,8 @@ function wp_dashboard_incoming_links_output() { } echo "\n"; - + $rss->__destruct(); + unset($rss); } function wp_dashboard_incoming_links_control() { @@ -706,7 +716,7 @@ function wp_dashboard_primary_control() { */ function wp_dashboard_rss_output( $widget_id ) { $widgets = get_option( 'dashboard_widget_options' ); - echo "
      "; + echo '
      '; wp_widget_rss_output( $widgets[$widget_id] ); echo "
      "; } @@ -738,11 +748,15 @@ function wp_dashboard_secondary_output() { echo '

      '; } } elseif ( !$rss->get_item_quantity() ) { + $rss->__destruct(); + unset($rss); return false; } else { echo '
      '; wp_widget_rss_output( $rss, $widgets['dashboard_secondary'] ); echo '
      '; + $rss->__destruct(); + unset($rss); } } @@ -825,6 +839,9 @@ function wp_dashboard_plugins_output() { echo "

      $label

      \n"; echo "
      $title
       (" . __( 'Install' ) . ")\n"; echo "

      $description

      \n"; + + $$feed->__destruct(); + unset($$feed); } } @@ -918,10 +935,13 @@ function wp_dashboard_rss_control( $widget_id, $form_inputs = array() ) { // title is optional. If black, fill it if possible if ( !$widget_options[$widget_id]['title'] && isset($_POST['widget-rss'][$number]['title']) ) { $rss = fetch_feed($widget_options[$widget_id]['url']); - if ( ! is_wp_error($rss) ) - $widget_options[$widget_id]['title'] = htmlentities(strip_tags($rss->get_title())); - else + if ( is_wp_error($rss) ) { $widget_options[$widget_id]['title'] = htmlentities(__('Unknown Feed')); + } else { + $widget_options[$widget_id]['title'] = htmlentities(strip_tags($rss->get_title())); + $rss->__destruct(); + unset($rss); + } } update_option( 'dashboard_widget_options', $widget_options ); } diff --git a/wp-admin/includes/export.php b/wp-admin/includes/export.php index 641e1738..921a2377 100644 --- a/wp-admin/includes/export.php +++ b/wp-admin/includes/export.php @@ -24,7 +24,7 @@ define('WXR_VERSION', '1.0'); * @param unknown_type $author */ function export_wp($author='') { -global $wpdb, $post_ids, $post; +global $wpdb, $post_ids, $post, $wp_taxonomies; do_action('export_wp'); @@ -46,6 +46,13 @@ $post_ids = $wpdb->get_col("SELECT ID FROM $wpdb->posts $where ORDER BY post_dat $categories = (array) get_categories('get=all'); $tags = (array) get_tags('get=all'); +$custom_taxonomies = $wp_taxonomies; +unset($custom_taxonomies['category']); +unset($custom_taxonomies['post_tag']); +unset($custom_taxonomies['link_category']); +$custom_taxonomies = array_keys($custom_taxonomies); +$terms = (array) get_terms($custom_taxonomies, 'get=all'); + /** * {@internal Missing Short Description}} * @@ -182,6 +189,34 @@ function wxr_tag_description($t) { echo '' . wxr_cdata($t->description) . ''; } +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param object $t Term Object + */ +function wxr_term_name($t) { + if ( empty($t->name) ) + return; + + echo '' . wxr_cdata($t->name) . ''; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param object $t Term Object + */ +function wxr_term_description($t) { + if ( empty($t->description) ) + return; + + echo '' . wxr_cdata($t->description) . ''; +} + /** * {@internal Missing Short Description}} * @@ -221,7 +256,7 @@ echo '\n"; - + @@ -255,6 +290,9 @@ echo '\n"; slug; ?> + + + taxonomy; ?>slug; ?>parent ? $custom_taxonomies[$t->parent]->name : ''; ?> \n"; // Don't export revisions. They bloat the export. if ( 'revision' == $post->post_type ) continue; - setup_postdata($post); ?> + setup_postdata($post); + + $is_sticky = 0; + if ( is_sticky( $post->ID ) ) + $is_sticky = 1; + +?> <?php echo apply_filters('the_title_rss', $post->post_title); ?> @@ -291,6 +335,7 @@ echo '\n"; menu_order; ?> post_type; ?> post_password; ?> + post_type == 'attachment') { ?> ID); ?> @@ -313,7 +358,7 @@ if ( $comments ) { foreach ( $comments as $c ) { ?> comment_ID; ?> comment_author); ?> comment_author_email; ?> -comment_author_url; ?> +comment_author_url ); ?> comment_author_IP; ?> comment_date; ?> comment_date_gmt; ?> diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index 5cd7a454..4120532d 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -99,13 +99,14 @@ function get_real_file_to_edit( $file ) { } /** - * {@internal Missing Short Description}} + * Returns a listing of all files in the specified folder and all subdirectories up to 100 levels deep. + * The depth of the recursiveness can be controlled by the $levels param. * - * @since unknown + * @since 2.6.0 * - * @param string $folder Optional. Full path to folder - * @param int $levels Optional. Levels of folders to follow, Default: 100 (PHP Loop limit). - * @return bool|array + * @param string $folder Full path to folder + * @param int $levels (optional) Levels of folders to follow, Default: 100 (PHP Loop limit). + * @return bool|array False on failure, Else array of files */ function list_files( $folder = '', $levels = 100 ) { if( empty($folder) ) @@ -135,11 +136,14 @@ function list_files( $folder = '', $levels = 100 ) { } /** - * {@internal Missing Short Description}} + * Determines a writable directory for temporary files. + * Function's preference is to WP_CONTENT_DIR followed by the return value of sys_get_temp_dir(), before finally defaulting to /tmp/ * - * @since unknown + * In the event that this function does not find a writable location, It may be overridden by the WP_TEMP_DIR constant in your wp-config.php file. * - * @return unknown + * @since 2.5.0 + * + * @return string Writable temporary directory */ function get_temp_dir() { if ( defined('WP_TEMP_DIR') ) @@ -156,13 +160,17 @@ function get_temp_dir() { } /** - * {@internal Missing Short Description}} + * Returns a filename of a Temporary unique file. + * Please note that the calling function must unlink() this itself. * - * @since unknown + * The filename is based off the passed parameter or defaults to the current unix timestamp, + * while the directory can either be passed as well, or by leaving it blank, default to a writable temporary directory. * - * @param unknown_type $filename - * @param unknown_type $dir - * @return unknown + * @since 2.6.0 + * + * @param string $filename (optional) Filename to base the Unique file off + * @param string $dir (optional) Directory to store the file in + * @return string a writable filename */ function wp_tempnam($filename = '', $dir = ''){ if ( empty($dir) ) @@ -171,6 +179,7 @@ function wp_tempnam($filename = '', $dir = ''){ if ( empty($filename) ) $filename = time(); + $filename = preg_replace('|\..*$|', '.tmp', $filename); $filename = $dir . wp_unique_filename($dir, $filename); touch($filename); return $filename; @@ -186,8 +195,6 @@ function wp_tempnam($filename = '', $dir = ''){ * @return unknown */ function validate_file_to_edit( $file, $allowed_files = '' ) { - $file = stripslashes( $file ); - $code = validate_file( $file, $allowed_files ); if (!$code ) @@ -197,8 +204,8 @@ function validate_file_to_edit( $file, $allowed_files = '' ) { case 1 : wp_die( __('Sorry, can’t edit files with “..” in the name. If you are trying to edit a file in your WordPress home directory, you can just type the name of the file in.' )); - case 2 : - wp_die( __('Sorry, can’t call files with their real path.' )); + //case 2 : + // wp_die( __('Sorry, can’t call files with their real path.' )); case 3 : wp_die( __('Sorry, that file cannot be edited.' )); @@ -222,9 +229,15 @@ function wp_handle_upload( &$file, $overrides = false, $time = null ) { } } + $file = apply_filters( 'wp_handle_upload_prefilter', $file ); + // You may define your own function and pass the name in $overrides['upload_error_handler'] $upload_error_handler = 'wp_handle_upload_error'; + // You may have had one or more 'wp_handle_upload_prefilter' functions error out the file. Handle that gracefully. + if ( isset( $file['error'] ) && !ctype_digit( $file['error'] ) && $file['error'] ) + return $upload_error_handler( $file, $file['error'] ); + // You may define your own function and pass the name in $overrides['unique_filename_callback'] $unique_filename_callback = null; @@ -264,7 +277,7 @@ function wp_handle_upload( &$file, $overrides = false, $time = null ) { // A non-empty file will pass this test. if ( $test_size && !($file['size'] > 0 ) ) - return $upload_error_handler( $file, __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini.' )); + return $upload_error_handler( $file, __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.' )); // A properly uploaded file will pass this test. There should be no reason to override this one. if (! @ is_uploaded_file( $file['tmp_name'] ) ) @@ -424,10 +437,10 @@ function wp_handle_sideload( &$file, $overrides = false ) { } /** - * Downloads a url to a local file using the Snoopy HTTP Class. + * Downloads a url to a local temporary file using the WordPress HTTP Class. + * Please note, That the calling function must unlink() the file. * - * @since unknown - * @todo Transition over to using the new HTTP Request API (jacob). + * @since 2.5.0 * * @param string $url the URL of the file to download * @return mixed WP_Error on failure, string Filename on success. @@ -466,13 +479,17 @@ function download_url( $url ) { } /** - * {@internal Missing Short Description}} + * Unzip's a specified ZIP file to a location on the Filesystem via the WordPress Filesystem Abstraction. + * Assumes that WP_Filesystem() has already been called and set up. * - * @since unknown + * Attempts to increase the PHP Memory limit to 256M before uncompressing, + * However, The most memory required shouldn't be much larger than the Archive itself. * - * @param unknown_type $file - * @param unknown_type $to - * @return unknown + * @since 2.5.0 + * + * @param string $file Full path and filename of zip archive + * @param string $to Full path on the filesystem to extract archive to + * @return mixed WP_Error on failure, True on success */ function unzip_file($file, $to) { global $wp_filesystem; @@ -480,7 +497,7 @@ function unzip_file($file, $to) { if ( ! $wp_filesystem || !is_object($wp_filesystem) ) return new WP_Error('fs_unavailable', __('Could not access filesystem.')); - // Unzip uses a lot of memory + // Unzip uses a lot of memory, but not this much hopefully @ini_set('memory_limit', '256M'); $fs =& $wp_filesystem; @@ -538,13 +555,14 @@ function unzip_file($file, $to) { } /** - * {@internal Missing Short Description}} + * Copies a directory from one location to another via the WordPress Filesystem Abstraction. + * Assumes that WP_Filesystem() has already been called and setup. * - * @since unknown + * @since 2.5.0 * - * @param unknown_type $from - * @param unknown_type $to - * @return unknown + * @param string $from source directory + * @param string $to destination directory + * @return mixed WP_Error on failure, True on success. */ function copy_dir($from, $to) { global $wp_filesystem; @@ -573,15 +591,20 @@ function copy_dir($from, $to) { return $result; } } + return true; } /** - * {@internal Missing Short Description}} + * Initialises and connects the WordPress Filesystem Abstraction classes. + * This function will include the chosen transport and attempt connecting. * - * @since unknown + * Plugins may add extra transports, And force WordPress to use them by returning the filename via the 'filesystem_method_file' filter. * - * @param unknown_type $args - * @return unknown + * @since 2.5.0 + * + * @param array $args (optional) Connection args, These are passed directly to the WP_Filesystem_*() classes. + * @param string $context (optional) Context for get_filesystem_method(), See function declaration for more information. + * @return boolean false on failure, true on success */ function WP_Filesystem( $args = false, $context = false ) { global $wp_filesystem; @@ -597,13 +620,19 @@ function WP_Filesystem( $args = false, $context = false ) { $abstraction_file = apply_filters('filesystem_method_file', ABSPATH . 'wp-admin/includes/class-wp-filesystem-' . $method . '.php', $method); if( ! file_exists($abstraction_file) ) return; - + require_once($abstraction_file); } $method = "WP_Filesystem_$method"; $wp_filesystem = new $method($args); + //Define the timeouts for the connections. Only available after the construct is called to allow for per-transport overriding of the default. + if ( ! defined('FS_CONNECT_TIMEOUT') ) + define('FS_CONNECT_TIMEOUT', 30); + if ( ! defined('FS_TIMEOUT') ) + define('FS_TIMEOUT', 30); + if ( is_wp_error($wp_filesystem->errors) && $wp_filesystem->errors->get_error_code() ) return false; @@ -620,13 +649,20 @@ function WP_Filesystem( $args = false, $context = false ) { } /** - * {@internal Missing Short Description}} + * Determines which Filesystem Method to use. + * The priority of the Transports are: Direct, SSH2, FTP PHP Extension, FTP Sockets (Via Sockets class, or fsoxkopen()) * - * @since unknown + * Note that the return value of this function can be overridden in 2 ways + * - By defining FS_METHOD in your wp-config.php file + * - By using the filesystem_method filter + * Valid values for these are: 'direct', 'ssh', 'ftpext' or 'ftpsockets' + * Plugins may also define a custom transport handler, See the WP_Filesystem function for more information. + * + * @since 2.5.0 * - * @param unknown_type $args + * @param array $args Connection details. * @param string $context Full path to the directory that is tested for being writable. - * @return unknown + * @return string The transport to use, see description for valid return values. */ function get_filesystem_method($args = array(), $context = false) { $method = defined('FS_METHOD') ? FS_METHOD : false; //Please ensure that this is either 'direct', 'ssh', 'ftpext' or 'ftpsockets' @@ -635,13 +671,13 @@ function get_filesystem_method($args = array(), $context = false) { if ( !$context ) $context = WP_CONTENT_DIR; $context = trailingslashit($context); - $temp_file_name = $context . '.write-test-' . time(); + $temp_file_name = $context . 'temp-write-test-' . time(); $temp_handle = @fopen($temp_file_name, 'w'); if ( $temp_handle ) { - if ( getmyuid() == fileowner($temp_file_name) ) + if ( getmyuid() == @fileowner($temp_file_name) ) $method = 'direct'; @fclose($temp_handle); - unlink($temp_file_name); + @unlink($temp_file_name); } } @@ -652,14 +688,20 @@ function get_filesystem_method($args = array(), $context = false) { } /** - * {@internal Missing Short Description}} + * Displays a form to the user to request for their FTP/SSH details in order to connect to the filesystem. + * All chosen/entered details are saved, Excluding the Password. * - * @since unknown + * Hostnames may be in the form of hostname:portnumber (eg: wordpress.org:2467) to specify an alternate FTP/SSH port. * - * @param unknown_type $form_post - * @param unknown_type $type - * @param unknown_type $error - * @return unknown + * Plugins may override this form by returning true|false via the request_filesystem_credentials filter. + * + * @since 2.5.0 + * + * @param string $form_post the URL to post the form to + * @param string $type the chosen Filesystem method in use + * @param boolean $error if the current request has failed to connect + * @param string $context The directory which is needed access to, The write-test will be performed on this directory by get_filesystem_method() + * @return boolean False on failure. True on success. */ function request_filesystem_credentials($form_post, $type = '', $error = false, $context = false) { $req_cred = apply_filters('request_filesystem_credentials', '', $form_post, $type, $error, $context); @@ -675,28 +717,31 @@ function request_filesystem_credentials($form_post, $type = '', $error = false, $credentials = get_option('ftp_credentials', array( 'hostname' => '', 'username' => '')); // If defined, set it to that, Else, If POST'd, set it to that, If not, Set it to whatever it previously was(saved details in option) - $credentials['hostname'] = defined('FTP_HOST') ? FTP_HOST : (!empty($_POST['hostname']) ? $_POST['hostname'] : $credentials['hostname']); - $credentials['username'] = defined('FTP_USER') ? FTP_USER : (!empty($_POST['username']) ? $_POST['username'] : $credentials['username']); - $credentials['password'] = defined('FTP_PASS') ? FTP_PASS : (!empty($_POST['password']) ? $_POST['password'] : ''); + $credentials['hostname'] = defined('FTP_HOST') ? FTP_HOST : (!empty($_POST['hostname']) ? stripslashes($_POST['hostname']) : $credentials['hostname']); + $credentials['username'] = defined('FTP_USER') ? FTP_USER : (!empty($_POST['username']) ? stripslashes($_POST['username']) : $credentials['username']); + $credentials['password'] = defined('FTP_PASS') ? FTP_PASS : (!empty($_POST['password']) ? stripslashes($_POST['password']) : ''); // Check to see if we are setting the public/private keys for ssh - $credentials['public_key'] = defined('FTP_PUBKEY') ? FTP_PUBKEY : (!empty($_POST['public_key']) ? $_POST['public_key'] : ''); - $credentials['private_key'] = defined('FTP_PRIKEY') ? FTP_PRIKEY : (!empty($_POST['private_key']) ? $_POST['private_key'] : ''); + $credentials['public_key'] = defined('FTP_PUBKEY') ? FTP_PUBKEY : (!empty($_POST['public_key']) ? stripslashes($_POST['public_key']) : ''); + $credentials['private_key'] = defined('FTP_PRIKEY') ? FTP_PRIKEY : (!empty($_POST['private_key']) ? stripslashes($_POST['private_key']) : ''); //sanitize the hostname, Some people might pass in odd-data: $credentials['hostname'] = preg_replace('|\w+://|', '', $credentials['hostname']); //Strip any schemes off - if ( strpos($credentials['hostname'], ':') ) + if ( strpos($credentials['hostname'], ':') ) { list( $credentials['hostname'], $credentials['port'] ) = explode(':', $credentials['hostname'], 2); - else + if ( ! is_numeric($credentials['port']) ) + unset($credentials['port']); + } else { unset($credentials['port']); + } - if ( defined('FTP_SSH') || (defined('FS_METHOD') && 'ssh' == FS_METHOD) ) + if ( (defined('FTP_SSH') && FTP_SSH) || (defined('FS_METHOD') && 'ssh' == FS_METHOD) ) $credentials['connection_type'] = 'ssh'; - else if ( defined('FTP_SSL') && 'ftpext' == $type ) //Only the FTP Extension understands SSL + else if ( (defined('FTP_SSL') && FTP_SSL) && 'ftpext' == $type ) //Only the FTP Extension understands SSL $credentials['connection_type'] = 'ftps'; else if ( !empty($_POST['connection_type']) ) - $credentials['connection_type'] = $_POST['connection_type']; + $credentials['connection_type'] = stripslashes($_POST['connection_type']); else if ( !isset($credentials['connection_type']) ) //All else fails (And its not defaulted to something else saved), Default to FTP $credentials['connection_type'] = 'ftp'; @@ -725,6 +770,17 @@ function request_filesystem_credentials($form_post, $type = '', $error = false, $error_string = $error->get_error_message(); echo '

      ' . $error_string . '

      '; } + + $types = array(); + if ( extension_loaded('ftp') || extension_loaded('sockets') || function_exists('fsockopen') ) + $types[ 'ftp' ] = __('FTP'); + if ( extension_loaded('ftp') ) //Only this supports FTPS + $types[ 'ftps' ] = __('FTPS (SSL)'); + if ( extension_loaded('ssh2') && function_exists('stream_get_contents') ) + $types[ 'ssh' ] = __('SSH2'); + + $types = apply_filters('fs_ftp_connection_types', $types, $credentials, $type, $error, $context); + ?> - false); - $file = wp_handle_sideload($file_array, $overrides); + $file = wp_handle_sideload($file_array, $overrides); if ( isset($file['error']) ) return new WP_Error( 'upload_error', $file['error'] ); @@ -279,7 +276,7 @@ function media_handle_sideload($file_array, $post_id, $desc = null, $post_data = 'post_content' => $content, ), $post_data ); - // Save the data + // Save the attachment metadata $id = wp_insert_attachment($attachment, $file, $post_id); if ( !is_wp_error($id) ) { wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) ); @@ -316,13 +313,19 @@ wp_enqueue_style( 'ie' ); @@ -405,6 +408,15 @@ function media_upload_form_handler() { $post = apply_filters('attachment_fields_to_save', $post, $attachment); + if ( isset($attachment['image_alt']) && !empty($attachment['image_alt']) ) { + $image_alt = get_post_meta($attachment_id, '_wp_attachment_image_alt', true); + if ( $image_alt != stripslashes($attachment['image_alt']) ) { + $image_alt = wp_strip_all_tags( stripslashes($attachment['image_alt']), true ); + // update_meta expects slashed + update_post_meta( $attachment_id, '_wp_attachment_image_alt', addslashes($image_alt) ); + } + } + if ( isset($post['errors']) ) { $errors[$attachment_id] = $post['errors']; unset($post['errors']); @@ -413,9 +425,10 @@ function media_upload_form_handler() { if ( $post != $_post ) wp_update_post($post); - foreach ( get_attachment_taxonomies($post) as $t ) + foreach ( get_attachment_taxonomies($post) as $t ) { if ( isset($attachment[$t]) ) wp_set_object_terms($attachment_id, array_map('trim', preg_split('/,+/', $attachment[$t])), $t, false); + } } if ( isset($_POST['insert-gallery']) || isset($_POST['update-gallery']) ) { ?> @@ -468,6 +481,8 @@ function media_upload_image() { } if ( !empty($_POST['insertonlybutton']) ) { + $alt = $align = ''; + $src = $_POST['insertonly']['src']; if ( !empty($src) && !strpos($src, '://') ) $src = "http://$src"; @@ -477,8 +492,9 @@ function media_upload_image() { $class = " class='align$align'"; } if ( !empty($src) ) - $html = "$alt"; - $html = apply_filters('image_send_to_editor_url', $html, $src, $alt, $align); + $html = "$alt"; + + $html = apply_filters('image_send_to_editor_url', $html, esc_url_raw($src), $alt, $align); return media_send_to_editor($html); } @@ -514,25 +530,33 @@ function media_upload_image() { */ function media_sideload_image($file, $post_id, $desc = null) { if (!empty($file) ) { - $file_array['name'] = basename($file); + // Download file to temp location $tmp = download_url($file); + + // Set variables for storage + // fix file filename for query strings + preg_match('/[^\?]+\.(jpg|JPG|jpe|JPE|jpeg|JPEG|gif|GIF|png|PNG)/', $file, $matches); + $file_array['name'] = basename($matches[0]); $file_array['tmp_name'] = $tmp; - $desc = @$desc; + // If error storing temporarily, unlink if ( is_wp_error($tmp) ) { @unlink($file_array['tmp_name']); $file_array['tmp_name'] = ''; } - $id = media_handle_sideload($file_array, $post_id, $desc); + // do the validation and storage stuff + $id = media_handle_sideload($file_array, $post_id, @$desc); $src = $id; + // If error storing permanently, unlink if ( is_wp_error($id) ) { @unlink($file_array['tmp_name']); return $id; } } + // Finally check to make sure the file has been saved, then return the html if ( !empty($src) ) { $alt = @$desc; $html = "$alt"; @@ -565,12 +589,16 @@ function media_upload_audio() { $href = $_POST['insertonly']['href']; if ( !empty($href) && !strpos($href, '://') ) $href = "http://$href"; + $title = esc_attr($_POST['insertonly']['title']); if ( empty($title) ) - $title = basename($href); + $title = esc_attr( basename($href) ); + if ( !empty($title) && !empty($href) ) - $html = "$title"; + $html = "$title"; + $html = apply_filters('audio_send_to_editor_url', $html, $href, $title); + return media_send_to_editor($html); } @@ -619,12 +647,16 @@ function media_upload_video() { $href = $_POST['insertonly']['href']; if ( !empty($href) && !strpos($href, '://') ) $href = "http://$href"; + $title = esc_attr($_POST['insertonly']['title']); - if ( empty($title) ) - $title = basename($href); + if ( empty($title) ) + $title = esc_attr( basename($href) ); + if ( !empty($title) && !empty($href) ) - $html = "$title"; + $html = "$title"; + $html = apply_filters('video_send_to_editor_url', $html, $href, $title); + return media_send_to_editor($html); } @@ -673,12 +705,13 @@ function media_upload_file() { $href = $_POST['insertonly']['href']; if ( !empty($href) && !strpos($href, '://') ) $href = "http://$href"; + $title = esc_attr($_POST['insertonly']['title']); if ( empty($title) ) $title = basename($href); if ( !empty($title) && !empty($href) ) - $html = "$title"; - $html = apply_filters('file_send_to_editor_url', $html, $href, $title); + $html = "$title"; + $html = apply_filters('file_send_to_editor_url', $html, esc_url_raw($href), $title); return media_send_to_editor($html); } @@ -757,16 +790,19 @@ function media_upload_library() { */ function image_align_input_fields( $post, $checked = '' ) { + if ( empty($checked) ) + $checked = get_user_setting('align', 'none'); + $alignments = array('none' => __('None'), 'left' => __('Left'), 'center' => __('Center'), 'right' => __('Right')); if ( !array_key_exists( (string) $checked, $alignments ) ) $checked = 'none'; $out = array(); - foreach ($alignments as $name => $label) { + foreach ( $alignments as $name => $label ) { $name = esc_attr($name); $out[] = ""; + " />"; } return join("\n", $out); } @@ -780,27 +816,36 @@ function image_align_input_fields( $post, $checked = '' ) { * @param unknown_type $checked * @return unknown */ -function image_size_input_fields( $post, $checked = '' ) { +function image_size_input_fields( $post, $check = '' ) { // get a list of the actual pixel dimensions of each possible intermediate version of this image $size_names = array('thumbnail' => __('Thumbnail'), 'medium' => __('Medium'), 'large' => __('Large'), 'full' => __('Full size')); - foreach ( $size_names as $size => $name ) { + if ( empty($check) ) + $check = get_user_setting('imgsize', 'medium'); + + foreach ( $size_names as $size => $label ) { $downsize = image_downsize($post->ID, $size); + $checked = ''; // is this size selectable? $enabled = ( $downsize[3] || 'full' == $size ); $css_id = "image-size-{$size}-{$post->ID}"; // if this size is the default but that's not available, don't select it - if ( $checked && !$enabled ) - $checked = ''; - // if $checked was not specified, default to the first available size that's bigger than a thumbnail - if ( !$checked && $enabled && 'thumbnail' != $size ) - $checked = $size; - - $html = "
      "; - - $html .= ""; + if ( $size == $check ) { + if ( $enabled ) + $checked = " checked='checked'"; + else + $check = ''; + } elseif ( !$check && $enabled && 'thumbnail' != $size ) { + // if $check is not enabled, default to the first available size that's bigger than a thumbnail + $check = $size; + $checked = " checked='checked'"; + } + + $html = "
      "; + + $html .= ""; // only show the dimensions if that choice is available if ( $enabled ) $html .= " "; @@ -826,21 +871,25 @@ function image_size_input_fields( $post, $checked = '' ) { * @param unknown_type $url_type * @return unknown */ -function image_link_input_fields($post, $url_type='') { +function image_link_input_fields($post, $url_type = '') { $file = wp_get_attachment_url($post->ID); $link = get_attachment_link($post->ID); + if ( empty($url_type) ) + $url_type = get_user_setting('urlbutton', 'post'); + $url = ''; if ( $url_type == 'file' ) $url = $file; elseif ( $url_type == 'post' ) $url = $link; - return "
      - - - + return " +
      + + + "; } @@ -855,15 +904,17 @@ function image_link_input_fields($post, $url_type='') { */ function image_attachment_fields_to_edit($form_fields, $post) { if ( substr($post->post_mime_type, 0, 5) == 'image' ) { - $form_fields['post_title']['required'] = true; - $file = wp_get_attachment_url($post->ID); - - $form_fields['image_url']['value'] = $file; + $alt = get_post_meta($post->ID, '_wp_attachment_image_alt', true); + if ( empty($alt) ) + $alt = ''; - $form_fields['post_excerpt']['label'] = __('Caption'); - $form_fields['post_excerpt']['helps'][] = __('Also used as alternate text for the image'); + $form_fields['post_title']['required'] = true; - $form_fields['post_content']['label'] = __('Description'); + $form_fields['image_alt'] = array( + 'value' => $alt, + 'label' => __('Alternate text'), + 'helps' => __('Alt text for the image, e.g. “The Mona Lisa”') + ); $form_fields['align'] = array( 'label' => __('Alignment'), @@ -871,7 +922,10 @@ function image_attachment_fields_to_edit($form_fields, $post) { 'html' => image_align_input_fields($post, get_option('image_default_align')), ); - $form_fields['image-size'] = image_size_input_fields($post, get_option('image_default_size')); + $form_fields['image-size'] = image_size_input_fields( $post, get_option('image_default_size', 'medium') ); + + } else { + unset( $form_fields['image_alt'] ); } return $form_fields; } @@ -933,20 +987,12 @@ function image_media_send_to_editor($html, $attachment_id, $attachment) { $post =& get_post($attachment_id); if ( substr($post->post_mime_type, 0, 5) == 'image' ) { $url = $attachment['url']; - - if ( isset($attachment['align']) ) - $align = $attachment['align']; - else - $align = 'none'; - - if ( !empty($attachment['image-size']) ) - $size = $attachment['image-size']; - else - $size = 'medium'; - + $align = !empty($attachment['align']) ? $attachment['align'] : 'none'; + $size = !empty($attachment['image-size']) ? $attachment['image-size'] : 'medium'; + $alt = !empty($attachment['image_alt']) ? $attachment['image_alt'] : ''; $rel = ( $url == get_attachment_link($attachment_id) ); - return get_image_send_to_editor($attachment_id, $attachment['post_excerpt'], $attachment['post_title'], $align, $url, $rel, $size); + return get_image_send_to_editor($attachment_id, $attachment['post_excerpt'], $attachment['post_title'], $align, $url, $rel, $size, $alt); } return $html; @@ -976,22 +1022,23 @@ function get_attachment_fields_to_edit($post, $errors = null) { $form_fields = array( 'post_title' => array( 'label' => __('Title'), - 'value' => $edit_post->post_title, + 'value' => $edit_post->post_title ), + 'image_alt' => array(), 'post_excerpt' => array( 'label' => __('Caption'), - 'value' => $edit_post->post_excerpt, + 'value' => $edit_post->post_excerpt ), 'post_content' => array( 'label' => __('Description'), 'value' => $edit_post->post_content, - 'input' => 'textarea', + 'input' => 'textarea' ), 'url' => array( 'label' => __('Link URL'), 'input' => 'html', 'html' => image_link_input_fields($post, get_option('image_default_link_type')), - 'helps' => __('Enter a link URL or click above for presets.'), + 'helps' => __('Enter a link URL or click above for presets.') ), 'menu_order' => array( 'label' => __('Order'), @@ -1000,9 +1047,9 @@ function get_attachment_fields_to_edit($post, $errors = null) { 'image_url' => array( 'label' => __('File URL'), 'input' => 'html', - 'html' => "
      ", - 'value' => isset($edit_post->post_url) ? $edit_post->post_url : '', - 'helps' => __('Location of the uploaded file.'), + 'html' => "
      ", + 'value' => wp_get_attachment_url($post->ID), + 'helps' => __('Location of the uploaded file.') ) ); @@ -1062,9 +1109,12 @@ function get_media_items( $post_id, $errors ) { } $output = ''; - foreach ( (array) $attachments as $id => $attachment ) + foreach ( (array) $attachments as $id => $attachment ) { + if ( $attachment->post_status == 'trash' ) + continue; if ( $item = get_media_item( $id, array( 'errors' => isset($errors[$id]) ? $errors[$id] : null) ) ) $output .= "\n
      $item\n
      "; + } return $output; } @@ -1081,16 +1131,15 @@ function get_media_items( $post_id, $errors ) { function get_media_item( $attachment_id, $args = null ) { global $redir_tab; - $default_args = array( 'errors' => null, 'send' => true, 'delete' => true, 'toggle' => true, 'show_title' => true ); - $args = wp_parse_args( $args, $default_args ); - extract( $args, EXTR_SKIP ); - - global $post_mime_types; if ( ( $attachment_id = intval($attachment_id) ) && $thumb_url = get_attachment_icon_src( $attachment_id ) ) $thumb_url = $thumb_url[0]; else return false; + $default_args = array( 'errors' => null, 'send' => true, 'delete' => true, 'toggle' => true, 'show_title' => true ); + $args = wp_parse_args( $args, $default_args ); + extract( $args, EXTR_SKIP ); + $toggle_on = __('Show'); $toggle_off = __('Hide'); @@ -1105,12 +1154,10 @@ function get_media_item( $attachment_id, $args = null ) { $tags = esc_attr(join(', ', $tags)); } - $type = ''; - if ( isset($post_mime_types) ) { - $keys = array_keys(wp_match_mime_types(array_keys($post_mime_types), $post->post_mime_type)); - $type = array_shift($keys); - $type = ""; - } + $post_mime_types = get_post_mime_types(); + $keys = array_keys(wp_match_mime_types(array_keys($post_mime_types), $post->post_mime_type)); + $type = array_shift($keys); + $type_html = ""; $form_fields = get_attachment_fields_to_edit($post, $errors); @@ -1125,7 +1172,7 @@ function get_media_item( $attachment_id, $args = null ) { } $display_title = ( !empty( $title ) ) ? $title : $filename; // $title shouldn't ever be empty, but just in case - $display_title = $show_title ? "
      " . wp_html_excerpt($display_title, 60) . "
      " : ''; + $display_title = $show_title ? "
      " . wp_html_excerpt($display_title, 60) . "
      " : ''; $gallery = ( (isset($_REQUEST['tab']) && 'gallery' == $_REQUEST['tab']) || (isset($redir_tab) && 'gallery' == $redir_tab) ) ? true : false; $order = ''; @@ -1142,22 +1189,41 @@ function get_media_item( $attachment_id, $args = null ) { } } + $media_dims = ''; + $meta = wp_get_attachment_metadata($post->ID); + if ( is_array($meta) && array_key_exists('width', $meta) && array_key_exists('height', $meta) ) + $media_dims .= "{$meta['width']} × {$meta['height']} "; + $media_dims = apply_filters('media_meta', $media_dims, $post); + + $image_edit_button = ''; + if ( gd_edit_image_support($post->post_mime_type) ) { + $nonce = wp_create_nonce("image_editor-$post->ID"); + $image_edit_button = " "; + } + $item = " - $type + $type_html $toggle_links $order $display_title - + - - + + - - - + + \n"; + + if ( !empty($media_dims) ) + $item .= "\n"; + + $item .= " + - \n"; + + + \n"; $defaults = array( 'input' => 'text', @@ -1166,15 +1232,31 @@ function get_media_item( $attachment_id, $args = null ) { 'extra_rows' => array(), ); - $delete_href = wp_nonce_url("post.php?action=delete-post&post=$attachment_id", 'delete-post_' . $attachment_id); if ( $send ) $send = ""; - if ( $delete ) - $delete = "" . __('Delete') . ""; - if ( ( $send || $delete ) && !isset($form_fields['buttons']) ) - $form_fields['buttons'] = array('tr' => "\t\t\n"); + if ( $delete && current_user_can('delete_post', $attachment_id) ) { + if ( !EMPTY_TRASH_DAYS ) { + $delete = "" . __('Delete Permanently') . ""; + } elseif ( !MEDIA_TRASH ) { + $delete = "" . __('Delete') . "
      " . sprintf(__("You are about to delete %s."), $filename) . " " . __('Continue') . " " . __('Cancel') . "
      "; + } else { + $delete = "" . __('Move to Trash') . "" . __('Undo') . ""; + } + } else { + $delete = ''; + } + + $thumbnail = ''; + $calling_post_id = 0; + if ( isset( $_GET['post_id'] ) ) + $calling_post_id = $_GET['post_id']; + elseif ( isset( $_POST ) && count( $_POST ) ) // Like for async-upload where $_GET['post_id'] isn't set + $calling_post_id = $post->post_parent; + if ( 'image' == $type && $calling_post_id && current_theme_supports( 'post-thumbnails', get_post_type( $calling_post_id ) ) && get_post_thumbnail_id( $calling_post_id ) != $attachment_id ) + $thumbnail = "" . esc_html__( "Use as thumbnail" ) . ""; + + if ( ( $send || $thumbnail || $delete ) && !isset($form_fields['buttons']) ) + $form_fields['buttons'] = array('tr' => "\t\t\n"); $hidden_fields = array(); @@ -1206,7 +1288,7 @@ function get_media_item( $attachment_id, $args = null ) { elseif ( $field['input'] == 'textarea' ) { $item .= ""; } else { - $item .= ""; + $item .= ""; } if ( !empty($field['helps']) ) $item .= "

      " . join( "

      \n

      ", array_unique((array) $field['helps']) ) . '

      '; @@ -1324,6 +1406,7 @@ SWFUpload.onload = function() { post_params : { "post_id" : "", "auth_cookie" : "", + "logged_in_cookie": "", "_wpnonce" : "", "type" : "", "tab" : "", @@ -1369,7 +1452,7 @@ SWFUpload.onload = function() {

      - +

      @@ -1400,6 +1483,7 @@ function media_upload_type_form($type = 'file', $errors = null, $id = null) { ?> + @@ -1474,21 +1558,23 @@ var addExtImage = { align : 'alignnone', insert : function() { - var t = this, html, f = document.forms[0], cls, title = '', alt = '', caption = null; + var t = this, html, f = document.forms[0], cls, title = '', alt = '', caption = ''; - if ( '' == f.src.value || '' == t.width ) return false; + if ( '' == f.src.value || '' == t.width ) + return false; if ( f.title.value ) { - title = f.title.value.replace(/['"<>]+/g, ''); + title = f.title.value.replace(/'/g, ''').replace(/"/g, '"').replace(//g, '>'); title = ' title="'+title+'"'; } - if ( f.alt.value ) { - alt = f.alt.value.replace(/['"<>]+/g, ''); + if ( f.alt.value ) + alt = f.alt.value.replace(/'/g, ''').replace(/"/g, '"').replace(//g, '>'); + - caption = f.alt.value.replace(/'/g, ''').replace(/"/g, '"').replace(//g, '>'); + if ( f.caption.value ) + caption = f.caption.value.replace(/'/g, ''').replace(/"/g, '"').replace(//g, '>'); - } cls = caption ? '' : ' class="'+t.align+'"'; @@ -1502,6 +1588,7 @@ var addExtImage = { var win = window.dialogArguments || opener || parent || top; win.send_to_editor(html); + return false; }, resetImageData : function() { @@ -1510,8 +1597,8 @@ var addExtImage = { t.width = t.height = ''; document.getElementById('go_button').style.color = '#bbb'; if ( ! document.forms[0].src.value ) - document.getElementById('status_img').src = 'images/required.gif'; - else document.getElementById('status_img').src = 'images/no.png'; + document.getElementById('status_img').innerHTML = '*'; + else document.getElementById('status_img').innerHTML = ''; }, updateImageData : function() { @@ -1520,7 +1607,7 @@ var addExtImage = { t.width = t.preloadImg.width; t.height = t.preloadImg.height; document.getElementById('go_button').style.color = '#333'; - document.getElementById('status_img').src = 'images/yes.png'; + document.getElementById('status_img').innerHTML = ''; }, getImageData : function() { @@ -1530,7 +1617,7 @@ var addExtImage = { t.resetImageData(); return false; } - document.getElementById('status_img').src = 'images/wpspin_light.gif'; + document.getElementById('status_img').innerHTML = ''; t.preloadImg = new Image(); t.preloadImg.onload = t.updateImageData; t.preloadImg.onerror = t.resetImageData; @@ -1560,13 +1647,14 @@ var addExtImage = { * @param unknown_type $errors */ function media_upload_gallery_form($errors) { - global $redir_tab; + global $redir_tab, $type; $redir_tab = 'gallery'; media_upload_header(); $post_id = intval($_REQUEST['post_id']); - $form_action_url = admin_url("media-upload.php?type={$GLOBALS['type']}&tab=gallery&post_id=$post_id"); + $form_action_url = admin_url("media-upload.php?type=$type&tab=gallery&post_id=$post_id"); + $form_action_url = apply_filters('media_upload_form_url', $form_action_url, $type); ?> + + +id, true, $post->post_type ); // TODO: ROLE SYSTEM + if ( $post->post_author && !in_array($post->post_author, $authors) ) + $authors[] = $post->post_author; +?> + $authors, 'name' => 'post_author_override', 'selected' => empty($post->ID) ? $user_ID : $post->post_author) ); ?> + +
      + + $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('Main Page (no parent)'), 'sort_column'=> 'menu_order, post_title')); ?> +

      + +
      + +

      + +
      +

      +

      + + + +
        +
      • +
      • +
      + +
      +
        + link_id) ) + wp_link_category_checklist($link->link_id); + else + wp_link_category_checklist(); + ?> +
      +
      + + + +
      +

      + +
      + +
      +

      +

      +

      +
      +

      +link_rel ) ? $link->link_rel : ''; // In PHP 5.3: $link_rel = $link->link_rel ?: ''; + $rels = preg_split('/\s+/', $link_rel); + + if ('' != $value && in_array($value, $rels) ) { + echo ' checked="checked"'; + } + + if ('' == $value) { + if ('family' == $class && strpos($link_rel, 'child') === false && strpos($link_rel, 'parent') === false && strpos($link_rel, 'sibling') === false && strpos($link_rel, 'spouse') === false && strpos($link_rel, 'kin') === false) echo ' checked="checked"'; + if ('friendship' == $class && strpos($link_rel, 'friend') === false && strpos($link_rel, 'acquaintance') === false && strpos($link_rel, 'contact') === false) echo ' checked="checked"'; + if ('geographical' == $class && strpos($link_rel, 'co-resident') === false && strpos($link_rel, 'neighbor') === false) echo ' checked="checked"'; + if ('identity' == $class && in_array('me', $rels) ) echo ' checked="checked"'; + } +} + + +/** + * Display xfn form fields. + * + * @since 2.6.0 + * + * @param object $link + */ +function link_xfn_meta_box($link) { +?> +
      $filename" . __('File name:') . " $filename
      $post->post_mime_type
      " . mysql2date($post->post_date, get_option('time_format')) . "
      " . apply_filters('media_meta', '', $post) . "
      " . __('File type:') . " $post->post_mime_type
      " . __('Upload date:') . " " . mysql2date( get_option('date_format'), $post->post_date ) . "
      " . __('Dimensions:') . " $media_dims
      $image_edit_button
      $send $delete -
      " . sprintf(__("You are about to delete %s."), $filename) . " " . __('Continue') . " - " . __('Cancel') . "
      $send $thumbnail $delete
      + + + + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +
      + + + + +
      + +
      + + +
      + + + +
      + + + + + + +
      + + + + +
      +
      +

      XFN.'); ?>

      + + + + + + + + + + + + + + + + + + +
        +
      +ID, '_thumbnail_id', true ); + echo _wp_post_thumbnail_html( $thumbnail_id ); +} diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php index 356c6b00..96bcab3e 100644 --- a/wp-admin/includes/misc.php +++ b/wp-admin/includes/misc.php @@ -154,7 +154,7 @@ function iis7_save_url_rewrite_rules(){ // Using win_is_writable() instead of is_writable() because of a bug in Windows PHP if ( ( ! file_exists($web_config_file) && win_is_writable($home_path) && $wp_rewrite->using_mod_rewrite_permalinks() ) || win_is_writable($web_config_file) ) { if ( iis7_supports_permalinks() ) { - $rule = $wp_rewrite->iis7_url_rewrite_rules(); + $rule = $wp_rewrite->iis7_url_rewrite_rules(false, '', ''); if ( ! empty($rule) ) { return iis7_add_rewrite_rule($web_config_file, $rule); } else { @@ -587,6 +587,7 @@ function iis7_add_rewrite_rule($filename, $rewrite_rule) { $rule_fragment->appendXML($rewrite_rule); $rules_node->appendChild($rule_fragment); + $doc->encoding = "UTF-8"; $doc->formatOutput = true; saveDomDocument($doc, $filename); diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index 88a95dda..da1e076a 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -66,38 +66,25 @@ * @return array See above for description. */ function get_plugin_data( $plugin_file, $markup = true, $translate = true ) { - // We don't need to write to the file, so just open for reading. - $fp = fopen($plugin_file, 'r'); - - // Pull only the first 8kiB of the file in. - $plugin_data = fread( $fp, 8192 ); - - // PHP will close file handle, but we are good citizens. - fclose($fp); - - preg_match( '|Plugin Name:(.*)$|mi', $plugin_data, $name ); - preg_match( '|Plugin URI:(.*)$|mi', $plugin_data, $uri ); - preg_match( '|Version:(.*)|i', $plugin_data, $version ); - preg_match( '|Description:(.*)$|mi', $plugin_data, $description ); - preg_match( '|Author:(.*)$|mi', $plugin_data, $author_name ); - preg_match( '|Author URI:(.*)$|mi', $plugin_data, $author_uri ); - preg_match( '|Text Domain:(.*)$|mi', $plugin_data, $text_domain ); - preg_match( '|Domain Path:(.*)$|mi', $plugin_data, $domain_path ); - - foreach ( array( 'name', 'uri', 'version', 'description', 'author_name', 'author_uri', 'text_domain', 'domain_path' ) as $field ) { - if ( !empty( ${$field} ) ) - ${$field} = _cleanup_header_comment(${$field}[1]); - else - ${$field} = ''; - } - $plugin_data = array( - 'Name' => $name, 'Title' => $name, 'PluginURI' => $uri, 'Description' => $description, - 'Author' => $author_name, 'AuthorURI' => $author_uri, 'Version' => $version, - 'TextDomain' => $text_domain, 'DomainPath' => $domain_path - ); + $default_headers = array( + 'Name' => 'Plugin Name', + 'PluginURI' => 'Plugin URI', + 'Version' => 'Version', + 'Description' => 'Description', + 'Author' => 'Author', + 'AuthorURI' => 'Author URI', + 'TextDomain' => 'Text Domain', + 'DomainPath' => 'Domain Path' + ); + + $plugin_data = get_file_data( $plugin_file, $default_headers, 'plugin' ); + + //For backward compatibility by default Title is the same as Name. + $plugin_data['Title'] = $plugin_data['Name']; + if ( $markup || $translate ) - $plugin_data = _get_plugin_data_markup_translate($plugin_file, $plugin_data, $markup, $translate); + $plugin_data = _get_plugin_data_markup_translate( $plugin_file, $plugin_data, $markup, $translate ); return $plugin_data; } @@ -107,9 +94,9 @@ function _get_plugin_data_markup_translate($plugin_file, $plugin_data, $markup = //Translate fields if( $translate && ! empty($plugin_data['TextDomain']) ) { if( ! empty( $plugin_data['DomainPath'] ) ) - load_plugin_textdomain($plugin_data['TextDomain'], dirname($plugin_file). $plugin_data['DomainPath']); + load_plugin_textdomain($plugin_data['TextDomain'], false, dirname($plugin_file). $plugin_data['DomainPath']); else - load_plugin_textdomain($plugin_data['TextDomain'], dirname($plugin_file)); + load_plugin_textdomain($plugin_data['TextDomain'], false, dirname($plugin_file)); foreach ( array('Name', 'PluginURI', 'Description', 'Author', 'AuthorURI', 'Version') as $field ) $plugin_data[ $field ] = translate($plugin_data[ $field ], $plugin_data['TextDomain']); @@ -272,7 +259,7 @@ function get_plugins($plugin_folder = '') { * @return bool True, if in the active plugins list. False, not in the list. */ function is_plugin_active($plugin) { - return in_array($plugin, get_option('active_plugins')); + return in_array( $plugin, apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ); } /** @@ -314,8 +301,10 @@ function activate_plugin($plugin, $redirect = '') { @include(WP_PLUGIN_DIR . '/' . $plugin); $current[] = $plugin; sort($current); + do_action( 'activate_plugin', trim( $plugin) ); update_option('active_plugins', $current); - do_action('activate_' . $plugin); + do_action( 'activate_' . trim( $plugin ) ); + do_action( 'activated_plugin', trim( $plugin) ); ob_end_clean(); } @@ -343,9 +332,19 @@ function deactivate_plugins($plugins, $silent= false) { $plugin = plugin_basename($plugin); if( ! is_plugin_active($plugin) ) continue; - array_splice($current, array_search( $plugin, $current), 1 ); // Fixed Array-fu! - if ( ! $silent ) //Used by Plugin updater to internally deactivate plugin, however, not to notify plugins of the fact to prevent plugin output. - do_action('deactivate_' . trim( $plugin )); + if ( ! $silent ) + do_action( 'deactivate_plugin', trim( $plugin ) ); + + $key = array_search( $plugin, (array) $current ); + + if ( false !== $key ) + array_splice( $current, $key, 1 ); + + //Used by Plugin updater to internally deactivate plugin, however, not to notify plugins of the fact to prevent plugin output. + if ( ! $silent ) { + do_action( 'deactivate_' . trim( $plugin ) ); + do_action( 'deactivated_plugin', trim( $plugin ) ); + } } update_option('active_plugins', $current); @@ -477,7 +476,7 @@ function delete_plugins($plugins, $redirect = '' ) { } function validate_active_plugins() { - $check_plugins = get_option('active_plugins'); + $check_plugins = apply_filters( 'active_plugins', get_option('active_plugins') ); // Sanity check. If the active plugin list is not an array, make it an // empty array. @@ -584,7 +583,7 @@ function uninstall_plugin($plugin) { // Menu // -function add_menu_page( $page_title, $menu_title, $access_level, $file, $function = '', $icon_url = '' ) { +function add_menu_page( $page_title, $menu_title, $access_level, $file, $function = '', $icon_url = '', $position = NULL ) { global $menu, $admin_page_hooks, $_registered_pages; $file = plugin_basename( $file ); @@ -595,12 +594,19 @@ function add_menu_page( $page_title, $menu_title, $access_level, $file, $functio if (!empty ( $function ) && !empty ( $hookname )) add_action( $hookname, $function ); - if ( empty($icon_url) ) + if ( empty($icon_url) ) { $icon_url = 'images/generic.png'; - elseif ( is_ssl() && 0 === strpos($icon_url, 'http://') ) + } elseif ( is_ssl() && 0 === strpos($icon_url, 'http://') ) { $icon_url = 'https://' . substr($icon_url, 7); + } - $menu[] = array ( $menu_title, $access_level, $file, $page_title, 'menu-top ' . $hookname, $hookname, $icon_url ); + $new_menu = array ( $menu_title, $access_level, $file, $page_title, 'menu-top ' . $hookname, $hookname, $icon_url ); + + if ( NULL === $position ) { + $menu[] = $new_menu; + } else { + $menu[$position] = $new_menu; + } $_registered_pages[$hookname] = true; @@ -608,51 +614,19 @@ function add_menu_page( $page_title, $menu_title, $access_level, $file, $functio } function add_object_page( $page_title, $menu_title, $access_level, $file, $function = '', $icon_url = '') { - global $menu, $admin_page_hooks, $_wp_last_object_menu, $_registered_pages; - - $file = plugin_basename( $file ); - - $admin_page_hooks[$file] = sanitize_title( $menu_title ); - - $hookname = get_plugin_page_hookname( $file, '' ); - if (!empty ( $function ) && !empty ( $hookname )) - add_action( $hookname, $function ); - - if ( empty($icon_url) ) - $icon_url = 'images/generic.png'; + global $_wp_last_object_menu; $_wp_last_object_menu++; - $menu[$_wp_last_object_menu] = array ( $menu_title, $access_level, $file, $page_title, 'menu-top ' . $hookname, $hookname, $icon_url ); - - $_registered_pages[$hookname] = true; - - return $hookname; + return add_menu_page($page_title, $menu_title, $access_level, $file, $function, $icon_url, $_wp_last_object_menu); } function add_utility_page( $page_title, $menu_title, $access_level, $file, $function = '', $icon_url = '') { - global $menu, $admin_page_hooks, $_wp_last_utility_menu, $_registered_pages; - - $file = plugin_basename( $file ); - - $admin_page_hooks[$file] = sanitize_title( $menu_title ); - - $hookname = get_plugin_page_hookname( $file, '' ); - if (!empty ( $function ) && !empty ( $hookname )) - add_action( $hookname, $function ); - - if ( empty($icon_url) ) - $icon_url = 'images/generic.png'; - elseif ( is_ssl() && 0 === strpos($icon_url, 'http://') ) - $icon_url = 'https://' . substr($icon_url, 7); + global $_wp_last_utility_menu; $_wp_last_utility_menu++; - $menu[$_wp_last_utility_menu] = array ( $menu_title, $access_level, $file, $page_title, 'menu-top ' . $hookname, $hookname, $icon_url ); - - $_registered_pages[$hookname] = true; - - return $hookname; + return add_menu_page($page_title, $menu_title, $access_level, $file, $function, $icon_url, $_wp_last_utility_menu); } function add_submenu_page( $parent, $page_title, $menu_title, $access_level, $file, $function = '' ) { @@ -692,7 +666,7 @@ function add_submenu_page( $parent, $page_title, $menu_title, $access_level, $fi $_registered_pages[$hookname] = true; // backwards-compatibility for plugins using add_management page. See wp-admin/admin.php for redirect from edit.php to tools.php - if ( 'tools.php' == $parent ) + if ( 'tools.php' == $parent ) $_registered_pages[get_plugin_page_hookname( $file, 'edit.php')] = true; return $hookname; @@ -1003,7 +977,8 @@ function user_can_access_admin_page() { * * @since 2.7.0 * - * @param string $option_group A settings group name. Can be anything. + * @param string $option_group A settings group name. Should correspond to a whitelisted option key name. + * Default whitelisted option key names include "general," "discussion," and "reading," among others. * @param string $option_name The name of an option to sanitize and save. * @param unknown_type $sanitize_callback A callback function that sanitizes the option's value. * @return unknown diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 51bb136c..e5924f1d 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -236,6 +236,14 @@ function bulk_edit_posts( $post_data = null ) { wp_die( __('You are not allowed to edit posts.') ); } + if ( -1 == $post_data['_status'] ) { + $post_data['post_status'] = null; + unset($post_data['post_status']); + } else { + $post_data['post_status'] = $post_data['_status']; + } + unset($post_data['_status']); + $post_IDs = array_map( 'intval', (array) $post_data['post'] ); $reset = array( 'post_author', 'post_status', 'post_password', 'post_parent', 'page_template', 'comment_status', 'ping_status', 'keep_private', 'tags_input', 'post_category', 'sticky' ); @@ -298,7 +306,7 @@ function bulk_edit_posts( $post_data = null ) { $post_data['ID'] = $post_ID; $updated[] = wp_update_post( $post_data ); - if ( current_user_can( 'edit_others_posts' ) && isset( $post_data['sticky'] ) ) { + if ( isset( $post_data['sticky'] ) && current_user_can( 'edit_others_posts' ) ) { if ( 'sticky' == $post_data['sticky'] ) stick_post( $post_ID ); else @@ -318,29 +326,18 @@ function bulk_edit_posts( $post_data = null ) { * @return unknown */ function get_default_post_to_edit() { + + $post_title = ''; if ( !empty( $_REQUEST['post_title'] ) ) $post_title = esc_html( stripslashes( $_REQUEST['post_title'] )); - else if ( !empty( $_REQUEST['popuptitle'] ) ) { - $post_title = esc_html( stripslashes( $_REQUEST['popuptitle'] )); - $post_title = funky_javascript_fix( $post_title ); - } else { - $post_title = ''; - } $post_content = ''; if ( !empty( $_REQUEST['content'] ) ) $post_content = esc_html( stripslashes( $_REQUEST['content'] )); - else if ( !empty( $post_title ) ) { - $text = esc_html( stripslashes( urldecode( $_REQUEST['text'] ) ) ); - $text = funky_javascript_fix( $text); - $popupurl = esc_url($_REQUEST['popupurl']); - $post_content = ''.$post_title.''."\n$text"; - } + $post_excerpt = ''; if ( !empty( $_REQUEST['excerpt'] ) ) $post_excerpt = esc_html( stripslashes( $_REQUEST['excerpt'] )); - else - $post_excerpt = ''; $post->ID = 0; $post->post_name = ''; @@ -562,7 +559,9 @@ function add_meta( $post_ID ) { $metakeyselect = isset($_POST['metakeyselect']) ? stripslashes( trim( $_POST['metakeyselect'] ) ) : ''; $metakeyinput = isset($_POST['metakeyinput']) ? stripslashes( trim( $_POST['metakeyinput'] ) ) : ''; - $metavalue = isset($_POST['metavalue']) ? maybe_serialize( stripslashes( trim( $_POST['metavalue'] ) ) ) : ''; + $metavalue = isset($_POST['metavalue']) ? maybe_serialize( stripslashes_deep( $_POST['metavalue'] ) ) : ''; + if ( is_string($metavalue) ) + $metavalue = trim( $metavalue ); if ( ('0' === $metavalue || !empty ( $metavalue ) ) && ((('#NONE#' != $metakeyselect) && !empty ( $metakeyselect) ) || !empty ( $metakeyinput) ) ) { // We have a key/value pair. If both the select and the @@ -580,6 +579,8 @@ function add_meta( $post_ID ) { wp_cache_delete($post_ID, 'post_meta'); $wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->postmeta (post_id,meta_key,meta_value ) VALUES (%s, %s, %s)", $post_ID, $metakey, $metavalue) ); + do_action( 'added_postmeta', $wpdb->insert_id, $post_ID, $metakey, $metavalue ); + return $wpdb->insert_id; } return false; @@ -598,9 +599,13 @@ function delete_meta( $mid ) { $mid = (int) $mid; $post_id = $wpdb->get_var( $wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_id = %d", $mid) ); + + do_action( 'delete_postmeta', $mid ); wp_cache_delete($post_id, 'post_meta'); + $rval = $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->postmeta WHERE meta_id = %d", $mid) ); + do_action( 'deleted_postmeta', $mid ); - return $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->postmeta WHERE meta_id = %d", $mid) ); + return $rval; } /** @@ -681,15 +686,19 @@ function update_meta( $meta_id, $meta_key, $meta_value ) { return false; $post_id = $wpdb->get_var( $wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_id = %d", $meta_id) ); - wp_cache_delete($post_id, 'post_meta'); - $meta_value = maybe_serialize( stripslashes( $meta_value ) ); + $meta_value = maybe_serialize( stripslashes_deep( $meta_value ) ); $meta_id = (int) $meta_id; $data = compact( 'meta_key', 'meta_value' ); $where = compact( 'meta_id' ); - return $wpdb->update( $wpdb->postmeta, $data, $where ); + do_action( 'update_postmeta', $meta_id, $post_id, $meta_key, $meta_value ); + $rval = $wpdb->update( $wpdb->postmeta, $data, $where ); + wp_cache_delete($post_id, 'post_meta'); + do_action( 'updated_postmeta', $meta_id, $post_id, $meta_key, $meta_value ); + + return $rval; } // @@ -706,6 +715,7 @@ function update_meta( $meta_id, $meta_key, $meta_value ) { * @return unknown */ function _fix_attachment_links( $post_ID ) { + global $_fix_attachment_link_id; $post = & get_post( $post_ID, ARRAY_A ); @@ -733,7 +743,8 @@ function _fix_attachment_links( $post_ID ) { } $post_search[$i] = $anchor; - $post_replace[$i] = preg_replace( "#href=(\"|')[^'\"]*\\1#e", "stripslashes( 'href=\\1' ).get_attachment_link( $id ).stripslashes( '\\1' )", $anchor ); + $_fix_attachment_link_id = $id; + $post_replace[$i] = preg_replace_callback( "#href=(\"|')[^'\"]*\\1#", '_fix_attachment_links_replace_cb', $anchor ); ++$i; } @@ -745,6 +756,11 @@ function _fix_attachment_links( $post_ID ) { return wp_update_post( $post); } +function _fix_attachment_links_replace_cb($match) { + global $_fix_attachment_link_id; + return stripslashes( 'href='.$match[1] ).get_attachment_link( $_fix_attachment_link_id ).stripslashes( $match[1] ); +} + /** * Move child posts to a new parent. * @@ -759,7 +775,17 @@ function _relocate_children( $old_ID, $new_ID ) { global $wpdb; $old_ID = (int) $old_ID; $new_ID = (int) $new_ID; - return $wpdb->update($wpdb->posts, array('post_parent' => $new_ID), array('post_parent' => $old_ID) ); + + $children = $wpdb->get_col( $wpdb->prepare(" + SELECT post_id + FROM $wpdb->postmeta + WHERE meta_key = '_wp_attachment_temp_parent' + AND meta_value = %d", $old_ID) ); + + foreach ( $children as $child_id ) { + $wpdb->update($wpdb->posts, array('post_parent' => $new_ID), array('ID' => $child_id) ); + delete_post_meta($child_id, '_wp_attachment_temp_parent'); + } } /** @@ -795,6 +821,7 @@ function wp_edit_posts_query( $q = false ) { 'pending' => array(_x('Pending Review', 'post'), __('Pending posts'), _n_noop('Pending Review (%s)', 'Pending Review (%s)')), 'draft' => array(_x('Draft', 'post'), _x('Drafts', 'manage posts header'), _n_noop('Draft (%s)', 'Drafts (%s)')), 'private' => array(_x('Private', 'post'), __('Private posts'), _n_noop('Private (%s)', 'Private (%s)')), + 'trash' => array(_x('Trash', 'post'), __('Trash posts'), _n_noop('Trash (%s)', 'Trash (%s)')), ); $post_stati = apply_filters('post_stati', $post_stati); @@ -818,16 +845,33 @@ function wp_edit_posts_query( $q = false ) { $orderby = 'date'; } - $posts_per_page = get_user_option('edit_per_page'); - if ( empty($posts_per_page) ) + $posts_per_page = (int) get_user_option( 'edit_per_page', 0, false ); + if ( empty( $posts_per_page ) || $posts_per_page < 1 ) $posts_per_page = 15; - $posts_per_page = apply_filters('edit_posts_per_page', $posts_per_page); + $posts_per_page = apply_filters( 'edit_posts_per_page', $posts_per_page ); wp("post_type=post&$post_status_q&posts_per_page=$posts_per_page&order=$order&orderby=$orderby"); return array($post_stati, $avail_post_stati); } +/** + * Get default post mime types + * + * @since 2.9.0 + * + * @return array + */ +function get_post_mime_types() { + $post_mime_types = array( // array( adj, noun ) + 'image' => array(__('Images'), __('Manage Images'), _n_noop('Image (%s)', 'Images (%s)')), + 'audio' => array(__('Audio'), __('Manage Audio'), _n_noop('Audio (%s)', 'Audio (%s)')), + 'video' => array(__('Video'), __('Manage Video'), _n_noop('Video (%s)', 'Video (%s)')), + ); + + return apply_filters('post_mime_types', $post_mime_types); +} + /** * {@internal Missing Short Description}} * @@ -858,18 +902,13 @@ function wp_edit_attachments_query( $q = false ) { $q['m'] = isset( $q['m'] ) ? (int) $q['m'] : 0; $q['cat'] = isset( $q['cat'] ) ? (int) $q['cat'] : 0; $q['post_type'] = 'attachment'; - $q['post_status'] = 'any'; - $media_per_page = get_user_option('upload_per_page'); - if ( empty($media_per_page) ) + $q['post_status'] = isset( $q['status'] ) && 'trash' == $q['status'] ? 'trash' : 'inherit'; + $media_per_page = (int) get_user_option( 'upload_per_page', 0, false ); + if ( empty( $media_per_page ) || $media_per_page < 1 ) $media_per_page = 20; - $q['posts_per_page'] = $media_per_page; - $post_mime_types = array( // array( adj, noun ) - 'image' => array(__('Images'), __('Manage Images'), _n_noop('Image (%s)', 'Images (%s)')), - 'audio' => array(__('Audio'), __('Manage Audio'), _n_noop('Audio (%s)', 'Audio (%s)')), - 'video' => array(__('Video'), __('Manage Video'), _n_noop('Video (%s)', 'Video (%s)')), - ); - $post_mime_types = apply_filters('post_mime_types', $post_mime_types); + $q['posts_per_page'] = apply_filters( 'upload_per_page', $media_per_page ); + $post_mime_types = get_post_mime_types(); $avail_post_mime_types = get_available_post_mime_types('attachment'); if ( isset($q['post_mime_type']) && !array_intersect( (array) $q['post_mime_type'], array_keys($post_mime_types) ) ) @@ -906,12 +945,12 @@ function postbox_classes( $id, $page ) { * * @since unknown * - * @param unknown_type $id - * @param unknown_type $title - * @param unknown_type $name - * @return unknown + * @param int|object $id Post ID or post object. + * @param string $title (optional) Title + * @param string $name (optional) Name + * @return array With two entries of type string */ -function get_sample_permalink($id, $title=null, $name = null) { +function get_sample_permalink($id, $title = null, $name = null) { $post = &get_post($id); if (!$post->ID) { return array('', ''); @@ -924,7 +963,7 @@ function get_sample_permalink($id, $title=null, $name = null) { // drafts, so we will fake, that our post is published if (in_array($post->post_status, array('draft', 'pending'))) { $post->post_status = 'publish'; - $post->post_name = sanitize_title($post->post_name? $post->post_name : $post->post_title, $post->ID); + $post->post_name = sanitize_title($post->post_name ? $post->post_name : $post->post_title, $post->ID); } $post->post_name = wp_unique_post_slug($post->post_name, $post->ID, $post->post_status, $post->post_type, $post->post_parent); @@ -932,7 +971,7 @@ function get_sample_permalink($id, $title=null, $name = null) { // If the user wants to set a new name -- override the current one // Note: if empty name is supplied -- use the title instead, see #6072 if (!is_null($name)) { - $post->post_name = sanitize_title($name? $name : $title, $post->ID); + $post->post_name = sanitize_title($name ? $name : $title, $post->ID); } $post->filter = 'sample'; @@ -960,40 +999,48 @@ function get_sample_permalink($id, $title=null, $name = null) { } /** - * {@internal Missing Short Description}} + * sample permalink html * + * intended to be used for the inplace editor of the permalink post slug on in the post (and page?) editor. + * * @since unknown * - * @param unknown_type $id - * @param unknown_type $new_title - * @param unknown_type $new_slug - * @return unknown + * @param int|object $id Post ID or post object. + * @param string $new_title (optional) New title + * @param string $new_slug (optional) New slug + * @return string intended to be used for the inplace editor of the permalink post slug on in the post (and page?) editor. */ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) { $post = &get_post($id); list($permalink, $post_name) = get_sample_permalink($post->ID, $new_title, $new_slug); - if ( 'publish' == $post->post_status ) + + if ( 'publish' == $post->post_status ) { $view_post = 'post' == $post->post_type ? __('View Post') : __('View Page'); + $title = __('Click to edit this part of the permalink'); + } else { + $title = __('Temporary permalink. Click to edit this part.'); + } if ( false === strpos($permalink, '%postname%') && false === strpos($permalink, '%pagename%') ) { $return = '' . __('Permalink:') . "\n" . '' . $permalink . "\n"; - if ( current_user_can( 'manage_options' ) ) + if ( current_user_can( 'manage_options' ) && !( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') ) ) $return .= '' . __('Change Permalinks') . "\n"; if ( isset($view_post) ) $return .= "$view_post\n"; + $return = apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug); + return $return; } - $title = __('Click to edit this part of the permalink'); - if (function_exists('mb_strlen')) { - if (mb_strlen($post_name) > 30) { + if ( function_exists('mb_strlen') ) { + if ( mb_strlen($post_name) > 30 ) { $post_name_abridged = mb_substr($post_name, 0, 14). '…' . mb_substr($post_name, -14); } else { $post_name_abridged = $post_name; } } else { - if (strlen($post_name) > 30) { + if ( strlen($post_name) > 30 ) { $post_name_abridged = substr($post_name, 0, 14). '…' . substr($post_name, -14); } else { $post_name_abridged = $post_name; @@ -1004,20 +1051,51 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) { $display_link = str_replace(array('%pagename%','%postname%'), $post_name_html, $permalink); $view_link = str_replace(array('%pagename%','%postname%'), $post_name, $permalink); $return = '' . __('Permalink:') . "\n" . '' . $display_link . "\n"; - $return .= '' . __('Edit') . "\n"; + $return .= '' . __('Edit') . "\n"; $return .= '' . $post_name . "\n"; if ( isset($view_post) ) $return .= "$view_post\n"; + $return = apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug); + return $return; } /** - * {@internal Missing Short Description}} + * Output HTML for the post thumbnail meta-box. * - * @since unknown + * @since 2.9.0 + * + * @param int $thumbnail_id ID of the attachment used for thumbnail + * @return string html + */ +function _wp_post_thumbnail_html( $thumbnail_id = NULL ) { + global $content_width, $_wp_additional_image_sizes; + $content = '

      ' . esc_html__( 'Set thumbnail' ) . '

      '; + + if ( $thumbnail_id && get_post( $thumbnail_id ) ) { + $old_content_width = $content_width; + $content_width = 266; + if ( !isset( $_wp_additional_image_sizes['post-thumbnail'] ) ) + $thumbnail_html = wp_get_attachment_image( $thumbnail_id, array( $content_width, $content_width ) ); + else + $thumbnail_html = wp_get_attachment_image( $thumbnail_id, 'post-thumbnail' ); + if ( !empty( $thumbnail_html ) ) { + $content = '' . $thumbnail_html . ''; + $content .= '

      ' . esc_html__( 'Remove thumbnail' ) . '

      '; + } + $content_width = $old_content_width; + } + + return apply_filters( 'admin_post_thumbnail_html', $content ); +} + +/** + * Check to see if the post is currently being edited by another user. * - * @param unknown_type $post_id + * @since 2.5.0 + * + * @param int $post_id ID of the post to check for editing * @return bool|int False: not locked or locked by current user. Int: user ID of user with lock. */ function wp_check_post_lock( $post_id ) { @@ -1037,12 +1115,12 @@ function wp_check_post_lock( $post_id ) { } /** - * {@internal Missing Short Description}} + * Mark the post as currently being edited by the current user * - * @since unknown + * @since 2.5.0 * - * @param unknown_type $post_id - * @return unknown + * @param int $post_id ID of the post to being edited + * @return bool Returns false if the post doesn't exist of there is no current user */ function wp_set_post_lock( $post_id ) { global $current_user; @@ -1061,7 +1139,7 @@ function wp_set_post_lock( $post_id ) { /** * Outputs the notice message to say that someone else is editing this post at the moment. - * + * * @since 2.8.5 * @return none */ @@ -1069,7 +1147,7 @@ function _admin_notice_post_locked() { global $post; $last_user = get_userdata( get_post_meta( $post->ID, '_edit_last', true ) ); $last_user_name = $last_user ? $last_user->display_name : __('Somebody'); - + switch ($post->post_type) { case 'post': $message = __( 'Warning: %s is currently editing this post' ); @@ -1080,9 +1158,9 @@ function _admin_notice_post_locked() { default: $message = __( 'Warning: %s is currently editing this.' ); } - + $message = sprintf( $message, esc_html( $last_user_name ) ); - echo "

      $message

      "; + echo "

      $message

      "; } /** @@ -1104,6 +1182,8 @@ function wp_create_post_autosave( $post_id ) { if ( $old_autosave = wp_get_post_autosave( $post_id ) ) { $new_autosave = _wp_post_revision_fields( $_POST, true ); $new_autosave['ID'] = $old_autosave->ID; + $current_user = wp_get_current_user(); + $new_autosave['post_author'] = $current_user->ID; return wp_update_post( $new_autosave ); } @@ -1187,8 +1267,9 @@ function post_preview() { * to the URL when queueing them with the mce_external_plugins filter. * * @param bool $teeny optional Output a trimmed down version used in Press This. + * @param mixed $settings optional An array that can add to or overwrite the default TinyMCE settings. */ -function wp_tiny_mce( $teeny = false ) { +function wp_tiny_mce( $teeny = false, $settings = false ) { global $concatenate_scripts, $compress_scripts, $tinymce_version; if ( ! user_can_richedit() ) @@ -1207,7 +1288,7 @@ function wp_tiny_mce( $teeny = false ) { $mce_spellchecker_languages = apply_filters('mce_spellchecker_languages', '+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv'); if ( $teeny ) { - $plugins = apply_filters( 'teeny_mce_plugins', array('safari', 'inlinepopups', 'media', 'autosave', 'fullscreen') ); + $plugins = apply_filters( 'teeny_mce_plugins', array('safari', 'inlinepopups', 'media', 'fullscreen', 'wordpress') ); $ext_plugins = ''; } else { $plugins = array( 'safari', 'inlinepopups', 'spellchecker', 'paste', 'wordpress', 'media', 'fullscreen', 'wpeditimage', 'wpgallery', 'tabfocus' ); @@ -1341,7 +1422,9 @@ function wp_tiny_mce( $teeny = false ) { 'accessibility_focus' => true, 'tabfocus_elements' => 'major-publishing-actions', 'media_strict' => false, - 'save_callback' => 'switchEditors.saveCallback', + 'paste_remove_styles' => true, + 'paste_remove_spans' => true, + 'paste_strip_class_attributes' => 'all', 'wpeditimage_disable_captions' => $no_captions, 'plugins' => "$plugins" ); @@ -1351,6 +1434,9 @@ function wp_tiny_mce( $teeny = false ) { if ( ! empty($mce_css) ) $initArray['content_css'] = "$mce_css"; + if ( is_array($settings) ) + $initArray = array_merge($initArray, $settings); + // For people who really REALLY know what they're doing with TinyMCE // You can modify initArray to add, remove, change elements of the config before tinyMCE.init // Setting "valid_elements", "invalid_elements" and "extended_valid_elements" can be done through "tiny_mce_before_init". diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php index 53ec246d..e7d37f4c 100644 --- a/wp-admin/includes/schema.php +++ b/wp-admin/includes/schema.php @@ -19,12 +19,10 @@ $charset_collate = ''; // Declare these as global in case schema.php is included from a function. global $wpdb, $wp_queries; -if ( $wpdb->has_cap( 'collation' ) ) { - if ( ! empty($wpdb->charset) ) - $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset"; - if ( ! empty($wpdb->collate) ) - $charset_collate .= " COLLATE $wpdb->collate"; -} +if ( ! empty($wpdb->charset) ) + $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset"; +if ( ! empty($wpdb->collate) ) + $charset_collate .= " COLLATE $wpdb->collate"; /** Create WordPress database tables SQL */ $wp_queries = "CREATE TABLE $wpdb->terms ( @@ -54,6 +52,15 @@ CREATE TABLE $wpdb->term_relationships ( PRIMARY KEY (object_id,term_taxonomy_id), KEY term_taxonomy_id (term_taxonomy_id) ) $charset_collate; +CREATE TABLE $wpdb->commentmeta ( + meta_id bigint(20) unsigned NOT NULL auto_increment, + comment_id bigint(20) unsigned NOT NULL default '0', + meta_key varchar(255) default NULL, + meta_value longtext, + PRIMARY KEY (meta_id), + KEY comment_id (comment_id), + KEY meta_key (meta_key) +) $charset_collate; CREATE TABLE $wpdb->comments ( comment_ID bigint(20) unsigned NOT NULL auto_increment, comment_post_ID bigint(20) unsigned NOT NULL default '0', @@ -99,8 +106,8 @@ CREATE TABLE $wpdb->options ( option_name varchar(64) NOT NULL default '', option_value longtext NOT NULL, autoload varchar(20) NOT NULL default 'yes', - PRIMARY KEY (option_id,blog_id,option_name), - KEY option_name (option_name) + PRIMARY KEY (option_id), + UNIQUE KEY option_name (option_name) ) $charset_collate; CREATE TABLE $wpdb->postmeta ( meta_id bigint(20) unsigned NOT NULL auto_increment, @@ -180,12 +187,10 @@ function populate_options() { do_action('populate_options'); if ( ini_get('safe_mode') ) { - // Safe mode screws up mkdir(), so we must use a flat structure. + // Safe mode can break mkdir() so use a flat structure by default. $uploads_use_yearmonth_folders = 0; - $upload_path = WP_CONTENT_DIR; } else { $uploads_use_yearmonth_folders = 1; - $upload_path = WP_CONTENT_DIR . '/uploads'; } $options = array( @@ -200,7 +205,6 @@ function populate_options() { 'require_name_email' => 1, 'comments_notify' => 1, 'posts_per_rss' => 10, - 'rss_excerpt_length' => 50, 'rss_use_excerpt' => 0, 'mailserver_url' => 'mail.example.com', 'mailserver_login' => 'login@example.com', @@ -257,7 +261,7 @@ function populate_options() { // 2.0.1 'uploads_use_yearmonth_folders' => $uploads_use_yearmonth_folders, - 'upload_path' => $upload_path, + 'upload_path' => '', // 2.0.3 'secret' => wp_generate_password(64), @@ -305,7 +309,12 @@ function populate_options() { 'widget_rss' => array(), // 2.8 - 'timezone_string' => '' + 'timezone_string' => '', + + // 2.9 + 'embed_autourls' => 1, + 'embed_size_w' => '', + 'embed_size_h' => 600, ); // Set autoload to no for these options @@ -339,9 +348,12 @@ function populate_options() { // Delete unused options $unusedoptions = array ('blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory', 'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping', 'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'fileupload_allowedusers', 'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference', 'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char', 'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1', 'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5', 'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9', 'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls', 'default_geourl_lat', 'default_geourl_lon', 'use_default_geourl', 'weblogs_xml_url', 'new_users_can_blog', '_wpnonce', '_wp_http_referer', 'Update', 'action', 'rich_editing', 'autosave_interval', 'deactivated_plugins', 'can_compress_scripts', - 'page_uris', 'rewrite_rules', 'update_core', 'update_plugins', 'update_themes', 'doing_cron', 'random_seed'); + 'page_uris', 'update_core', 'update_plugins', 'update_themes', 'doing_cron', 'random_seed', 'rss_excerpt_length'); foreach ($unusedoptions as $option) delete_option($option); + + // delete obsolete magpie stuff + $wpdb->query("DELETE FROM $wpdb->options WHERE option_name REGEXP '^rss_[0-9a-f]{32}(_ts)?$'"); } /** diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index b47e079d..79bc9900 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -177,14 +177,14 @@ function _cat_row( $category, $level, $name_override = false ) { $output .= "$edit"; $output .= ''; break; case 'description': $output .= "$category->description"; break; case 'slug': - $output .= "$category->slug"; + $output .= "" . apply_filters('editable_slug', $category->slug) . ""; break; case 'posts': $attributes = 'class="posts column-posts num"' . $style; @@ -347,14 +347,14 @@ function link_cat_row( $category, $name_override = false ) { $output .= "$edit"; $output .= ''; break; case 'description': $output .= "$category->description"; break; case 'slug': - $output .= "$category->slug"; + $output .= "" . apply_filters('editable_slug', $category->slug) . ""; break; case 'links': $attributes = 'class="links column-links num"' . $style; @@ -376,7 +376,7 @@ function link_cat_row( $category, $name_override = false ) { * * Compares the first two arguments and if identical marks as checked * - * @since 2.8 + * @since 1.0 * * @param any $checked One of the values to compare * @param any $current (true) The other value to compare if not just true @@ -391,7 +391,7 @@ function checked( $checked, $current = true, $echo = true) { * * Compares the first two arguments and if identical marks as selected * - * @since 2.8 + * @since 1.0 * * @param any selected One of the values to compare * @param any $current (true) The other value to compare if not just true @@ -415,7 +415,7 @@ function selected( $selected, $current = true, $echo = true) { * @param string $type The type of checked|selected we are doing. */ function __checked_selected_helper( $helper, $current, $echo, $type) { - if ( $helper == $current) + if ( (string) $helper === (string) $current) $result = " $type='$type'"; else $result = ''; @@ -487,7 +487,7 @@ class Walker_Category_Checklist extends Walker { * @param unknown_type $selected_cats * @param unknown_type $popular_cats */ -function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false, $walker = null ) { +function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false, $walker = null, $checked_ontop = true ) { if ( empty($walker) || !is_a($walker, 'Walker') ) $walker = new Walker_Category_Checklist; @@ -515,19 +515,21 @@ function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $select $categories = get_categories('get=all'); } - // Post process $categories rather than adding an exclude to the get_terms() query to keep the query the same across all posts (for any query cache) - $checked_categories = array(); - $keys = array_keys( $categories ); + if ( $checked_ontop ) { + // Post process $categories rather than adding an exclude to the get_terms() query to keep the query the same across all posts (for any query cache) + $checked_categories = array(); + $keys = array_keys( $categories ); - foreach( $keys as $k ) { - if ( in_array( $categories[$k]->term_id, $args['selected_cats'] ) ) { - $checked_categories[] = $categories[$k]; - unset( $categories[$k] ); + foreach( $keys as $k ) { + if ( in_array( $categories[$k]->term_id, $args['selected_cats'] ) ) { + $checked_categories[] = $categories[$k]; + unset( $categories[$k] ); + } } - } - // Put checked cats on top - echo call_user_func_array(array(&$walker, 'walk'), array($checked_categories, 0, $args)); + // Put checked cats on top + echo call_user_func_array(array(&$walker, 'walk'), array($checked_categories, 0, $args)); + } // Then the rest of them echo call_user_func_array(array(&$walker, 'walk'), array($categories, 0, $args)); } @@ -545,10 +547,12 @@ function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $select */ function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $echo = true ) { global $post_ID; + if ( $post_ID ) $checked_categories = wp_get_post_categories($post_ID); else $checked_categories = array(); + $categories = get_terms( $taxonomy, array( 'orderby' => 'count', 'order' => 'DESC', 'number' => $number, 'hierarchical' => false ) ); $popular_ids = array(); @@ -557,11 +561,12 @@ function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $ech if ( !$echo ) // hack for AJAX use continue; $id = "popular-category-$category->term_id"; + $checked = in_array( $category->term_id, $checked_categories ) ? 'checked="checked"' : ''; ?> @@ -663,7 +668,7 @@ function _tag_row( $tag, $class = '', $taxonomy = 'post_tag' ) { $actions = array(); $actions['edit'] = '' . __('Edit') . ''; $actions['inline hide-if-no-js'] = '' . __('Quick Edit') . ''; - $actions['delete'] = "term_id) . "'>" . __('Delete') . ""; + $actions['delete'] = "term_id) . "'>" . __('Delete') . ""; $actions = apply_filters('tag_row_actions', $actions, $tag); $action_count = count($actions); $i = 0; @@ -676,13 +681,13 @@ function _tag_row( $tag, $class = '', $taxonomy = 'post_tag' ) { $out .= '
      '; $out .= ''; + $out .= '
      ' . apply_filters('editable_slug', $qe_data->slug) . '
      '; break; case 'description': $out .= "$tag->description"; break; case 'slug': - $out .= "$tag->slug"; + $out .= "" . apply_filters('editable_slug', $tag->slug) . ""; break; case 'posts': $attributes = 'class="posts column-posts num"' . $style; @@ -730,7 +735,7 @@ function tag_rows( $page = 1, $pagesize = 20, $searchterms = '', $taxonomy = 'po $out = ''; $count = 0; foreach( $tags as $tag ) - $out .= _tag_row( $tag, ++$count % 2 ? ' class="iedit alternate"' : ' class="iedit"', $taxonomy ); + $out .= _tag_row( $tag, ++$count % 2 ? ' class="alternate"' : '', $taxonomy ); // filter and send to screen echo $out; @@ -753,7 +758,8 @@ function wp_manage_posts_columns() { $posts_columns['author'] = __('Author'); $posts_columns['categories'] = __('Categories'); $posts_columns['tags'] = __('Tags'); - if ( !isset($_GET['post_status']) || !in_array($_GET['post_status'], array('pending', 'draft', 'future')) ) + $post_status = !empty($_REQUEST['post_status']) ? $_REQUEST['post_status'] : 'all'; + if ( !in_array( $post_status, array('pending', 'draft', 'future') ) ) $posts_columns['comments'] = '
      Comments
      '; $posts_columns['date'] = __('Date'); $posts_columns = apply_filters('manage_posts_columns', $posts_columns); @@ -800,10 +806,8 @@ function wp_manage_pages_columns() { $posts_columns['cb'] = ''; $posts_columns['title'] = __('Title'); $posts_columns['author'] = __('Author'); - $post_status = 'all'; - if ( !empty($_GET['post_status']) ) - $post_status = $_GET['post_status']; - if ( !in_array($post_status, array('pending', 'draft', 'future')) ) + $post_status = !empty($_REQUEST['post_status']) ? $_REQUEST['post_status'] : 'all'; + if ( !in_array( $post_status, array('pending', 'draft', 'future') ) ) $posts_columns['comments'] = '
      '; $posts_columns['date'] = __('Date'); $posts_columns = apply_filters('manage_pages_columns', $posts_columns); @@ -1055,21 +1059,18 @@ function inline_edit_row( $type ) { id, true, $type ); // TODO: ROLE SYSTEM + $authors_dropdown = ''; if ( $authors && count( $authors ) > 1 ) : - $users_opt = array('include' => $authors, 'name' => 'post_author', 'class'=> 'authors', 'multi' => 1); + $users_opt = array('include' => $authors, 'name' => 'post_author', 'class'=> 'authors', 'multi' => 1, 'echo' => 0); if ( $bulk ) $users_opt['show_option_none'] = __('- No Change -'); -?> - + $authors_dropdown = ''; - @@ -1294,7 +1295,7 @@ function get_inline_data($post) { echo '