From: Edward Z. Yang Date: Wed, 20 Jun 2012 03:36:14 +0000 (-0400) Subject: WordPress 3.4 X-Git-Tag: wordpress-3.4 X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/commitdiff_plain/refs/tags/wordpress-3.4 WordPress 3.4 Signed-off-by: Edward Z. Yang --- diff --git a/index.php b/index.php index 49403ecc..1e3364ad 100644 --- a/index.php +++ b/index.php @@ -15,4 +15,3 @@ define('WP_USE_THEMES', true); /** Loads the WordPress Environment and Template */ require('./wp-blog-header.php'); -?> \ No newline at end of file diff --git a/license.txt b/license.txt index 431a146a..ec05d294 100644 --- a/license.txt +++ b/license.txt @@ -37,16 +37,15 @@ and =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble + Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public @@ -55,7 +54,7 @@ software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to +the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not @@ -96,7 +95,7 @@ patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. - GNU GENERAL PUBLIC LICENSE + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains @@ -160,6 +159,7 @@ distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or @@ -294,7 +294,7 @@ make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY + NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN @@ -316,8 +316,66 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - END OF TERMS AND CONDITIONS + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. WRITTEN OFFER diff --git a/readme.html b/readme.html index 8980b379..b32c5409 100644 --- a/readme.html +++ b/readme.html @@ -7,8 +7,8 @@

- WordPress -
Version 3.3.2 + WordPress +
Version 3.4

Semantic Personal Publishing Platform

@@ -104,6 +104,5 @@

License

WordPress is free software, and is released under the terms of the GPL version 2 or (at your option) any later version. See license.txt.

- diff --git a/wp-activate.php b/wp-activate.php index 4f720709..d470772f 100644 --- a/wp-activate.php +++ b/wp-activate.php @@ -63,9 +63,9 @@ get_header(); '; if ( $signup->domain . $signup->path == '' ) { - printf( __('Your account has been activated. You may now log in to the site using your chosen username of “%2$s”. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can reset your password.'), network_site_url( 'wp-login.php', 'login' ), $signup->user_login, $signup->user_email, wp_lostpassword_url() ); + printf( __('Your account has been activated. You may now log in to the site using your chosen username of “%2$s”. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can reset your password.'), network_site_url( 'wp-login.php', 'login' ), $signup->user_login, $signup->user_email, wp_lostpassword_url() ); } else { - printf( __('Your site at %2$s is active. You may now log in to your site using your chosen username of “%3$s”. Please check your email inbox at %4$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can reset your password.'), 'http://' . $signup->domain, $signup->domain, $signup->user_login, $signup->user_email, wp_lostpassword_url() ); + printf( __('Your site at %2$s is active. You may now log in to your site using your chosen username of “%3$s”. Please check your email inbox at %4$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can reset your password.'), 'http://' . $signup->domain, $signup->domain, $signup->user_login, $signup->user_email, wp_lostpassword_url() ); } echo '

'; } else { diff --git a/wp-admin/about.php b/wp-admin/about.php index 1ebc0f0d..3fa52e79 100644 --- a/wp-admin/about.php +++ b/wp-admin/about.php @@ -13,13 +13,13 @@ $title = __( 'About' ); list( $display_version ) = explode( '-', $wp_version ); -include( './admin-header.php' ); +include( ABSPATH . 'wp-admin/admin-header.php' ); ?>

-
+
@@ -33,107 +33,62 @@ include( './admin-header.php' ); -
-

-

Version %1$s addressed some security issues and fixed %2$s bug.', - 'Version %1$s addressed some security issues and fixed %2$s bugs.', 12 ), '3.3.2', number_format_i18n( 12 ) ); ?> - the release notes.' ), 'http://codex.wordpress.org/Version_3.3.2' ); ?> -

-

Version %1$s addressed a security issue and fixed %2$s bug.', - 'Version %1$s addressed a security issue and fixed %2$s bugs.', 15 ), '3.3.1', number_format_i18n( 15 ) ); ?> - the release notes.' ), 'http://codex.wordpress.org/Version_3.3.1' ); ?> -

-
-
-

+

-
- - -
-
-

-

+ +

+

before activating a new theme. Note: this feature is available for installed themes only.' ); ?>

-

-

- -

-

-
+

+

-

+

-
-

-

- -
-

-

+
+

+

theme support.' ); ?>

+
+ + +
-
-
- -

-

-
-
- -

-

-
+
+ +

+

-

+

-
- - -
-
-

-

- -

-

- -

-

-
+ + +

+

+

Embeds.' ), __( 'http://codex.wordpress.org/Embeds' ) ); ?>

+
-

+

-
-
-

- -

-
-
-

-

Tools → Import to get the new Tumblr Importer, which maps your Tumblog posts to the matching WordPress post formats. Tip: Choose a theme designed to display post formats to get the greatest benefit from the importer.' ); ?>

-
-
-

-

Note: if you’ve added new widgets since the switch, you’ll need to rescue them from the Inactive Widgets area.' ); ?>

-
+
+ + +

+

-
@@ -141,49 +96,43 @@ include( './admin-header.php' );
-

-

-
-
-

-

-
-
-

-

-
-
+

+

-
-
-

is_main_query()

-

WP_Query object is the main WordPress query or a secondary query.' ); ?>

+

+

-

-

+

+

+ +

+

-

-

+

+

WordPress API that supports custom content types and taxonomies, as well as dozens of other bug fixes and improvements.' ), __( 'http://codex.wordpress.org/XML-RPC_WordPress_API' ) ); ?>

+ +

+

-
- "> | - +
Version %1$s addressed some security issues and fixed 'Version %1$s addressed some security issues and fixed %2$s bugs.' ); __( 'For more information, see the release notes.' ); - -?> \ No newline at end of file diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php index c21c861e..db44df78 100644 --- a/wp-admin/admin-ajax.php +++ b/wp-admin/admin-ajax.php @@ -4,6 +4,8 @@ * * @package WordPress * @subpackage Administration + * + * @link http://codex.wordpress.org/AJAX_in_Plugins */ /** @@ -11,1581 +13,59 @@ * * @since 2.1.0 */ -define('DOING_AJAX', true); -define('WP_ADMIN', true); - -if ( ! isset( $_REQUEST['action'] ) ) - die('-1'); - -require_once('../wp-load.php'); - -require_once('./includes/admin.php'); -@header('Content-Type: text/html; charset=' . get_option('blog_charset')); -send_nosniff_header(); - -do_action('admin_init'); - -if ( ! is_user_logged_in() ) { - - if ( isset( $_POST['action'] ) && $_POST['action'] == 'autosave' ) { - $id = isset($_POST['post_ID'])? (int) $_POST['post_ID'] : 0; - - if ( ! $id ) - die('-1'); - - $message = sprintf( __('ALERT: You are logged out! Could not save draft. Please log in again.'), wp_login_url() ); - $x = new WP_Ajax_Response( array( - 'what' => 'autosave', - 'id' => $id, - 'data' => $message - ) ); - $x->send(); - } - - if ( !empty( $_REQUEST['action'] ) ) - do_action( 'wp_ajax_nopriv_' . $_REQUEST['action'] ); - - die('-1'); -} - -if ( isset( $_GET['action'] ) ) : -switch ( $action = $_GET['action'] ) : -case 'fetch-list' : - - $list_class = $_GET['list_args']['class']; - check_ajax_referer( "fetch-list-$list_class", '_ajax_fetch_list_nonce' ); - - $current_screen = convert_to_screen( $_GET['list_args']['screen']['id'] ); - - define( 'WP_NETWORK_ADMIN', $current_screen->is_network ); - define( 'WP_USER_ADMIN', $current_screen->is_user ); - - $wp_list_table = _get_list_table( $list_class ); - if ( ! $wp_list_table ) - die( '0' ); - - if ( ! $wp_list_table->ajax_user_can() ) - die( '-1' ); - - $wp_list_table->ajax_response(); - - die( '0' ); - break; -case 'ajax-tag-search' : - if ( isset( $_GET['tax'] ) ) { - $taxonomy = sanitize_key( $_GET['tax'] ); - $tax = get_taxonomy( $taxonomy ); - if ( ! $tax ) - die( '0' ); - if ( ! current_user_can( $tax->cap->assign_terms ) ) - die( '-1' ); - } else { - die('0'); - } - - $s = stripslashes( $_GET['q'] ); - - if ( false !== strpos( $s, ',' ) ) { - $s = explode( ',', $s ); - $s = $s[count( $s ) - 1]; - } - $s = trim( $s ); - if ( strlen( $s ) < 2 ) - die; // require 2 chars for matching - - $results = $wpdb->get_col( $wpdb->prepare( "SELECT t.name FROM $wpdb->term_taxonomy AS tt INNER JOIN $wpdb->terms AS t ON tt.term_id = t.term_id WHERE tt.taxonomy = %s AND t.name LIKE (%s)", $taxonomy, '%' . like_escape( $s ) . '%' ) ); - - echo join( $results, "\n" ); - die; - break; -case 'wp-compression-test' : - if ( !current_user_can( 'manage_options' ) ) - die('-1'); - - if ( ini_get('zlib.output_compression') || 'ob_gzhandler' == ini_get('output_handler') ) { - update_site_option('can_compress_scripts', 0); - die('0'); - } - - if ( isset($_GET['test']) ) { - header( 'Expires: Wed, 11 Jan 1984 05:00:00 GMT' ); - header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); - header( 'Cache-Control: no-cache, must-revalidate, max-age=0' ); - header( 'Pragma: no-cache' ); - header('Content-Type: application/x-javascript; charset=UTF-8'); - $force_gzip = ( defined('ENFORCE_GZIP') && ENFORCE_GZIP ); - $test_str = '"wpCompressionTest Lorem ipsum dolor sit amet consectetuer mollis sapien urna ut a. Eu nonummy condimentum fringilla tempor pretium platea vel nibh netus Maecenas. Hac molestie amet justo quis pellentesque est ultrices interdum nibh Morbi. Cras mattis pretium Phasellus ante ipsum ipsum ut sociis Suspendisse Lorem. Ante et non molestie. Porta urna Vestibulum egestas id congue nibh eu risus gravida sit. Ac augue auctor Ut et non a elit massa id sodales. Elit eu Nulla at nibh adipiscing mattis lacus mauris at tempus. Netus nibh quis suscipit nec feugiat eget sed lorem et urna. Pellentesque lacus at ut massa consectetuer ligula ut auctor semper Pellentesque. Ut metus massa nibh quam Curabitur molestie nec mauris congue. Volutpat molestie elit justo facilisis neque ac risus Ut nascetur tristique. Vitae sit lorem tellus et quis Phasellus lacus tincidunt nunc Fusce. Pharetra wisi Suspendisse mus sagittis libero lacinia Integer consequat ac Phasellus. Et urna ac cursus tortor aliquam Aliquam amet tellus volutpat Vestibulum. Justo interdum condimentum In augue congue tellus sollicitudin Quisque quis nibh."'; - - if ( 1 == $_GET['test'] ) { - echo $test_str; - die; - } elseif ( 2 == $_GET['test'] ) { - if ( !isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) - die('-1'); - if ( false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) { - header('Content-Encoding: deflate'); - $out = gzdeflate( $test_str, 1 ); - } elseif ( false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) { - header('Content-Encoding: gzip'); - $out = gzencode( $test_str, 1 ); - } else { - die('-1'); - } - echo $out; - die; - } elseif ( 'no' == $_GET['test'] ) { - update_site_option('can_compress_scripts', 0); - } elseif ( 'yes' == $_GET['test'] ) { - update_site_option('can_compress_scripts', 1); - } - } - - 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 'menu-quick-search': - if ( ! current_user_can( 'edit_theme_options' ) ) - die('-1'); - - require_once ABSPATH . 'wp-admin/includes/nav-menu.php'; - - _wp_ajax_menu_quick_search( $_REQUEST ); - - exit; - 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'); - break; -endswitch; -endif; - -/** - * Sends back current comment total and new page links if they need to be updated. - * - * Contrary to normal success AJAX response ("1"), die with time() on success. - * - * @since 2.7 - * - * @param int $comment_id - * @return die - */ -function _wp_ajax_delete_comment_response( $comment_id, $delta = -1 ) { - $total = (int) @$_POST['_total']; - $per_page = (int) @$_POST['_per_page']; - $page = (int) @$_POST['_page']; - $url = esc_url_raw( @$_POST['_url'] ); - // JS didn't send us everything we need to know. Just die with success message - if ( !$total || !$per_page || !$page || !$url ) - die( (string) time() ); - - $total += $delta; - if ( $total < 0 ) - $total = 0; - - // Only do the expensive stuff on a page-break, and about 1 other time per page - if ( 0 == $total % $per_page || 1 == mt_rand( 1, $per_page ) ) { - $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($post_id); - - if ( isset( $comment_count->$status ) ) // We're looking for a known type of comment count - $total = $comment_count->$status; - // else use the decremented value from above - } - - $time = time(); // The time since the last comment count - - $x = new WP_Ajax_Response( array( - 'what' => 'comment', - 'id' => $comment_id, // here for completeness - not used - 'supplemental' => array( - 'total_items_i18n' => sprintf( _n( '1 item', '%s items', $total ), number_format_i18n( $total ) ), - 'total_pages' => ceil( $total / $per_page ), - 'total_pages_i18n' => number_format_i18n( ceil( $total / $per_page ) ), - 'total' => $total, - 'time' => $time - ) - ) ); - $x->send(); -} - -function _wp_ajax_add_hierarchical_term() { - $action = $_POST['action']; - $taxonomy = get_taxonomy(substr($action, 4)); - check_ajax_referer( $action, '_ajax_nonce-add-' . $taxonomy->name ); - if ( !current_user_can( $taxonomy->cap->edit_terms ) ) - die('-1'); - $names = explode(',', $_POST['new'.$taxonomy->name]); - $parent = isset($_POST['new'.$taxonomy->name.'_parent']) ? (int) $_POST['new'.$taxonomy->name.'_parent'] : 0; - if ( 0 > $parent ) - $parent = 0; - if ( $taxonomy->name == 'category' ) - $post_category = isset($_POST['post_category']) ? (array) $_POST['post_category'] : array(); - else - $post_category = ( isset($_POST['tax_input']) && isset($_POST['tax_input'][$taxonomy->name]) ) ? (array) $_POST['tax_input'][$taxonomy->name] : array(); - $checked_categories = array_map( 'absint', (array) $post_category ); - $popular_ids = wp_popular_terms_checklist($taxonomy->name, 0, 10, false); - - foreach ( $names as $cat_name ) { - $cat_name = trim($cat_name); - $category_nicename = sanitize_title($cat_name); - if ( '' === $category_nicename ) - continue; - if ( !($cat_id = term_exists($cat_name, $taxonomy->name, $parent)) ) { - $new_term = wp_insert_term($cat_name, $taxonomy->name, array('parent' => $parent)); - $cat_id = $new_term['term_id']; - } - $checked_categories[] = $cat_id; - if ( $parent ) // Do these all at once in a second - continue; - $category = get_term( $cat_id, $taxonomy->name ); - ob_start(); - wp_terms_checklist( 0, array( 'taxonomy' => $taxonomy->name, 'descendants_and_self' => $cat_id, 'selected_cats' => $checked_categories, 'popular_cats' => $popular_ids )); - $data = ob_get_contents(); - ob_end_clean(); - $add = array( - 'what' => $taxonomy->name, - 'id' => $cat_id, - 'data' => str_replace( array("\n", "\t"), '', $data), - 'position' => -1 - ); - } - - if ( $parent ) { // Foncy - replace the parent and all its children - $parent = get_term( $parent, $taxonomy->name ); - $term_id = $parent->term_id; - - while ( $parent->parent ) { // get the top parent - $parent = &get_term( $parent->parent, $taxonomy->name ); - if ( is_wp_error( $parent ) ) - break; - $term_id = $parent->term_id; - } - - ob_start(); - wp_terms_checklist( 0, array('taxonomy' => $taxonomy->name, 'descendants_and_self' => $term_id, 'selected_cats' => $checked_categories, 'popular_cats' => $popular_ids)); - $data = ob_get_contents(); - ob_end_clean(); - $add = array( - 'what' => $taxonomy->name, - 'id' => $term_id, - 'data' => str_replace( array("\n", "\t"), '', $data), - 'position' => -1 - ); - } - - ob_start(); - wp_dropdown_categories( array( - 'taxonomy' => $taxonomy->name, 'hide_empty' => 0, 'name' => 'new'.$taxonomy->name.'_parent', 'orderby' => 'name', - 'hierarchical' => 1, 'show_option_none' => '— '.$taxonomy->labels->parent_item.' —' - ) ); - $sup = ob_get_contents(); - ob_end_clean(); - $add['supplemental'] = array( 'newcat_parent' => $sup ); +define( 'DOING_AJAX', true ); +define( 'WP_ADMIN', true ); - $x = new WP_Ajax_Response( $add ); - $x->send(); -} - -$id = isset($_POST['id'])? (int) $_POST['id'] : 0; -switch ( $action = $_POST['action'] ) : -case 'delete-comment' : // On success, die with time() instead of 1 - if ( !$comment = get_comment( $id ) ) - die( (string) time() ); - if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) ) - die('-1'); - - check_ajax_referer( "delete-comment_$id" ); - $status = wp_get_comment_status( $comment->comment_ID ); - - $delta = -1; - if ( isset($_POST['trash']) && 1 == $_POST['trash'] ) { - if ( 'trash' == $status ) - die( (string) time() ); - $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 ); - if ( ! isset( $_POST['comment_status'] ) || $_POST['comment_status'] != 'trash' ) // undo trash, not in trash - $delta = 1; - } 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 ); - if ( ! isset( $_POST['comment_status'] ) || $_POST['comment_status'] != 'spam' ) // undo spam, not in spam - $delta = 1; - } 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, $delta ); +// Require an action parameter +if ( empty( $_REQUEST['action'] ) ) die( '0' ); - break; -case 'delete-tag' : - $tag_id = (int) $_POST['tag_ID']; - check_ajax_referer( "delete-tag_$tag_id" ); - - $taxonomy = !empty($_POST['taxonomy']) ? $_POST['taxonomy'] : 'post_tag'; - $tax = get_taxonomy($taxonomy); - - if ( !current_user_can( $tax->cap->delete_terms ) ) - die('-1'); - - $tag = get_term( $tag_id, $taxonomy ); - if ( !$tag || is_wp_error( $tag ) ) - die('1'); - - if ( wp_delete_term($tag_id, $taxonomy)) - die('1'); - else - die('0'); - break; -case 'delete-link' : - check_ajax_referer( "delete-bookmark_$id" ); - if ( !current_user_can( 'manage_links' ) ) - die('-1'); - - $link = get_bookmark( $id ); - if ( !$link || is_wp_error( $link ) ) - die('1'); - - if ( wp_delete_link( $id ) ) - die('1'); - else - die('0'); - break; -case 'delete-meta' : - check_ajax_referer( "delete-meta_$id" ); - if ( !$meta = get_metadata_by_mid( 'post', $id ) ) - die('1'); - - if ( is_protected_meta( $meta->meta_key, 'post' ) || ! current_user_can( 'delete_post_meta', $meta->post_id, $meta->meta_key ) ) - die('-1'); - if ( delete_meta( $meta->meta_id ) ) - die('1'); - die('0'); - break; -case 'delete-post' : - check_ajax_referer( "{$action}_$id" ); - if ( !current_user_can( 'delete_post', $id ) ) - die('-1'); - - if ( !get_post( $id ) ) - die('1'); - - if ( wp_delete_post( $id ) ) - die('1'); - 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 ) ) - die('-1'); - - if ( !get_page( $id ) ) - die('1'); - - if ( wp_delete_post( $id ) ) - die('1'); - else - die('0'); - break; -case 'dim-comment' : // On success, die with time() instead of 1 - - if ( !$comment = get_comment( $id ) ) { - $x = new WP_Ajax_Response( array( - 'what' => 'comment', - 'id' => new WP_Error('invalid_comment', sprintf(__('Comment %d does not exist'), $id)) - ) ); - $x->send(); - } - - if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) && ! current_user_can( 'moderate_comments' ) ) - die('-1'); - - $current = wp_get_comment_status( $comment->comment_ID ); - if ( $_POST['new'] == $current ) - die( (string) time() ); - - check_ajax_referer( "approve-comment_$id" ); - if ( in_array( $current, array( 'unapproved', 'spam' ) ) ) - $result = wp_set_comment_status( $comment->comment_ID, 'approve', true ); - else - $result = wp_set_comment_status( $comment->comment_ID, 'hold', true ); - - if ( is_wp_error($result) ) { - $x = new WP_Ajax_Response( array( - 'what' => 'comment', - 'id' => $result - ) ); - $x->send(); - } - - // 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' ); - break; -case 'add-link-category' : // On the Fly - check_ajax_referer( $action ); - if ( !current_user_can( 'manage_categories' ) ) - die('-1'); - $names = explode(',', $_POST['newcat']); - $x = new WP_Ajax_Response(); - foreach ( $names as $cat_name ) { - $cat_name = trim($cat_name); - $slug = sanitize_title($cat_name); - if ( '' === $slug ) - continue; - if ( !$cat_id = term_exists( $cat_name, 'link_category' ) ) { - $cat_id = wp_insert_term( $cat_name, 'link_category' ); - } - $cat_id = $cat_id['term_id']; - $cat_name = esc_html(stripslashes($cat_name)); - $x->add( array( - 'what' => 'link-category', - 'id' => $cat_id, - 'data' => "", - 'position' => -1 - ) ); - } - $x->send(); - break; -case 'add-tag' : - check_ajax_referer( 'add-tag', '_wpnonce_add-tag' ); - $post_type = !empty($_POST['post_type']) ? $_POST['post_type'] : 'post'; - $taxonomy = !empty($_POST['taxonomy']) ? $_POST['taxonomy'] : 'post_tag'; - $tax = get_taxonomy($taxonomy); - - if ( !current_user_can( $tax->cap->edit_terms ) ) - die('-1'); - - $x = new WP_Ajax_Response(); - - $tag = wp_insert_term($_POST['tag-name'], $taxonomy, $_POST ); - - if ( !$tag || is_wp_error($tag) || (!$tag = get_term( $tag['term_id'], $taxonomy )) ) { - $message = __('An error has occurred. Please reload the page and try again.'); - if ( is_wp_error($tag) && $tag->get_error_message() ) - $message = $tag->get_error_message(); - - $x->add( array( - 'what' => 'taxonomy', - 'data' => new WP_Error('error', $message ) - ) ); - $x->send(); - } - - set_current_screen( $_POST['screen'] ); - - $wp_list_table = _get_list_table('WP_Terms_List_Table'); - - $level = 0; - if ( is_taxonomy_hierarchical($taxonomy) ) { - $level = count( get_ancestors( $tag->term_id, $taxonomy ) ); - ob_start(); - $wp_list_table->single_row( $tag, $level ); - $noparents = ob_get_clean(); - } - - ob_start(); - $wp_list_table->single_row( $tag ); - $parents = ob_get_clean(); - - $x->add( array( - 'what' => 'taxonomy', - 'supplemental' => compact('parents', 'noparents') - ) ); - $x->add( array( - 'what' => 'term', - 'position' => $level, - 'supplemental' => (array) $tag - ) ); - $x->send(); - break; -case 'get-tagcloud' : - if ( isset( $_POST['tax'] ) ) { - $taxonomy = sanitize_key( $_POST['tax'] ); - $tax = get_taxonomy( $taxonomy ); - if ( ! $tax ) - die( '0' ); - if ( ! current_user_can( $tax->cap->assign_terms ) ) - die( '-1' ); - } else { - die('0'); - } - - $tags = get_terms( $taxonomy, array( 'number' => 45, 'orderby' => 'count', 'order' => 'DESC' ) ); - - if ( empty( $tags ) ) - die( isset( $tax->no_tagcloud ) ? $tax->no_tagcloud : __('No tags found!') ); - - if ( is_wp_error( $tags ) ) - die( $tags->get_error_message() ); - - foreach ( $tags as $key => $tag ) { - $tags[ $key ]->link = '#'; - $tags[ $key ]->id = $tag->term_id; - } - - // We need raw tag names here, so don't filter the output - $return = wp_generate_tag_cloud( $tags, array('filter' => 0) ); - - if ( empty($return) ) - die('0'); - - echo $return; - - exit; - break; -case 'get-comments' : - check_ajax_referer( $action ); - - set_current_screen( 'edit-comments' ); - - $wp_list_table = _get_list_table('WP_Post_Comments_List_Table'); - - if ( !current_user_can( 'edit_post', $post_id ) ) - die('-1'); - - $wp_list_table->prepare_items(); - - if ( !$wp_list_table->has_items() ) - die('1'); - - $x = new WP_Ajax_Response(); - ob_start(); - foreach ( $wp_list_table->items as $comment ) { - if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) ) - continue; - get_comment( $comment ); - $wp_list_table->single_row( $comment ); - } - $comment_list_item = ob_get_contents(); - ob_end_clean(); - - $x->add( array( - 'what' => 'comments', - 'data' => $comment_list_item - ) ); - $x->send(); - break; -case 'replyto-comment' : - check_ajax_referer( $action, '_ajax_nonce-replyto-comment' ); - - set_current_screen( 'edit-comments' ); - - $comment_post_ID = (int) $_POST['comment_post_ID']; - if ( !current_user_can( 'edit_post', $comment_post_ID ) ) - die('-1'); - - $status = $wpdb->get_var( $wpdb->prepare("SELECT post_status FROM $wpdb->posts WHERE ID = %d", $comment_post_ID) ); - - if ( empty($status) ) - die('1'); - 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(); - if ( $user->ID ) { - $comment_author = $wpdb->escape($user->display_name); - $comment_author_email = $wpdb->escape($user->user_email); - $comment_author_url = $wpdb->escape($user->user_url); - $comment_content = trim($_POST['content']); - if ( current_user_can( 'unfiltered_html' ) ) { - if ( wp_create_nonce( 'unfiltered-html-comment' ) != $_POST['_wp_unfiltered_html_comment'] ) { - kses_remove_filters(); // start with a clean slate - kses_init_filters(); // set up the filters - } - } - } else { - die( __('Sorry, you must be logged in to reply to a comment.') ); - } - - if ( '' == $comment_content ) - die( __('ERROR: please type a comment.') ); - - $comment_parent = absint($_POST['comment_ID']); - $comment_auto_approved = false; - $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'comment_parent', 'user_ID'); - - $comment_id = wp_new_comment( $commentdata ); - $comment = get_comment($comment_id); - if ( ! $comment ) die('1'); - - $position = ( isset($_POST['position']) && (int) $_POST['position'] ) ? (int) $_POST['position'] : '-1'; - - - // automatically approve parent comment - if ( !empty($_POST['approve_parent']) ) { - $parent = get_comment( $comment_parent ); - - if ( $parent && $parent->comment_approved === '0' && $parent->comment_post_ID == $comment_post_ID ) { - if ( wp_set_comment_status( $parent->comment_ID, 'approve' ) ) - $comment_auto_approved = true; - } - } - - ob_start(); - if ( 'dashboard' == $_REQUEST['mode'] ) { - require_once( ABSPATH . 'wp-admin/includes/dashboard.php' ); - _wp_dashboard_recent_comments_row( $comment ); - } else { - if ( 'single' == $_REQUEST['mode'] ) { - $wp_list_table = _get_list_table('WP_Post_Comments_List_Table'); - } else { - $wp_list_table = _get_list_table('WP_Comments_List_Table'); - } - $wp_list_table->single_row( $comment ); - } - $comment_list_item = ob_get_contents(); - ob_end_clean(); - - $response = array( - 'what' => 'comment', - 'id' => $comment->comment_ID, - 'data' => $comment_list_item, - 'position' => $position - ); - - if ( $comment_auto_approved ) - $response['supplemental'] = array( 'parent_approved' => $parent->comment_ID ); - - $x = new WP_Ajax_Response(); - $x->add( $response ); - $x->send(); - break; -case 'edit-comment' : - check_ajax_referer( 'replyto-comment', '_ajax_nonce-replyto-comment' ); - - set_current_screen( 'edit-comments' ); - - $comment_id = (int) $_POST['comment_ID']; - if ( ! current_user_can( 'edit_comment', $comment_id ) ) - die('-1'); - - if ( '' == $_POST['content'] ) - die( __('ERROR: please type a comment.') ); - - $_POST['comment_status'] = $_POST['status']; - edit_comment(); - - $position = ( isset($_POST['position']) && (int) $_POST['position']) ? (int) $_POST['position'] : '-1'; - $comments_status = isset($_POST['comments_listing']) ? $_POST['comments_listing'] : ''; - - $checkbox = ( isset($_POST['checkbox']) && true == $_POST['checkbox'] ) ? 1 : 0; - $wp_list_table = _get_list_table( $checkbox ? 'WP_Comments_List_Table' : 'WP_Post_Comments_List_Table' ); - - ob_start(); - $wp_list_table->single_row( get_comment( $comment_id ) ); - $comment_list_item = ob_get_contents(); - ob_end_clean(); - - $x = new WP_Ajax_Response(); - - $x->add( array( - 'what' => 'edit_comment', - 'id' => $comment->comment_ID, - 'data' => $comment_list_item, - 'position' => $position - )); - - $x->send(); - break; -case 'add-menu-item' : - if ( ! current_user_can( 'edit_theme_options' ) ) - die('-1'); - - check_ajax_referer( 'add-menu_item', 'menu-settings-column-nonce' ); - - require_once ABSPATH . 'wp-admin/includes/nav-menu.php'; - - // For performance reasons, we omit some object properties from the checklist. - // The following is a hacky way to restore them when adding non-custom items. - - $menu_items_data = array(); - foreach ( (array) $_POST['menu-item'] as $menu_item_data ) { - if ( - ! empty( $menu_item_data['menu-item-type'] ) && - 'custom' != $menu_item_data['menu-item-type'] && - ! empty( $menu_item_data['menu-item-object-id'] ) - ) { - switch( $menu_item_data['menu-item-type'] ) { - case 'post_type' : - $_object = get_post( $menu_item_data['menu-item-object-id'] ); - break; - - case 'taxonomy' : - $_object = get_term( $menu_item_data['menu-item-object-id'], $menu_item_data['menu-item-object'] ); - break; - } - - $_menu_items = array_map( 'wp_setup_nav_menu_item', array( $_object ) ); - $_menu_item = array_shift( $_menu_items ); - - // Restore the missing menu item properties - $menu_item_data['menu-item-description'] = $_menu_item->description; - } - - $menu_items_data[] = $menu_item_data; - } - - $item_ids = wp_save_nav_menu_items( 0, $menu_items_data ); - if ( is_wp_error( $item_ids ) ) - die('-1'); - foreach ( (array) $item_ids as $menu_item_id ) { - $menu_obj = get_post( $menu_item_id ); - if ( ! empty( $menu_obj->ID ) ) { - $menu_obj = wp_setup_nav_menu_item( $menu_obj ); - $menu_obj->label = $menu_obj->title; // don't show "(pending)" in ajax-added items - $menu_items[] = $menu_obj; - } - } +/** Load WordPress Bootstrap */ +require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' ); - if ( ! empty( $menu_items ) ) { - $args = array( - 'after' => '', - 'before' => '', - 'link_after' => '', - 'link_before' => '', - 'walker' => new Walker_Nav_Menu_Edit, - ); - echo walk_nav_menu_tree( $menu_items, 0, (object) $args ); - } - break; -case 'add-meta' : - check_ajax_referer( 'add-meta', '_ajax_nonce-add-meta' ); - $c = 0; - $pid = (int) $_POST['post_id']; - $post = get_post( $pid ); +/** Load WordPress Administration APIs */ +require_once( ABSPATH . 'wp-admin/includes/admin.php' ); - if ( isset($_POST['metakeyselect']) || isset($_POST['metakeyinput']) ) { - if ( !current_user_can( 'edit_post', $pid ) ) - die('-1'); - if ( isset($_POST['metakeyselect']) && '#NONE#' == $_POST['metakeyselect'] && empty($_POST['metakeyinput']) ) - die('1'); - if ( $post->post_status == 'auto-draft' ) { - $save_POST = $_POST; // Backup $_POST - $_POST = array(); // Make it empty for edit_post() - $_POST['action'] = 'draft'; // Warning fix - $_POST['post_ID'] = $pid; - $_POST['post_type'] = $post->post_type; - $_POST['post_status'] = 'draft'; - $now = current_time('timestamp', 1); - $_POST['post_title'] = sprintf('Draft created on %s at %s', date(get_option('date_format'), $now), date(get_option('time_format'), $now)); +/** Load Ajax Handlers for WordPress Core */ +require_once( ABSPATH . 'wp-admin/includes/ajax-actions.php' ); - if ( $pid = edit_post() ) { - if ( is_wp_error( $pid ) ) { - $x = new WP_Ajax_Response( array( - 'what' => 'meta', - 'data' => $pid - ) ); - $x->send(); - } - $_POST = $save_POST; // Now we can restore original $_POST again - if ( !$mid = add_meta( $pid ) ) - die(__('Please provide a custom field value.')); - } else { - die('0'); - } - } else if ( !$mid = add_meta( $pid ) ) { - die(__('Please provide a custom field value.')); - } +@header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) ); +@header( 'X-Robots-Tag: noindex' ); - $meta = get_metadata_by_mid( 'post', $mid ); - $pid = (int) $meta->post_id; - $meta = get_object_vars( $meta ); - $x = new WP_Ajax_Response( array( - 'what' => 'meta', - 'id' => $mid, - 'data' => _list_meta_row( $meta, $c ), - 'position' => 1, - 'supplemental' => array('postid' => $pid) - ) ); - } else { // Update? - $mid = (int) key( $_POST['meta'] ); - $key = stripslashes( $_POST['meta'][$mid]['key'] ); - $value = stripslashes( $_POST['meta'][$mid]['value'] ); - if ( '' == trim($key) ) - die(__('Please provide a custom field name.')); - if ( '' == trim($value) ) - die(__('Please provide a custom field value.')); - if ( ! $meta = get_metadata_by_mid( 'post', $mid ) ) - die('0'); // if meta doesn't exist - if ( is_protected_meta( $meta->meta_key, 'post' ) || is_protected_meta( $key, 'post' ) || - ! current_user_can( 'edit_post_meta', $meta->post_id, $meta->meta_key ) || - ! current_user_can( 'edit_post_meta', $meta->post_id, $key ) ) - die('-1'); - if ( $meta->meta_value != $value || $meta->meta_key != $key ) { - if ( !$u = update_metadata_by_mid( 'post', $mid, $value, $key ) ) - die('0'); // We know meta exists; we also know it's unchanged (or DB error, in which case there are bigger problems). - } - - $x = new WP_Ajax_Response( array( - 'what' => 'meta', - 'id' => $mid, 'old_id' => $mid, - 'data' => _list_meta_row( array( - 'meta_key' => $key, - 'meta_value' => $value, - 'meta_id' => $mid - ), $c ), - 'position' => 0, - 'supplemental' => array('postid' => $meta->post_id) - ) ); - } - $x->send(); - break; -case 'add-user' : - check_ajax_referer( $action ); - if ( !current_user_can('create_users') ) - die('-1'); - if ( !$user_id = add_user() ) - die('0'); - elseif ( is_wp_error( $user_id ) ) { - $x = new WP_Ajax_Response( array( - 'what' => 'user', - 'id' => $user_id - ) ); - $x->send(); - } - $user_object = new WP_User( $user_id ); - - $wp_list_table = _get_list_table('WP_Users_List_Table'); - - $x = new WP_Ajax_Response( array( - 'what' => 'user', - 'id' => $user_id, - 'data' => $wp_list_table->single_row( $user_object, '', $user_object->roles[0] ), - 'supplemental' => array( - 'show-link' => sprintf(__( 'User %s added' ), "user-$user_id", $user_object->user_login), - 'role' => $user_object->roles[0] - ) - ) ); - $x->send(); - break; -case 'autosave' : // The name of this action is hardcoded in edit_post() - define( 'DOING_AUTOSAVE', true ); - - $nonce_age = check_ajax_referer( 'autosave', 'autosavenonce' ); - - $_POST['post_category'] = explode(",", $_POST['catslist']); - if ( $_POST['post_type'] == 'page' || empty($_POST['post_category']) ) - unset($_POST['post_category']); - - $do_autosave = (bool) $_POST['autosave']; - $do_lock = true; - - $data = $alert = ''; - /* translators: draft saved date format, see http://php.net/date */ - $draft_saved_date_format = __('g:i:s a'); - /* translators: %s: date and time */ - $message = sprintf( __('Draft saved at %s.'), date_i18n( $draft_saved_date_format ) ); - - $supplemental = array(); - if ( isset($login_grace_period) ) - $alert .= sprintf( __('Your login has expired. Please open a new browser window and log in again. '), add_query_arg( 'interim-login', 1, wp_login_url() ) ); - - $id = $revision_id = 0; - - $post_ID = (int) $_POST['post_ID']; - $_POST['ID'] = $post_ID; - $post = get_post($post_ID); - if ( 'auto-draft' == $post->post_status ) - $_POST['post_status'] = 'draft'; - - if ( $last = wp_check_post_lock( $post->ID ) ) { - $do_autosave = $do_lock = false; - - $last_user = get_userdata( $last ); - $last_user_name = $last_user ? $last_user->display_name : __( 'Someone' ); - $data = __( 'Autosave disabled.' ); - - $supplemental['disable_autosave'] = 'disable'; - $alert .= sprintf( __( '%s is currently editing this article. If you update it, you will overwrite the changes.' ), esc_html( $last_user_name ) ); - } - - if ( 'page' == $post->post_type ) { - if ( !current_user_can('edit_page', $post_ID) ) - die(__('You are not allowed to edit this page.')); - } else { - if ( !current_user_can('edit_post', $post_ID) ) - die(__('You are not allowed to edit this post.')); - } - - if ( $do_autosave ) { - // Drafts and auto-drafts are just overwritten by autosave - if ( 'auto-draft' == $post->post_status || 'draft' == $post->post_status ) { - $id = edit_post(); - } else { // Non drafts are not overwritten. The autosave is stored in a special post revision. - $revision_id = wp_create_post_autosave( $post->ID ); - if ( is_wp_error($revision_id) ) - $id = $revision_id; - else - $id = $post->ID; - } - $data = $message; - } else { - if ( ! empty( $_POST['auto_draft'] ) ) - $id = 0; // This tells us it didn't actually save - else - $id = $post->ID; - } - - if ( $do_lock && empty( $_POST['auto_draft'] ) && $id && is_numeric( $id ) ) { - $lock_result = wp_set_post_lock( $id ); - $supplemental['active-post-lock'] = implode( ':', $lock_result ); - } - - if ( $nonce_age == 2 ) { - $supplemental['replace-autosavenonce'] = wp_create_nonce('autosave'); - $supplemental['replace-getpermalinknonce'] = wp_create_nonce('getpermalink'); - $supplemental['replace-samplepermalinknonce'] = wp_create_nonce('samplepermalink'); - $supplemental['replace-closedpostboxesnonce'] = wp_create_nonce('closedpostboxes'); - $supplemental['replace-_ajax_linking_nonce'] = wp_create_nonce( 'internal-linking' ); - if ( $id ) { - if ( $_POST['post_type'] == 'post' ) - $supplemental['replace-_wpnonce'] = wp_create_nonce('update-post_' . $id); - elseif ( $_POST['post_type'] == 'page' ) - $supplemental['replace-_wpnonce'] = wp_create_nonce('update-page_' . $id); - } - } - - if ( ! empty($alert) ) - $supplemental['alert'] = $alert; - - $x = new WP_Ajax_Response( array( - 'what' => 'autosave', - 'id' => $id, - 'data' => $id ? $data : '', - 'supplemental' => $supplemental - ) ); - $x->send(); - break; -case 'closed-postboxes' : - check_ajax_referer( 'closedpostboxes', 'closedpostboxesnonce' ); - $closed = isset( $_POST['closed'] ) ? explode( ',', $_POST['closed']) : array(); - $closed = array_filter($closed); - - $hidden = isset( $_POST['hidden'] ) ? explode( ',', $_POST['hidden']) : array(); - $hidden = array_filter($hidden); - - $page = isset( $_POST['page'] ) ? $_POST['page'] : ''; - - if ( $page != sanitize_key( $page ) ) - die('0'); - - if ( ! $user = wp_get_current_user() ) - die('-1'); - - if ( is_array($closed) ) - update_user_option($user->ID, "closedpostboxes_$page", $closed, true); - - if ( is_array($hidden) ) { - $hidden = array_diff( $hidden, array('submitdiv', 'linksubmitdiv', 'manage-menu', 'create-menu') ); // postboxes that are always shown - update_user_option($user->ID, "metaboxhidden_$page", $hidden, true); - } - - die('1'); - break; -case 'hidden-columns' : - check_ajax_referer( 'screen-options-nonce', 'screenoptionnonce' ); - $hidden = isset( $_POST['hidden'] ) ? $_POST['hidden'] : ''; - $hidden = explode( ',', $_POST['hidden'] ); - $page = isset( $_POST['page'] ) ? $_POST['page'] : ''; - - if ( $page != sanitize_key( $page ) ) - die('0'); - - if ( ! $user = wp_get_current_user() ) - die('-1'); - - if ( is_array($hidden) ) - update_user_option($user->ID, "manage{$page}columnshidden", $hidden, true); - - die('1'); - break; -case 'update-welcome-panel' : - check_ajax_referer( 'welcome-panel-nonce', 'welcomepanelnonce' ); - - if ( ! current_user_can( 'edit_theme_options' ) ) - die('-1'); - - update_user_meta( get_current_user_id(), 'show_welcome_panel', empty( $_POST['visible'] ) ? 0 : 1 ); - - die('1'); - break; -case 'menu-get-metabox' : - if ( ! current_user_can( 'edit_theme_options' ) ) - die('-1'); - - require_once ABSPATH . 'wp-admin/includes/nav-menu.php'; - - if ( isset( $_POST['item-type'] ) && 'post_type' == $_POST['item-type'] ) { - $type = 'posttype'; - $callback = 'wp_nav_menu_item_post_type_meta_box'; - $items = (array) get_post_types( array( 'show_in_nav_menus' => true ), 'object' ); - } elseif ( isset( $_POST['item-type'] ) && 'taxonomy' == $_POST['item-type'] ) { - $type = 'taxonomy'; - $callback = 'wp_nav_menu_item_taxonomy_meta_box'; - $items = (array) get_taxonomies( array( 'show_ui' => true ), 'object' ); - } - - if ( ! empty( $_POST['item-object'] ) && isset( $items[$_POST['item-object']] ) ) { - $item = apply_filters( 'nav_menu_meta_box_object', $items[ $_POST['item-object'] ] ); - ob_start(); - call_user_func_array($callback, array( - null, - array( - 'id' => 'add-' . $item->name, - 'title' => $item->labels->name, - 'callback' => $callback, - 'args' => $item, - ) - )); - - $markup = ob_get_clean(); - - echo json_encode(array( - 'replace-id' => $type . '-' . $item->name, - 'markup' => $markup, - )); - } - - exit; - break; -case 'menu-quick-search': - if ( ! current_user_can( 'edit_theme_options' ) ) - die('-1'); - - require_once ABSPATH . 'wp-admin/includes/nav-menu.php'; - - _wp_ajax_menu_quick_search( $_REQUEST ); - - exit; - break; -case 'wp-link-ajax': - check_ajax_referer( 'internal-linking', '_ajax_linking_nonce' ); - - $args = array(); - - if ( isset( $_POST['search'] ) ) - $args['s'] = stripslashes( $_POST['search'] ); - $args['pagenum'] = ! empty( $_POST['page'] ) ? absint( $_POST['page'] ) : 1; - - require(ABSPATH . WPINC . '/class-wp-editor.php'); - $results = _WP_Editors::wp_link_query( $args ); - - if ( ! isset( $results ) ) - die( '0' ); - - echo json_encode( $results ); - echo "\n"; - - exit; - break; -case 'menu-locations-save': - if ( ! current_user_can( 'edit_theme_options' ) ) - die('-1'); - check_ajax_referer( 'add-menu_item', 'menu-settings-column-nonce' ); - if ( ! isset( $_POST['menu-locations'] ) ) - die('0'); - set_theme_mod( 'nav_menu_locations', array_map( 'absint', $_POST['menu-locations'] ) ); - die('1'); - break; -case 'meta-box-order': - check_ajax_referer( 'meta-box-order' ); - $order = isset( $_POST['order'] ) ? (array) $_POST['order'] : false; - $page_columns = isset( $_POST['page_columns'] ) ? $_POST['page_columns'] : 'auto'; - - if ( $page_columns != 'auto' ) - $page_columns = (int) $page_columns; - - $page = isset( $_POST['page'] ) ? $_POST['page'] : ''; - - if ( $page != sanitize_key( $page ) ) - die('0'); - - if ( ! $user = wp_get_current_user() ) - die('-1'); - - if ( $order ) - update_user_option($user->ID, "meta-box-order_$page", $order, true); - - if ( $page_columns ) - update_user_option($user->ID, "screen_layout_$page", $page_columns, true); - - die('1'); - break; -case 'get-permalink': - check_ajax_referer( 'getpermalink', 'getpermalinknonce' ); - $post_id = isset($_POST['post_id'])? intval($_POST['post_id']) : 0; - die(add_query_arg(array('preview' => 'true'), get_permalink($post_id))); -break; -case 'sample-permalink': - check_ajax_referer( 'samplepermalink', 'samplepermalinknonce' ); - $post_id = isset($_POST['post_id'])? intval($_POST['post_id']) : 0; - $title = isset($_POST['new_title'])? $_POST['new_title'] : ''; - $slug = isset($_POST['new_slug'])? $_POST['new_slug'] : null; - die(get_sample_permalink_html($post_id, $title, $slug)); -break; -case 'inline-save': - check_ajax_referer( 'inlineeditnonce', '_inline_edit' ); - - if ( ! isset($_POST['post_ID']) || ! ( $post_ID = (int) $_POST['post_ID'] ) ) - exit; - - if ( 'page' == $_POST['post_type'] ) { - if ( ! current_user_can( 'edit_page', $post_ID ) ) - die( __('You are not allowed to edit this page.') ); - } else { - if ( ! current_user_can( 'edit_post', $post_ID ) ) - die( __('You are not allowed to edit this post.') ); - } - - set_current_screen( $_POST['screen'] ); - - if ( $last = wp_check_post_lock( $post_ID ) ) { - $last_user = get_userdata( $last ); - $last_user_name = $last_user ? $last_user->display_name : __( 'Someone' ); - printf( $_POST['post_type'] == 'page' ? __( 'Saving is disabled: %s is currently editing this page.' ) : __( 'Saving is disabled: %s is currently editing this post.' ), esc_html( $last_user_name ) ); - exit; - } - - $data = &$_POST; - - $post = get_post( $post_ID, ARRAY_A ); - $post = add_magic_quotes($post); //since it is from db - - $data['content'] = $post['post_content']; - $data['excerpt'] = $post['post_excerpt']; - - // rename - $data['user_ID'] = $GLOBALS['user_ID']; - - if ( isset($data['post_parent']) ) - $data['parent_id'] = $data['post_parent']; - - // status - if ( isset($data['keep_private']) && 'private' == $data['keep_private'] ) - $data['post_status'] = 'private'; - else - $data['post_status'] = $data['_status']; - - if ( empty($data['comment_status']) ) - $data['comment_status'] = 'closed'; - if ( empty($data['ping_status']) ) - $data['ping_status'] = 'closed'; - - // update the post - edit_post(); - - $wp_list_table = _get_list_table('WP_Posts_List_Table'); - - $mode = $_POST['post_view']; - $wp_list_table->display_rows( array( get_post( $_POST['post_ID'] ) ) ); - - exit; - break; -case 'inline-save-tax': - check_ajax_referer( 'taxinlineeditnonce', '_inline_edit' ); - - $taxonomy = sanitize_key( $_POST['taxonomy'] ); - $tax = get_taxonomy( $taxonomy ); - if ( ! $tax ) - die( '0' ); - - if ( ! current_user_can( $tax->cap->edit_terms ) ) - die( '-1' ); - - set_current_screen( 'edit-' . $taxonomy ); - - $wp_list_table = _get_list_table('WP_Terms_List_Table'); - - if ( ! isset($_POST['tax_ID']) || ! ( $id = (int) $_POST['tax_ID'] ) ) - die(-1); - - $tag = get_term( $id, $taxonomy ); - $_POST['description'] = $tag->description; - - $updated = wp_update_term($id, $taxonomy, $_POST); - if ( $updated && !is_wp_error($updated) ) { - $tag = get_term( $updated['term_id'], $taxonomy ); - if ( !$tag || is_wp_error( $tag ) ) { - if ( is_wp_error($tag) && $tag->get_error_message() ) - die( $tag->get_error_message() ); - die( __('Item not updated.') ); - } - - echo $wp_list_table->single_row( $tag ); - } else { - if ( is_wp_error($updated) && $updated->get_error_message() ) - die( $updated->get_error_message() ); - die( __('Item not updated.') ); - } - - exit; - break; -case 'find_posts': - check_ajax_referer( 'find-posts' ); - - if ( empty($_POST['ps']) ) - exit; - - if ( !empty($_POST['post_type']) && in_array( $_POST['post_type'], get_post_types() ) ) - $what = $_POST['post_type']; - else - $what = 'post'; - - $s = stripslashes($_POST['ps']); - preg_match_all('/".*?("|$)|((?<=[\\s",+])|^)[^\\s",+]+/', $s, $matches); - $search_terms = array_map('_search_terms_tidy', $matches[0]); - - $searchand = $search = ''; - foreach ( (array) $search_terms as $term ) { - $term = esc_sql( like_escape( $term ) ); - $search .= "{$searchand}(($wpdb->posts.post_title LIKE '%{$term}%') OR ($wpdb->posts.post_content LIKE '%{$term}%'))"; - $searchand = ' AND '; - } - $term = esc_sql( like_escape( $s ) ); - 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 post_status IN ('draft', 'publish') AND ($search) ORDER BY post_date_gmt DESC LIMIT 50" ); - - if ( ! $posts ) { - $posttype = get_post_type_object($what); - exit($posttype->labels->not_found); - } - - $html = ''; - foreach ( $posts as $post ) { - - switch ( $post->post_status ) { - case 'publish' : - case 'private' : - $stat = __('Published'); - break; - case 'future' : - $stat = __('Scheduled'); - break; - case 'pending' : - $stat = __('Pending Review'); - break; - case 'draft' : - $stat = __('Draft'); - break; - } - - if ( '0000-00-00 00:00:00' == $post->post_date ) { - $time = ''; - } else { - /* translators: date format in table columns, see http://php.net/date */ - $time = mysql2date(__('Y/m/d'), $post->post_date); - } - - $html .= ''; - $html .= ''."\n\n"; - } - $html .= '

'.__('Title').''.__('Date').''.__('Status').'
'.esc_html( $time ).''.esc_html( $stat ).'
'; - - $x = new WP_Ajax_Response(); - $x->add( array( - 'what' => $what, - 'data' => $html - )); - $x->send(); - - break; -case 'widgets-order' : - check_ajax_referer( 'save-sidebar-widgets', 'savewidgets' ); - - if ( !current_user_can('edit_theme_options') ) - die('-1'); - - unset( $_POST['savewidgets'], $_POST['action'] ); - - // save widgets order for all sidebars - if ( is_array($_POST['sidebars']) ) { - $sidebars = array(); - foreach ( $_POST['sidebars'] as $key => $val ) { - $sb = array(); - if ( !empty($val) ) { - $val = explode(',', $val); - foreach ( $val as $k => $v ) { - if ( strpos($v, 'widget-') === false ) - continue; - - $sb[$k] = substr($v, strpos($v, '_') + 1); - } - } - $sidebars[$key] = $sb; - } - wp_set_sidebars_widgets($sidebars); - die('1'); - } - - die('-1'); - break; -case 'save-widget' : - check_ajax_referer( 'save-sidebar-widgets', 'savewidgets' ); - - if ( !current_user_can('edit_theme_options') || !isset($_POST['id_base']) ) - die('-1'); - - unset( $_POST['savewidgets'], $_POST['action'] ); - - do_action('load-widgets.php'); - do_action('widgets.php'); - do_action('sidebar_admin_setup'); - - $id_base = $_POST['id_base']; - $widget_id = $_POST['widget-id']; - $sidebar_id = $_POST['sidebar']; - $multi_number = !empty($_POST['multi_number']) ? (int) $_POST['multi_number'] : 0; - $settings = isset($_POST['widget-' . $id_base]) && is_array($_POST['widget-' . $id_base]) ? $_POST['widget-' . $id_base] : false; - $error = '

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

'; - - $sidebars = wp_get_sidebars_widgets(); - $sidebar = isset($sidebars[$sidebar_id]) ? $sidebars[$sidebar_id] : array(); - - // delete - if ( isset($_POST['delete_widget']) && $_POST['delete_widget'] ) { - - if ( !isset($wp_registered_widgets[$widget_id]) ) - die($error); - - $sidebar = array_diff( $sidebar, array($widget_id) ); - $_POST = array('sidebar' => $sidebar_id, 'widget-' . $id_base => array(), 'the-widget-id' => $widget_id, 'delete_widget' => '1'); - } elseif ( $settings && preg_match( '/__i__|%i%/', key($settings) ) ) { - if ( !$multi_number ) - die($error); - - $_POST['widget-' . $id_base] = array( $multi_number => array_shift($settings) ); - $widget_id = $id_base . '-' . $multi_number; - $sidebar[] = $widget_id; - } - $_POST['widget-id'] = $sidebar; - - foreach ( (array) $wp_registered_widget_updates as $name => $control ) { - - if ( $name == $id_base ) { - if ( !is_callable( $control['callback'] ) ) - continue; - - ob_start(); - call_user_func_array( $control['callback'], $control['params'] ); - ob_end_clean(); - break; - } - } - - if ( isset($_POST['delete_widget']) && $_POST['delete_widget'] ) { - $sidebars[$sidebar_id] = $sidebar; - wp_set_sidebars_widgets($sidebars); - echo "deleted:$widget_id"; - die(); - } - - if ( !empty($_POST['add_new']) ) - die(); - - if ( $form = $wp_registered_widget_controls[$widget_id] ) - call_user_func_array( $form['callback'], $form['params'] ); - - 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'] ); - - check_ajax_referer( "set_post_thumbnail-$post_ID" ); - - if ( $thumbnail_id == '-1' ) { - if ( delete_post_thumbnail( $post_ID ) ) - die( _wp_post_thumbnail_html() ); - else - die( '0' ); - } - - if ( set_post_thumbnail( $post_ID, $thumbnail_id ) ) - die( _wp_post_thumbnail_html( $thumbnail_id ) ); - die( '0' ); - break; -case 'date_format' : - die( date_i18n( sanitize_option( 'date_format', $_POST['date'] ) ) ); - break; -case 'time_format' : - die( date_i18n( sanitize_option( 'time_format', $_POST['date'] ) ) ); - break; -case 'wp-fullscreen-save-post' : - $post_id = isset( $_POST['post_ID'] ) ? (int) $_POST['post_ID'] : 0; - - $post = $post_type = null; - - if ( $post_id ) - $post = get_post( $post_id ); - - if ( $post ) - $post_type = $post->post_type; - elseif ( isset( $_POST['post_type'] ) && post_type_exists( $_POST['post_type'] ) ) - $post_type = $_POST['post_type']; - - check_ajax_referer('update-' . $post_type . '_' . $post_id, '_wpnonce'); - - $post_id = edit_post(); - - if ( is_wp_error($post_id) ) { - if ( $post_id->get_error_message() ) - $message = $post_id->get_error_message(); - else - $message = __('Save failed'); - - echo json_encode( array( 'message' => $message, 'last_edited' => '' ) ); - die(); - } else { - $message = __('Saved.'); - } - - if ( $post ) { - $last_date = mysql2date( get_option('date_format'), $post->post_modified ); - $last_time = mysql2date( get_option('time_format'), $post->post_modified ); - } else { - $last_date = date_i18n( get_option('date_format') ); - $last_time = date_i18n( get_option('time_format') ); - } - - if ( $last_id = get_post_meta($post_id, '_edit_last', true) ) { - $last_user = get_userdata($last_id); - $last_edited = sprintf( __('Last edited by %1$s on %2$s at %3$s'), esc_html( $last_user->display_name ), $last_date, $last_time ); - } else { - $last_edited = sprintf( __('Last edited on %1$s at %2$s'), $last_date, $last_time ); - } - - echo json_encode( array( 'message' => $message, 'last_edited' => $last_edited ) ); - die(); - break; -case 'wp-remove-post-lock' : - if ( empty( $_POST['post_ID'] ) || empty( $_POST['active_post_lock'] ) ) - die( '0' ); - $post_id = (int) $_POST['post_ID']; - if ( ! $post = get_post( $post_id ) ) - die( '0' ); - - check_ajax_referer( 'update-' . $post->post_type . '_' . $post_id ); - - if ( ! current_user_can( 'edit_post', $post_id ) ) - die( '-1' ); - - $active_lock = array_map( 'absint', explode( ':', $_POST['active_post_lock'] ) ); - if ( $active_lock[1] != get_current_user_id() ) - die( '0' ); - - $new_lock = ( time() - apply_filters( 'wp_check_post_lock_window', AUTOSAVE_INTERVAL * 2 ) + 5 ) . ':' . $active_lock[1]; - update_post_meta( $post_id, '_edit_lock', $new_lock, implode( ':', $active_lock ) ); - die( '1' ); -case 'dismiss-wp-pointer' : - $pointer = $_POST['pointer']; - if ( $pointer != sanitize_key( $pointer ) ) - die( '0' ); - -// check_ajax_referer( 'dismiss-pointer_' . $pointer ); - - $dismissed = array_filter( explode( ',', (string) get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) ) ); - - if ( in_array( $pointer, $dismissed ) ) - die( '0' ); - - $dismissed[] = $pointer; - $dismissed = implode( ',', $dismissed ); +send_nosniff_header(); - update_user_meta( get_current_user_id(), 'dismissed_wp_pointers', $dismissed ); - die( '1' ); - break; -default : - do_action( 'wp_ajax_' . $_POST['action'] ); - die('0'); - break; -endswitch; -?> +do_action( 'admin_init' ); + +$core_actions_get = array( + 'fetch-list', 'ajax-tag-search', 'wp-compression-test', 'imgedit-preview', 'oembed-cache', + 'autocomplete-user', 'dashboard-widgets', 'logged-in', +); + +$core_actions_post = array( + 'oembed-cache', 'image-editor', 'delete-comment', 'delete-tag', 'delete-link', + 'delete-meta', 'delete-post', 'trash-post', 'untrash-post', 'delete-page', 'dim-comment', + 'add-link-category', 'add-tag', 'get-tagcloud', 'get-comments', 'replyto-comment', + 'edit-comment', 'add-menu-item', 'add-meta', 'add-user', 'autosave', 'closed-postboxes', + 'hidden-columns', 'update-welcome-panel', 'menu-get-metabox', 'wp-link-ajax', + 'menu-locations-save', 'menu-quick-search', 'meta-box-order', 'get-permalink', + 'sample-permalink', 'inline-save', 'inline-save-tax', 'find_posts', 'widgets-order', + 'save-widget', 'set-post-thumbnail', 'date_format', 'time_format', 'wp-fullscreen-save-post', + 'wp-remove-post-lock', 'dismiss-wp-pointer', 'upload-attachment', +); + +// Register core Ajax calls. +if ( ! empty( $_GET['action'] ) && in_array( $_GET['action'], $core_actions_get ) ) + add_action( 'wp_ajax_' . $_GET['action'], 'wp_ajax_' . str_replace( '-', '_', $_GET['action'] ), 1 ); + +if ( ! empty( $_POST['action'] ) && in_array( $_POST['action'], $core_actions_post ) ) + add_action( 'wp_ajax_' . $_POST['action'], 'wp_ajax_' . str_replace( '-', '_', $_POST['action'] ), 1 ); + +add_action( 'wp_ajax_nopriv_autosave', 'wp_ajax_nopriv_autosave', 1 ); + +if ( is_user_logged_in() ) + do_action( 'wp_ajax_' . $_REQUEST['action'] ); // Authenticated actions +else + do_action( 'wp_ajax_nopriv_' . $_REQUEST['action'] ); // Non-admin actions + +// Default status +die( '0' ); diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index b8c84fda..f5967490 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -13,4 +13,3 @@ _deprecated_file( basename(__FILE__), '2.5', 'wp-admin/includes/admin.php' ); /** WordPress Administration API: Includes all Administration functions. */ require_once(ABSPATH . 'wp-admin/includes/admin.php'); -?> \ No newline at end of file diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php index a34a51b8..248897c9 100644 --- a/wp-admin/admin-header.php +++ b/wp-admin/admin-header.php @@ -11,7 +11,7 @@ if ( ! defined( 'WP_ADMIN' ) ) require_once( './admin.php' ); // In case admin-header.php is included in a function. -global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, $wp_version, $is_iphone, +global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, $wp_version, $current_site, $update_title, $total_update_count, $parent_file; // Catch plugins that include admin-header.php before admin.php completes. @@ -55,7 +55,7 @@ var userSettings = { 'uid': 'ID; ?>', 'time':'' }, - ajaxurl = '', + ajaxurl = '', pagenow = 'id; ?>', typenow = 'post_type; ?>', adminpage = '', @@ -85,13 +85,26 @@ if ( is_rtl() ) $admin_body_class .= ' branch-' . str_replace( array( '.', ',' ), '-', floatval( $wp_version ) ); $admin_body_class .= ' version-' . str_replace( '.', '-', preg_replace( '/^([.0-9]+).*/', '$1', $wp_version ) ); $admin_body_class .= ' admin-color-' . sanitize_html_class( get_user_option( 'admin_color' ), 'fresh' ); +$admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) ); -if ( $is_iphone ) { ?> - - +if ( wp_is_mobile() ) + $admin_body_class .= ' mobile'; + +$admin_body_class .= ' no-customize-support'; + +?> "> - + + +
diff --git a/wp-admin/admin-post.php b/wp-admin/admin-post.php index 5f9eccb5..f4af998e 100644 --- a/wp-admin/admin-post.php +++ b/wp-admin/admin-post.php @@ -29,5 +29,3 @@ if ( !empty($_REQUEST['action']) ) $action .= '_' . $_REQUEST['action']; do_action($action); - -?> \ No newline at end of file diff --git a/wp-admin/admin.php b/wp-admin/admin.php index 46e45e34..015ced30 100644 --- a/wp-admin/admin.php +++ b/wp-admin/admin.php @@ -12,16 +12,16 @@ * @since 2.3.2 */ if ( ! defined('WP_ADMIN') ) - define('WP_ADMIN', TRUE); + define('WP_ADMIN', true); if ( ! defined('WP_NETWORK_ADMIN') ) - define('WP_NETWORK_ADMIN', FALSE); + define('WP_NETWORK_ADMIN', false); if ( ! defined('WP_USER_ADMIN') ) - define('WP_USER_ADMIN', FALSE); + define('WP_USER_ADMIN', false); if ( ! WP_NETWORK_ADMIN && ! WP_USER_ADMIN ) { - define('WP_BLOG_ADMIN', TRUE); + define('WP_BLOG_ADMIN', true); } if ( isset($_GET['import']) && !defined('WP_LOAD_IMPORTERS') ) @@ -30,7 +30,7 @@ if ( isset($_GET['import']) && !defined('WP_LOAD_IMPORTERS') ) require_once(dirname(dirname(__FILE__)) . '/wp-load.php'); if ( get_option('db_upgraded') ) { - $wp_rewrite->flush_rules(); + flush_rewrite_rules(); update_option( 'db_upgraded', false ); /** @@ -153,7 +153,6 @@ if ( isset($plugin_page) ) { if ( validate_file($plugin_page) ) wp_die(__('Invalid plugin page')); - if ( !( file_exists(WP_PLUGIN_DIR . "/$plugin_page") && is_file(WP_PLUGIN_DIR . "/$plugin_page") ) && !( file_exists(WPMU_PLUGIN_DIR . "/$plugin_page") && is_file(WPMU_PLUGIN_DIR . "/$plugin_page") ) ) wp_die(sprintf(__('Cannot load %s.'), htmlentities($plugin_page))); @@ -229,5 +228,3 @@ if ( isset($plugin_page) ) { if ( !empty($_REQUEST['action']) ) do_action('admin_action_' . $_REQUEST['action']); - -?> diff --git a/wp-admin/async-upload.php b/wp-admin/async-upload.php index 1bd267fa..e9d59e22 100644 --- a/wp-admin/async-upload.php +++ b/wp-admin/async-upload.php @@ -66,5 +66,3 @@ if ( $_REQUEST['short'] ) { $type = $_REQUEST['type']; echo apply_filters("async_upload_{$type}", $id); } - -?> diff --git a/wp-admin/comment.php b/wp-admin/comment.php index b2c69cb7..de5483e2 100644 --- a/wp-admin/comment.php +++ b/wp-admin/comment.php @@ -65,7 +65,7 @@ case 'editcomment' : $comment_id = absint( $_GET['c'] ); if ( !$comment = get_comment( $comment_id ) ) - comment_footer_die( __('Oops, no comment with this ID.') . sprintf(' '.__('Go back').'!', 'javascript:history.go(-1)') ); + comment_footer_die( __('Oops, no comment with this ID.') . sprintf(' ' . __('Go back') . '.', 'javascript:history.go(-1)') ); if ( !current_user_can( 'edit_comment', $comment_id ) ) comment_footer_die( __('You are not allowed to edit this comment.') ); @@ -73,9 +73,6 @@ case 'editcomment' : 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.') ); - if ( 'spam' == $comment->comment_approved ) - comment_footer_die( __('This comment is marked as Spam. Please mark it as Not Spam if you want to edit it.') ); - $comment = get_comment_to_edit( $comment_id ); include('./edit-form-comment.php'); @@ -222,7 +219,7 @@ case 'unapprovecomment' : $noredir = isset($_REQUEST['noredir']); if ( !$comment = get_comment($comment_id) ) - comment_footer_die( __('Oops, no comment with this ID.') . sprintf(' '.__('Go back').'!', 'edit-comments.php') ); + comment_footer_die( __('Oops, no comment with this ID.') . sprintf(' ' . __('Go back') . '.', 'edit-comments.php') ); if ( !current_user_can( 'edit_comment', $comment->comment_ID ) ) comment_footer_die( __('You are not allowed to edit comments on this post.') ); @@ -295,5 +292,3 @@ default: } // end switch include('./admin-footer.php'); - -?> diff --git a/wp-admin/credits.php b/wp-admin/credits.php index cdc84c7c..68f7ed6c 100644 --- a/wp-admin/credits.php +++ b/wp-admin/credits.php @@ -17,7 +17,9 @@ function wp_credits() { $results = get_site_transient( 'wordpress_credits_' . $locale ); - if ( ! is_array( $results ) ) { + if ( ! is_array( $results ) + || ( isset( $results['data']['version'] ) && strpos( $wp_version, $results['data']['version'] ) !== 0 ) + ) { $response = wp_remote_get( "http://api.wordpress.org/core/credits/1.0/?version=$wp_version&locale=$locale" ); if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) @@ -44,13 +46,13 @@ function _wp_credits_build_object_link( &$data ) { list( $display_version ) = explode( '-', $wp_version ); -include( './admin-header.php' ); +include( ABSPATH . 'wp-admin/admin-header.php' ); ?>

-
+
@@ -73,7 +75,7 @@ if ( ! $credits ) { 'http://wordpress.org/about/', /* translators: Url to the codex documentation on contributing to WordPress used on the credits page */ __( 'http://codex.wordpress.org/Contributing_to_WordPress' ) ) . '

'; - include( './admin-footer.php' ); + include( ABSPATH . 'wp-admin/admin-footer.php' ); exit; } @@ -134,7 +136,7 @@ foreach ( $credits['groups'] as $group_slug => $group_data ) {
diff --git a/wp-admin/css/colors-classic.css b/wp-admin/css/colors-classic.css index fae10241..91017ee6 100644 --- a/wp-admin/css/colors-classic.css +++ b/wp-admin/css/colors-classic.css @@ -1 +1 @@ -html,.wp-dialog{background-color:#fff;}* 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"],input[type="email"],input[type="number"],input[type="search"],input[type="tel"],input[type="url"],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{border-color:#D1E5EE;}#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:#D1E5EE;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,.wp-tab-panel,ul.category-tabs li.tabs,ul.add-menu-item-tabs li.tabs,.wp-tab-active{border-color:#dfdfdf;background-color:#fff;}ul.category-tabs li.tabs,ul.add-menu-item-tabs li.tabs,.wp-tab-active{background-color:#fff;}input.disabled,textarea.disabled{background-color:#ccc;}#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,.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,.sidebar-name,#nav-menu-header,#nav-menu-footer,.menu-item-handle,#fullscreen-topbar{background-color:#f5fafd;background-image:-ms-linear-gradient(top,#f7fcfe,#eff8ff);background-image:-moz-linear-gradient(top,#f7fcfe,#eff8ff);background-image:-o-linear-gradient(top,#f7fcfe,#eff8ff);background-image:-webkit-gradient(linear,left top,left bottom,from(#f7fcfe),to(#eff8ff));background-image:-webkit-linear-gradient(top,#f7fcfe,#eff8ff);background-image:linear-gradient(top,#f7fcfe,#eff8ff);}.widget .widget-top,.postbox h3,.stuffbox h3{border-bottom-color:#D1E5EE;text-shadow:#fff 0 1px 0;-moz-box-shadow:0 1px 0 #fff;-webkit-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff;}.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:#174f69;}.wrap .add-new-h2{background:#f1f1f1;}.subtitle{color:#777;}.ac_over{background-color:#f0f0b8;}.ac_results{background-color:#fff;border-color:#808080;}.ac_results li{color:#101010;}.alternate,.alt{background-color:#f7fcfe;}.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;}div.error,.login #login_error{background-color:#ffebe8;border-color:#c00;}div.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:#000;}.howto,.nonessential,#edit-slug-box,.form-input-tip,.subsubsub{color:#666;}.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;}#adminmenu a:hover,#adminmenu li.menu-top>a:focus,#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,#side-sortables .add-menu-item-tabs .tabs a,.wp-tab-bar .wp-tab-active 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;}div.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{border-top-color:#fff;border-bottom-color:#D0DFE9;}.widefat th{text-shadow:rgba(255,255,255,0.8) 0 1px 0;}.widefat td{color:#555;}.widefat p,.widefat ol,.widefat ul{color:#333;}.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;}th.sortable a:hover,th.sortable a:active,th.sortable a:focus{color:#333;}h3.dashboard-widget-title small a{color:#d7d7d7;}h3.dashboard-widget-title small a:hover{color:#fff;}a,#adminmenu a,#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;}#adminmenu .awaiting-mod,#adminmenu .update-plugins,#sidemenu a .update-plugins,#rightnow .reallynow{background-color:#464646;color:#fff;-moz-box-shadow:rgba(255,255,255,0.5) 0 1px 0;-webkit-box-shadow:rgba(255,255,255,0.5) 0 1px 0;box-shadow:rgba(255,255,255,0.5) 0 1px 0;}#plugin-information .action-button{background-color:#d54e21;color:#fff;}#adminmenu li.current a .awaiting-mod,#adminmenu li a.wp-has-current-submenu .update-plugins{background-color:#464646;color:#fff;-moz-box-shadow:rgba(255,255,255,0.5) 0 1px 0;-webkit-box-shadow:rgba(255,255,255,0.5) 0 1px 0;box-shadow:rgba(255,255,255,0.5) 0 1px 0;}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;}.quicktags-toolbar input{background:#fff;background-image:-ms-linear-gradient(bottom,#e5f0f8,#fff);background-image:-moz-linear-gradient(bottom,#e5f0f8,#fff);background-image:-o-linear-gradient(bottom,#e5f0f8,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#e5f0f8),to(#fff));background-image:-webkit-linear-gradient(bottom,#e5f0f8,#fff)!important;background-image:linear-gradient(bottom,#e5f0f8,#fff);}#editable-post-name{background-color:#fffbcc;}#edit-slug-box strong,.tablenav .displaying-num,#submitted-on,.submitted-on{color:#777;}.login #nav a,.login #backtoblog a{color:#21759b!important;}.login #nav a:hover,.login #backtoblog a:hover{color:#d54e21!important;}#footer{color:#777;border-color:#b0c8d7;}#media-items .media-item,.media-item .describe,.imgedit-group{border-color:#dfdfdf;}.checkbox,.side-info,.plugins tr,#your-profile #rich_editing{background-color:#fcfcfc;}.plugins .inactive,.plugins .inactive th,.plugins .inactive td,tr.inactive+tr.plugin-update-tr .plugin-update{background-color:#f4f4f4;}.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;}.welcome-panel{border-color:#d1e5ee;}.welcome-panel p{color:#777;}.welcome-panel-column p{color:#464646;}.welcome-panel h3{text-shadow:1px 1px 1px white;}.widget,#widget-list .widget-top,.postbox,#titlediv,#poststuff .postarea,.stuffbox{border-color:#d1e5ee;-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff;-webkit-border-radius:3px;border-radius:3px;}.widget,#widget-list .widget-top,.postbox,.menu-item-settings{background-color:#f7fcfe;}.postbox h3{color:#174f69;}.widget .widget-top{color:#174f69;}.sidebar-name:hover h3,.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,.update-nag{background-color:#fffbcc;border-color:#e6db55;color:#555;}.login #backtoblog a{color:#464646;}#wphead{border-bottom:#d0dfe9 1px solid;}#wphead h1 a{color:#174f69;}#footer a:link,#footer a:visited{text-decoration:none;}#footer a:hover{color:#000;text-decoration:underline;}.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:#cfdfe9;background-color:#cfdfe9;background-image:url("../images/ed-bg-vs.gif?ver=20101102");}.quicktags-toolbar input{border-color:#b2c4c8;}.quicktags-toolbar input:hover{border-color:#d0dfe9;background:#f0f8fe;}#poststuff .wp-editor-wrap .wp_themeSkin .mceStatusbar{border-color:#d0dfe9;}#poststuff .wp-editor-wrap .wp_themeSkin .mceStatusbar *{color:#555;}#poststuff #editor-toolbar .active{border-color:#d0dfe9 #d0dfe9 #eff8ff;background-color:#eff8ff;color:#333;}#post-status-info{background-color:#eff8ff;}.wp-editor-wrap .wp_themeSkin *,.wp-editor-wrap .wp_themeSkin a:hover,.wp-editor-wrap .wp_themeSkin a:link,.wp-editor-wrap .wp_themeSkin a:visited,.wp-editor-wrap .wp_themeSkin a:active{color:#000;}.wp-editor-wrap .wp_themeSkin table.mceLayout{border-color:#bed1dd #bed1dd #d0dfe9;}#editorcontainer #content,#editorcontainer .wp-editor-wrap .wp_themeSkin .mceIframeContainer{-moz-box-shadow:inset 1px 1px 2px rgba(0,0,0,0.1);-webkit-box-shadow:inset 1px 1px 2px rgba(0,0,0,0.1);box-shadow:inset 1px 1px 2px rgba(0,0,0,0.1);}.wp-editor-wrap .wp_themeSkin iframe{background:transparent;}.wp-editor-wrap .wp_themeSkin .mceStatusbar{color:#000;background-color:#f5f5f5;}.wp-editor-wrap .wp_themeSkin .mceButton{border-color:#B0C8D7;background-color:#cfdfe9;background-image:-ms-linear-gradient(bottom,#cfdfe9,#fff);background-image:-moz-linear-gradient(bottom,#cfdfe9,#fff);background-image:-o-linear-gradient(bottom,#cfdfe9,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#cfdfe9),to(#fff));background-image:-webkit-linear-gradient(bottom,#cfdfe9,#fff)!important;background-image:linear-gradient(bottom,#cfdfe9,#fff);}.wp-editor-wrap .wp_themeSkin a.mceButtonEnabled:hover{border-color:#5589AA!important;background-color:#c9c9c9;background-image:-ms-linear-gradient(bottom,#bdccd5,#fff);background-image:-moz-linear-gradient(bottom,#bdccd5,#fff);background-image:-o-linear-gradient(bottom,#bdccd5,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#bdccd5),to(#fff));background-image:-webkit-linear-gradient(bottom,#bdccd5,#fff)!important;background-image:linear-gradient(bottom,#bdccd5,#fff);}.wp-editor-wrap .wp_themeSkin a.mceButton:active,.wp-editor-wrap .wp_themeSkin a.mceButtonEnabled:active,.wp-editor-wrap .wp_themeSkin a.mceButtonSelected:active,.wp-editor-wrap .wp_themeSkin a.mceButtonActive,.wp-editor-wrap .wp_themeSkin a.mceButtonActive:active,.wp-editor-wrap .wp_themeSkin a.mceButtonActive:hover{background:#B0C8D7!important;background-image:-ms-linear-gradient(bottom,#fff,#cfdfe9);background-image:-moz-linear-gradient(bottom,#fff,#cfdfe9);background-image:-o-linear-gradient(bottom,#fff,#cfdfe9);background-image:-webkit-gradient(linear,left bottom,left top,from(#fff),to(#cfdfe9));background-image:-webkit-linear-gradient(bottom,#fff,#cfdfe9)!important;background-image:linear-gradient(bottom,#fff,#cfdfe9);border-color:#5589AA!important;}.wp-editor-wrap .wp_themeSkin .mceButtonDisabled{border-color:#B0C8D7!important;}.wp-editor-wrap .wp_themeSkin .mceListBox .mceText,.wp-editor-wrap .wp_themeSkin .mceListBox .mceOpen{border-color:#B0C8D7;background-color:#cfdfe9;background-image:-ms-linear-gradient(bottom,#cfdfe9,#fff);background-image:-moz-linear-gradient(bottom,#cfdfe9,#fff);background-image:-o-linear-gradient(bottom,#cfdfe9,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#cfdfe9),to(#fff));background-image:-webkit-linear-gradient(bottom,#cfdfe9,#fff)!important;background-image:linear-gradient(bottom,#cfdfe9,#fff);}.wp-editor-wrap .wp_themeSkin .mceListBox .mceOpen{border-left:0!important;}.wp-editor-wrap .wp_themeSkin table.mceListBoxEnabled:hover .mceOpen,.wp-editor-wrap .wp_themeSkin .mceListBoxHover .mceOpen,.wp-editor-wrap .wp_themeSkin .mceListBoxHover:active .mceOpen,.wp-editor-wrap .wp_themeSkin .mceListBoxSelected .mceOpen,.wp-editor-wrap .wp_themeSkin .mceListBoxSelected .mceText,.wp-editor-wrap .wp_themeSkin table.mceListBoxEnabled:active .mceText{background:#B0C8D7;border-color:#5589AA!important;}.wp-editor-wrap .wp_themeSkin table.mceListBoxEnabled:hover .mceText,.wp-editor-wrap .wp_themeSkin .mceListBoxHover .mceText,.wp-editor-wrap .wp_themeSkin table.mceListBoxEnabled:hover .mceOpen,.wp-editor-wrap .wp_themeSkin .mceListBoxHover .mceOpen{border-color:#5589AA!important;background-color:#c9c9c9;background-image:-ms-linear-gradient(bottom,#cfdfe9,#fff);background-image:-moz-linear-gradient(bottom,#cfdfe9,#fff);background-image:-o-linear-gradient(bottom,#cfdfe9,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#cfdfe9),to(#fff));background-image:-webkit-linear-gradient(bottom,#cfdfe9,#fff)!important;background-image:linear-gradient(bottom,#cfdfe9,#fff);}.wp-editor-wrap .wp_themeSkin select.mceListBox{border-color:#B2B2B2;background-color:#fff;}.wp-editor-wrap .wp_themeSkin .mceSplitButton a.mceAction,.wp-editor-wrap .wp_themeSkin .mceSplitButton a.mceOpen{border-color:#B0C8D7;}.wp-editor-wrap .wp_themeSkin .mceSplitButton a.mceOpen:hover,.wp-editor-wrap .wp_themeSkin .mceSplitButtonSelected a.mceOpen,.wp-editor-wrap .wp_themeSkin table.mceSplitButtonEnabled:hover a.mceAction,.wp-editor-wrap .wp_themeSkin .mceSplitButton a.mceAction:hover{border-color:#5589AA!important;}.wp-editor-wrap .wp_themeSkin table.mceSplitButton td{background-color:#cfdfe9;background-image:-ms-linear-gradient(bottom,#cfdfe9,#fff);background-image:-moz-linear-gradient(bottom,#cfdfe9,#fff);background-image:-o-linear-gradient(bottom,#cfdfe9,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#cfdfe9),to(#fff));background-image:-webkit-linear-gradient(bottom,#cfdfe9,#fff)!important;background-image:linear-gradient(bottom,#cfdfe9,#fff);}.wp-editor-wrap .wp_themeSkin table.mceSplitButton:hover td{background-image:-ms-linear-gradient(bottom,#cfdfe9,#fff);background-image:-moz-linear-gradient(bottom,#cfdfe9,#fff);background-image:-o-linear-gradient(bottom,#cfdfe9,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#cfdfe9),to(#fff));background-image:-webkit-linear-gradient(bottom,#cfdfe9,#fff)!important;background-image:linear-gradient(bottom,#cfdfe9,#fff);}.wp-editor-wrap .wp_themeSkin .mceSplitButtonActive{background-color:#B0C8D7;}.wp-editor-wrap .wp_themeSkin div.mceColorSplitMenu table{background-color:#ebebeb;border-color:#B2B2B2;}.wp-editor-wrap .wp_themeSkin .mceColorSplitMenu a{border-color:#B2B2B2;}.wp-editor-wrap .wp_themeSkin .mceColorSplitMenu a.mceMoreColors{border-color:#fff;}.wp-editor-wrap .wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover{border-color:#0A246A;background-color:#B6BDD2;}.wp-editor-wrap .wp_themeSkin a.mceMoreColors:hover{border-color:#0A246A;}.wp-editor-wrap .wp_themeSkin .mceMenu{border-color:#ddd;}.wp-editor-wrap .wp_themeSkin .mceMenu table{background-color:#ebeaeb;}.wp-editor-wrap .wp_themeSkin .mceMenu .mceText{color:#000;}.wp-editor-wrap .wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover,.wp-editor-wrap .wp_themeSkin .mceMenu .mceMenuItemActive{background-color:#f5f5f5;}.wp-editor-wrap .wp_themeSkin td.mceMenuItemSeparator{background-color:#aaa;}.wp-editor-wrap .wp_themeSkin .mceMenuItemTitle a{background-color:#ccc;border-bottom-color:#aaa;}.wp-editor-wrap .wp_themeSkin .mceMenuItemTitle span.mceText{color:#000;}.wp-editor-wrap .wp_themeSkin .mceMenuItemDisabled .mceText{color:#888;}.wp-editor-wrap .wp_themeSkin tr.mceFirst td.mceToolbar{background:#cfdfe9 url("../images/ed-bg-vs.gif?ver=20101102") repeat-x scroll left top;border-color:#cfdfe9;}.wp-admin #mceModalBlocker{background:#000;}.wp-admin .clearlooks2 .mceFocus .mceTop .mceLeft{background:#444;border-left:1px solid #999;border-top:1px solid #999;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;}.wp-admin .clearlooks2 .mceFocus .mceTop .mceRight{background:#444;border-right:1px solid #999;border-top:1px solid #999;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;}.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;}.wp-editor-wrap .wp-switch-editor{background-color:#f5fafd;border-color:#d1e5ee #d1e5ee #d1e5ee;color:#999;}.wp-editor-wrap.tmce-active .switch-tmce,.wp-editor-wrap.html-active .switch-html{background-color:#eff8ff;border-color:#d1e5ee #d1e5ee #eff8ff;color:#333;}.wp-editor-wrap.quicktags-toolbar input{color:#464646;border-color:#d1e5ee;background-color:#eff8ff;background-image:-ms-linear-gradient(bottom,#eff8ff,#fff);background-image:-moz-linear-gradient(bottom,#eff8ff,#fff);background-image:-o-linear-gradient(bottom,#eff8ff,#fff);background-image:-webkit-linear-gradient(bottom,#eff8ff,#fff);background-image:linear-gradient(bottom,#eff8ff,#fff);}.wp-editor-wrap .quicktags-toolbar,.wp-editor-wrap.wp_themeSkin tr.mceFirst td.mceToolbar{border-bottom:1px solid #ccc;background-color:#eff8ff;background-image:-ms-linear-gradient(bottom,#cfdfe9,#eff8ff);background-image:-moz-linear-gradient(bottom,#cfdfe9,#eff8ff);background-image:-o-linear-gradient(bottom,#cfdfe9,#eff8ff);background-image:-webkit-linear-gradient(bottom,#cfdfe9,#eff8ff);background-image:linear-gradient(bottom,#cfdfe9,#eff8ff);}.wp-editor-wrap .quicktags-toolbar input:hover{border-color:#aaa;background:#ddd;}.wp-editor-wrap.wp_themeSkin .mceButton,.wp-editor-wrap.wp_themeSkin .mceListBox .mceText,.wp-editor-wrap.wp_themeSkin .mceListBox .mceOpen{border-color:#ccc;background-color:#eff8ff;background-image:-ms-linear-gradient(bottom,#eff8ff,#fff);background-image:-moz-linear-gradient(bottom,#eff8ff,#fff);background-image:-o-linear-gradient(bottom,#eff8ff,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#eff8ff),to(#fff));background-image:-webkit-linear-gradient(bottom,#eff8ff,#fff);background-image:linear-gradient(bottom,#eff8ff,#fff);}.wp-editor-wrap.wp_themeSkin a.mceButtonEnabled:hover{border-color:#a0a0a0;background:#ddd;background-image:-ms-linear-gradient(bottom,#cfdfe9,#fff);background-image:-moz-linear-gradient(bottom,#cfdfe9,#fff);background-image:-o-linear-gradient(bottom,#cfdfe9,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#cfdfe9),to(#fff));background-image:-webkit-linear-gradient(bottom,#cfdfe9,#fff);background-image:linear-gradient(bottom,#cfdfe9,#fff);}#titlediv #title{border-color:#bdccd5;}#editorcontainer{border-color:#bdccd5 #bdccd5 #d0dfe9;}#post-status-info{border-color:#d0dfe9 #bdccd5 #bdccd5;}.editwidget .widget-inside{border-color:#d0dfe9;}#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;}#adminmenuback,#adminmenuwrap{background-color:#EFF8FF;border-color:#D1E5EE;}#adminmenushadow,#adminmenuback{background-image:url(../images/menu-shadow.png);background-position:top right;background-repeat:repeat-y;}#adminmenu li.wp-menu-separator{background:#D1E5EE;border-color:#bed1dd;}#adminmenu div.separator{border-color:#D1E5EE;}#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/arrows-dark-vs.png) no-repeat -1px 6px;}#adminmenu .wp-has-submenu:hover .wp-menu-toggle,#adminmenu .wp-menu-open .wp-menu-toggle{background:transparent url(../images/arrows-vs.png) no-repeat -2px 6px;}#adminmenu a.menu-top,.folded #adminmenu li.menu-top,#adminmenu .wp-submenu .wp-submenu-head{border-top-color:#fff;border-bottom-color:#cae6ff;}#adminmenu li.wp-menu-open{border-color:#d1e5ee;}#adminmenu li.menu-top:hover>a,#adminmenu li.menu-top.focused>a,#adminmenu li.menu-top>a:focus{background-color:#e0f1ff;text-shadow:0 1px 0 rgba(255,255,255,0.4);}#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,#adminmenu li.current a.menu-top,.folded #adminmenu li.wp-has-current-submenu,.folded #adminmenu li.current.menu-top,#adminmenu .wp-menu-arrow,#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head{background-color:#5589AA;background-image:-ms-linear-gradient(bottom,#5589AA,#619bbb);background-image:-moz-linear-gradient(bottom,#5589AA,#619bbb);background-image:-o-linear-gradient(bottom,#5589AA,#619bbb);background-image:-webkit-gradient(linear,left bottom,left top,from(#5589AA),to(#619bbb));background-image:-webkit-linear-gradient(bottom,#5589AA,#619bbb);background-image:linear-gradient(bottom,#5589AA,#619bbb);}#adminmenu .wp-menu-arrow div{background-color:#5589AA;background-image:-ms-linear-gradient(right bottom,#5589AA,#619bbb);background-image:-moz-linear-gradient(right bottom,#5589AA,#619bbb);background-image:-o-linear-gradient(right bottom,#5589AA,#619bbb);background-image:-webkit-gradient(linear,right bottom,left top,from(#5589AA),to(#619bbb));background-image:-webkit-linear-gradient(right bottom,#5589AA,#619bbb);background-image:linear-gradient(right bottom,#5589AA,#619bbb);}#adminmenu li.wp-not-current-submenu .wp-menu-arrow{border-top-color:#fff;border-bottom-color:#cae6ff;background:#e0f1ff;}#adminmenu li.wp-not-current-submenu .wp-menu-arrow div{background:#e0f1ff;border-color:#cae6ff;}.folded #adminmenu li.menu-top li:hover a{background-image:none;}#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,#adminmenu li.current a.menu-top,#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head{text-shadow:0 -1px 0 #333;color:#fff;border-top-color:#5A8FAD;border-bottom-color:#5589AA;}.folded #adminmenu li.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{border-top-color:#5A8FAD;border-bottom-color:#5589AA;}#adminmenu .wp-submenu a:hover,#adminmenu .wp-submenu a:focus{background-color:#EFF8FF;color:#333;}#adminmenu .wp-submenu li.current,#adminmenu .wp-submenu li.current a,#adminmenu .wp-submenu li.current a:hover{color:#333;}#adminmenu .wp-submenu ul{background-color:#fff;}#adminmenu .wp-submenu-wrap,#adminmenu .wp-submenu ul{border-color:#d0dfe9;}#adminmenu .wp-submenu-wrap,.folded #adminmenu .wp-has-current-submenu .wp-submenu-wrap{-moz-box-shadow:2px 2px 5px rgba(0,0,0,0.4);-webkit-box-shadow:2px 2px 5px rgba(0,0,0,0.4);box-shadow:2px 2px 5px rgba(0,0,0,0.4);}#adminmenu .wp-submenu .wp-submenu-head{border-right-color:#e8eff4;background-color:#EFF8FF;}#adminmenu div.wp-submenu{background-color:transparent;}#collapse-menu{color:#A0C3D5;}#collapse-menu:hover{color:#5A8FAD;}#collapse-button{border-color:#d0dfe9;background-color:#eff8ff;background-image:-ms-linear-gradient(bottom,#eff8ff,#fff);background-image:-moz-linear-gradient(bottom,#eff8ff,#fff);background-image:-o-linear-gradient(bottom,#eff8ff,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#eff8ff),to(#fff));background-image:-webkit-linear-gradient(bottom,#eff8ff,#fff);background-image:linear-gradient(bottom,#eff8ff,#fff);}#collapse-menu:hover #collapse-button{border-color:#A0C3D5;}#collapse-button div{background:transparent url(../images/arrows-vs.png) no-repeat 0 -72px;}.folded #collapse-button div{background-position:0 -108px;}.icon16.icon-dashboard,#adminmenu .menu-icon-dashboard div.wp-menu-image{background:transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -60px -33px;}#adminmenu .menu-icon-dashboard:hover div.wp-menu-image,#adminmenu .menu-icon-dashboard.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-dashboard.current div.wp-menu-image{background:transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -60px -1px;}.icon16.icon-post,#adminmenu .menu-icon-post div.wp-menu-image{background:transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -271px -33px;}#adminmenu .menu-icon-post:hover div.wp-menu-image,#adminmenu .menu-icon-post.wp-has-current-submenu div.wp-menu-image{background:transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -271px -1px;}.icon16.icon-media,#adminmenu .menu-icon-media div.wp-menu-image{background:transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -120px -33px;}#adminmenu .menu-icon-media:hover div.wp-menu-image,#adminmenu .menu-icon-media.wp-has-current-submenu div.wp-menu-image{background:transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -120px -1px;}.icon16.icon-links,#adminmenu .menu-icon-links div.wp-menu-image{background:transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -90px -33px;}#adminmenu .menu-icon-links:hover div.wp-menu-image,#adminmenu .menu-icon-links.wp-has-current-submenu div.wp-menu-image{background:transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -90px -1px;}.icon16.icon-page,#adminmenu .menu-icon-page div.wp-menu-image{background:transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -150px -33px;}#adminmenu .menu-icon-page:hover div.wp-menu-image,#adminmenu .menu-icon-page.wp-has-current-submenu div.wp-menu-image{background:transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -150px -1px;}.icon16.icon-comments,#adminmenu .menu-icon-comments div.wp-menu-image{background:transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -30px -33px;}#adminmenu .menu-icon-comments:hover div.wp-menu-image,#adminmenu .menu-icon-comments.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-comments.current div.wp-menu-image{background:transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -30px -1px;}.icon16.icon-appearance,#adminmenu .menu-icon-appearance div.wp-menu-image{background:transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll 0 -33px;}#adminmenu .menu-icon-appearance:hover div.wp-menu-image,#adminmenu .menu-icon-appearance.wp-has-current-submenu div.wp-menu-image{background:transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll 0 -1px;}.icon16.icon-plugins,#adminmenu .menu-icon-plugins div.wp-menu-image{background:transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -180px -33px;}#adminmenu .menu-icon-plugins:hover div.wp-menu-image,#adminmenu .menu-icon-plugins.wp-has-current-submenu div.wp-menu-image{background:transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -180px -1px;}.icon16.icon-users,#adminmenu .menu-icon-users div.wp-menu-image{background:transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -300px -33px;}#adminmenu .menu-icon-users:hover div.wp-menu-image,#adminmenu .menu-icon-users.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-users.current div.wp-menu-image{background:transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -300px -1px;}.icon16.icon-tools,#adminmenu .menu-icon-tools div.wp-menu-image{background:transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -210px -33px;}#adminmenu .menu-icon-tools:hover div.wp-menu-image,#adminmenu .menu-icon-tools.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-tools.current div.wp-menu-image{background:transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -210px -1px;}.icon16.icon-settings,#icon-options-general,#adminmenu .menu-icon-settings div.wp-menu-image{background:transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -240px -33px;}#adminmenu .menu-icon-settings:hover div.wp-menu-image,#adminmenu .menu-icon-settings.wp-has-current-submenu div.wp-menu-image{background:transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -240px -1px;}.icon16.icon-site,#adminmenu .menu-icon-site div.wp-menu-image{background:transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -360px -33px;}#adminmenu .menu-icon-site:hover div.wp-menu-image,#adminmenu .menu-icon-site.wp-has-current-submenu div.wp-menu-image{background:transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -360px -1px;}.icon32.icon-post,#icon-edit,#icon-post{background:transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -552px -5px;}.icon32.icon-dashboard,#icon-index{background:transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -137px -5px;}.icon32.icon-media,#icon-upload{background:transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -251px -5px;}.icon32.icon-links,#icon-link-manager,#icon-link,#icon-link-category{background:transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -190px -5px;}.icon32.icon-page,#icon-edit-pages,#icon-page{background:transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -312px -5px;}.icon32.icon-comments,#icon-edit-comments{background:transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -72px -5px;}.icon32.icon-appearance,#icon-themes{background:transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -11px -5px;}.icon32.icon-plugins,#icon-plugins{background:transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -370px -5px;}.icon32.icon-users,#icon-users,#icon-profile,#icon-user-edit{background:transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -600px -5px;}.icon32.icon-tools,#icon-tools,#icon-admin{background:transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -432px -5px;}.icon32.icon-settings,#icon-options-general{background:transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -492px -5px;}.icon32.icon-site,#icon-ms-admin{background:transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -659px -5px;}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-meta{background-color:#EFF8FF;border-color:#D1E5EE;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.05);box-shadow:0 1px 3px rgba(0,0,0,0.05);}#contextual-help-back{background:#fff;}.contextual-help-tabs a:hover{background-color:#ceeaff;color:#333;}#contextual-help-back,.contextual-help-tabs .active{border-color:#D1E5EE;}.contextual-help-tabs .active,.contextual-help-tabs .active a,.contextual-help-tabs .active a:hover{background:#fff;color:#000;}#screen-options-link-wrap,#contextual-help-link-wrap{background-color:#eff8ff;border-right:1px solid #D1E5EE;border-left:1px solid #D1E5EE;border-bottom:1px solid #D1E5EE;background-image:-ms-linear-gradient(bottom,#eff8ff,#fff);background-image:-moz-linear-gradient(bottom,#eff8ff,#fff);background-image:-o-linear-gradient(bottom,#eff8ff,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#eff8ff),to(#fff));background-image:-webkit-linear-gradient(bottom,#eff8ff,#fff);background-image:linear-gradient(bottom,#eff8ff,#fff);}#screen-meta-links a.show-settings{color:#606060;}#screen-meta-links a.show-settings:hover{color:#000;}#screen-meta-links a.show-settings{background:transparent url(../images/arrows.png) no-repeat right 3px;}#screen-meta-links a.show-settings.screen-meta-active{background:transparent url(../images/arrows.png) no-repeat right -33px;}#replyerror{border-color:#ddd;background-color:#f9f9f9;}.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;}div.star img{border-left:1px solid #fff;border-right:1px solid #fff;}#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{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;}fieldset.inline-edit-col-right .inline-edit-col{border-color:#dfdfdf;}.attention{color:#D54E21;}.meta-box-sortables .postbox:hover .handlediv{background:transparent url(../images/arrows-vs.png) no-repeat 6px 7px;}.tablenav .tablenav-pages{color:#555;}.tablenav .tablenav-pages a{border-color:#d1e5ee;background:#eee url('../images/menu-bits-vs.gif?ver=20101102') repeat-x scroll left -379px;}.tablenav .tablenav-pages a:hover,.tablenav .tablenav-pages a:focus{color:#d54e21;}.tablenav .tablenav-pages a.disabled,.tablenav .tablenav-pages a.disabled:hover,.tablenav .tablenav-pages a.disabled:focus{color:#aaa;}.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-top-color:#fff;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,#post-body ul.add-menu-item-tabs li.tabs a,body.press-this ul.category-tabs li.tabs a{color:#333;}.view-switch #view-switch-list{background:transparent url(../images/list.png) no-repeat 0 0;}.view-switch .current #view-switch-list{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 .current #view-switch-excerpt{background:transparent url(../images/list.png) no-repeat -60px 0;}#header-logo{background:transparent url(../images/wp-logo-vs.png?ver=20101102) no-repeat scroll center center;}.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:#f7fcfe;border-color:#d0dfe9;}#available-widgets .widget-holder{background-color:#f7fcfe;border-color:#d0dfe9;}#available-widgets .widget-description{color:#555;}.sidebar-name{color:#464646;background-color:#f7fcfe;background-image:-ms-linear-gradient(top,#ECF8FE,#f7fcfe);background-image:-moz-linear-gradient(top,#ECF8FE,#f7fcfe);background-image:-o-linear-gradient(top,#ECF8FE,#f7fcfe);background-image:-webkit-gradient(linear,left top,left bottom,from(#ECF8FE),to(#f7fcfe));background-image:-webkit-linear-gradient(top,#ECF8FE,#f7fcfe);background-image:linear-gradient(top,#ECF8FE,#f7fcfe);text-shadow:#fff 0 1px 0;border-color:#d0dfe9;-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff;}.sidebar-name:hover,#removing-widget{color:#d54e21;}#removing-widget span{color:black;}.sidebar-name-arrow{background:transparent url(../images/arrows-vs.png) no-repeat 5px 9px;}.sidebar-name:hover .sidebar-name-arrow{background:transparent url(../images/arrows-dark-vs.png) no-repeat 5px 9px;}.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;}#menu-management .menu-edit{border-color:#d0dfe9;}#post-body{background:#fff;border-top-color:#fff;border-bottom-color:#d0dfe9;}#nav-menu-header{border-bottom-color:#d0dfe9;}#nav-menu-footer{border-top-color:#fff;}#menu-management .nav-tabs-arrow a{color:#C1C1C1;}#menu-management .nav-tabs-arrow a:hover{color:#D54E21;}#menu-management .nav-tabs-arrow a:active{color:#464646;}#menu-management .nav-tab-active{border-color:#dfdfdf;}#menu-management .nav-tab{background:#f7fcfe;border-color:#d0dfe9;}.js .input-with-default-title{color:#aaa;}#cancel-save{color:#f00;}#cancel-save:hover{background-color:#F00;color:#fff;}.list-container{border-color:#dfdfdf;}.menu-item-handle{border-color:#d0dfe9;}.menu li.deleting .menu-item-handle{background-color:#f66;text-shadow:#ccc;}.item-type{color:#999;}.item-controls .menu-item-delete:hover{color:#f00;}.nav-menus-php .item-edit{background:transparent url(../images/arrows-vs.png) no-repeat 8px 10px;border-bottom-color:#eff8ff;}.item-edit:hover{background:transparent url(../images/arrows-dark-vs.png) no-repeat 8px 10px;}.menu-item-settings{border-color:#d0dfe9;}.link-to-original{color:#777;border-color:#d0dfe9;}#cancel-save:hover{color:#fff!important;}#update-menu-item{color:#fff!important;}#update-menu-item:hover,#update-menu-item:active,#update-menu-item:focus{color:#eaf2fa!important;border-color:#13455b!important;}.submitbox .submitcancel{color:#21759B;border-bottom-color:#21759B;}.submitbox .submitcancel:hover{background:#21759B;color:#fff;}#menu-management .nav-tab-active,.menu-item-handle,.menu-item-settings{-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff;}#menu-management .nav-tab-active{background:#eff8ff;border-bottom-color:#eff8ff;}#upload-form label{color:#777;}.fullscreen-overlay{background:#fff;}.wp-fullscreen-focus #wp-fullscreen-title,.wp-fullscreen-focus #wp-fullscreen-container{border-color:#BED1DD;}#fullscreen-topbar{border-bottom-color:#D1E5EE;}.about-wrap h1{color:#333;text-shadow:1px 1px 1px white;}.about-text{color:#777;}.wp-badge{color:#fff;text-shadow:0 -1px 0 rgba(22,57,81,0.3);}.about-wrap h2 .nav-tab{color:#21759B;}.about-wrap h2 .nav-tab:hover{color:#d54e21;}.about-wrap h2 .nav-tab-active,.about-wrap h2 .nav-tab-active:hover{color:#333;}.about-wrap h2 .nav-tab-active{text-shadow:1px 1px 1px white;color:#464646;}.about-wrap h3{color:#333;text-shadow:1px 1px 1px white;}.about-wrap .feature-section h4{color:#464646;}.about-wrap .feature-section img{background:#fff;border-color:#dfdfdf;-moz-box-shadow:0 0 6px rgba(0,0,0,0.3);-webkit-box-shadow:0 0 6px rgba(0,0,0,0.3);box-shadow:0 0 6px rgba(0,0,0,0.3);}.about-wrap .point-releases{border-bottom:1px solid #dfdfdf;}.about-wrap .point-releases h3{border-top:1px solid #dfdfdf;}.about-wrap .point-releases h3:first-child{border:0;}.about-wrap h4.wp-people-group{text-shadow:1px 1px 1px white;}.about-wrap li.wp-person img.gravatar{-moz-box-shadow:0 0 4px rgba(0,0,0,0.4);-webkit-box-shadow:0 0 4px rgba(0,0,0,0.4);box-shadow:0 0 4px rgba(0,0,0,0.4);}.about-wrap li.wp-person .title{color:#464646;text-shadow:1px 1px 1px white;}.freedoms-php .about-wrap ol li{color:#999;}.freedoms-php .about-wrap ol p{color:#464646;}.rtl .bar{border-right-color:none;border-left-color:#99d;}.rtl .post-com-count{background-image:url(../images/bubble_bg-rtl.gif);}.rtl #screen-meta-links a.show-settings{background-position:left 3px;}.rtl #screen-meta-links a.show-settings.screen-meta-active{background-position:left -33px;}.rtl #adminmenushadow,.rtl #adminmenuback{background-image:url(../images/menu-shadow-rtl.png);background-position:top left;}.rtl #adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle,.rtl #adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle{background:transparent url(../images/arrows-dark-vs.png) no-repeat 8px 6px;}.rtl #adminmenu .wp-has-submenu:hover .wp-menu-toggle,.rtl #adminmenu .wp-menu-open .wp-menu-toggle{background:transparent url(../images/arrows-vs.png) no-repeat 8px 6px;}.rtl #adminmenu .wp-submenu .wp-submenu-head{border-right-color:none;border-left-color:#d1e5ee;}.rtl #adminmenu .wp-submenu-wrap,.rtl.folded #adminmenu .wp-has-current-submenu .wp-submenu-wrap{-moz-box-shadow:-2px 2px 5px rgba(0,0,0,0.4);-webkit-box-shadow:-2px 2px 5px rgba(0,0,0,0.4);box-shadow:-2px 2px 5px rgba(0,0,0,0.4);}.rtl #collapse-button div{background-position:0 -108px;}.rtl.folded #collapse-button div{background-position:0 -72px;}.rtl .meta-box-sortables .postbox:hover .handlediv{background:transparent url(../images/arrows-vs.png) no-repeat 6px 7px;}.rtl .tablenav .tablenav-pages a{border-color:#d1e5ee;background:#eee url('../images/menu-bits-rtl-vs.gif?ver=20100610') repeat-x scroll right -379px;}.rtl #post-body .misc-pub-section{border-right-color:none;border-left-color:#d1e5ee;}.rtl .sidebar-name-arrow{background:transparent url(../images/arrows-vs.png) no-repeat 5px 9px;}.rtl .sidebar-name:hover .sidebar-name-arrow{background:transparent url(../images/arrows-dark-vs.png) no-repeat 5px 9px;} \ No newline at end of file +html,.wp-dialog{background-color:#fff}* 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"],input[type="email"],input[type="number"],input[type="search"],input[type="tel"],input[type="url"],select{border-color:#dfdfdf;background-color:#fff;color:#333}select{color:#000}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="file"]:focus,input[type="button"]:focus,input[type="submit"]:focus,input[type="reset"]:focus,input[type="email"]:focus,input[type="number"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="url"]:focus,select:focus{border-color:#d1e5ee}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,.ui-autocomplete li a{color:#333}body>#upload-menu{border-bottom-color:#fff}#postcustomstuff table,#your-profile fieldset,#rightnow,div.dashboard-widget,#dashboard-widgets p.dashboard-widget-links{border-color:#d1e5ee}#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:#d1e5ee;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}ul.category-tabs li{border-color:transparent}div.tabs-panel,.wp-tab-panel,ul.category-tabs li.tabs,ul.add-menu-item-tabs li.tabs,.wp-tab-active{border-color:#dfdfdf;background-color:#fff}ul.category-tabs li.tabs,ul.add-menu-item-tabs li.tabs,.wp-tab-active{background-color:#fff}input.disabled,textarea.disabled{background-color:#ccc}#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,.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,.sidebar-name,#nav-menu-header,#nav-menu-footer,.menu-item-handle,#fullscreen-topbar{background-color:#f5fafd;background-image:-ms-linear-gradient(top,#f7fcfe,#eff8ff);background-image:-moz-linear-gradient(top,#f7fcfe,#eff8ff);background-image:-o-linear-gradient(top,#f7fcfe,#eff8ff);background-image:-webkit-gradient(linear,left top,left bottom,from(#f7fcfe),to(#eff8ff));background-image:-webkit-linear-gradient(top,#f7fcfe,#eff8ff);background-image:linear-gradient(top,#f7fcfe,#eff8ff)}.widget .widget-top,.postbox h3,.stuffbox h3{border-bottom-color:#d1e5ee;text-shadow:#fff 0 1px 0;-moz-box-shadow:0 1px 0 #fff;-webkit-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff}.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:#174f69}.wrap .add-new-h2{background:#f1f1f1}.subtitle{color:#777}.ac_over{background-color:#f0f0b8}.ac_results{background-color:#fff;border-color:#808080}.ac_results li{color:#101010}.alternate,.alt{background-color:#f7fcfe}.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}div.error,.login #login_error{background-color:#ffebe8;border-color:#c00}div.error a{color:#c00}.form-invalid{background-color:#ffebe8!important}.form-invalid input,.form-invalid select{border-color:#c00!important}.submit,#commentsdiv #add-new-comment{border-color:#dfdfdf}.highlight{background-color:#e4f2fd;color:#000}.howto,.nonessential,#edit-slug-box,.form-input-tip,.subsubsub{color:#666}.media-upload-form label.form-help,td.help{color:#9a9a9a}.ui-autocomplete{background-color:#eff8ff;border-color:#d1e5ee}.ui-autocomplete li a.ui-state-hover{background-color:#def1ff}.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}#adminmenu a:hover,#adminmenu li.menu-top>a:focus,#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,#side-sortables .add-menu-item-tabs .tabs a,.wp-tab-bar .wp-tab-active 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}div.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{border-top-color:#fff;border-bottom-color:#d0dfe9}.widefat th{text-shadow:rgba(255,255,255,0.8) 0 1px 0}.widefat td{color:#555}.widefat p,.widefat ol,.widefat ul{color:#333}.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}th.sortable a:hover,th.sortable a:active,th.sortable a:focus{color:#333}h3.dashboard-widget-title small a{color:#d7d7d7}h3.dashboard-widget-title small a:hover{color:#fff}a,#adminmenu a,#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}#adminmenu .awaiting-mod,#adminmenu .update-plugins,#sidemenu a .update-plugins,#rightnow .reallynow{background-color:#464646;color:#fff;-moz-box-shadow:rgba(255,255,255,0.5) 0 1px 0;-webkit-box-shadow:rgba(255,255,255,0.5) 0 1px 0;box-shadow:rgba(255,255,255,0.5) 0 1px 0}#plugin-information .action-button{background-color:#d54e21;color:#fff}#adminmenu li.current a .awaiting-mod,#adminmenu li a.wp-has-current-submenu .update-plugins{background-color:#464646;color:#fff;-moz-box-shadow:rgba(255,255,255,0.5) 0 1px 0;-webkit-box-shadow:rgba(255,255,255,0.5) 0 1px 0;box-shadow:rgba(255,255,255,0.5) 0 1px 0}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}.quicktags-toolbar input{background:#fff;background-image:-ms-linear-gradient(bottom,#e5f0f8,#fff);background-image:-moz-linear-gradient(bottom,#e5f0f8,#fff);background-image:-o-linear-gradient(bottom,#e5f0f8,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#e5f0f8),to(#fff));background-image:-webkit-linear-gradient(bottom,#e5f0f8,#fff)!important;background-image:linear-gradient(bottom,#e5f0f8,#fff)}#editable-post-name{background-color:#fffbcc}#edit-slug-box strong,.tablenav .displaying-num,#submitted-on,.submitted-on{color:#777}.login #nav a,.login #backtoblog a{color:#21759b!important}.login #nav a:hover,.login #backtoblog a:hover{color:#d54e21!important}#footer{color:#777;border-color:#b0c8d7}#media-items .media-item,.media-item .describe,.imgedit-group{border-color:#dfdfdf}.checkbox,.side-info,.plugins tr,#your-profile #rich_editing{background-color:#fcfcfc}.plugins .inactive,.plugins .inactive th,.plugins .inactive td,tr.inactive+tr.plugin-update-tr .plugin-update{background-color:#f4f4f4}.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}.welcome-panel{border-color:#d1e5ee}.welcome-panel p{color:#777}.welcome-panel-column p{color:#464646}.welcome-panel h3{text-shadow:1px 1px 1px white}.widget,#widget-list .widget-top,.postbox,#titlediv,#poststuff .postarea,.stuffbox{border-color:#d1e5ee;-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff;-webkit-border-radius:3px;border-radius:3px}.widget,#widget-list .widget-top,.postbox,.menu-item-settings{background-color:#f7fcfe}.postbox h3{color:#174f69}.widget .widget-top{color:#174f69}.sidebar-name:hover h3,.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,.update-nag{background-color:#fffbcc;border-color:#e6db55;color:#555}.login #backtoblog a{color:#464646}#wphead{border-bottom:#d0dfe9 1px solid}#wphead h1 a{color:#174f69}#footer a:link,#footer a:visited{text-decoration:none}#footer a:hover{color:#000;text-decoration:underline}.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:#cfdfe9;background-color:#cfdfe9;background-image:url("../images/ed-bg-vs.gif?ver=20101102")}.quicktags-toolbar input{border-color:#b2c4c8}.quicktags-toolbar input:hover{border-color:#d0dfe9;background:#f0f8fe}#poststuff .wp-editor-wrap .wp_themeSkin .mceStatusbar{border-color:#d0dfe9}#poststuff .wp-editor-wrap .wp_themeSkin .mceStatusbar *{color:#555}#poststuff #editor-toolbar .active{border-color:#d0dfe9 #d0dfe9 #eff8ff;background-color:#eff8ff;color:#333}#post-status-info{background-color:#eff8ff}.wp-editor-wrap .wp_themeSkin *,.wp-editor-wrap .wp_themeSkin a:hover,.wp-editor-wrap .wp_themeSkin a:link,.wp-editor-wrap .wp_themeSkin a:visited,.wp-editor-wrap .wp_themeSkin a:active{color:#000}.wp-editor-wrap .wp_themeSkin table.mceLayout{border-color:#bed1dd #bed1dd #d0dfe9}#editorcontainer #content,#editorcontainer .wp-editor-wrap .wp_themeSkin .mceIframeContainer{-moz-box-shadow:inset 1px 1px 2px rgba(0,0,0,0.1);-webkit-box-shadow:inset 1px 1px 2px rgba(0,0,0,0.1);box-shadow:inset 1px 1px 2px rgba(0,0,0,0.1)}.wp-editor-wrap .wp_themeSkin iframe{background:transparent}.wp-editor-wrap .wp_themeSkin .mceStatusbar{color:#000;background-color:#f5f5f5}.wp-editor-wrap .wp_themeSkin .mceButton{border-color:#b0c8d7;background-color:#cfdfe9;background-image:-ms-linear-gradient(bottom,#cfdfe9,#fff);background-image:-moz-linear-gradient(bottom,#cfdfe9,#fff);background-image:-o-linear-gradient(bottom,#cfdfe9,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#cfdfe9),to(#fff));background-image:-webkit-linear-gradient(bottom,#cfdfe9,#fff)!important;background-image:linear-gradient(bottom,#cfdfe9,#fff)}.wp-editor-wrap .wp_themeSkin a.mceButtonEnabled:hover{border-color:#5589aa!important;background-color:#c9c9c9;background-image:-ms-linear-gradient(bottom,#bdccd5,#fff);background-image:-moz-linear-gradient(bottom,#bdccd5,#fff);background-image:-o-linear-gradient(bottom,#bdccd5,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#bdccd5),to(#fff));background-image:-webkit-linear-gradient(bottom,#bdccd5,#fff)!important;background-image:linear-gradient(bottom,#bdccd5,#fff)}.wp-editor-wrap .wp_themeSkin a.mceButton:active,.wp-editor-wrap .wp_themeSkin a.mceButtonEnabled:active,.wp-editor-wrap .wp_themeSkin a.mceButtonSelected:active,.wp-editor-wrap .wp_themeSkin a.mceButtonActive,.wp-editor-wrap .wp_themeSkin a.mceButtonActive:active,.wp-editor-wrap .wp_themeSkin a.mceButtonActive:hover{background:#b0c8d7!important;background-image:-ms-linear-gradient(bottom,#fff,#cfdfe9);background-image:-moz-linear-gradient(bottom,#fff,#cfdfe9);background-image:-o-linear-gradient(bottom,#fff,#cfdfe9);background-image:-webkit-gradient(linear,left bottom,left top,from(#fff),to(#cfdfe9));background-image:-webkit-linear-gradient(bottom,#fff,#cfdfe9)!important;background-image:linear-gradient(bottom,#fff,#cfdfe9);border-color:#5589aa!important}.wp-editor-wrap .wp_themeSkin .mceButtonDisabled{border-color:#b0c8d7!important}.wp-editor-wrap .wp_themeSkin .mceListBox .mceText,.wp-editor-wrap .wp_themeSkin .mceListBox .mceOpen{border-color:#b0c8d7;background-color:#cfdfe9;background-image:-ms-linear-gradient(bottom,#cfdfe9,#fff);background-image:-moz-linear-gradient(bottom,#cfdfe9,#fff);background-image:-o-linear-gradient(bottom,#cfdfe9,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#cfdfe9),to(#fff));background-image:-webkit-linear-gradient(bottom,#cfdfe9,#fff)!important;background-image:linear-gradient(bottom,#cfdfe9,#fff)}.wp-editor-wrap .wp_themeSkin .mceListBox .mceOpen{border-left:0!important}.wp-editor-wrap .wp_themeSkin table.mceListBoxEnabled:hover .mceOpen,.wp-editor-wrap .wp_themeSkin .mceListBoxHover .mceOpen,.wp-editor-wrap .wp_themeSkin .mceListBoxHover:active .mceOpen,.wp-editor-wrap .wp_themeSkin .mceListBoxSelected .mceOpen,.wp-editor-wrap .wp_themeSkin .mceListBoxSelected .mceText,.wp-editor-wrap .wp_themeSkin table.mceListBoxEnabled:active .mceText{background:#b0c8d7;border-color:#5589aa!important}.wp-editor-wrap .wp_themeSkin table.mceListBoxEnabled:hover .mceText,.wp-editor-wrap .wp_themeSkin .mceListBoxHover .mceText,.wp-editor-wrap .wp_themeSkin table.mceListBoxEnabled:hover .mceOpen,.wp-editor-wrap .wp_themeSkin .mceListBoxHover .mceOpen{border-color:#5589aa!important;background-color:#c9c9c9;background-image:-ms-linear-gradient(bottom,#cfdfe9,#fff);background-image:-moz-linear-gradient(bottom,#cfdfe9,#fff);background-image:-o-linear-gradient(bottom,#cfdfe9,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#cfdfe9),to(#fff));background-image:-webkit-linear-gradient(bottom,#cfdfe9,#fff)!important;background-image:linear-gradient(bottom,#cfdfe9,#fff)}.wp-editor-wrap .wp_themeSkin select.mceListBox{border-color:#b2b2b2;background-color:#fff}.wp-editor-wrap .wp_themeSkin .mceSplitButton a.mceAction,.wp-editor-wrap .wp_themeSkin .mceSplitButton a.mceOpen{border-color:#b0c8d7}.wp-editor-wrap .wp_themeSkin .mceSplitButton a.mceOpen:hover,.wp-editor-wrap .wp_themeSkin .mceSplitButtonSelected a.mceOpen,.wp-editor-wrap .wp_themeSkin table.mceSplitButtonEnabled:hover a.mceAction,.wp-editor-wrap .wp_themeSkin .mceSplitButton a.mceAction:hover{border-color:#5589aa!important}.wp-editor-wrap .wp_themeSkin table.mceSplitButton td{background-color:#cfdfe9;background-image:-ms-linear-gradient(bottom,#cfdfe9,#fff);background-image:-moz-linear-gradient(bottom,#cfdfe9,#fff);background-image:-o-linear-gradient(bottom,#cfdfe9,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#cfdfe9),to(#fff));background-image:-webkit-linear-gradient(bottom,#cfdfe9,#fff)!important;background-image:linear-gradient(bottom,#cfdfe9,#fff)}.wp-editor-wrap .wp_themeSkin table.mceSplitButton:hover td{background-image:-ms-linear-gradient(bottom,#cfdfe9,#fff);background-image:-moz-linear-gradient(bottom,#cfdfe9,#fff);background-image:-o-linear-gradient(bottom,#cfdfe9,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#cfdfe9),to(#fff));background-image:-webkit-linear-gradient(bottom,#cfdfe9,#fff)!important;background-image:linear-gradient(bottom,#cfdfe9,#fff)}.wp-editor-wrap .wp_themeSkin .mceSplitButtonActive{background-color:#b0c8d7}.wp-editor-wrap .wp_themeSkin div.mceColorSplitMenu table{background-color:#ebebeb;border-color:#b2b2b2}.wp-editor-wrap .wp_themeSkin .mceColorSplitMenu a{border-color:#b2b2b2}.wp-editor-wrap .wp_themeSkin .mceColorSplitMenu a.mceMoreColors{border-color:#fff}.wp-editor-wrap .wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover{border-color:#0a246a;background-color:#b6bdd2}.wp-editor-wrap .wp_themeSkin a.mceMoreColors:hover{border-color:#0a246a}.wp-editor-wrap .wp_themeSkin .mceMenu{border-color:#ddd}.wp-editor-wrap .wp_themeSkin .mceMenu table{background-color:#ebeaeb}.wp-editor-wrap .wp_themeSkin .mceMenu .mceText{color:#000}.wp-editor-wrap .wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover,.wp-editor-wrap .wp_themeSkin .mceMenu .mceMenuItemActive{background-color:#f5f5f5}.wp-editor-wrap .wp_themeSkin td.mceMenuItemSeparator{background-color:#aaa}.wp-editor-wrap .wp_themeSkin .mceMenuItemTitle a{background-color:#ccc;border-bottom-color:#aaa}.wp-editor-wrap .wp_themeSkin .mceMenuItemTitle span.mceText{color:#000}.wp-editor-wrap .wp_themeSkin .mceMenuItemDisabled .mceText{color:#888}.wp-editor-wrap .wp_themeSkin tr.mceFirst td.mceToolbar{background:#cfdfe9 url("../images/ed-bg-vs.gif?ver=20101102") repeat-x scroll left top;border-color:#cfdfe9}.wp-admin #mceModalBlocker{background:#000}.wp-admin .clearlooks2 .mceFocus .mceTop .mceLeft{background:#444;border-left:1px solid #999;border-top:1px solid #999;-webkit-border-top-left-radius:3px;border-top-left-radius:3px}.wp-admin .clearlooks2 .mceFocus .mceTop .mceRight{background:#444;border-right:1px solid #999;border-top:1px solid #999;-webkit-border-top-right-radius:3px;border-top-right-radius:3px}.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}.wp-editor-wrap .wp-switch-editor{background-color:#f5fafd;border-color:#d1e5ee #d1e5ee #d1e5ee;color:#999}.wp-editor-wrap.tmce-active .switch-tmce,.wp-editor-wrap.html-active .switch-html{background-color:#eff8ff;border-color:#d1e5ee #d1e5ee #eff8ff;color:#333}.wp-editor-wrap.quicktags-toolbar input{color:#464646;border-color:#d1e5ee;background-color:#eff8ff;background-image:-ms-linear-gradient(bottom,#eff8ff,#fff);background-image:-moz-linear-gradient(bottom,#eff8ff,#fff);background-image:-o-linear-gradient(bottom,#eff8ff,#fff);background-image:-webkit-linear-gradient(bottom,#eff8ff,#fff);background-image:linear-gradient(bottom,#eff8ff,#fff)}.wp-editor-wrap .quicktags-toolbar,.wp-editor-wrap.wp_themeSkin tr.mceFirst td.mceToolbar{border-bottom:1px solid #ccc;background-color:#eff8ff;background-image:-ms-linear-gradient(bottom,#cfdfe9,#eff8ff);background-image:-moz-linear-gradient(bottom,#cfdfe9,#eff8ff);background-image:-o-linear-gradient(bottom,#cfdfe9,#eff8ff);background-image:-webkit-linear-gradient(bottom,#cfdfe9,#eff8ff);background-image:linear-gradient(bottom,#cfdfe9,#eff8ff)}.wp-editor-wrap .quicktags-toolbar input:hover{border-color:#aaa;background:#ddd}.wp-editor-wrap.wp_themeSkin .mceButton,.wp-editor-wrap.wp_themeSkin .mceListBox .mceText,.wp-editor-wrap.wp_themeSkin .mceListBox .mceOpen{border-color:#ccc;background-color:#eff8ff;background-image:-ms-linear-gradient(bottom,#eff8ff,#fff);background-image:-moz-linear-gradient(bottom,#eff8ff,#fff);background-image:-o-linear-gradient(bottom,#eff8ff,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#eff8ff),to(#fff));background-image:-webkit-linear-gradient(bottom,#eff8ff,#fff);background-image:linear-gradient(bottom,#eff8ff,#fff)}.wp-editor-wrap.wp_themeSkin a.mceButtonEnabled:hover{border-color:#a0a0a0;background:#ddd;background-image:-ms-linear-gradient(bottom,#cfdfe9,#fff);background-image:-moz-linear-gradient(bottom,#cfdfe9,#fff);background-image:-o-linear-gradient(bottom,#cfdfe9,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#cfdfe9),to(#fff));background-image:-webkit-linear-gradient(bottom,#cfdfe9,#fff);background-image:linear-gradient(bottom,#cfdfe9,#fff)}#titlediv #title{border-color:#bdccd5}#editorcontainer{border-color:#bdccd5 #bdccd5 #d0dfe9}#post-status-info{border-color:#d0dfe9 #bdccd5 #bdccd5}.editwidget .widget-inside{border-color:#d0dfe9}#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}#adminmenuback,#adminmenuwrap{background-color:#eff8ff;border-color:#d1e5ee}#adminmenushadow,#adminmenuback{background-image:url(../images/menu-shadow.png);background-position:top right;background-repeat:repeat-y}#adminmenu li.wp-menu-separator{background:#d1e5ee;border-color:#bed1dd}#adminmenu div.separator{border-color:#d1e5ee}#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/arrows-dark-vs.png) no-repeat -1px 6px}#adminmenu .wp-has-submenu:hover .wp-menu-toggle,#adminmenu .wp-menu-open .wp-menu-toggle{background:transparent url(../images/arrows-vs.png) no-repeat -2px 6px}#adminmenu a.menu-top,.folded #adminmenu li.menu-top,#adminmenu .wp-submenu .wp-submenu-head{border-top-color:#fff;border-bottom-color:#cae6ff}#adminmenu li.wp-menu-open{border-color:#d1e5ee}#adminmenu li.menu-top:hover>a,#adminmenu li.menu-top.focused>a,#adminmenu li.menu-top>a:focus{background-color:#e0f1ff;text-shadow:0 1px 0 rgba(255,255,255,0.4)}#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,#adminmenu li.current a.menu-top,.folded #adminmenu li.wp-has-current-submenu,.folded #adminmenu li.current.menu-top,#adminmenu .wp-menu-arrow,#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head{background-color:#5589aa;background-image:-ms-linear-gradient(bottom,#5589aa,#619bbb);background-image:-moz-linear-gradient(bottom,#5589aa,#619bbb);background-image:-o-linear-gradient(bottom,#5589aa,#619bbb);background-image:-webkit-gradient(linear,left bottom,left top,from(#5589aa),to(#619bbb));background-image:-webkit-linear-gradient(bottom,#5589aa,#619bbb);background-image:linear-gradient(bottom,#5589aa,#619bbb)}#adminmenu .wp-menu-arrow div{background-color:#5589aa;background-image:-ms-linear-gradient(right bottom,#5589aa,#619bbb);background-image:-moz-linear-gradient(right bottom,#5589aa,#619bbb);background-image:-o-linear-gradient(right bottom,#5589aa,#619bbb);background-image:-webkit-gradient(linear,right bottom,left top,from(#5589aa),to(#619bbb));background-image:-webkit-linear-gradient(right bottom,#5589aa,#619bbb);background-image:linear-gradient(right bottom,#5589aa,#619bbb)}#adminmenu li.wp-not-current-submenu .wp-menu-arrow{border-top-color:#fff;border-bottom-color:#cae6ff;background:#e0f1ff}#adminmenu li.wp-not-current-submenu .wp-menu-arrow div{background:#e0f1ff;border-color:#cae6ff}.folded #adminmenu li.menu-top li:hover a{background-image:none}#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,#adminmenu li.current a.menu-top,#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head{text-shadow:0 -1px 0 #333;color:#fff;border-top-color:#5a8fad;border-bottom-color:#5589aa}.folded #adminmenu li.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{border-top-color:#5a8fad;border-bottom-color:#5589aa}#adminmenu .wp-submenu a:hover,#adminmenu .wp-submenu a:focus{background-color:#eff8ff;color:#333}#adminmenu .wp-submenu li.current,#adminmenu .wp-submenu li.current a,#adminmenu .wp-submenu li.current a:hover{color:#333}#adminmenu .wp-submenu ul{background-color:#fff}#adminmenu .wp-submenu-wrap,#adminmenu .wp-submenu ul{border-color:#d0dfe9}#adminmenu .wp-submenu-wrap,.folded #adminmenu .wp-has-current-submenu .wp-submenu-wrap{-moz-box-shadow:2px 2px 5px rgba(0,0,0,0.4);-webkit-box-shadow:2px 2px 5px rgba(0,0,0,0.4);box-shadow:2px 2px 5px rgba(0,0,0,0.4)}#adminmenu .wp-submenu .wp-submenu-head{border-right-color:#e8eff4;background-color:#eff8ff}#adminmenu div.wp-submenu{background-color:transparent}#collapse-menu{color:#a0c3d5}#collapse-menu:hover{color:#5a8fad}#collapse-button{border-color:#d0dfe9;background-color:#eff8ff;background-image:-ms-linear-gradient(bottom,#eff8ff,#fff);background-image:-moz-linear-gradient(bottom,#eff8ff,#fff);background-image:-o-linear-gradient(bottom,#eff8ff,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#eff8ff),to(#fff));background-image:-webkit-linear-gradient(bottom,#eff8ff,#fff);background-image:linear-gradient(bottom,#eff8ff,#fff)}#collapse-menu:hover #collapse-button{border-color:#a0c3d5}#collapse-button div{background:transparent url(../images/arrows-vs.png) no-repeat 0 -72px}.folded #collapse-button div{background-position:0 -108px}@media only screen and (max-width:900px){#adminmenu li.menu-top{border-top-color:#fff;border-bottom-color:#cae6ff}#adminmenu li.wp-has-current-submenu,#adminmenu li.current.menu-top{background-color:#5589aa;background-image:-ms-linear-gradient(bottom,#5589aa,#619bbb);background-image:-moz-linear-gradient(bottom,#5589aa,#619bbb);background-image:-o-linear-gradient(bottom,#5589aa,#619bbb);background-image:-webkit-gradient(linear,left bottom,left top,from(#5589aa),to(#619bbb));background-image:-webkit-linear-gradient(bottom,#5589aa,#619bbb);background-image:linear-gradient(bottom,#5589aa,#619bbb)}#adminmenu li.menu-top li:hover a{background-image:none}#adminmenu li.wp-has-current-submenu,#adminmenu li.current.menu-top{border-top-color:#5a8fad;border-bottom-color:#5589aa}#adminmenu .wp-has-current-submenu .wp-submenu-wrap{-moz-box-shadow:2px 2px 5px rgba(0,0,0,0.4);-webkit-box-shadow:2px 2px 5px rgba(0,0,0,0.4);box-shadow:2px 2px 5px rgba(0,0,0,0.4)}#collapse-button div{background-position:0 -108px}}.icon16,.icon32,div.wp-menu-image{background-color:transparent;background-repeat:no-repeat}.icon16.icon-dashboard,.menu-icon-dashboard div.wp-menu-image,.icon16.icon-post,.menu-icon-post div.wp-menu-image,.icon16.icon-media,.menu-icon-media div.wp-menu-image,.icon16.icon-links,.menu-icon-links div.wp-menu-image,.icon16.icon-page,.menu-icon-page div.wp-menu-image,.icon16.icon-comments,.menu-icon-comments div.wp-menu-image,.icon16.icon-appearance,.menu-icon-appearance div.wp-menu-image,.icon16.icon-plugins,.menu-icon-plugins div.wp-menu-image,.icon16.icon-users,.menu-icon-users div.wp-menu-image,.icon16.icon-tools,.menu-icon-tools div.wp-menu-image,.icon16.icon-settings,.menu-icon-settings div.wp-menu-image,.icon16.icon-site,.menu-icon-site div.wp-menu-image{background-image:url('../images/menu-vs.png?ver=20120201')}.icon16.icon-dashboard,#adminmenu .menu-icon-dashboard div.wp-menu-image{background-position:-59px -33px}#adminmenu .menu-icon-dashboard:hover div.wp-menu-image,#adminmenu .menu-icon-dashboard.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-dashboard.current div.wp-menu-image{background-position:-59px -1px}.icon16.icon-post,#adminmenu .menu-icon-post div.wp-menu-image{background-position:-269px -33px}#adminmenu .menu-icon-post:hover div.wp-menu-image,#adminmenu .menu-icon-post.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-post.current div.wp-menu-image{background-position:-269px -1px}.icon16.icon-media,#adminmenu .menu-icon-media div.wp-menu-image{background-position:-119px -33px}#adminmenu .menu-icon-media:hover div.wp-menu-image,#adminmenu .menu-icon-media.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-media.current div.wp-menu-image{background-position:-119px -1px}.icon16.icon-links,#adminmenu .menu-icon-links div.wp-menu-image{background-position:-89px -33px}#adminmenu .menu-icon-links:hover div.wp-menu-image,#adminmenu .menu-icon-links.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-links.current div.wp-menu-image{background-position:-89px -1px}.icon16.icon-page,#adminmenu .menu-icon-page div.wp-menu-image{background-position:-149px -33px}#adminmenu .menu-icon-page:hover div.wp-menu-image,#adminmenu .menu-icon-page.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-page.current div.wp-menu-image{background-position:-149px -1px}.icon16.icon-comments,#adminmenu .menu-icon-comments div.wp-menu-image{background-position:-29px -33px}#adminmenu .menu-icon-comments:hover div.wp-menu-image,#adminmenu .menu-icon-comments.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-comments.current div.wp-menu-image{background-position:-29px -1px}.icon16.icon-appearance,#adminmenu .menu-icon-appearance div.wp-menu-image{background-position:1px -33px}#adminmenu .menu-icon-appearance:hover div.wp-menu-image,#adminmenu .menu-icon-appearance.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-appearance.current div.wp-menu-image{background-position:1px -1px}.icon16.icon-plugins,#adminmenu .menu-icon-plugins div.wp-menu-image{background-position:-179px -33px}#adminmenu .menu-icon-plugins:hover div.wp-menu-image,#adminmenu .menu-icon-plugins.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-plugins.current div.wp-menu-image{background-position:-179px -1px}.icon16.icon-users,#adminmenu .menu-icon-users div.wp-menu-image{background-position:-300px -33px}#adminmenu .menu-icon-users:hover div.wp-menu-image,#adminmenu .menu-icon-users.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-users.current div.wp-menu-image{background-position:-300px -1px}.icon16.icon-tools,#adminmenu .menu-icon-tools div.wp-menu-image{background-position:-209px -33px}#adminmenu .menu-icon-tools:hover div.wp-menu-image,#adminmenu .menu-icon-tools.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-tools.current div.wp-menu-image{background-position:-209px -1px}.icon16.icon-settings,#adminmenu .menu-icon-settings div.wp-menu-image{background-position:-239px -33px}#adminmenu .menu-icon-settings:hover div.wp-menu-image,#adminmenu .menu-icon-settings.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-settings.current div.wp-menu-image{background-position:-239px -1px}.icon16.icon-site,#adminmenu .menu-icon-site div.wp-menu-image{background-position:-359px -33px}#adminmenu .menu-icon-site:hover div.wp-menu-image,#adminmenu .menu-icon-site.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-site.current div.wp-menu-image{background-position:-359px -1px}.icon32.icon-post,#icon-edit,#icon-post,.icon32.icon-dashboard,#icon-index,.icon32.icon-media,#icon-upload,.icon32.icon-links,#icon-link-manager,#icon-link,#icon-link-category,.icon32.icon-page,#icon-edit-pages,#icon-page,.icon32.icon-comments,#icon-edit-comments,.icon32.icon-appearance,#icon-themes,.icon32.icon-plugins,#icon-plugins,.icon32.icon-users,#icon-users,#icon-profile,#icon-user-edit,.icon32.icon-tools,#icon-tools,#icon-admin,.icon32.icon-settings,#icon-options-general,.icon32.icon-site,#icon-ms-admin{background-image:url(../images/icons32-vs.png?ver=20111206)}.icon32.icon-post,#icon-edit,#icon-post{background-position:-552px -5px}.icon32.icon-dashboard,#icon-index{background-position:-137px -5px}.icon32.icon-media,#icon-upload{background-position:-251px -5px}.icon32.icon-links,#icon-link-manager,#icon-link,#icon-link-category{background-position:-190px -5px}.icon32.icon-page,#icon-edit-pages,#icon-page{background-position:-312px -5px}.icon32.icon-comments,#icon-edit-comments{background-position:-72px -5px}.icon32.icon-appearance,#icon-themes{background-position:-11px -5px}.icon32.icon-plugins,#icon-plugins{background-position:-370px -5px}.icon32.icon-users,#icon-users,#icon-profile,#icon-user-edit{background-position:-600px -5px}.icon32.icon-tools,#icon-tools,#icon-admin{background-position:-432px -5px}.icon32.icon-settings,#icon-options-general{background-position:-492px -5px}.icon32.icon-site,#icon-ms-admin{background-position:-659px -5px}@media only screen and (-webkit-min-device-pixel-ratio:1.5){.icon32.icon-post,#icon-edit,#icon-post,.icon32.icon-dashboard,#icon-index,.icon32.icon-media,#icon-upload,.icon32.icon-links,#icon-link-manager,#icon-link,#icon-link-category,.icon32.icon-page,#icon-edit-pages,#icon-page,.icon32.icon-comments,#icon-edit-comments,.icon32.icon-appearance,#icon-themes,.icon32.icon-plugins,#icon-plugins,.icon32.icon-users,#icon-users,#icon-profile,#icon-user-edit,.icon32.icon-tools,#icon-tools,#icon-admin,.icon32.icon-settings,#icon-options-general,.icon32.icon-site,#icon-ms-admin{background-image:url(../images/icons32-vs-2x.png?ver=20120412);background-size:708px 45px}.icon16.icon-dashboard,.menu-icon-dashboard div.wp-menu-image,.icon16.icon-post,.menu-icon-post div.wp-menu-image,.icon16.icon-media,.menu-icon-media div.wp-menu-image,.icon16.icon-links,.menu-icon-links div.wp-menu-image,.icon16.icon-page,.menu-icon-page div.wp-menu-image,.icon16.icon-comments,.menu-icon-comments div.wp-menu-image,.icon16.icon-appearance,.menu-icon-appearance div.wp-menu-image,.icon16.icon-plugins,.menu-icon-plugins div.wp-menu-image,.icon16.icon-users,.menu-icon-users div.wp-menu-image,.icon16.icon-tools,.menu-icon-tools div.wp-menu-image,.icon16.icon-settings,.menu-icon-settings div.wp-menu-image,.icon16.icon-site,.menu-icon-site div.wp-menu-image{background-image:url('../images/menu-2x.png?ver=20120412');background-size:390px 64px}}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-meta{background-color:#eff8ff;border-color:#d1e5ee;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.05);box-shadow:0 1px 3px rgba(0,0,0,0.05)}#contextual-help-back{background:#fff}.contextual-help-tabs a:hover{background-color:#ceeaff;color:#333}#contextual-help-back,.contextual-help-tabs .active{border-color:#d1e5ee}.contextual-help-tabs .active,.contextual-help-tabs .active a,.contextual-help-tabs .active a:hover{background:#fff;color:#000}#screen-options-link-wrap,#contextual-help-link-wrap{background-color:#eff8ff;border-right:1px solid #d1e5ee;border-left:1px solid #d1e5ee;border-bottom:1px solid #d1e5ee;background-image:-ms-linear-gradient(bottom,#eff8ff,#eff8ff);background-image:-moz-linear-gradient(bottom,#def1ff,#eff8ff);background-image:-o-linear-gradient(bottom,#def1ff,#eff8ff);background-image:-webkit-gradient(linear,left bottom,left top,from(#def1ff),to(#eff8ff));background-image:-webkit-linear-gradient(bottom,#def1ff,#eff8ff);background-image:linear-gradient(bottom,#def1ff,#eff8ff)}#screen-meta-links a.show-settings{color:#606060}#screen-meta-links a.show-settings:hover{color:#000}#screen-meta-links a.show-settings{background:transparent url(../images/arrows-vs.png) no-repeat right 4px}#screen-meta-links a.show-settings.screen-meta-active{background:transparent url(../images/arrows-vs.png) no-repeat right -31px}#replyerror{border-color:#ddd;background-color:#f9f9f9}.vim-current,.vim-current th,.vim-current td{background-color:#e4f2fd!important}#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{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}fieldset.inline-edit-col-right .inline-edit-col{border-color:#dfdfdf}.attention{color:#d54e21}.meta-box-sortables .postbox:hover .handlediv{background:transparent url(../images/arrows-vs.png) no-repeat 6px 7px}.tablenav .tablenav-pages{color:#555}.tablenav .tablenav-pages a{border-color:#d1e5ee;background:#eee url('../images/menu-bits-vs.gif?ver=20101102') repeat-x scroll left -379px}.tablenav .tablenav-pages a:hover,.tablenav .tablenav-pages a:focus{color:#d54e21}.tablenav .tablenav-pages a.disabled,.tablenav .tablenav-pages a.disabled:hover,.tablenav .tablenav-pages a.disabled:focus{color:#aaa}.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-top-color:#fff;border-bottom-color:#eee}#minor-publishing{border-bottom-color:#ddd}#post-body .misc-pub-section{border-left-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,#post-body ul.add-menu-item-tabs li.tabs a,body.press-this ul.category-tabs li.tabs a{color:#333}.view-switch #view-switch-list{background:transparent url(../images/list.png) no-repeat 0 0}.view-switch .current #view-switch-list{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 .current #view-switch-excerpt{background:transparent url(../images/list.png) no-repeat -60px 0}#header-logo{background:transparent url(../images/wp-logo-vs.png?ver=20101102) no-repeat scroll center center}.popular-tags,.feature-filter{background-color:#fff;border-color:#dfdfdf}div.widgets-sortables,#widgets-left .inactive{background-color:#f7fcfe;border-color:#d0dfe9}#available-widgets .widget-holder{background-color:#f7fcfe;border-color:#d0dfe9}#available-widgets .widget-description{color:#555}.sidebar-name{color:#464646;background-color:#f7fcfe;background-image:-ms-linear-gradient(top,#ecf8fe,#f7fcfe);background-image:-moz-linear-gradient(top,#ecf8fe,#f7fcfe);background-image:-o-linear-gradient(top,#ecf8fe,#f7fcfe);background-image:-webkit-gradient(linear,left top,left bottom,from(#ecf8fe),to(#f7fcfe));background-image:-webkit-linear-gradient(top,#ecf8fe,#f7fcfe);background-image:linear-gradient(top,#ecf8fe,#f7fcfe);text-shadow:#fff 0 1px 0;border-color:#d0dfe9;-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.sidebar-name:hover,#removing-widget{color:#d54e21}#removing-widget span{color:black}.sidebar-name-arrow{background:transparent url(../images/arrows-vs.png) no-repeat 5px 9px}.sidebar-name:hover .sidebar-name-arrow{background:transparent url(../images/arrows-dark-vs.png) no-repeat 5px 9px}.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}#menu-management .menu-edit{border-color:#d0dfe9}#post-body{background:#fff;border-top-color:#fff;border-bottom-color:#d0dfe9}#nav-menu-header{border-bottom-color:#d0dfe9}#nav-menu-footer{border-top-color:#fff}#menu-management .nav-tabs-arrow a{color:#c1c1c1}#menu-management .nav-tabs-arrow a:hover{color:#d54e21}#menu-management .nav-tabs-arrow a:active{color:#464646}#menu-management .nav-tab-active{border-color:#dfdfdf}#menu-management .nav-tab{background:#f7fcfe;border-color:#d0dfe9}.js .input-with-default-title{color:#aaa}#cancel-save{color:#f00}#cancel-save:hover{background-color:#f00;color:#fff}.list-container{border-color:#dfdfdf}.menu-item-handle{border-color:#d0dfe9}.menu li.deleting .menu-item-handle{background-color:#f66;text-shadow:#ccc}.item-type{color:#999}.item-controls .menu-item-delete:hover{color:#f00}.nav-menus-php .item-edit{background:transparent url(../images/arrows-vs.png) no-repeat 8px 10px;border-bottom-color:#eff8ff}.item-edit:hover{background:transparent url(../images/arrows-dark-vs.png) no-repeat 8px 10px}.menu-item-settings{border-color:#d0dfe9}.link-to-original{color:#777;border-color:#d0dfe9}#cancel-save:hover{color:#fff!important}#update-menu-item{color:#fff!important}#update-menu-item:hover,#update-menu-item:active,#update-menu-item:focus{color:#eaf2fa!important;border-color:#13455b!important}.submitbox .submitcancel{color:#21759b;border-bottom-color:#21759b}.submitbox .submitcancel:hover{background:#21759b;color:#fff}#menu-management .nav-tab-active,.menu-item-handle,.menu-item-settings{-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}#menu-management .nav-tab-active{background:#eff8ff;border-bottom-color:#eff8ff}#upload-form label{color:#777}.fullscreen-overlay{background:#fff}.wp-fullscreen-focus #wp-fullscreen-title,.wp-fullscreen-focus #wp-fullscreen-container{border-color:#bed1dd}#fullscreen-topbar{border-bottom-color:#d1e5ee}.about-wrap h1{color:#333;text-shadow:1px 1px 1px white}.about-text{color:#777}.wp-badge{color:#fff;text-shadow:0 -1px 0 rgba(22,57,81,0.3)}.about-wrap h2 .nav-tab{color:#21759b}.about-wrap h2 .nav-tab:hover{color:#d54e21}.about-wrap h2 .nav-tab-active,.about-wrap h2 .nav-tab-active:hover{color:#333}.about-wrap h2 .nav-tab-active{text-shadow:1px 1px 1px white;color:#464646}.about-wrap h3{color:#333;text-shadow:1px 1px 1px white}.about-wrap .feature-section h4{color:#464646}.about-wrap .feature-section img{background:#fff;border:1px #ccc solid;-moz-box-shadow:0 1px 3px rgba(0,0,0,0.3);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.3);box-shadow:0 1px 3px rgba(0,0,0,0.3)}.about-wrap .point-releases{border-bottom:1px solid #dfdfdf}.about-wrap .point-releases h3{border-top:1px solid #dfdfdf}.about-wrap .point-releases h3:first-child{border:0}.about-wrap h4.wp-people-group{text-shadow:1px 1px 1px white}.about-wrap li.wp-person img.gravatar{-moz-box-shadow:0 0 4px rgba(0,0,0,0.4);-webkit-box-shadow:0 0 4px rgba(0,0,0,0.4);box-shadow:0 0 4px rgba(0,0,0,0.4)}.about-wrap li.wp-person .title{color:#464646;text-shadow:1px 1px 1px white}.freedoms-php .about-wrap ol li{color:#999}.freedoms-php .about-wrap ol p{color:#464646}.rtl .bar{border-right-color:none;border-left-color:#99d}.rtl .post-com-count{background-image:url(../images/bubble_bg-rtl.gif)}.rtl #screen-meta-links a.show-settings{background-position:left 3px}.rtl #screen-meta-links a.show-settings.screen-meta-active{background-position:left -33px}.rtl #adminmenushadow,.rtl #adminmenuback{background-image:url(../images/menu-shadow-rtl.png);background-position:top left}.rtl #adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle,.rtl #adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle{background:transparent url(../images/arrows-dark-vs.png) no-repeat 8px 6px}.rtl #adminmenu .wp-has-submenu:hover .wp-menu-toggle,.rtl #adminmenu .wp-menu-open .wp-menu-toggle{background:transparent url(../images/arrows-vs.png) no-repeat 8px 6px}.rtl #adminmenu .wp-submenu .wp-submenu-head{border-right-color:none;border-left-color:#d1e5ee}.rtl #adminmenu .wp-submenu-wrap,.rtl.folded #adminmenu .wp-has-current-submenu .wp-submenu-wrap{-moz-box-shadow:-2px 2px 5px rgba(0,0,0,0.4);-webkit-box-shadow:-2px 2px 5px rgba(0,0,0,0.4);box-shadow:-2px 2px 5px rgba(0,0,0,0.4)}.rtl #collapse-button div{background-position:0 -108px}.rtl.folded #collapse-button div{background-position:0 -72px}@media only screen and (max-width:900px){.rtl #adminmenu .wp-has-current-submenu .wp-submenu-wrap{-moz-box-shadow:-2px 2px 5px rgba(0,0,0,0.4);-webkit-box-shadow:-2px 2px 5px rgba(0,0,0,0.4);box-shadow:-2px 2px 5px rgba(0,0,0,0.4)}.rtl #collapse-button div{background-position:0 -72px}}.rtl .meta-box-sortables .postbox:hover .handlediv{background:transparent url(../images/arrows-vs.png) no-repeat 6px 7px}.rtl .tablenav .tablenav-pages a{border-color:#d1e5ee;background:#eee url('../images/menu-bits-rtl-vs.gif?ver=20100610') repeat-x scroll right -379px}.rtl #post-body .misc-pub-section{border-right-color:none;border-left-color:#d1e5ee}.rtl .sidebar-name-arrow{background:transparent url(../images/arrows-vs.png) no-repeat 5px 9px}.rtl .sidebar-name:hover .sidebar-name-arrow{background:transparent url(../images/arrows-dark-vs.png) no-repeat 5px 9px} \ No newline at end of file diff --git a/wp-admin/css/colors-classic.dev.css b/wp-admin/css/colors-classic.dev.css index 3c71473c..b70e35df 100644 --- a/wp-admin/css/colors-classic.dev.css +++ b/wp-admin/css/colors-classic.dev.css @@ -45,6 +45,27 @@ input[type="url"], select { border-color: #dfdfdf; background-color: #fff; + color: #333; +} + +select { + color: #000; +} + +textarea:focus, +input[type="text"]:focus, +input[type="password"]:focus, +input[type="file"]:focus, +input[type="button"]:focus, +input[type="submit"]:focus, +input[type="reset"]:focus, +input[type="email"]:focus, +input[type="number"]:focus, +input[type="search"]:focus, +input[type="tel"]:focus, +input[type="url"]:focus, +select:focus { + border-color: #d1e5ee; } kbd, @@ -75,7 +96,8 @@ a.page-numbers:hover { body, #wpbody, -.form-table .pre { +.form-table .pre, +.ui-autocomplete li a { color: #333; } @@ -136,6 +158,10 @@ div.dashboard-widget-submit { border-top-color: #ccc; } +ul.category-tabs li { + border-color: transparent; +} + div.tabs-panel, .wp-tab-panel, ul.category-tabs li.tabs, @@ -287,8 +313,9 @@ div.error a { border-color: #c00 !important; } -.submit { - border-color: #DFDFDF; +.submit, +#commentsdiv #add-new-comment { + border-color: #dfdfdf; } .highlight { @@ -309,6 +336,15 @@ td.help { color: #9a9a9a; } +.ui-autocomplete { + background-color: #eff8ff; + border-color: #d1e5ee; +} + +.ui-autocomplete li a.ui-state-hover { + background-color: #def1ff; +} + .post-com-count { background-image: url(../images/bubble_bg.gif); color: #fff; @@ -1002,7 +1038,6 @@ table.widefat .spam a:hover, border-color: #5589AA !important; } - .wp-editor-wrap .wp_themeSkin table.mceSplitButton td { background-color: #cfdfe9; /* Fallback */ background-image: -ms-linear-gradient(bottom, #cfdfe9, #fff); /* IE10 */ @@ -1408,203 +1443,381 @@ table.widefat .spam a:hover, background-position: 0 -108px; } +/* Auto-folding of the admin menu */ +@media only screen and (max-width: 900px) { + #adminmenu li.menu-top { + border-top-color: #ffffff; + border-bottom-color: #cae6ff; + } + + #adminmenu li.wp-has-current-submenu, + #adminmenu li.current.menu-top { + background-color: #5589AA; /* Fallback */ + background-image: -ms-linear-gradient(bottom, #5589AA, #619bbb); /* IE10 */ + background-image: -moz-linear-gradient(bottom, #5589AA, #619bbb); /* Firefox */ + background-image: -o-linear-gradient(bottom, #5589AA, #619bbb); /* Opera */ + background-image: -webkit-gradient(linear, left bottom, left top, from(#5589AA), to(#619bbb)); /* old Webkit */ + background-image: -webkit-linear-gradient(bottom, #5589AA, #619bbb); /* new Webkit */ + background-image: linear-gradient(bottom, #5589AA, #619bbb); /* proposed W3C Markup */ + } + + #adminmenu li.menu-top li:hover a { + background-image: none; + } + + #adminmenu li.wp-has-current-submenu, + #adminmenu li.current.menu-top { + border-top-color: #5A8FAD; + border-bottom-color: #5589AA; + } + + #adminmenu .wp-has-current-submenu .wp-submenu-wrap { + -moz-box-shadow: 2px 2px 5px rgba( 0, 0, 0, 0.4 ); + -webkit-box-shadow: 2px 2px 5px rgba( 0, 0, 0, 0.4 ); + box-shadow: 2px 2px 5px rgba( 0, 0, 0, 0.4 ); + } + + #collapse-button div { + background-position: 0 -108px; + } +} + /* menu and screen icons */ +.icon16, +.icon32, +div.wp-menu-image { + background-color: transparent; + background-repeat: no-repeat; +} + +.icon16.icon-dashboard, +.menu-icon-dashboard div.wp-menu-image, +.icon16.icon-post, +.menu-icon-post div.wp-menu-image, +.icon16.icon-media, +.menu-icon-media div.wp-menu-image, +.icon16.icon-links, +.menu-icon-links div.wp-menu-image, +.icon16.icon-page, +.menu-icon-page div.wp-menu-image, +.icon16.icon-comments, +.menu-icon-comments div.wp-menu-image, +.icon16.icon-appearance, +.menu-icon-appearance div.wp-menu-image, +.icon16.icon-plugins, +.menu-icon-plugins div.wp-menu-image, +.icon16.icon-users, +.menu-icon-users div.wp-menu-image, +.icon16.icon-tools, +.menu-icon-tools div.wp-menu-image, +.icon16.icon-settings, +.menu-icon-settings div.wp-menu-image, +.icon16.icon-site, +.menu-icon-site div.wp-menu-image { + background-image: url('../images/menu-vs.png?ver=20120201'); +} + .icon16.icon-dashboard, #adminmenu .menu-icon-dashboard div.wp-menu-image { - background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -60px -33px; + background-position: -59px -33px; } #adminmenu .menu-icon-dashboard:hover div.wp-menu-image, #adminmenu .menu-icon-dashboard.wp-has-current-submenu div.wp-menu-image, #adminmenu .menu-icon-dashboard.current div.wp-menu-image { - background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -60px -1px; + background-position: -59px -1px; } .icon16.icon-post, #adminmenu .menu-icon-post div.wp-menu-image { - background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -271px -33px; + background-position: -269px -33px; } #adminmenu .menu-icon-post:hover div.wp-menu-image, -#adminmenu .menu-icon-post.wp-has-current-submenu div.wp-menu-image { - background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -271px -1px; +#adminmenu .menu-icon-post.wp-has-current-submenu div.wp-menu-image, +#adminmenu .menu-icon-post.current div.wp-menu-image { + background-position: -269px -1px; } .icon16.icon-media, #adminmenu .menu-icon-media div.wp-menu-image { - background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -120px -33px; + background-position: -119px -33px; } #adminmenu .menu-icon-media:hover div.wp-menu-image, -#adminmenu .menu-icon-media.wp-has-current-submenu div.wp-menu-image { - background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -120px -1px; +#adminmenu .menu-icon-media.wp-has-current-submenu div.wp-menu-image, +#adminmenu .menu-icon-media.current div.wp-menu-image { + background-position: -119px -1px; } .icon16.icon-links, #adminmenu .menu-icon-links div.wp-menu-image { - background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -90px -33px; + background-position: -89px -33px; } #adminmenu .menu-icon-links:hover div.wp-menu-image, -#adminmenu .menu-icon-links.wp-has-current-submenu div.wp-menu-image { - background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -90px -1px; +#adminmenu .menu-icon-links.wp-has-current-submenu div.wp-menu-image, +#adminmenu .menu-icon-links.current div.wp-menu-image { + background-position: -89px -1px; } .icon16.icon-page, #adminmenu .menu-icon-page div.wp-menu-image { - background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -150px -33px; + background-position: -149px -33px; } #adminmenu .menu-icon-page:hover div.wp-menu-image, -#adminmenu .menu-icon-page.wp-has-current-submenu div.wp-menu-image { - background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -150px -1px; +#adminmenu .menu-icon-page.wp-has-current-submenu div.wp-menu-image, +#adminmenu .menu-icon-page.current div.wp-menu-image { + background-position: -149px -1px; } .icon16.icon-comments, #adminmenu .menu-icon-comments div.wp-menu-image { - background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -30px -33px; + background-position: -29px -33px; } #adminmenu .menu-icon-comments:hover div.wp-menu-image, #adminmenu .menu-icon-comments.wp-has-current-submenu div.wp-menu-image, #adminmenu .menu-icon-comments.current div.wp-menu-image { - background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -30px -1px; + background-position: -29px -1px; } .icon16.icon-appearance, #adminmenu .menu-icon-appearance div.wp-menu-image { - background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll 0 -33px; + background-position: 1px -33px; } #adminmenu .menu-icon-appearance:hover div.wp-menu-image, -#adminmenu .menu-icon-appearance.wp-has-current-submenu div.wp-menu-image { - background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll 0 -1px; +#adminmenu .menu-icon-appearance.wp-has-current-submenu div.wp-menu-image, +#adminmenu .menu-icon-appearance.current div.wp-menu-image { + background-position: 1px -1px; } .icon16.icon-plugins, #adminmenu .menu-icon-plugins div.wp-menu-image { - background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -180px -33px; + background-position: -179px -33px; } #adminmenu .menu-icon-plugins:hover div.wp-menu-image, -#adminmenu .menu-icon-plugins.wp-has-current-submenu div.wp-menu-image { - background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -180px -1px; +#adminmenu .menu-icon-plugins.wp-has-current-submenu div.wp-menu-image, +#adminmenu .menu-icon-plugins.current div.wp-menu-image { + background-position: -179px -1px; } .icon16.icon-users, #adminmenu .menu-icon-users div.wp-menu-image { - background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -300px -33px; + background-position: -300px -33px; } #adminmenu .menu-icon-users:hover div.wp-menu-image, #adminmenu .menu-icon-users.wp-has-current-submenu div.wp-menu-image, #adminmenu .menu-icon-users.current div.wp-menu-image { - background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -300px -1px; + background-position: -300px -1px; } .icon16.icon-tools, #adminmenu .menu-icon-tools div.wp-menu-image { - background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -210px -33px; + background-position: -209px -33px; } #adminmenu .menu-icon-tools:hover div.wp-menu-image, #adminmenu .menu-icon-tools.wp-has-current-submenu div.wp-menu-image, #adminmenu .menu-icon-tools.current div.wp-menu-image { - background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -210px -1px; + background-position: -209px -1px; } .icon16.icon-settings, -#icon-options-general, #adminmenu .menu-icon-settings div.wp-menu-image { - background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -240px -33px; + background-position: -239px -33px; } #adminmenu .menu-icon-settings:hover div.wp-menu-image, -#adminmenu .menu-icon-settings.wp-has-current-submenu div.wp-menu-image { - background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -240px -1px; +#adminmenu .menu-icon-settings.wp-has-current-submenu div.wp-menu-image, +#adminmenu .menu-icon-settings.current div.wp-menu-image { + background-position: -239px -1px; } .icon16.icon-site, #adminmenu .menu-icon-site div.wp-menu-image { - background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -360px -33px; + background-position: -359px -33px; } #adminmenu .menu-icon-site:hover div.wp-menu-image, -#adminmenu .menu-icon-site.wp-has-current-submenu div.wp-menu-image { - background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -360px -1px; +#adminmenu .menu-icon-site.wp-has-current-submenu div.wp-menu-image, +#adminmenu .menu-icon-site.current div.wp-menu-image { + background-position: -359px -1px; } /* end menu and screen icons */ /* Screen Icons */ +.icon32.icon-post, +#icon-edit, +#icon-post, +.icon32.icon-dashboard, +#icon-index, +.icon32.icon-media, +#icon-upload, +.icon32.icon-links, +#icon-link-manager, +#icon-link, +#icon-link-category, +.icon32.icon-page, +#icon-edit-pages, +#icon-page, +.icon32.icon-comments, +#icon-edit-comments, +.icon32.icon-appearance, +#icon-themes, +.icon32.icon-plugins, +#icon-plugins, +.icon32.icon-users, +#icon-users, +#icon-profile, +#icon-user-edit, +.icon32.icon-tools, +#icon-tools, +#icon-admin, +.icon32.icon-settings, +#icon-options-general, +.icon32.icon-site, +#icon-ms-admin { + background-image: url(../images/icons32-vs.png?ver=20111206); +} + .icon32.icon-post, #icon-edit, #icon-post { - background: transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -552px -5px; + background-position: -552px -5px; } .icon32.icon-dashboard, #icon-index { - background: transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -137px -5px; + background-position: -137px -5px; } .icon32.icon-media, #icon-upload { - background: transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -251px -5px; + background-position: -251px -5px; } .icon32.icon-links, #icon-link-manager, #icon-link, #icon-link-category { - background: transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -190px -5px; + background-position: -190px -5px; } .icon32.icon-page, #icon-edit-pages, #icon-page { - background: transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -312px -5px; + background-position: -312px -5px; } .icon32.icon-comments, #icon-edit-comments { - background: transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -72px -5px; + background-position: -72px -5px; } .icon32.icon-appearance, #icon-themes { - background: transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -11px -5px; + background-position: -11px -5px; } .icon32.icon-plugins, #icon-plugins { - background: transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -370px -5px; + background-position: -370px -5px; } .icon32.icon-users, #icon-users, #icon-profile, #icon-user-edit { - background: transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -600px -5px; + background-position: -600px -5px; } .icon32.icon-tools, #icon-tools, #icon-admin { - background: transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -432px -5px; + background-position: -432px -5px; } .icon32.icon-settings, #icon-options-general { - background: transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -492px -5px; + background-position: -492px -5px; } .icon32.icon-site, #icon-ms-admin { - background: transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -659px -5px; + background-position: -659px -5px; +} + +@media only screen and (-webkit-min-device-pixel-ratio: 1.5) { + .icon32.icon-post, + #icon-edit, + #icon-post, + .icon32.icon-dashboard, + #icon-index, + .icon32.icon-media, + #icon-upload, + .icon32.icon-links, + #icon-link-manager, + #icon-link, + #icon-link-category, + .icon32.icon-page, + #icon-edit-pages, + #icon-page, + .icon32.icon-comments, + #icon-edit-comments, + .icon32.icon-appearance, + #icon-themes, + .icon32.icon-plugins, + #icon-plugins, + .icon32.icon-users, + #icon-users, + #icon-profile, + #icon-user-edit, + .icon32.icon-tools, + #icon-tools, + #icon-admin, + .icon32.icon-settings, + #icon-options-general, + .icon32.icon-site, + #icon-ms-admin { + background-image: url(../images/icons32-vs-2x.png?ver=20120412); + background-size: 708px 45px; + } + + .icon16.icon-dashboard, + .menu-icon-dashboard div.wp-menu-image, + .icon16.icon-post, + .menu-icon-post div.wp-menu-image, + .icon16.icon-media, + .menu-icon-media div.wp-menu-image, + .icon16.icon-links, + .menu-icon-links div.wp-menu-image, + .icon16.icon-page, + .menu-icon-page div.wp-menu-image, + .icon16.icon-comments, + .menu-icon-comments div.wp-menu-image, + .icon16.icon-appearance, + .menu-icon-appearance div.wp-menu-image, + .icon16.icon-plugins, + .menu-icon-plugins div.wp-menu-image, + .icon16.icon-users, + .menu-icon-users div.wp-menu-image, + .icon16.icon-tools, + .menu-icon-tools div.wp-menu-image, + .icon16.icon-settings, + .menu-icon-settings div.wp-menu-image, + .icon16.icon-site, + .menu-icon-site div.wp-menu-image { + background-image: url('../images/menu-2x.png?ver=20120412'); + background-size: 390px 64px; + } } /* end screen icons */ - /* Diff */ table.diff .diff-deletedline { background-color: #fdd; @@ -1674,12 +1887,12 @@ table.diff .diff-addedline ins { border-right: 1px solid #D1E5EE; border-left: 1px solid #D1E5EE; border-bottom: 1px solid #D1E5EE; - background-image: -ms-linear-gradient(bottom, #eff8ff, #fff); /* IE10 */ - background-image: -moz-linear-gradient(bottom, #eff8ff, #fff); /* Firefox */ - background-image: -o-linear-gradient(bottom, #eff8ff, #fff); /* Opera */ - background-image: -webkit-gradient(linear, left bottom, left top, from(#eff8ff), to(#fff)); /* old Webkit */ - background-image: -webkit-linear-gradient(bottom, #eff8ff, #fff); /* new Webkit */ - background-image: linear-gradient(bottom, #eff8ff, #fff); /* proposed W3C Markup */ + background-image: -ms-linear-gradient(bottom, #eff8ff, #eff8ff); /* IE10 */ + background-image: -moz-linear-gradient(bottom, #def1ff, #eff8ff); /* Firefox */ + background-image: -o-linear-gradient(bottom, #def1ff, #eff8ff); /* Opera */ + background-image: -webkit-gradient(linear, left bottom, left top, from(#def1ff), to(#eff8ff)); /* old Webkit */ + background-image: -webkit-linear-gradient(bottom, #def1ff, #eff8ff); /* new Webkit */ + background-image: linear-gradient(bottom, #def1ff, #eff8ff); /* proposed W3C Markup */ } #screen-meta-links a.show-settings { @@ -1691,11 +1904,11 @@ table.diff .diff-addedline ins { } #screen-meta-links a.show-settings { - background: transparent url(../images/arrows.png) no-repeat right 3px; + background: transparent url(../images/arrows-vs.png) no-repeat right 4px; } #screen-meta-links a.show-settings.screen-meta-active { - background: transparent url(../images/arrows.png) no-repeat right -33px; + background: transparent url(../images/arrows-vs.png) no-repeat right -31px; } /* end screen options and help tabs */ @@ -1713,20 +1926,6 @@ table.diff .diff-addedline ins { } /* Install Plugins */ -.star-average, -.star.star-rating { - background-color: #fc0; -} - -div.star.select:hover { - background-color: #d00; -} - -div.star img { - border-left: 1px solid #fff; - border-right: 1px solid #fff; -} - #plugin-information .fyi ul { background-color: #eaf3fa; } @@ -1835,7 +2034,7 @@ fieldset.inline-edit-col-right .inline-edit-col { } #post-body .misc-pub-section { - border-right-color: #eee; + border-left-color: #eee; } .post-com-count span { @@ -1883,14 +2082,6 @@ body.press-this ul.category-tabs li.tabs a { 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: #f7fcfe; @@ -2108,7 +2299,6 @@ div.widgets-sortables, border-bottom-color: #eff8ff; } -/* custom header & background pages */ #upload-form label { color: #777; } @@ -2170,11 +2360,11 @@ div.widgets-sortables, .about-wrap .feature-section img { background: #fff; - border-color: #dfdfdf; + border: 1px #ccc solid; - -moz-box-shadow: 0 0 6px rgba( 0, 0, 0, 0.3 ); - -webkit-box-shadow: 0 0 6px rgba( 0, 0, 0, 0.3 ); - box-shadow: 0 0 6px rgba( 0, 0, 0, 0.3 ); + -moz-box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.3 ); + -webkit-box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.3 ); + box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.3 ); } .about-wrap .point-releases { @@ -2272,6 +2462,19 @@ div.widgets-sortables, background-position: 0 -72px; } +/* Auto-folding of the admin menu for RTL */ +@media only screen and (max-width: 900px) { + .rtl #adminmenu .wp-has-current-submenu .wp-submenu-wrap{ + -moz-box-shadow: -2px 2px 5px rgba( 0, 0, 0, 0.4 ); + -webkit-box-shadow: -2px 2px 5px rgba( 0, 0, 0, 0.4 ); + box-shadow: -2px 2px 5px rgba( 0, 0, 0, 0.4 ); + } + + .rtl #collapse-button div { + background-position: 0 -72px; + } +} + /* edit image */ .rtl .meta-box-sortables .postbox:hover .handlediv { background: transparent url(../images/arrows-vs.png) no-repeat 6px 7px; diff --git a/wp-admin/css/colors-fresh.css b/wp-admin/css/colors-fresh.css index 58c75d26..f7f57927 100644 --- a/wp-admin/css/colors-fresh.css +++ b/wp-admin/css/colors-fresh.css @@ -1 +1 @@ -html,.wp-dialog{background-color:#fff;}textarea,input[type="text"],input[type="password"],input[type="file"],input[type="button"],input[type="submit"],input[type="reset"],input[type="email"],input[type="number"],input[type="search"],input[type="tel"],input[type="url"],select{border-color:#dfdfdf;background-color:#fff;}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="file"]:focus,input[type="button"]:focus,input[type="submit"]:focus,input[type="reset"]:focus,input[type="email"]:focus,input[type="number"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="url"]:focus,select:focus{border-color:#bbb;}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{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;}.widefat{border-color:#dfdfdf;background-color:#f9f9f9;}textarea.widefat{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,.wp-tab-panel,ul.category-tabs li.tabs,ul.add-menu-item-tabs li.tabs,.wp-tab-active{border-color:#dfdfdf;background-color:#fff;}ul.category-tabs li.tabs,ul.add-menu-item-tabs li.tabs,.wp-tab-active{background-color:#fff;}input.disabled,textarea.disabled{background-color:#ccc;}#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,.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,.sidebar-name,#nav-menu-header,#nav-menu-footer,.menu-item-handle,#fullscreen-topbar{background-color:#f1f1f1;background-image:-ms-linear-gradient(top,#f9f9f9,#ececec);background-image:-moz-linear-gradient(top,#f9f9f9,#ececec);background-image:-o-linear-gradient(top,#f9f9f9,#ececec);background-image:-webkit-gradient(linear,left top,left bottom,from(#f9f9f9),to(#ececec));background-image:-webkit-linear-gradient(top,#f9f9f9,#ececec);background-image:linear-gradient(top,#f9f9f9,#ececec);}.widget .widget-top,.postbox h3,.stuffbox h3{border-bottom-color:#dfdfdf;text-shadow:#fff 0 1px 0;-moz-box-shadow:0 1px 0 #fff;-webkit-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff;}.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;}.wrap .add-new-h2{background:#f1f1f1;}.subtitle{color:#777;}.ac_over{background-color:#f0f0b8;}.ac_results{background-color:#fff;border-color:#808080;}.ac_results li{color:#101010;}.alternate,.alt{background-color:#fcfcfc;}.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;}div.error,.login #login_error{background-color:#ffebe8;border-color:#c00;}div.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:#000;}.howto,.nonessential,#edit-slug-box,.form-input-tip,.subsubsub{color:#666;}.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;}#adminmenu a:hover,#adminmenu li.menu-top>a:focus,#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,#side-sortables .add-menu-item-tabs .tabs a,.wp-tab-bar .wp-tab-active 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;}div.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{border-top-color:#fff;border-bottom-color:#dfdfdf;}.widefat th{text-shadow:rgba(255,255,255,0.8) 0 1px 0;}.widefat td{color:#555;}.widefat p,.widefat ol,.widefat ul{color:#333;}.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;}th.sortable a:hover,th.sortable a:active,th.sortable a:focus{color:#333;}h3.dashboard-widget-title small a{color:#d7d7d7;}h3.dashboard-widget-title small a:hover{color:#fff;}a,#adminmenu a,#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;}#adminmenu .awaiting-mod,#adminmenu .update-plugins,#sidemenu a .update-plugins,#rightnow .reallynow{background-color:#464646;color:#fff;-moz-box-shadow:rgba(255,255,255,0.5) 0 1px 0;-webkit-box-shadow:rgba(255,255,255,0.5) 0 1px 0;box-shadow:rgba(255,255,255,0.5) 0 1px 0;}#plugin-information .action-button{background-color:#d54e21;color:#fff;}#adminmenu li.current a .awaiting-mod,#adminmenu li a.wp-has-current-submenu .update-plugins{background-color:#464646;color:#fff;-moz-box-shadow:rgba(255,255,255,0.5) 0 1px 0;-webkit-box-shadow:rgba(255,255,255,0.5) 0 1px 0;box-shadow:rgba(255,255,255,0.5) 0 1px 0;}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;}#editable-post-name{background-color:#fffbcc;}#edit-slug-box strong,.tablenav .displaying-num,#submitted-on,.submitted-on{color:#777;}.login #nav a,.login #backtoblog a{color:#21759b!important;}.login #nav a:hover,.login #backtoblog a:hover{color:#d54e21!important;}#footer{color:#777;border-color:#dfdfdf;}.imgedit-group,#media-items .media-item,.media-item .describe{border-color:#dfdfdf;}.checkbox,.side-info,.plugins tr,#your-profile #rich_editing{background-color:#fcfcfc;}.plugins .inactive,.plugins .inactive th,.plugins .inactive td,tr.inactive+tr.plugin-update-tr .plugin-update{background-color:#f4f4f4;}.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;}.welcome-panel{border-color:#dfdfdf;}.welcome-panel p{color:#777;}.welcome-panel-column p{color:#464646;}.welcome-panel h3{text-shadow:1px 1px 1px white;}.widget,#widget-list .widget-top,.postbox,#titlediv,#poststuff .postarea,.stuffbox{border-color:#dfdfdf;-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff;-webkit-border-radius:3px;border-radius:3px;}.widget,#widget-list .widget-top,.postbox,.menu-item-settings{background-color:#f5f5f5;background-image:-ms-linear-gradient(top,#f9f9f9,#f5f5f5);background-image:-moz-linear-gradient(top,#f9f9f9,#f5f5f5);background-image:-o-linear-gradient(top,#f9f9f9,#f5f5f5);background-image:-webkit-gradient(linear,left top,left bottom,from(#f9f9f9),to(#f5f5f5));background-image:-webkit-linear-gradient(top,#f9f9f9,#f5f5f5);background-image:linear-gradient(top,#f9f9f9,#f5f5f5);}.postbox h3{color:#464646;}.widget .widget-top{color:#222;}.sidebar-name:hover h3,.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,.update-nag{background-color:#FFFBCC;border-color:#E6DB55;color:#555;}#screen-meta{background-color:#f1f1f1;border-color:#ccc;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.05);box-shadow:0 1px 3px rgba(0,0,0,0.05);}#contextual-help-back{background:#fff;}.contextual-help-tabs a:hover{color:#333;}#contextual-help-back,.contextual-help-tabs .active{border-color:#ccc;}.contextual-help-tabs .active,.contextual-help-tabs .active a,.contextual-help-tabs .active a:hover{background:#fff;color:#000;}#screen-options-link-wrap,#contextual-help-link-wrap{background-color:#e3e3e3;border-right:1px solid transparent;border-left:1px solid transparent;border-bottom:1px solid transparent;background-image:-ms-linear-gradient(bottom,#dfdfdf,#f1f1f1);background-image:-moz-linear-gradient(bottom,#dfdfdf,#f1f1f1);background-image:-o-linear-gradient(bottom,#dfdfdf,#f1f1f1);background-image:-webkit-gradient(linear,left bottom,left top,from(#dfdfdf),to(#f1f1f1));background-image:-webkit-linear-gradient(bottom,#dfdfdf,#f1f1f1);background-image:linear-gradient(bottom,#dfdfdf,#f1f1f1);}#screen-meta-links a.show-settings{color:#777;}#screen-meta-links a.show-settings:hover{color:#000;}#screen-meta-links a.show-settings{background:transparent url(../images/arrows.png) no-repeat right 3px;}#screen-meta-links a.show-settings.screen-meta-active{background:transparent url(../images/arrows.png) no-repeat right -33px;}.login #backtoblog a{color:#464646;}#wphead{border-bottom:#dfdfdf 1px solid;}#wphead h1 a{color:#464646;}#footer a:link,#footer a:visited{text-decoration:none;}#footer a:hover{color:#000;text-decoration:underline;}.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;}#titlediv #title{border-color:#ccc;}#post-status-info{border-color:#dfdfdf #ccc #ccc;background-color:#eaeaea;}.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;}#adminmenuback,#adminmenuwrap{background-color:#ececec;border-color:#ccc;}#adminmenushadow,#adminmenuback{background-image:url(../images/menu-shadow.png);background-position:top right;background-repeat:repeat-y;}#adminmenu li.wp-menu-separator{background:#dfdfdf;border-color:#cfcfcf;}#adminmenu div.separator{border-color:#e1e1e1;}#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/arrows-dark.png) no-repeat -1px 6px;}#adminmenu .wp-has-submenu:hover .wp-menu-toggle,#adminmenu .wp-menu-open .wp-menu-toggle{background:transparent url(../images/arrows.png) no-repeat -2px 6px;}#adminmenu a.menu-top,.folded #adminmenu li.menu-top,#adminmenu .wp-submenu .wp-submenu-head{border-top-color:#f9f9f9;border-bottom-color:#dfdfdf;}#adminmenu li.wp-menu-open{border-color:#dfdfdf;}#adminmenu li.menu-top:hover>a,#adminmenu li.menu-top.focused>a,#adminmenu li.menu-top>a:focus{background-color:#e4e4e4;text-shadow:0 1px 0 rgba(255,255,255,0.4);}#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,#adminmenu li.current a.menu-top,.folded #adminmenu li.wp-has-current-submenu,.folded #adminmenu li.current.menu-top,#adminmenu .wp-menu-arrow,#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head{background-color:#777;background-image:-ms-linear-gradient(bottom,#6d6d6d,#808080);background-image:-moz-linear-gradient(bottom,#6d6d6d,#808080);background-image:-o-linear-gradient(bottom,#6d6d6d,#808080);background-image:-webkit-gradient(linear,left bottom,left top,from(#6d6d6d),to(#808080));background-image:-webkit-linear-gradient(bottom,#6d6d6d,#808080);background-image:linear-gradient(bottom,#6d6d6d,#808080);}#adminmenu .wp-menu-arrow div{background-color:#777;background-image:-ms-linear-gradient(right bottom,#6d6d6d,#808080);background-image:-moz-linear-gradient(right bottom,#6d6d6d,#808080);background-image:-o-linear-gradient(right bottom,#6d6d6d,#808080);background-image:-webkit-gradient(linear,right bottom,left top,from(#6d6d6d),to(#808080));background-image:-webkit-linear-gradient(right bottom,#6d6d6d,#808080);background-image:linear-gradient(right bottom,#6d6d6d,#808080);}#adminmenu li.wp-not-current-submenu .wp-menu-arrow{border-top-color:#f9f9f9;border-bottom-color:#dfdfdf;background:#E4E4E4;}#adminmenu li.wp-not-current-submenu .wp-menu-arrow div{background:#E4E4E4;border-color:#ccc;}.folded #adminmenu li.menu-top li:hover a{background-image:none;}#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,#adminmenu li.current a.menu-top,#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head{text-shadow:0 -1px 0 #333;color:#fff;border-top-color:#808080;border-bottom-color:#6d6d6d;}.folded #adminmenu li.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{border-top-color:#808080;border-bottom-color:#6d6d6d;}#adminmenu .wp-submenu a:hover,#adminmenu .wp-submenu a:focus{background-color:#EAF2FA;color:#333;}#adminmenu .wp-submenu li.current,#adminmenu .wp-submenu li.current a,#adminmenu .wp-submenu li.current a:hover{color:#333;}#adminmenu .wp-submenu ul{background-color:#fff;}#adminmenu .wp-submenu-wrap,#adminmenu .wp-submenu ul{border-color:#dfdfdf;}#adminmenu .wp-submenu-wrap,.folded #adminmenu .wp-has-current-submenu .wp-submenu-wrap{-moz-box-shadow:2px 2px 5px rgba(0,0,0,0.4);-webkit-box-shadow:2px 2px 5px rgba(0,0,0,0.4);box-shadow:2px 2px 5px rgba(0,0,0,0.4);}#adminmenu .wp-submenu .wp-submenu-head{border-right-color:#dfdfdf;background-color:#ececec;}#adminmenu div.wp-submenu{background-color:transparent;}#collapse-menu{color:#aaa;}#collapse-menu:hover{color:#999;}#collapse-button{border-color:#ccc;background-color:#f4f4f4;background-image:-ms-linear-gradient(bottom,#dfdfdf,#fff);background-image:-moz-linear-gradient(bottom,#dfdfdf,#fff);background-image:-o-linear-gradient(bottom,#dfdfdf,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#dfdfdf),to(#fff));background-image:-webkit-linear-gradient(bottom,#dfdfdf,#fff);background-image:linear-gradient(bottom,#dfdfdf,#fff);}#collapse-menu:hover #collapse-button{border-color:#aaa;}#collapse-button div{background:transparent url(../images/arrows.png) no-repeat 0 -72px;}.folded #collapse-button div{background-position:0 -108px;}.icon16.icon-dashboard,#adminmenu .menu-icon-dashboard div.wp-menu-image{background:transparent url('../images/menu.png?ver=20111128') no-repeat scroll -60px -33px;}#adminmenu .menu-icon-dashboard:hover div.wp-menu-image,#adminmenu .menu-icon-dashboard.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-dashboard.current div.wp-menu-image{background:transparent url('../images/menu.png?ver=20111128') no-repeat scroll -60px -1px;}.icon16.icon-post,#adminmenu .menu-icon-post div.wp-menu-image{background:transparent url('../images/menu.png?ver=20111128') no-repeat scroll -271px -33px;}#adminmenu .menu-icon-post:hover div.wp-menu-image,#adminmenu .menu-icon-post.wp-has-current-submenu div.wp-menu-image{background:transparent url('../images/menu.png?ver=20111128') no-repeat scroll -271px -1px;}.icon16.icon-media,#adminmenu .menu-icon-media div.wp-menu-image{background:transparent url('../images/menu.png?ver=20111128') no-repeat scroll -120px -33px;}#adminmenu .menu-icon-media:hover div.wp-menu-image,#adminmenu .menu-icon-media.wp-has-current-submenu div.wp-menu-image{background:transparent url('../images/menu.png?ver=20111128') no-repeat scroll -120px -1px;}.icon16.icon-links,#adminmenu .menu-icon-links div.wp-menu-image{background:transparent url('../images/menu.png?ver=20111128') no-repeat scroll -90px -33px;}#adminmenu .menu-icon-links:hover div.wp-menu-image,#adminmenu .menu-icon-links.wp-has-current-submenu div.wp-menu-image{background:transparent url('../images/menu.png?ver=20111128') no-repeat scroll -90px -1px;}.icon16.icon-page,#adminmenu .menu-icon-page div.wp-menu-image{background:transparent url('../images/menu.png?ver=20111128') no-repeat scroll -150px -33px;}#adminmenu .menu-icon-page:hover div.wp-menu-image,#adminmenu .menu-icon-page.wp-has-current-submenu div.wp-menu-image{background:transparent url('../images/menu.png?ver=20111128') no-repeat scroll -150px -1px;}.icon16.icon-comments,#adminmenu .menu-icon-comments div.wp-menu-image{background:transparent url('../images/menu.png?ver=20111128') no-repeat scroll -30px -33px;}#adminmenu .menu-icon-comments:hover div.wp-menu-image,#adminmenu .menu-icon-comments.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-comments.current div.wp-menu-image{background:transparent url('../images/menu.png?ver=20111128') no-repeat scroll -30px -1px;}.icon16.icon-appearance,#adminmenu .menu-icon-appearance div.wp-menu-image{background:transparent url('../images/menu.png?ver=20111128') no-repeat scroll 0 -33px;}#adminmenu .menu-icon-appearance:hover div.wp-menu-image,#adminmenu .menu-icon-appearance.wp-has-current-submenu div.wp-menu-image{background:transparent url('../images/menu.png?ver=20111128') no-repeat scroll 0 -1px;}.icon16.icon-plugins,#adminmenu .menu-icon-plugins div.wp-menu-image{background:transparent url('../images/menu.png?ver=20111128') no-repeat scroll -180px -33px;}#adminmenu .menu-icon-plugins:hover div.wp-menu-image,#adminmenu .menu-icon-plugins.wp-has-current-submenu div.wp-menu-image{background:transparent url('../images/menu.png?ver=20111128') no-repeat scroll -180px -1px;}.icon16.icon-users,#adminmenu .menu-icon-users div.wp-menu-image{background:transparent url('../images/menu.png?ver=20111128') no-repeat scroll -300px -33px;}#adminmenu .menu-icon-users:hover div.wp-menu-image,#adminmenu .menu-icon-users.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-users.current div.wp-menu-image{background:transparent url('../images/menu.png?ver=20111128') no-repeat scroll -300px -1px;}.icon16.icon-tools,#adminmenu .menu-icon-tools div.wp-menu-image{background:transparent url('../images/menu.png?ver=20111128') no-repeat scroll -210px -33px;}#adminmenu .menu-icon-tools:hover div.wp-menu-image,#adminmenu .menu-icon-tools.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-tools.current div.wp-menu-image{background:transparent url('../images/menu.png?ver=20111128') no-repeat scroll -210px -1px;}.icon16.icon-settings,#adminmenu .menu-icon-settings div.wp-menu-image{background:transparent url('../images/menu.png?ver=20111128') no-repeat scroll -240px -33px;}#adminmenu .menu-icon-settings:hover div.wp-menu-image,#adminmenu .menu-icon-settings.wp-has-current-submenu div.wp-menu-image{background:transparent url('../images/menu.png?ver=20111128') no-repeat scroll -240px -1px;}.icon16.icon-site,#adminmenu .menu-icon-site div.wp-menu-image{background:transparent url('../images/menu.png?ver=20111128') no-repeat scroll -360px -33px;}#adminmenu .menu-icon-site:hover div.wp-menu-image,#adminmenu .menu-icon-site.wp-has-current-submenu div.wp-menu-image{background:transparent url('../images/menu.png?ver=20111128') no-repeat scroll -360px -1px;}.icon32.icon-post,#icon-edit,#icon-post{background:transparent url(../images/icons32.png?ver=20111206) no-repeat -552px -5px;}.icon32.icon-dashboard,#icon-index{background:transparent url(../images/icons32.png?ver=20111206) no-repeat -137px -5px;}.icon32.icon-media,#icon-upload{background:transparent url(../images/icons32.png?ver=20111206) no-repeat -251px -5px;}.icon32.icon-links,#icon-link-manager,#icon-link,#icon-link-category{background:transparent url(../images/icons32.png?ver=20111206) no-repeat -190px -5px;}.icon32.icon-page,#icon-edit-pages,#icon-page{background:transparent url(../images/icons32.png?ver=20111206) no-repeat -312px -5px;}.icon32.icon-comments,#icon-edit-comments{background:transparent url(../images/icons32.png?ver=20111206) no-repeat -72px -5px;}.icon32.icon-appearance,#icon-themes{background:transparent url(../images/icons32.png?ver=20111206) no-repeat -11px -5px;}.icon32.icon-plugins,#icon-plugins{background:transparent url(../images/icons32.png?ver=20111206) no-repeat -370px -5px;}.icon32.icon-users,#icon-users,#icon-profile,#icon-user-edit{background:transparent url(../images/icons32.png?ver=20111206) no-repeat -600px -5px;}.icon32.icon-tools,#icon-tools,#icon-admin{background:transparent url(../images/icons32.png?ver=20111206) no-repeat -432px -5px;}.icon32.icon-settings,#icon-options-general{background:transparent url(../images/icons32.png?ver=20111206) no-repeat -492px -5px;}.icon32.icon-site,#icon-ms-admin{background:transparent url(../images/icons32.png?ver=20111206) no-repeat -659px -5px;}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;}#replyerror{border-color:#ddd;background-color:#f9f9f9;}.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;}div.star img{border-left:1px solid #fff;border-right:1px solid #fff;}.widefat div.star img{border-left:1px solid #f9f9f9;border-right:1px solid #f9f9f9;}#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{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;}fieldset.inline-edit-col-right .inline-edit-col{border-color:#dfdfdf;}.attention{color:#D54E21;}.meta-box-sortables .postbox:hover .handlediv{background:transparent url(../images/arrows.png) no-repeat 6px 7px;}.tablenav .tablenav-pages{color:#555;}.tablenav .tablenav-pages a{border-color:#e3e3e3;background:#eee url('../images/menu-bits.gif?ver=20100610') repeat-x scroll left -379px;}.tablenav .tablenav-pages a:hover,.tablenav .tablenav-pages a:focus{color:#d54e21;}.tablenav .tablenav-pages a.disabled,.tablenav .tablenav-pages a.disabled:hover,.tablenav .tablenav-pages a.disabled:focus{color:#aaa;}.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-top-color:#fff;border-bottom-color:#dfdfdf;}#minor-publishing{border-bottom-color:#dfdfdf;}#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,#post-body ul.add-menu-item-tabs li.tabs a,body.press-this ul.category-tabs li.tabs a{color:#333;}.view-switch #view-switch-list{background:transparent url(../images/list.png) no-repeat 0 0;}.view-switch .current #view-switch-list{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 .current #view-switch-excerpt{background:transparent url(../images/list.png) no-repeat -60px 0;}#header-logo{background:transparent url(../images/wp-logo.png?ver=20110504) no-repeat scroll center center;}.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:#fcfcfc;border-color:#dfdfdf;}#available-widgets .widget-holder{background-color:#fcfcfc;border-color:#dfdfdf;}#available-widgets .widget-description{color:#555;}.sidebar-name{color:#464646;text-shadow:#fff 0 1px 0;border-color:#dfdfdf;-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff;}.sidebar-name:hover,#removing-widget{color:#d54e21;}#removing-widget span{color:black;}.sidebar-name-arrow{background:transparent url(../images/arrows.png) no-repeat 5px 9px;}.sidebar-name:hover .sidebar-name-arrow{background:transparent url(../images/arrows-dark.png) no-repeat 5px 9px;}.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;}#menu-management .menu-edit{border-color:#dfdfdf;}#post-body{background:#fff;border-top-color:#fff;border-bottom-color:#dfdfdf;}#nav-menu-header{border-bottom-color:#dfdfdf;}#nav-menu-footer{border-top-color:#fff;}#menu-management .nav-tabs-arrow a{color:#C1C1C1;}#menu-management .nav-tabs-arrow a:hover{color:#D54E21;}#menu-management .nav-tabs-arrow a:active{color:#464646;}#menu-management .nav-tab-active{border-color:#dfdfdf;}#menu-management .nav-tab{background:#fbfbfb;border-color:#dfdfdf;}.js .input-with-default-title{color:#aaa;}#cancel-save{color:#f00;}#cancel-save:hover{background-color:#F00;color:#fff;}.list-container{border-color:#DFDFDF;}.menu-item-handle{border-color:#dfdfdf;}.menu li.deleting .menu-item-handle{background-color:#f66;text-shadow:#ccc;}.item-type{color:#999;}.item-controls .menu-item-delete:hover{color:#f00;}.nav-menus-php .item-edit{background:transparent url(../images/arrows.png) no-repeat 8px 10px;border-bottom-color:#eee;}.item-edit:hover{background:transparent url(../images/arrows-dark.png) no-repeat 8px 10px;}.menu-item-settings{border-color:#dfdfdf;}.link-to-original{color:#777;border-color:#dfdfdf;}#cancel-save:hover{color:#fff!important;}#update-menu-item{color:#fff!important;}#update-menu-item:hover,#update-menu-item:active,#update-menu-item:focus{color:#eaf2fa!important;border-color:#13455b!important;}.submitbox .submitcancel{color:#21759B;border-bottom-color:#21759B;}.submitbox .submitcancel:hover{background:#21759B;color:#fff;}#menu-management .nav-tab-active,.menu-item-handle,.menu-item-settings{-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff;}#menu-management .nav-tab-active{background:#f9f9f9;border-bottom-color:#f9f9f9;}#upload-form label{color:#777;}.fullscreen-overlay{background:#fff;}.wp-fullscreen-focus #wp-fullscreen-title,.wp-fullscreen-focus #wp-fullscreen-container{border-color:#ccc;}#fullscreen-topbar{border-bottom-color:#DFDFDF;}.about-wrap h1{color:#333;text-shadow:1px 1px 1px white;}.about-text{color:#777;}.wp-badge{color:#fff;text-shadow:0 -1px 0 rgba(22,57,81,0.3);}.about-wrap h2 .nav-tab{color:#21759B;}.about-wrap h2 .nav-tab:hover{color:#d54e21;}.about-wrap h2 .nav-tab-active,.about-wrap h2 .nav-tab-active:hover{color:#333;}.about-wrap h2 .nav-tab-active{text-shadow:1px 1px 1px white;color:#464646;}.about-wrap h3{color:#333;text-shadow:1px 1px 1px white;}.about-wrap .feature-section h4{color:#464646;}.about-wrap .feature-section img{background:#fff;border-color:#dfdfdf;-moz-box-shadow:0 0 6px rgba(0,0,0,0.3);-webkit-box-shadow:0 0 6px rgba(0,0,0,0.3);box-shadow:0 0 6px rgba(0,0,0,0.3);}.about-wrap h4.wp-people-group{text-shadow:1px 1px 1px white;}.about-wrap .point-releases{border-bottom:1px solid #dfdfdf;}.about-wrap .point-releases h3{border-top:1px solid #dfdfdf;}.about-wrap .point-releases h3:first-child{border:0;}.about-wrap li.wp-person img.gravatar{-moz-box-shadow:0 0 4px rgba(0,0,0,0.4);-webkit-box-shadow:0 0 4px rgba(0,0,0,0.4);box-shadow:0 0 4px rgba(0,0,0,0.4);}.about-wrap li.wp-person .title{color:#464646;text-shadow:1px 1px 1px white;}.freedoms-php .about-wrap ol li{color:#999;}.freedoms-php .about-wrap ol p{color:#464646;}.rtl .bar{border-right-color:none;border-left-color:#99d;}.rtl .post-com-count{background-image:url(../images/bubble_bg-rtl.gif);}.rtl #screen-meta-links a.show-settings{background-position:left 3px;}.rtl #screen-meta-links a.show-settings.screen-meta-active{background-position:left -33px;}.rtl #adminmenushadow,.rtl #adminmenuback{background-image:url(../images/menu-shadow-rtl.png);background-position:top left;}.rtl #adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle,.rtl #adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle{background:transparent url(../images/arrows-dark.png) no-repeat 8px 6px;}.rtl #adminmenu .wp-has-submenu:hover .wp-menu-toggle,.rtl #adminmenu .wp-menu-open .wp-menu-toggle{background:transparent url(../images/arrows.png) no-repeat 8px 6px;}.rtl #adminmenu .wp-submenu .wp-submenu-head{border-right-color:none;border-left-color:#dfdfdf;}.rtl #adminmenu .wp-submenu-wrap,.rtl.folded #adminmenu .wp-has-current-submenu .wp-submenu-wrap{-moz-box-shadow:-2px 2px 5px rgba(0,0,0,0.4);-webkit-box-shadow:-2px 2px 5px rgba(0,0,0,0.4);box-shadow:-2px 2px 5px rgba(0,0,0,0.4);}.rtl #collapse-button div{background-position:0 -108px;}.rtl.folded #collapse-button div{background-position:0 -72px;}.rtl .meta-box-sortables .postbox:hover .handlediv{background:transparent url(../images/arrows.png) no-repeat 6px 7px;}.rtl .tablenav .tablenav-pages a{border-color:#e3e3e3;background:#eee url('../images/menu-bits-rtl.gif?ver=20100610') repeat-x scroll right -379px;}.rtl #post-body .misc-pub-section{border-right-color:none;border-left-color:#eee;}.rtl .sidebar-name-arrow{background:transparent url(../images/arrows.png) no-repeat 5px 9px;}.rtl .sidebar-name:hover .sidebar-name-arrow{background:transparent url(../images/arrows-dark.png) no-repeat 5px 9px;} \ No newline at end of file +html,.wp-dialog{background-color:#fff}textarea,input[type="text"],input[type="password"],input[type="file"],input[type="button"],input[type="submit"],input[type="reset"],input[type="email"],input[type="number"],input[type="search"],input[type="tel"],input[type="url"],select{border-color:#dfdfdf;background-color:#fff;color:#333}select{color:#000}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="file"]:focus,input[type="button"]:focus,input[type="submit"]:focus,input[type="reset"]:focus,input[type="email"]:focus,input[type="number"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="url"]:focus,select:focus{border-color:#bbb}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,.ui-autocomplete li a{color:#333}body>#upload-menu{border-bottom-color:#fff}#postcustomstuff table,#your-profile fieldset,#rightnow,div.dashboard-widget,#dashboard-widgets p.dashboard-widget-links{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}.widefat{border-color:#dfdfdf;background-color:#f9f9f9}textarea.widefat{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}ul.category-tabs li{border-color:transparent}div.tabs-panel,.wp-tab-panel,ul.category-tabs li.tabs,ul.add-menu-item-tabs li.tabs,.wp-tab-active{border-color:#dfdfdf;background-color:#fff}ul.category-tabs li.tabs,ul.add-menu-item-tabs li.tabs,.wp-tab-active{background-color:#fff}input.disabled,textarea.disabled{background-color:#ccc}#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,.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,.sidebar-name,#nav-menu-header,#nav-menu-footer,.menu-item-handle{background-color:#f1f1f1;background-image:-ms-linear-gradient(top,#f9f9f9,#ececec);background-image:-moz-linear-gradient(top,#f9f9f9,#ececec);background-image:-o-linear-gradient(top,#f9f9f9,#ececec);background-image:-webkit-gradient(linear,left top,left bottom,from(#f9f9f9),to(#ececec));background-image:-webkit-linear-gradient(top,#f9f9f9,#ececec);background-image:linear-gradient(top,#f9f9f9,#ececec)}.widget .widget-top,.postbox h3,.stuffbox h3{border-bottom-color:#dfdfdf;text-shadow:#fff 0 1px 0;-moz-box-shadow:0 1px 0 #fff;-webkit-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff}.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}.wrap .add-new-h2{background:#f1f1f1}.subtitle{color:#777}.ac_over{background-color:#f0f0b8}.ac_results{background-color:#fff;border-color:#808080}.ac_results li{color:#101010}.alternate,.alt{background-color:#fcfcfc}.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}div.error,.login #login_error{background-color:#ffebe8;border-color:#c00}div.error a{color:#c00}.form-invalid{background-color:#ffebe8!important}.form-invalid input,.form-invalid select{border-color:#c00!important}.submit,#commentsdiv #add-new-comment{border-color:#dfdfdf}.highlight{background-color:#e4f2fd;color:#000}.howto,.nonessential,#edit-slug-box,.form-input-tip,.subsubsub{color:#666}.media-upload-form label.form-help,td.help{color:#9a9a9a}.ui-autocomplete{background-color:#efefef;border-color:#bbb}.ui-autocomplete li a.ui-state-hover{background-color:#ddd}.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}#adminmenu a:hover,#adminmenu li.menu-top>a:focus,#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,#side-sortables .add-menu-item-tabs .tabs a,.wp-tab-bar .wp-tab-active 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}div.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{border-top-color:#fff;border-bottom-color:#dfdfdf}.widefat th{text-shadow:rgba(255,255,255,0.8) 0 1px 0}.widefat td{color:#555}.widefat p,.widefat ol,.widefat ul{color:#333}.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}th.sortable a:hover,th.sortable a:active,th.sortable a:focus{color:#333}h3.dashboard-widget-title small a{color:#d7d7d7}h3.dashboard-widget-title small a:hover{color:#fff}a,#adminmenu a,#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}#adminmenu .awaiting-mod,#adminmenu .update-plugins,#sidemenu a .update-plugins,#rightnow .reallynow{background-color:#464646;color:#fff;-moz-box-shadow:rgba(255,255,255,0.5) 0 1px 0;-webkit-box-shadow:rgba(255,255,255,0.5) 0 1px 0;box-shadow:rgba(255,255,255,0.5) 0 1px 0}#plugin-information .action-button{background-color:#d54e21;color:#fff}#adminmenu li.current a .awaiting-mod,#adminmenu li a.wp-has-current-submenu .update-plugins{background-color:#464646;color:#fff;-moz-box-shadow:rgba(255,255,255,0.5) 0 1px 0;-webkit-box-shadow:rgba(255,255,255,0.5) 0 1px 0;box-shadow:rgba(255,255,255,0.5) 0 1px 0}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}#editable-post-name{background-color:#fffbcc}#edit-slug-box strong,.tablenav .displaying-num,#submitted-on,.submitted-on{color:#777}.login #nav a,.login #backtoblog a{color:#21759b!important}.login #nav a:hover,.login #backtoblog a:hover{color:#d54e21!important}#footer{color:#777;border-color:#dfdfdf}.imgedit-group,#media-items .media-item,.media-item .describe{border-color:#dfdfdf}.checkbox,.side-info,.plugins tr,#your-profile #rich_editing{background-color:#fcfcfc}.plugins .inactive,.plugins .inactive th,.plugins .inactive td,tr.inactive+tr.plugin-update-tr .plugin-update{background-color:#f4f4f4}.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}.welcome-panel{border-color:#dfdfdf}.welcome-panel p{color:#777}.welcome-panel-column p{color:#464646}.welcome-panel h3{text-shadow:1px 1px 1px white}.widget,#widget-list .widget-top,.postbox,#titlediv,#poststuff .postarea,.stuffbox{border-color:#dfdfdf;-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff;-webkit-border-radius:3px;border-radius:3px}.widget,#widget-list .widget-top,.postbox,.menu-item-settings{background-color:#f5f5f5;background-image:-ms-linear-gradient(top,#f9f9f9,#f5f5f5);background-image:-moz-linear-gradient(top,#f9f9f9,#f5f5f5);background-image:-o-linear-gradient(top,#f9f9f9,#f5f5f5);background-image:-webkit-gradient(linear,left top,left bottom,from(#f9f9f9),to(#f5f5f5));background-image:-webkit-linear-gradient(top,#f9f9f9,#f5f5f5);background-image:linear-gradient(top,#f9f9f9,#f5f5f5)}.postbox h3{color:#464646}.widget .widget-top{color:#222}.sidebar-name:hover h3,.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,.update-nag{background-color:#fffbcc;border-color:#e6db55;color:#555}#screen-meta{background-color:#f1f1f1;border-color:#ccc;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.05);box-shadow:0 1px 3px rgba(0,0,0,0.05)}#contextual-help-back{background:#fff}.contextual-help-tabs a:hover{color:#333}#contextual-help-back,.contextual-help-tabs .active{border-color:#ccc}.contextual-help-tabs .active,.contextual-help-tabs .active a,.contextual-help-tabs .active a:hover{background:#fff;color:#333}#screen-options-link-wrap,#contextual-help-link-wrap{background-color:#e3e3e3;border-right:1px solid #ccc;border-left:1px solid #ccc;border-bottom:1px solid #ccc;background-image:-ms-linear-gradient(bottom,#dfdfdf,#f1f1f1);background-image:-moz-linear-gradient(bottom,#dfdfdf,#f1f1f1);background-image:-o-linear-gradient(bottom,#dfdfdf,#f1f1f1);background-image:-webkit-gradient(linear,left bottom,left top,from(#dfdfdf),to(#f1f1f1));background-image:-webkit-linear-gradient(bottom,#dfdfdf,#f1f1f1);background-image:linear-gradient(bottom,#dfdfdf,#f1f1f1)}#screen-meta-links a.show-settings{color:#777}#screen-meta-links a.show-settings:hover{color:#333}#screen-meta-links a.show-settings{background:transparent url(../images/arrows.png) no-repeat right 4px}#screen-meta-links a.show-settings.screen-meta-active{background:transparent url(../images/arrows.png) no-repeat right -31px}.login #backtoblog a{color:#464646}#wphead{border-bottom:#dfdfdf 1px solid}#wphead h1 a{color:#464646}#footer a:link,#footer a:visited{text-decoration:none}#footer a:hover{text-decoration:underline}.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}#titlediv #title{border-color:#ccc}#post-status-info{border-color:#dfdfdf #ccc #ccc;background-color:#eaeaea}.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}#adminmenuback,#adminmenuwrap{background-color:#ececec;border-color:#ccc}#adminmenushadow,#adminmenuback{background-image:url(../images/menu-shadow.png);background-position:top right;background-repeat:repeat-y}#adminmenu li.wp-menu-separator{background:#dfdfdf;border-color:#cfcfcf}#adminmenu div.separator{border-color:#e1e1e1}#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/arrows-dark.png) no-repeat -1px 6px}#adminmenu .wp-has-submenu:hover .wp-menu-toggle,#adminmenu .wp-menu-open .wp-menu-toggle{background:transparent url(../images/arrows.png) no-repeat -2px 6px}#adminmenu a.menu-top,.folded #adminmenu li.menu-top,#adminmenu .wp-submenu .wp-submenu-head{border-top-color:#f9f9f9;border-bottom-color:#dfdfdf}#adminmenu li.wp-menu-open{border-color:#dfdfdf}#adminmenu li.menu-top:hover>a,#adminmenu li.menu-top.focused>a,#adminmenu li.menu-top>a:focus{background-color:#e4e4e4;text-shadow:0 1px 0 rgba(255,255,255,0.4)}#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,#adminmenu li.current a.menu-top,.folded #adminmenu li.wp-has-current-submenu,.folded #adminmenu li.current.menu-top,#adminmenu .wp-menu-arrow,#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head{background-color:#777;background-image:-ms-linear-gradient(bottom,#6d6d6d,#808080);background-image:-moz-linear-gradient(bottom,#6d6d6d,#808080);background-image:-o-linear-gradient(bottom,#6d6d6d,#808080);background-image:-webkit-gradient(linear,left bottom,left top,from(#6d6d6d),to(#808080));background-image:-webkit-linear-gradient(bottom,#6d6d6d,#808080);background-image:linear-gradient(bottom,#6d6d6d,#808080)}#adminmenu .wp-menu-arrow div{background-color:#777;background-image:-ms-linear-gradient(right bottom,#6d6d6d,#808080);background-image:-moz-linear-gradient(right bottom,#6d6d6d,#808080);background-image:-o-linear-gradient(right bottom,#6d6d6d,#808080);background-image:-webkit-gradient(linear,right bottom,left top,from(#6d6d6d),to(#808080));background-image:-webkit-linear-gradient(right bottom,#6d6d6d,#808080);background-image:linear-gradient(right bottom,#6d6d6d,#808080)}#adminmenu li.wp-not-current-submenu .wp-menu-arrow{border-top-color:#f9f9f9;border-bottom-color:#dfdfdf;background:#e4e4e4}#adminmenu li.wp-not-current-submenu .wp-menu-arrow div{background:#e4e4e4;border-color:#ccc}.folded #adminmenu li.menu-top li:hover a{background-image:none}#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,#adminmenu li.current a.menu-top,#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head{text-shadow:0 -1px 0 #333;color:#fff;border-top-color:#808080;border-bottom-color:#6d6d6d}.folded #adminmenu li.wp-has-current-submenu,.folded #adminmenu li.current.menu-top{border-top-color:#808080;border-bottom-color:#6d6d6d}#adminmenu .wp-submenu a:hover,#adminmenu .wp-submenu a:focus{background-color:#eaf2fa;color:#333}#adminmenu .wp-submenu li.current,#adminmenu .wp-submenu li.current a,#adminmenu .wp-submenu li.current a:hover{color:#333}#adminmenu .wp-submenu ul{background-color:#fff}#adminmenu .wp-submenu-wrap,#adminmenu .wp-submenu ul{border-color:#dfdfdf}#adminmenu .wp-submenu-wrap,.folded #adminmenu .wp-has-current-submenu .wp-submenu-wrap{-moz-box-shadow:2px 2px 5px rgba(0,0,0,0.4);-webkit-box-shadow:2px 2px 5px rgba(0,0,0,0.4);box-shadow:2px 2px 5px rgba(0,0,0,0.4)}#adminmenu .wp-submenu .wp-submenu-head{border-right-color:#dfdfdf;background-color:#ececec}#adminmenu div.wp-submenu{background-color:transparent}#collapse-menu{color:#aaa}#collapse-menu:hover{color:#999}#collapse-button{border-color:#ccc;background-color:#f4f4f4;background-image:-ms-linear-gradient(bottom,#dfdfdf,#fff);background-image:-moz-linear-gradient(bottom,#dfdfdf,#fff);background-image:-o-linear-gradient(bottom,#dfdfdf,#fff);background-image:-webkit-gradient(linear,left bottom,left top,from(#dfdfdf),to(#fff));background-image:-webkit-linear-gradient(bottom,#dfdfdf,#fff);background-image:linear-gradient(bottom,#dfdfdf,#fff)}#collapse-menu:hover #collapse-button{border-color:#aaa}#collapse-button div{background:transparent url(../images/arrows.png) no-repeat 0 -72px}.folded #collapse-button div{background-position:0 -108px}@media only screen and (max-width:900px){#adminmenu li.menu-top{border-top-color:#f9f9f9;border-bottom-color:#dfdfdf}#adminmenu li.wp-has-current-submenu,#adminmenu li.current.menu-top{background-color:#777;background-image:-ms-linear-gradient(bottom,#6d6d6d,#808080);background-image:-moz-linear-gradient(bottom,#6d6d6d,#808080);background-image:-o-linear-gradient(bottom,#6d6d6d,#808080);background-image:-webkit-gradient(linear,left bottom,left top,from(#6d6d6d),to(#808080));background-image:-webkit-linear-gradient(bottom,#6d6d6d,#808080);background-image:linear-gradient(bottom,#6d6d6d,#808080)}#adminmenu li.menu-top li:hover a{background-image:none}#adminmenu li.wp-has-current-submenu,#adminmenu li.current.menu-top{border-top-color:#808080;border-bottom-color:#6d6d6d}#adminmenu .wp-has-current-submenu .wp-submenu-wrap{-moz-box-shadow:2px 2px 5px rgba(0,0,0,0.4);-webkit-box-shadow:2px 2px 5px rgba(0,0,0,0.4);box-shadow:2px 2px 5px rgba(0,0,0,0.4)}#collapse-button div{background-position:0 -108px}}.icon16,.icon32,div.wp-menu-image{background-color:transparent;background-repeat:no-repeat}.icon16.icon-dashboard,.menu-icon-dashboard div.wp-menu-image,.icon16.icon-post,.menu-icon-post div.wp-menu-image,.icon16.icon-media,.menu-icon-media div.wp-menu-image,.icon16.icon-links,.menu-icon-links div.wp-menu-image,.icon16.icon-page,.menu-icon-page div.wp-menu-image,.icon16.icon-comments,.menu-icon-comments div.wp-menu-image,.icon16.icon-appearance,.menu-icon-appearance div.wp-menu-image,.icon16.icon-plugins,.menu-icon-plugins div.wp-menu-image,.icon16.icon-users,.menu-icon-users div.wp-menu-image,.icon16.icon-tools,.menu-icon-tools div.wp-menu-image,.icon16.icon-settings,.menu-icon-settings div.wp-menu-image,.icon16.icon-site,.menu-icon-site div.wp-menu-image{background-image:url('../images/menu.png?ver=20120201')}.icon16.icon-dashboard,#adminmenu .menu-icon-dashboard div.wp-menu-image{background-position:-59px -33px}#adminmenu .menu-icon-dashboard:hover div.wp-menu-image,#adminmenu .menu-icon-dashboard.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-dashboard.current div.wp-menu-image{background-position:-59px -1px}.icon16.icon-post,#adminmenu .menu-icon-post div.wp-menu-image{background-position:-269px -33px}#adminmenu .menu-icon-post:hover div.wp-menu-image,#adminmenu .menu-icon-post.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-post.current div.wp-menu-image{background-position:-269px -1px}.icon16.icon-media,#adminmenu .menu-icon-media div.wp-menu-image{background-position:-119px -33px}#adminmenu .menu-icon-media:hover div.wp-menu-image,#adminmenu .menu-icon-media.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-media.current div.wp-menu-image{background-position:-119px -1px}.icon16.icon-links,#adminmenu .menu-icon-links div.wp-menu-image{background-position:-89px -33px}#adminmenu .menu-icon-links:hover div.wp-menu-image,#adminmenu .menu-icon-links.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-links.current div.wp-menu-image{background-position:-89px -1px}.icon16.icon-page,#adminmenu .menu-icon-page div.wp-menu-image{background-position:-149px -33px}#adminmenu .menu-icon-page:hover div.wp-menu-image,#adminmenu .menu-icon-page.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-page.current div.wp-menu-image{background-position:-149px -1px}.icon16.icon-comments,#adminmenu .menu-icon-comments div.wp-menu-image{background-position:-29px -33px}#adminmenu .menu-icon-comments:hover div.wp-menu-image,#adminmenu .menu-icon-comments.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-comments.current div.wp-menu-image{background-position:-29px -1px}.icon16.icon-appearance,#adminmenu .menu-icon-appearance div.wp-menu-image{background-position:1px -33px}#adminmenu .menu-icon-appearance:hover div.wp-menu-image,#adminmenu .menu-icon-appearance.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-appearance.current div.wp-menu-image{background-position:1px -1px}.icon16.icon-plugins,#adminmenu .menu-icon-plugins div.wp-menu-image{background-position:-179px -33px}#adminmenu .menu-icon-plugins:hover div.wp-menu-image,#adminmenu .menu-icon-plugins.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-plugins.current div.wp-menu-image{background-position:-179px -1px}.icon16.icon-users,#adminmenu .menu-icon-users div.wp-menu-image{background-position:-300px -33px}#adminmenu .menu-icon-users:hover div.wp-menu-image,#adminmenu .menu-icon-users.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-users.current div.wp-menu-image{background-position:-300px -1px}.icon16.icon-tools,#adminmenu .menu-icon-tools div.wp-menu-image{background-position:-209px -33px}#adminmenu .menu-icon-tools:hover div.wp-menu-image,#adminmenu .menu-icon-tools.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-tools.current div.wp-menu-image{background-position:-209px -1px}.icon16.icon-settings,#adminmenu .menu-icon-settings div.wp-menu-image{background-position:-239px -33px}#adminmenu .menu-icon-settings:hover div.wp-menu-image,#adminmenu .menu-icon-settings.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-settings.current div.wp-menu-image{background-position:-239px -1px}.icon16.icon-site,#adminmenu .menu-icon-site div.wp-menu-image{background-position:-359px -33px}#adminmenu .menu-icon-site:hover div.wp-menu-image,#adminmenu .menu-icon-site.wp-has-current-submenu div.wp-menu-image,#adminmenu .menu-icon-site.current div.wp-menu-image{background-position:-359px -1px}.icon32.icon-post,#icon-edit,#icon-post,.icon32.icon-dashboard,#icon-index,.icon32.icon-media,#icon-upload,.icon32.icon-links,#icon-link-manager,#icon-link,#icon-link-category,.icon32.icon-page,#icon-edit-pages,#icon-page,.icon32.icon-comments,#icon-edit-comments,.icon32.icon-appearance,#icon-themes,.icon32.icon-plugins,#icon-plugins,.icon32.icon-users,#icon-users,#icon-profile,#icon-user-edit,.icon32.icon-tools,#icon-tools,#icon-admin,.icon32.icon-settings,#icon-options-general,.icon32.icon-site,#icon-ms-admin{background-image:url(../images/icons32.png?ver=20111206)}.icon32.icon-post,#icon-edit,#icon-post{background-position:-552px -5px}.icon32.icon-dashboard,#icon-index{background-position:-137px -5px}.icon32.icon-media,#icon-upload{background-position:-251px -5px}.icon32.icon-links,#icon-link-manager,#icon-link,#icon-link-category{background-position:-190px -5px}.icon32.icon-page,#icon-edit-pages,#icon-page{background-position:-312px -5px}.icon32.icon-comments,#icon-edit-comments{background-position:-72px -5px}.icon32.icon-appearance,#icon-themes{background-position:-11px -5px}.icon32.icon-plugins,#icon-plugins{background-position:-370px -5px}.icon32.icon-users,#icon-users,#icon-profile,#icon-user-edit{background-position:-600px -5px}.icon32.icon-tools,#icon-tools,#icon-admin{background-position:-432px -5px}.icon32.icon-settings,#icon-options-general{background-position:-492px -5px}.icon32.icon-site,#icon-ms-admin{background-position:-659px -5px}@media only screen and (-webkit-min-device-pixel-ratio:1.5){.icon32.icon-post,#icon-edit,#icon-post,.icon32.icon-dashboard,#icon-index,.icon32.icon-media,#icon-upload,.icon32.icon-links,#icon-link-manager,#icon-link,#icon-link-category,.icon32.icon-page,#icon-edit-pages,#icon-page,.icon32.icon-comments,#icon-edit-comments,.icon32.icon-appearance,#icon-themes,.icon32.icon-plugins,#icon-plugins,.icon32.icon-users,#icon-users,#icon-profile,#icon-user-edit,.icon32.icon-tools,#icon-tools,#icon-admin,.icon32.icon-settings,#icon-options-general,.icon32.icon-site,#icon-ms-admin{background-image:url(../images/icons32-2x.png?ver=20120412);background-size:708px 45px}.icon16.icon-dashboard,.menu-icon-dashboard div.wp-menu-image,.icon16.icon-post,.menu-icon-post div.wp-menu-image,.icon16.icon-media,.menu-icon-media div.wp-menu-image,.icon16.icon-links,.menu-icon-links div.wp-menu-image,.icon16.icon-page,.menu-icon-page div.wp-menu-image,.icon16.icon-comments,.menu-icon-comments div.wp-menu-image,.icon16.icon-appearance,.menu-icon-appearance div.wp-menu-image,.icon16.icon-plugins,.menu-icon-plugins div.wp-menu-image,.icon16.icon-users,.menu-icon-users div.wp-menu-image,.icon16.icon-tools,.menu-icon-tools div.wp-menu-image,.icon16.icon-settings,.menu-icon-settings div.wp-menu-image,.icon16.icon-site,.menu-icon-site div.wp-menu-image{background-image:url('../images/menu-2x.png?ver=20120412');background-size:390px 64px}}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}#replyerror{border-color:#ddd;background-color:#f9f9f9}.vim-current,.vim-current th,.vim-current td{background-color:#e4f2fd!important}#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{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}fieldset.inline-edit-col-right .inline-edit-col{border-color:#dfdfdf}.attention{color:#d54e21}.meta-box-sortables .postbox:hover .handlediv{background:transparent url(../images/arrows.png) no-repeat 6px 7px}.tablenav .tablenav-pages{color:#555}.tablenav .tablenav-pages a{border-color:#e3e3e3;background:#eee url('../images/menu-bits.gif?ver=20100610') repeat-x scroll left -379px}.tablenav .tablenav-pages a:hover,.tablenav .tablenav-pages a:focus{color:#d54e21}.tablenav .tablenav-pages a.disabled,.tablenav .tablenav-pages a.disabled:hover,.tablenav .tablenav-pages a.disabled:focus{color:#aaa}.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-top-color:#fff;border-bottom-color:#dfdfdf}#minor-publishing{border-bottom-color:#dfdfdf}#post-body .misc-pub-section{border-left-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,#post-body ul.add-menu-item-tabs li.tabs a,body.press-this ul.category-tabs li.tabs a{color:#333}.view-switch #view-switch-list{background:transparent url(../images/list.png) no-repeat 0 0}.view-switch .current #view-switch-list{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 .current #view-switch-excerpt{background:transparent url(../images/list.png) no-repeat -60px 0}#header-logo{background:transparent url(../images/wp-logo.png?ver=20110504) no-repeat scroll center center}.popular-tags,.feature-filter{background-color:#fff;border-color:#dfdfdf}div.widgets-sortables,#widgets-left .inactive,#available-widgets .widget-holder{background-color:#fcfcfc;border-color:#dfdfdf}#available-widgets .widget-description{color:#555}.sidebar-name{color:#464646;text-shadow:#fff 0 1px 0;border-color:#dfdfdf;-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.sidebar-name:hover,#removing-widget{color:#d54e21}#removing-widget span{color:black}.sidebar-name-arrow{background:transparent url(../images/arrows.png) no-repeat 5px 9px}.sidebar-name:hover .sidebar-name-arrow{background:transparent url(../images/arrows-dark.png) no-repeat 5px 9px}.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}#menu-management .menu-edit{border-color:#dfdfdf}#post-body{background:#fff;border-top-color:#fff;border-bottom-color:#dfdfdf}#nav-menu-header{border-bottom-color:#dfdfdf}#nav-menu-footer{border-top-color:#fff}#menu-management .nav-tabs-arrow a{color:#c1c1c1}#menu-management .nav-tabs-arrow a:hover{color:#d54e21}#menu-management .nav-tabs-arrow a:active{color:#464646}#menu-management .nav-tab-active{border-color:#dfdfdf}#menu-management .nav-tab{background:#fbfbfb;border-color:#dfdfdf}.js .input-with-default-title{color:#aaa}#cancel-save{color:#f00}#cancel-save:hover{background-color:#f00;color:#fff}.list-container,.menu-item-handle{border-color:#dfdfdf}.menu li.deleting .menu-item-handle{background-color:#f66;text-shadow:#ccc}.item-type{color:#999}.item-controls .menu-item-delete:hover{color:#f00}.nav-menus-php .item-edit{background:transparent url(../images/arrows.png) no-repeat 8px 10px;border-bottom-color:#eee}.item-edit:hover{background:transparent url(../images/arrows-dark.png) no-repeat 8px 10px}.menu-item-settings{border-color:#dfdfdf}.link-to-original{color:#777;border-color:#dfdfdf}#cancel-save:hover{color:#fff!important}#update-menu-item{color:#fff!important}#update-menu-item:hover,#update-menu-item:active,#update-menu-item:focus{color:#eaf2fa!important;border-color:#13455b!important}.submitbox .submitcancel{color:#21759b;border-bottom-color:#21759b}.submitbox .submitcancel:hover{background:#21759b;color:#fff}#menu-management .nav-tab-active,.menu-item-handle,.menu-item-settings{-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}#menu-management .nav-tab-active{background:#f9f9f9;border-bottom-color:#f9f9f9}#upload-form label{color:#777}.about-wrap h1{color:#333;text-shadow:1px 1px 1px white}.about-text{color:#777}.wp-badge{color:#fff;text-shadow:0 -1px 0 rgba(22,57,81,0.3)}.about-wrap h2 .nav-tab{color:#21759b}.about-wrap h2 .nav-tab:hover{color:#d54e21}.about-wrap h2 .nav-tab-active,.about-wrap h2 .nav-tab-active:hover{color:#333}.about-wrap h2 .nav-tab-active{text-shadow:1px 1px 1px white;color:#464646}.about-wrap h3{color:#333;text-shadow:1px 1px 1px white}.about-wrap .feature-section h4{color:#464646}.about-wrap .feature-section img{background:#fff;border:1px #ccc solid;-moz-box-shadow:0 1px 3px rgba(0,0,0,0.3);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.3);box-shadow:0 1px 3px rgba(0,0,0,0.3)}.about-wrap h4.wp-people-group{text-shadow:1px 1px 1px white}.about-wrap .point-releases{border-bottom:1px solid #dfdfdf}.about-wrap .point-releases h3{border-top:1px solid #dfdfdf}.about-wrap .point-releases h3:first-child{border:0}.about-wrap li.wp-person img.gravatar{-moz-box-shadow:0 0 4px rgba(0,0,0,0.4);-webkit-box-shadow:0 0 4px rgba(0,0,0,0.4);box-shadow:0 0 4px rgba(0,0,0,0.4)}.about-wrap li.wp-person .title{color:#464646;text-shadow:1px 1px 1px white}.freedoms-php .about-wrap ol li{color:#999}.freedoms-php .about-wrap ol p{color:#464646}.rtl .bar{border-right-color:none;border-left-color:#99d}.rtl .post-com-count{background-image:url(../images/bubble_bg-rtl.gif)}.rtl #screen-meta-links a.show-settings{background-position:left 3px}.rtl #screen-meta-links a.show-settings.screen-meta-active{background-position:left -33px}.rtl #adminmenushadow,.rtl #adminmenuback{background-image:url(../images/menu-shadow-rtl.png);background-position:top left}.rtl #adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle,.rtl #adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle{background:transparent url(../images/arrows-dark.png) no-repeat 8px 6px}.rtl #adminmenu .wp-has-submenu:hover .wp-menu-toggle,.rtl #adminmenu .wp-menu-open .wp-menu-toggle{background:transparent url(../images/arrows.png) no-repeat 8px 6px}.rtl #adminmenu .wp-submenu .wp-submenu-head{border-right-color:none;border-left-color:#dfdfdf}.rtl #adminmenu .wp-submenu-wrap,.rtl.folded #adminmenu .wp-has-current-submenu .wp-submenu-wrap{-moz-box-shadow:-2px 2px 5px rgba(0,0,0,0.4);-webkit-box-shadow:-2px 2px 5px rgba(0,0,0,0.4);box-shadow:-2px 2px 5px rgba(0,0,0,0.4)}.rtl #collapse-button div{background-position:0 -108px}.rtl.folded #collapse-button div{background-position:0 -72px}@media only screen and (max-width:900px){.rtl #adminmenu .wp-has-current-submenu .wp-submenu-wrap{-moz-box-shadow:-2px 2px 5px rgba(0,0,0,0.4);-webkit-box-shadow:-2px 2px 5px rgba(0,0,0,0.4);box-shadow:-2px 2px 5px rgba(0,0,0,0.4)}.rtl #collapse-button div{background-position:0 -72px}}.rtl .meta-box-sortables .postbox:hover .handlediv{background:transparent url(../images/arrows.png) no-repeat 6px 7px}.rtl .tablenav .tablenav-pages a{border-color:#e3e3e3;background:#eee url('../images/menu-bits-rtl.gif?ver=20100610') repeat-x scroll right -379px}.rtl #post-body .misc-pub-section{border-right-color:none;border-left-color:#eee}.rtl .sidebar-name-arrow{background:transparent url(../images/arrows.png) no-repeat 5px 9px}.rtl .sidebar-name:hover .sidebar-name-arrow{background:transparent url(../images/arrows-dark.png) no-repeat 5px 9px} \ No newline at end of file diff --git a/wp-admin/css/colors-fresh.dev.css b/wp-admin/css/colors-fresh.dev.css index 4543e55b..8049099e 100644 --- a/wp-admin/css/colors-fresh.dev.css +++ b/wp-admin/css/colors-fresh.dev.css @@ -40,6 +40,11 @@ input[type="url"], select { border-color: #dfdfdf; background-color: #fff; + color: #333; +} + +select { + color: #000; } textarea:focus, @@ -86,7 +91,8 @@ a.page-numbers:hover { body, #wpbody, -.form-table .pre { +.form-table .pre, +.ui-autocomplete li a { color: #333; } @@ -144,6 +150,10 @@ div.dashboard-widget-submit { border-top-color: #ccc; } +ul.category-tabs li { + border-color: transparent; +} + div.tabs-panel, .wp-tab-panel, ul.category-tabs li.tabs, @@ -182,8 +192,7 @@ h3.dashboard-widget-title small, .sidebar-name, #nav-menu-header, #nav-menu-footer, -.menu-item-handle, -#fullscreen-topbar { +.menu-item-handle { background-color: #f1f1f1; /* Fallback */ background-image: -ms-linear-gradient(top, #f9f9f9, #ececec); /* IE10 */ background-image: -moz-linear-gradient(top, #f9f9f9, #ececec); /* Firefox */ @@ -295,8 +304,9 @@ div.error a { border-color: #c00 !important; } -.submit { - border-color: #DFDFDF; +.submit, +#commentsdiv #add-new-comment { + border-color: #dfdfdf; } .highlight { @@ -317,6 +327,15 @@ td.help { color: #9a9a9a; } +.ui-autocomplete { + background-color: #efefef; + border-color: #bbb; +} + +.ui-autocomplete li a.ui-state-hover { + background-color: #ddd; +} + .post-com-count { background-image: url(../images/bubble_bg.gif); color: #fff; @@ -804,16 +823,16 @@ table.widefat span.spam a, .contextual-help-tabs .active a, .contextual-help-tabs .active a:hover { background: #fff; - color: #000; + color: #333; } /* screen options and help tabs */ #screen-options-link-wrap, #contextual-help-link-wrap { background-color: #e3e3e3; /* Fallback */ - border-right: 1px solid transparent; - border-left: 1px solid transparent; - border-bottom: 1px solid transparent; + border-right: 1px solid #ccc; + border-left: 1px solid #ccc; + border-bottom: 1px solid #ccc; background-image: -ms-linear-gradient(bottom, #dfdfdf, #f1f1f1); /* IE10 */ background-image: -moz-linear-gradient(bottom, #dfdfdf, #f1f1f1); /* Firefox */ background-image: -o-linear-gradient(bottom, #dfdfdf, #f1f1f1); /* Opera */ @@ -827,15 +846,15 @@ table.widefat span.spam a, } #screen-meta-links a.show-settings:hover { - color: #000; + color: #333; } #screen-meta-links a.show-settings { - background: transparent url(../images/arrows.png) no-repeat right 3px; + background: transparent url(../images/arrows.png) no-repeat right 4px; } #screen-meta-links a.show-settings.screen-meta-active { - background: transparent url(../images/arrows.png) no-repeat right -33px; + background: transparent url(../images/arrows.png) no-repeat right -31px; } /* end screen options and help tabs */ @@ -858,7 +877,6 @@ table.widefat span.spam a, } #footer a:hover { - color: #000; text-decoration: underline; } @@ -1089,212 +1107,394 @@ table.widefat .spam a:hover, background-image: -webkit-linear-gradient(bottom, #dfdfdf, #fff); /* new Webkit */ background-image: linear-gradient(bottom, #dfdfdf, #fff); /* proposed W3C Markup */ } + #collapse-menu:hover #collapse-button { border-color: #aaa; } + #collapse-button div { background: transparent url(../images/arrows.png) no-repeat 0 -72px; } + .folded #collapse-button div { background-position: 0 -108px; } +/* Auto-folding of the admin menu */ +@media only screen and (max-width: 900px) { + #adminmenu li.menu-top { + border-top-color: #f9f9f9; + border-bottom-color: #dfdfdf; + } + + #adminmenu li.wp-has-current-submenu, + #adminmenu li.current.menu-top { + background-color: #777; /* Fallback */ + background-image: -ms-linear-gradient(bottom, #6d6d6d, #808080); /* IE10 */ + background-image: -moz-linear-gradient(bottom, #6d6d6d, #808080); /* Firefox */ + background-image: -o-linear-gradient(bottom, #6d6d6d, #808080); /* Opera */ + background-image: -webkit-gradient(linear, left bottom, left top, from(#6d6d6d), to(#808080)); /* old Webkit */ + background-image: -webkit-linear-gradient(bottom, #6d6d6d, #808080); /* new Webkit */ + background-image: linear-gradient(bottom, #6d6d6d, #808080); /* proposed W3C Markup */ + } + + #adminmenu li.menu-top li:hover a { + background-image: none; + } + + #adminmenu li.wp-has-current-submenu, + #adminmenu li.current.menu-top { + border-top-color: #808080; + border-bottom-color: #6d6d6d; + } + + #adminmenu .wp-has-current-submenu .wp-submenu-wrap { + -moz-box-shadow: 2px 2px 5px rgba( 0, 0, 0, 0.4 ); + -webkit-box-shadow: 2px 2px 5px rgba( 0, 0, 0, 0.4 ); + box-shadow: 2px 2px 5px rgba( 0, 0, 0, 0.4 ); + } + + #collapse-button div { + background-position: 0 -108px; + } +} + /* menu and screen icons */ +.icon16, +.icon32, +div.wp-menu-image { + background-color: transparent; + background-repeat: no-repeat; +} + +.icon16.icon-dashboard, +.menu-icon-dashboard div.wp-menu-image, +.icon16.icon-post, +.menu-icon-post div.wp-menu-image, +.icon16.icon-media, +.menu-icon-media div.wp-menu-image, +.icon16.icon-links, +.menu-icon-links div.wp-menu-image, +.icon16.icon-page, +.menu-icon-page div.wp-menu-image, +.icon16.icon-comments, +.menu-icon-comments div.wp-menu-image, +.icon16.icon-appearance, +.menu-icon-appearance div.wp-menu-image, +.icon16.icon-plugins, +.menu-icon-plugins div.wp-menu-image, +.icon16.icon-users, +.menu-icon-users div.wp-menu-image, +.icon16.icon-tools, +.menu-icon-tools div.wp-menu-image, +.icon16.icon-settings, +.menu-icon-settings div.wp-menu-image, +.icon16.icon-site, +.menu-icon-site div.wp-menu-image { + background-image: url('../images/menu.png?ver=20120201'); +} + .icon16.icon-dashboard, #adminmenu .menu-icon-dashboard div.wp-menu-image { - background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -60px -33px; + background-position: -59px -33px; } #adminmenu .menu-icon-dashboard:hover div.wp-menu-image, #adminmenu .menu-icon-dashboard.wp-has-current-submenu div.wp-menu-image, #adminmenu .menu-icon-dashboard.current div.wp-menu-image { - background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -60px -1px; + background-position: -59px -1px; } .icon16.icon-post, #adminmenu .menu-icon-post div.wp-menu-image { - background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -271px -33px; + background-position: -269px -33px; } #adminmenu .menu-icon-post:hover div.wp-menu-image, -#adminmenu .menu-icon-post.wp-has-current-submenu div.wp-menu-image { - background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -271px -1px; +#adminmenu .menu-icon-post.wp-has-current-submenu div.wp-menu-image, +#adminmenu .menu-icon-post.current div.wp-menu-image { + background-position: -269px -1px; } .icon16.icon-media, #adminmenu .menu-icon-media div.wp-menu-image { - background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -120px -33px; + background-position: -119px -33px; } #adminmenu .menu-icon-media:hover div.wp-menu-image, -#adminmenu .menu-icon-media.wp-has-current-submenu div.wp-menu-image { - background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -120px -1px; +#adminmenu .menu-icon-media.wp-has-current-submenu div.wp-menu-image, +#adminmenu .menu-icon-media.current div.wp-menu-image { + background-position: -119px -1px; } .icon16.icon-links, #adminmenu .menu-icon-links div.wp-menu-image { - background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -90px -33px; + background-position: -89px -33px; } #adminmenu .menu-icon-links:hover div.wp-menu-image, -#adminmenu .menu-icon-links.wp-has-current-submenu div.wp-menu-image { - background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -90px -1px; +#adminmenu .menu-icon-links.wp-has-current-submenu div.wp-menu-image, +#adminmenu .menu-icon-links.current div.wp-menu-image { + background-position: -89px -1px; } .icon16.icon-page, #adminmenu .menu-icon-page div.wp-menu-image { - background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -150px -33px; + background-position: -149px -33px; } #adminmenu .menu-icon-page:hover div.wp-menu-image, -#adminmenu .menu-icon-page.wp-has-current-submenu div.wp-menu-image { - background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -150px -1px; +#adminmenu .menu-icon-page.wp-has-current-submenu div.wp-menu-image, +#adminmenu .menu-icon-page.current div.wp-menu-image { + background-position: -149px -1px; } .icon16.icon-comments, #adminmenu .menu-icon-comments div.wp-menu-image { - background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -30px -33px; + background-position: -29px -33px; } #adminmenu .menu-icon-comments:hover div.wp-menu-image, #adminmenu .menu-icon-comments.wp-has-current-submenu div.wp-menu-image, #adminmenu .menu-icon-comments.current div.wp-menu-image { - background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -30px -1px; + background-position: -29px -1px; } .icon16.icon-appearance, #adminmenu .menu-icon-appearance div.wp-menu-image { - background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll 0 -33px; + background-position: 1px -33px; } #adminmenu .menu-icon-appearance:hover div.wp-menu-image, -#adminmenu .menu-icon-appearance.wp-has-current-submenu div.wp-menu-image { - background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll 0 -1px; +#adminmenu .menu-icon-appearance.wp-has-current-submenu div.wp-menu-image, +#adminmenu .menu-icon-appearance.current div.wp-menu-image { + background-position: 1px -1px; } .icon16.icon-plugins, #adminmenu .menu-icon-plugins div.wp-menu-image { - background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -180px -33px; + background-position: -179px -33px; } #adminmenu .menu-icon-plugins:hover div.wp-menu-image, -#adminmenu .menu-icon-plugins.wp-has-current-submenu div.wp-menu-image { - background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -180px -1px; +#adminmenu .menu-icon-plugins.wp-has-current-submenu div.wp-menu-image, +#adminmenu .menu-icon-plugins.current div.wp-menu-image { + background-position: -179px -1px; } .icon16.icon-users, #adminmenu .menu-icon-users div.wp-menu-image { - background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -300px -33px; + background-position: -300px -33px; } #adminmenu .menu-icon-users:hover div.wp-menu-image, #adminmenu .menu-icon-users.wp-has-current-submenu div.wp-menu-image, #adminmenu .menu-icon-users.current div.wp-menu-image { - background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -300px -1px; + background-position: -300px -1px; } .icon16.icon-tools, #adminmenu .menu-icon-tools div.wp-menu-image { - background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -210px -33px; + background-position: -209px -33px; } #adminmenu .menu-icon-tools:hover div.wp-menu-image, #adminmenu .menu-icon-tools.wp-has-current-submenu div.wp-menu-image, #adminmenu .menu-icon-tools.current div.wp-menu-image { - background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -210px -1px; + background-position: -209px -1px; } .icon16.icon-settings, #adminmenu .menu-icon-settings div.wp-menu-image { - background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -240px -33px; + background-position: -239px -33px; } #adminmenu .menu-icon-settings:hover div.wp-menu-image, -#adminmenu .menu-icon-settings.wp-has-current-submenu div.wp-menu-image { - background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -240px -1px; +#adminmenu .menu-icon-settings.wp-has-current-submenu div.wp-menu-image, +#adminmenu .menu-icon-settings.current div.wp-menu-image { + background-position: -239px -1px; } .icon16.icon-site, #adminmenu .menu-icon-site div.wp-menu-image { - background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -360px -33px; + background-position: -359px -33px; } #adminmenu .menu-icon-site:hover div.wp-menu-image, -#adminmenu .menu-icon-site.wp-has-current-submenu div.wp-menu-image { - background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -360px -1px; +#adminmenu .menu-icon-site.wp-has-current-submenu div.wp-menu-image, +#adminmenu .menu-icon-site.current div.wp-menu-image { + background-position: -359px -1px; } /* end menu and screen icons */ /* Screen Icons */ +.icon32.icon-post, +#icon-edit, +#icon-post, +.icon32.icon-dashboard, +#icon-index, +.icon32.icon-media, +#icon-upload, +.icon32.icon-links, +#icon-link-manager, +#icon-link, +#icon-link-category, +.icon32.icon-page, +#icon-edit-pages, +#icon-page, +.icon32.icon-comments, +#icon-edit-comments, +.icon32.icon-appearance, +#icon-themes, +.icon32.icon-plugins, +#icon-plugins, +.icon32.icon-users, +#icon-users, +#icon-profile, +#icon-user-edit, +.icon32.icon-tools, +#icon-tools, +#icon-admin, +.icon32.icon-settings, +#icon-options-general, +.icon32.icon-site, +#icon-ms-admin { + background-image: url(../images/icons32.png?ver=20111206); +} + .icon32.icon-post, #icon-edit, #icon-post { - background: transparent url(../images/icons32.png?ver=20111206) no-repeat -552px -5px; + background-position: -552px -5px; } .icon32.icon-dashboard, #icon-index { - background: transparent url(../images/icons32.png?ver=20111206) no-repeat -137px -5px; + background-position: -137px -5px; } .icon32.icon-media, #icon-upload { - background: transparent url(../images/icons32.png?ver=20111206) no-repeat -251px -5px; + background-position: -251px -5px; } .icon32.icon-links, #icon-link-manager, #icon-link, #icon-link-category { - background: transparent url(../images/icons32.png?ver=20111206) no-repeat -190px -5px; + background-position: -190px -5px; } .icon32.icon-page, #icon-edit-pages, #icon-page { - background: transparent url(../images/icons32.png?ver=20111206) no-repeat -312px -5px; + background-position: -312px -5px; } .icon32.icon-comments, #icon-edit-comments { - background: transparent url(../images/icons32.png?ver=20111206) no-repeat -72px -5px; + background-position: -72px -5px; } .icon32.icon-appearance, #icon-themes { - background: transparent url(../images/icons32.png?ver=20111206) no-repeat -11px -5px; + background-position: -11px -5px; } .icon32.icon-plugins, #icon-plugins { - background: transparent url(../images/icons32.png?ver=20111206) no-repeat -370px -5px; + background-position: -370px -5px; } .icon32.icon-users, #icon-users, #icon-profile, #icon-user-edit { - background: transparent url(../images/icons32.png?ver=20111206) no-repeat -600px -5px; + background-position: -600px -5px; } .icon32.icon-tools, #icon-tools, #icon-admin { - background: transparent url(../images/icons32.png?ver=20111206) no-repeat -432px -5px; + background-position: -432px -5px; } .icon32.icon-settings, #icon-options-general { - background: transparent url(../images/icons32.png?ver=20111206) no-repeat -492px -5px; + background-position: -492px -5px; } .icon32.icon-site, #icon-ms-admin { - background: transparent url(../images/icons32.png?ver=20111206) no-repeat -659px -5px; + background-position: -659px -5px; +} + +@media only screen and (-webkit-min-device-pixel-ratio: 1.5) { + .icon32.icon-post, + #icon-edit, + #icon-post, + .icon32.icon-dashboard, + #icon-index, + .icon32.icon-media, + #icon-upload, + .icon32.icon-links, + #icon-link-manager, + #icon-link, + #icon-link-category, + .icon32.icon-page, + #icon-edit-pages, + #icon-page, + .icon32.icon-comments, + #icon-edit-comments, + .icon32.icon-appearance, + #icon-themes, + .icon32.icon-plugins, + #icon-plugins, + .icon32.icon-users, + #icon-users, + #icon-profile, + #icon-user-edit, + .icon32.icon-tools, + #icon-tools, + #icon-admin, + .icon32.icon-settings, + #icon-options-general, + .icon32.icon-site, + #icon-ms-admin { + background-image: url(../images/icons32-2x.png?ver=20120412); + background-size: 708px 45px; + } + + .icon16.icon-dashboard, + .menu-icon-dashboard div.wp-menu-image, + .icon16.icon-post, + .menu-icon-post div.wp-menu-image, + .icon16.icon-media, + .menu-icon-media div.wp-menu-image, + .icon16.icon-links, + .menu-icon-links div.wp-menu-image, + .icon16.icon-page, + .menu-icon-page div.wp-menu-image, + .icon16.icon-comments, + .menu-icon-comments div.wp-menu-image, + .icon16.icon-appearance, + .menu-icon-appearance div.wp-menu-image, + .icon16.icon-plugins, + .menu-icon-plugins div.wp-menu-image, + .icon16.icon-users, + .menu-icon-users div.wp-menu-image, + .icon16.icon-tools, + .menu-icon-tools div.wp-menu-image, + .icon16.icon-settings, + .menu-icon-settings div.wp-menu-image, + .icon16.icon-site, + .menu-icon-site div.wp-menu-image { + background-image: url('../images/menu-2x.png?ver=20120412'); + background-size: 390px 64px; + } } /* end screen icons */ - /* Diff */ table.diff .diff-deletedline { background-color: #fdd; @@ -1342,25 +1542,6 @@ table.diff .diff-addedline ins { } /* Install Plugins */ -.star-average, -.star.star-rating { - background-color: #fc0; -} - -div.star.select:hover { - background-color: #d00; -} - -div.star img { - border-left: 1px solid #fff; - border-right: 1px solid #fff; -} - -.widefat div.star img { - border-left: 1px solid #f9f9f9; - border-right: 1px solid #f9f9f9; -} - #plugin-information .fyi ul { background-color: #eaf3fa; } @@ -1469,7 +1650,7 @@ fieldset.inline-edit-col-right .inline-edit-col { } #post-body .misc-pub-section { - border-right-color: #eee; + border-left-color: #eee; } .post-com-count span { @@ -1517,20 +1698,8 @@ body.press-this ul.category-tabs li.tabs a { 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: #fcfcfc; - border-color: #dfdfdf; -} - +#widgets-left .inactive, #available-widgets .widget-holder { background-color: #fcfcfc; border-color: #dfdfdf; @@ -1657,10 +1826,7 @@ div.widgets-sortables, color: #fff; } -.list-container { - border-color: #DFDFDF; -} - +.list-container, .menu-item-handle { border-color: #dfdfdf; } @@ -1735,25 +1901,9 @@ div.widgets-sortables, border-bottom-color: #f9f9f9; } -/* custom header & background pages */ #upload-form label { color: #777; } -/* custom header & background pages */ - -/* full screen */ -.fullscreen-overlay { - background: #fff; -} - -.wp-fullscreen-focus #wp-fullscreen-title, -.wp-fullscreen-focus #wp-fullscreen-container { - border-color: #ccc; -} - -#fullscreen-topbar { - border-bottom-color: #DFDFDF; -} /* Begin About Pages */ @@ -1797,11 +1947,11 @@ div.widgets-sortables, .about-wrap .feature-section img { background: #fff; - border-color: #dfdfdf; + border: 1px #ccc solid; - -moz-box-shadow: 0 0 6px rgba( 0, 0, 0, 0.3 ); - -webkit-box-shadow: 0 0 6px rgba( 0, 0, 0, 0.3 ); - box-shadow: 0 0 6px rgba( 0, 0, 0, 0.3 ); + -moz-box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.3 ); + -webkit-box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.3 ); + box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.3 ); } .about-wrap h4.wp-people-group { @@ -1899,6 +2049,19 @@ div.widgets-sortables, background-position: 0 -72px; } +/* Auto-folding of the admin menu for RTL */ +@media only screen and (max-width: 900px) { + .rtl #adminmenu .wp-has-current-submenu .wp-submenu-wrap{ + -moz-box-shadow: -2px 2px 5px rgba( 0, 0, 0, 0.4 ); + -webkit-box-shadow: -2px 2px 5px rgba( 0, 0, 0, 0.4 ); + box-shadow: -2px 2px 5px rgba( 0, 0, 0, 0.4 ); + } + + .rtl #collapse-button div { + background-position: 0 -72px; + } +} + /* Edit Image */ .rtl .meta-box-sortables .postbox:hover .handlediv { background: transparent url(../images/arrows.png) no-repeat 6px 7px; diff --git a/wp-admin/css/customize-controls-rtl.css b/wp-admin/css/customize-controls-rtl.css new file mode 100644 index 00000000..1b1830f4 --- /dev/null +++ b/wp-admin/css/customize-controls-rtl.css @@ -0,0 +1 @@ +.control-section .customize-section-title{font-family:Tahoma,Arial,sans-serif}.customize-section-title:after{right:auto;left:20px}#customize-header-actions .button-primary{float:left}#customize-header-actions img{float:left;margin-right:0;margin-left:4px}.customize-control{float:right}.customize-control-radio input,.customize-control-checkbox input{margin-right:0;margin-left:5px}.customize-section .dropdown{float:right}.customize-section .dropdown-content{float:right;margin-right:0;margin-left:16px;-webkit-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.customize-control .dropdown-arrow{right:auto;left:0;border-color:#ccc;border-style:solid;border-width:1px 0 1px 1px;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.customize-control .dropdown-arrow:after{right:auto;left:4px}.customize-control-color .dropdown{margin-right:0;margin-left:5px}.customize-section input[type="text"].color-picker-hex,.customize-control-color .farbtastic-placeholder{float:right}.customize-section .customize-control-image .actions{text-align:left}.customize-control-image .library,.customize-control-image .actions,.customize-section .customize-control-image .library ul,.customize-section .customize-control-image .library li,.customize-section .customize-control-image .library-content{float:right} \ No newline at end of file diff --git a/wp-admin/css/customize-controls-rtl.dev.css b/wp-admin/css/customize-controls-rtl.dev.css new file mode 100644 index 00000000..1852fd91 --- /dev/null +++ b/wp-admin/css/customize-controls-rtl.dev.css @@ -0,0 +1,86 @@ +.control-section .customize-section-title { + font-family: Tahoma, Arial, sans-serif; +} +.customize-section-title:after { + right: auto; + left: 20px; +} + +#customize-header-actions .button-primary { + float: left; +} + +#customize-header-actions img { + float: left; + margin-right: 0; + margin-left: 4px; +} + +.customize-control { + float: right; +} + +.customize-control-radio input, +.customize-control-checkbox input { + margin-right: 0; + margin-left: 5px; +} + +/* + * Dropdowns + */ +.customize-section .dropdown { + float: right; +} + +.customize-section .dropdown-content { + float: right; + margin-right: 0px; + margin-left: 16px; + -webkit-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} + +.customize-control .dropdown-arrow { + right: auto; + left: 0; + + border-color: #ccc; + border-style: solid; + border-width: 1px 0 1px 1px; + -webkit-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; +} + +.customize-control .dropdown-arrow:after { + right: auto; + left: 4px; +} + +/* + * Color Picker + */ +.customize-control-color .dropdown { + margin-right: 0; + margin-left: 5px; +} + +.customize-section input[type="text"].color-picker-hex, +.customize-control-color .farbtastic-placeholder { + float: right; +} + +/* + * Image Picker + */ +.customize-section .customize-control-image .actions { + text-align: left; +} + +.customize-control-image .library, +.customize-control-image .actions, +.customize-section .customize-control-image .library ul, +.customize-section .customize-control-image .library li, +.customize-section .customize-control-image .library-content { + float: right; +} diff --git a/wp-admin/css/customize-controls.css b/wp-admin/css/customize-controls.css new file mode 100644 index 00000000..9447cc3e --- /dev/null +++ b/wp-admin/css/customize-controls.css @@ -0,0 +1 @@ +body{overflow:hidden}#customize-controls a{text-decoration:none}.customize-section{border-top:1px solid #fff;border-bottom:1px solid #dfdfdf;margin:0}.control-section.customize-section:hover,.control-section.customize-section.open{border-top-color:#808080}.control-section.customize-section:hover{border-bottom-color:#6d6d6d}.customize-section.open:hover{border-bottom-color:#dfdfdf}.customize-section:last-child{box-shadow:0 1px 0 0 #fff}.customize-section-title{margin:0;padding:15px 20px;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.cannot-expand .customize-section-title{cursor:auto}.customize-section-content{display:none;padding:10px 20px 15px;overflow:hidden}.control-section .customize-section-title{padding:10px 20px;font-size:15px;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-weight:normal;text-shadow:0 1px 0 #fff;background-color:#f5f5f5;background-image:-webkit-linear-gradient(top,#f5f5f5,#eee);background-image:-moz-linear-gradient(top,#f5f5f5,#eee);background-image:-ms-linear-gradient(top,#f5f5f5,#eee);background-image:-o-linear-gradient(top,#f5f5f5,#eee);background-image:linear-gradient(top,#f5f5f5,#eee)}.control-section:hover .customize-section-title,.control-section .customize-section-title:hover,.control-section.open .customize-section-title{color:#fff;text-shadow:0 -1px 0 #333;background-color:#808080;background-image:-webkit-linear-gradient(top,#808080,#6d6d6d);background-image:-moz-linear-gradient(top,#808080,#6d6d6d);background-image:-ms-linear-gradient(top,#808080,#6d6d6d);background-image:-o-linear-gradient(top,#808080,#6d6d6d);background-image:linear-gradient(top,#808080,#6d6d6d)}.control-section.open .customize-section-title{border-bottom:1px solid #6d6d6d}.customize-section.open .customize-section-content{display:block;background:#fdfdfd}.customize-section-title:after{content:'';width:0;height:0;border-color:#ccc transparent;border-style:solid;border-width:6px 6px 0;position:absolute;top:25px;right:20px;z-index:1}.cannot-expand .customize-section-title:after{display:none}.customize-section-title:hover:after{border-color:#aaa transparent}.control-section .customize-section-title:hover:after{border-color:#eee transparent}.control-section .customize-section-title:after{top:15px}#customize-info .customize-section-content{background:transparent}#customize-info .preview-notice{font-size:13px;line-height:24px;color:#999}#customize-info .theme-name{font-size:20px;font-weight:200;line-height:24px;color:#333;display:block;text-shadow:0 1px 0 #fff}#customize-info .theme-screenshot{width:258px;border:1px solid #ccc}#customize-info .theme-description{margin-top:1em;color:#777;line-height:20px}#customize-controls .submit{text-align:center}#customize-theme-controls>ul,#customize-theme-controls .customize-section-content{margin:0}#customize-header-actions .button-primary{float:right;margin-top:11px}#customize-header-actions img{display:none;float:right;margin-top:13px;margin-right:4px}.saving #customize-header-actions img{display:block}.customize-control{width:100%;float:left;clear:both;margin-bottom:8px}.customize-control-title{display:block;line-height:24px;font-weight:bold}.customize-control select,.customize-control input[type="text"],.customize-control input[type="radio"],.customize-control input[type="checkbox"],.customize-control-color .color-picker,.customize-control-checkbox label,.customize-control-upload div{line-height:28px}.customize-control input[type="text"]{width:98%;line-height:18px;margin:0}.customize-control select{min-width:50%;max-width:100%;height:28px;line-height:28px}.customize-control-checkbox input{margin-right:5px}.customize-control-radio{padding:5px 0 10px}.customize-control-radio .customize-control-title{margin-bottom:0;line-height:22px}.customize-control-radio label{line-height:20px}.customize-control-radio input{margin-right:5px}#customize-preview iframe{width:100%;height:100%}.customize-section .dropdown{float:left;display:block;position:relative;cursor:pointer;-webkit-border-radius:3px;border-radius:3px}.customize-section .dropdown-content{overflow:hidden;float:left;min-width:30px;height:16px;line-height:16px;margin-right:16px;padding:4px 5px;background-color:#eee;border:1px solid #ccc;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.customize-control .dropdown-arrow{position:absolute;top:0;bottom:0;right:0;width:15px;border-color:#ccc;border-style:solid;border-width:1px 1px 1px 0;-webkit-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.customize-control .dropdown-arrow:after{content:'';width:0;height:0;border-color:#ccc transparent;border-style:solid;border-width:4px 4px 0 4px;position:absolute;top:50%;margin-top:-1px;right:4px;z-index:1}.customize-section .dropdown:hover .dropdown-content,.customize-control .dropdown:hover .dropdown-arrow{border-color:#aaa}.customize-section .dropdown:hover .dropdown-arrow:after{border-color:#aaa transparent}.customize-control .dropdown-status{display:none;max-width:112px;color:#777}.customize-control-color .color-picker-hex,.customize-control-color .farbtastic-placeholder{display:none}.customize-control-color.open .color-picker-hex,.customize-control-color.open .farbtastic-placeholder{display:block}.customize-control-color .dropdown{margin-right:5px;margin-bottom:5px}.customize-control-color .dropdown .dropdown-content{background-color:#fff;border:1px solid rgba(0,0,0,0.15)}.customize-control-color .dropdown:hover .dropdown-content{border-color:rgba(0,0,0,0.25)}.customize-section input[type="text"].color-picker-hex{float:left;width:85px;font-family:monospace;text-align:center}.customize-section input[type="text"].color-picker-hex:focus::-webkit-input-placeholder{color:transparent}.customize-section input[type="text"].color-picker-hex:-moz-placeholder{color:#999}.customize-control-color .farbtastic-placeholder{width:100%;margin:5px 0 10px;float:left}.customize-control-color .farbtastic{margin:0 auto}.customize-control-image .library,.customize-control-image .actions{display:none;float:left;width:100%}.customize-control-image.open .library,.customize-control-image.open .actions{display:block}.customize-section .customize-control-image .dropdown-content{height:auto;min-height:24px;min-width:40px;padding:0}.customize-section .customize-control-image .dropdown-status{padding:4px 5px}.customize-section .customize-control-image .preview-thumbnail img{display:block;width:100%;max-width:122px;max-height:98px;margin:0 auto}.customize-section .customize-control-image .actions{text-align:right}.customize-section .customize-control-image .library ul{border-bottom:1px solid #dfdfdf;float:left;width:100%;margin:10px 0 0}.customize-section .customize-control-image .library li{color:#999;float:left;padding:3px 5px;margin:0;border-style:solid;border-color:transparent;border-width:1px 1px 0 1px}.customize-section .customize-control-image .library li.library-selected{margin-bottom:-1px;padding-bottom:4px;color:#777;background:#fdfdfd;border-color:#dfdfdf;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0}.customize-section .customize-control-image .library-content{display:none;width:100%;float:left;padding:10px 0}.customize-section .customize-control-image .library-content.library-selected{display:block}.customize-section .customize-control-image .library .thumbnail{display:block;width:100%}.customize-section .customize-control-image .library .thumbnail:hover img{border-color:#21759b}.customize-section .customize-control-image .library .thumbnail img{display:block;max-width:90%;max-height:80px;margin:5px auto;padding:4px;background:#fff;border:1px solid #dfdfdf}.customize-section .customize-control-upload .upload-fallback,.customize-section .customize-control-image .upload-fallback{display:none}.customize-section .customize-control-upload .upload-dropzone,.customize-section .customize-control-image .upload-dropzone{display:none;padding:15px 10px;border:3px dashed #dfdfdf;margin:5px auto;text-align:center;color:#777;position:relative;cursor:default}.customize-section .customize-control-upload .upload-dropzone.supports-drag-drop,.customize-section .customize-control-image .upload-dropzone.supports-drag-drop{display:block;-webkit-transition:border-color .1s;-moz-transition:border-color .1s;-ms-transition:border-color .1s;-o-transition:border-color .1s;transition:border-color .1s}.customize-section .customize-control-upload .library ul li,.customize-section .customize-control-image .library ul li{cursor:pointer}.customize-section .customize-control-upload .upload-dropzone.supports-drag-drop.drag-over,.customize-section .customize-control-image .upload-dropzone.supports-drag-drop.drag-over{border-color:#83b4d8}.ios .wp-full-overlay{position:relative}.ios #customize-preview{position:relative}.ios #customize-controls .wp-full-overlay-sidebar-content{-webkit-overflow-scrolling:touch}body.cheatin{min-width:0;background:#f9f9f9;padding:50px}body.cheatin p{max-width:700px;margin:0 auto;padding:2em;font-size:14px;background:#fff;border:1px solid #dfdfdf;-webkit-border-radius:3px;border-radius:3px} \ No newline at end of file diff --git a/wp-admin/css/customize-controls.dev.css b/wp-admin/css/customize-controls.dev.css new file mode 100644 index 00000000..908caa2d --- /dev/null +++ b/wp-admin/css/customize-controls.dev.css @@ -0,0 +1,537 @@ +body { + overflow: hidden; +} + +#customize-controls a { + text-decoration: none; +} + +.customize-section { + border-top: 1px solid #fff; + border-bottom: 1px solid #dfdfdf; + margin: 0; +} + +.control-section.customize-section:hover, +.control-section.customize-section.open { + border-top-color: #808080; +} + +.control-section.customize-section:hover { + border-bottom-color: #6d6d6d; +} + +.customize-section.open:hover { + border-bottom-color: #dfdfdf; +} + +.customize-section:last-child { + box-shadow: 0 1px 0 0px #fff; +} + +.customize-section-title { + margin: 0; + padding: 15px 20px; + position: relative; + + cursor: pointer; + + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; +} + +.cannot-expand .customize-section-title { + cursor: auto; +} + +.customize-section-content { + display: none; + padding: 10px 20px 15px; + overflow: hidden; +} + +.control-section .customize-section-title { + padding: 10px 20px; + font-size: 15px; + font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; + font-weight: normal; + text-shadow: 0 1px 0 #fff; + + background-color: #f5f5f5; + background-image: -webkit-linear-gradient( top, #f5f5f5, #eee ); + background-image: -moz-linear-gradient( top, #f5f5f5, #eee ); + background-image: -ms-linear-gradient( top, #f5f5f5, #eee ); + background-image: -o-linear-gradient( top, #f5f5f5, #eee ); + background-image: linear-gradient( top, #f5f5f5, #eee ); +} + +.control-section:hover .customize-section-title, +.control-section .customize-section-title:hover, +.control-section.open .customize-section-title { + color: #fff; + text-shadow: 0 -1px 0 #333; + background-color: #808080; + background-image: -webkit-linear-gradient( top, #808080, #6d6d6d ); + background-image: -moz-linear-gradient( top, #808080, #6d6d6d ); + background-image: -ms-linear-gradient( top, #808080, #6d6d6d ); + background-image: -o-linear-gradient( top, #808080, #6d6d6d ); + background-image: linear-gradient( top, #808080, #6d6d6d ); +} + +.control-section.open .customize-section-title { + border-bottom: 1px solid #6d6d6d; +} + +.customize-section.open .customize-section-content { + display: block; + background: #fdfdfd; +} + +.customize-section-title:after { + content: ''; + width: 0; + height: 0; + border-color: #ccc transparent; + border-style: solid; + border-width: 6px 6px 0; + position: absolute; + top: 25px; + right: 20px; + z-index: 1; +} + +.cannot-expand .customize-section-title:after { + display: none; +} + +.customize-section-title:hover:after { + border-color: #aaa transparent; +} + +.control-section .customize-section-title:hover:after { + border-color: #eee transparent; +} + +.control-section .customize-section-title:after { + top: 15px; +} + +#customize-info .customize-section-content { + background: transparent; +} + +#customize-info .preview-notice { + font-size: 13px; + line-height: 24px; + color: #999; +} + +#customize-info .theme-name { + font-size: 20px; + font-weight: 200; + line-height: 24px; + color: #333; + display: block; + text-shadow: 0 1px 0 #fff; +} + +#customize-info .theme-screenshot { + width: 258px; + border: 1px solid #ccc; +} + +#customize-info .theme-description { + margin-top: 1em; + color: #777; + line-height: 20px; +} + +#customize-controls .submit { + text-align: center; +} + +#customize-theme-controls > ul, +#customize-theme-controls .customize-section-content { + margin: 0; +} + +#customize-header-actions .button-primary { + float: right; + margin-top: 11px; +} + +#customize-header-actions img { + display: none; + float: right; + margin-top: 13px; + margin-right: 4px; +} + +.saving #customize-header-actions img { + display: block; +} + +.customize-control { + width: 100%; + float: left; + clear: both; + margin-bottom: 8px; +} + +.customize-control-title { + display: block; + line-height: 24px; + font-weight: bold; +} + +.customize-control select, +.customize-control input[type="text"], +.customize-control input[type="radio"], +.customize-control input[type="checkbox"], +.customize-control-color .color-picker, +.customize-control-checkbox label, +.customize-control-upload div { + line-height: 28px; +} + +.customize-control input[type="text"] { + width: 98%; + line-height: 18px; + margin: 0; +} + +.customize-control select { + min-width: 50%; + max-width: 100%; + height: 28px; + line-height: 28px; +} + +.customize-control-checkbox input { + margin-right: 5px; +} + +.customize-control-radio { + padding: 5px 0 10px; +} + +.customize-control-radio .customize-control-title { + margin-bottom: 0; + line-height: 22px; +} + +.customize-control-radio label { + line-height: 20px; +} + +.customize-control-radio input { + margin-right: 5px; +} + +#customize-preview iframe { + width: 100%; + height: 100%; +} + +/* + * Style for custom settings + */ + +/* + * Dropdowns + */ +.customize-section .dropdown { + float: left; + display: block; + position: relative; + cursor: pointer; + + -webkit-border-radius: 3px; + border-radius: 3px; +} + +.customize-section .dropdown-content { + overflow: hidden; + float: left; + min-width: 30px; + height: 16px; + line-height: 16px; + margin-right: 16px; + padding: 4px 5px; + background-color: #eee; + border: 1px solid #ccc; + -webkit-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; + + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; +} + +.customize-control .dropdown-arrow { + position: absolute; + top: 0; + bottom: 0; + right: 0; + width: 15px; + + border-color: #ccc; + border-style: solid; + border-width: 1px 1px 1px 0; + -webkit-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} + +.customize-control .dropdown-arrow:after { + content: ''; + width: 0; + height: 0; + border-color: #ccc transparent; + border-style: solid; + border-width: 4px 4px 0 4px; + position: absolute; + top: 50%; + margin-top: -1px; + right: 4px; + z-index: 1; +} + +.customize-section .dropdown:hover .dropdown-content, +.customize-control .dropdown:hover .dropdown-arrow { + border-color: #aaa; +} + +.customize-section .dropdown:hover .dropdown-arrow:after { + border-color: #aaa transparent; +} + +.customize-control .dropdown-status { + display: none; + max-width: 112px; + color: #777; +} + +/* + * Color Picker + */ +.customize-control-color .color-picker-hex, +.customize-control-color .farbtastic-placeholder { + display: none; +} + +.customize-control-color.open .color-picker-hex, +.customize-control-color.open .farbtastic-placeholder { + display: block; +} + +.customize-control-color .dropdown { + margin-right: 5px; + margin-bottom: 5px; +} + +.customize-control-color .dropdown .dropdown-content { + background-color: #fff; + border: 1px solid rgba( 0, 0, 0, 0.15 ); +} + +.customize-control-color .dropdown:hover .dropdown-content { + border-color: rgba( 0, 0, 0, 0.25 ); +} + +.customize-section input[type="text"].color-picker-hex { + float: left; + width: 85px; + font-family: monospace; + text-align: center; +} + +/* The centered cursor overlaps the placeholder in webkit. Hide it when selected. */ +.customize-section input[type="text"].color-picker-hex:focus::-webkit-input-placeholder { + color: transparent; +} +.customize-section input[type="text"].color-picker-hex:-moz-placeholder { + color: #999; +} + +.customize-control-color .farbtastic-placeholder { + width: 100%; + margin: 5px 0 10px; + float: left; +} + +.customize-control-color .farbtastic { + margin: 0 auto; +} + +/* + * Image Picker + */ +.customize-control-image .library, +.customize-control-image .actions { + display: none; + float: left; + width: 100%; +} + +.customize-control-image.open .library, +.customize-control-image.open .actions { + display: block; +} + +.customize-section .customize-control-image .dropdown-content { + height: auto; + min-height: 24px; + min-width: 40px; + padding: 0; +} + +.customize-section .customize-control-image .dropdown-status { + padding: 4px 5px; +} + +.customize-section .customize-control-image .preview-thumbnail img { + display: block; + width: 100%; + max-width: 122px; + max-height: 98px; + margin: 0 auto; +} + +.customize-section .customize-control-image .actions { + text-align: right; +} + +.customize-section .customize-control-image .library ul { + border-bottom: 1px solid #dfdfdf; + float: left; + width: 100%; + margin: 10px 0 0; +} + +.customize-section .customize-control-image .library li { + color: #999; + float: left; + padding: 3px 5px; + margin: 0; + border-style: solid; + border-color: transparent; + border-width: 1px 1px 0 1px; +} + +.customize-section .customize-control-image .library li.library-selected { + margin-bottom: -1px; + padding-bottom: 4px; + + color: #777; + background: #fdfdfd; + border-color: #dfdfdf; + -webkit-border-radius: 3px 3px 0 0; + border-radius: 3px 3px 0 0 ; +} + +.customize-section .customize-control-image .library-content { + display: none; + width: 100%; + float: left; + padding: 10px 0; +} + +.customize-section .customize-control-image .library-content.library-selected { + display: block; +} + +.customize-section .customize-control-image .library .thumbnail { + display: block; + width: 100%; +} + +.customize-section .customize-control-image .library .thumbnail:hover img { + border-color: #21759b; +} + +.customize-section .customize-control-image .library .thumbnail img { + display: block; + max-width: 90%; + max-height: 80px; + + margin: 5px auto; + padding: 4px; + background: #fff; + border: 1px solid #dfdfdf; +} + +.customize-section .customize-control-upload .upload-fallback, +.customize-section .customize-control-image .upload-fallback { + display: none; +} + +.customize-section .customize-control-upload .upload-dropzone, +.customize-section .customize-control-image .upload-dropzone { + display: none; + padding: 15px 10px; + border: 3px dashed #dfdfdf; + margin: 5px auto; + text-align: center; + color: #777; + position: relative; + cursor: default; +} + +.customize-section .customize-control-upload .upload-dropzone.supports-drag-drop, +.customize-section .customize-control-image .upload-dropzone.supports-drag-drop { + display: block; + -webkit-transition: border-color 0.1s; + -moz-transition: border-color 0.1s; + -ms-transition: border-color 0.1s; + -o-transition: border-color 0.1s; + transition: border-color 0.1s; +} + +.customize-section .customize-control-upload .library ul li, +.customize-section .customize-control-image .library ul li { + cursor: pointer; +} + +.customize-section .customize-control-upload .upload-dropzone.supports-drag-drop.drag-over, +.customize-section .customize-control-image .upload-dropzone.supports-drag-drop.drag-over { + border-color: #83b4d8; +} + +/** + * iOS can't scroll iframes, + * instead it expands the iframe size to match the size of the content + */ +.ios .wp-full-overlay { + position: relative; +} + +.ios #customize-preview { + position: relative; +} + +.ios #customize-controls .wp-full-overlay-sidebar-content { + -webkit-overflow-scrolling: touch; +} + +/** + * Handle cheaters. + */ +body.cheatin { + min-width: 0; + background: #f9f9f9; + padding: 50px; +} + +body.cheatin p { + max-width: 700px; + margin: 0 auto; + padding: 2em; + font-size: 14px; + + background: #fff; + border: 1px solid #dfdfdf; + + -webkit-border-radius: 3px; + border-radius: 3px; +} \ No newline at end of file diff --git a/wp-admin/css/farbtastic.css b/wp-admin/css/farbtastic.css index 1022b71a..ef1129c0 100644 --- a/wp-admin/css/farbtastic.css +++ b/wp-admin/css/farbtastic.css @@ -40,7 +40,6 @@ background: url(../images/marker.png) no-repeat; } - /* farbtastic-rtl */ .rtl .farbtastic .color, .rtl .farbtastic .overlay { @@ -51,5 +50,3 @@ .rtl .farbtastic .marker { margin: -8px -8px 0 0; } - - diff --git a/wp-admin/css/ie-rtl.css b/wp-admin/css/ie-rtl.css index 274306d2..47dd4e5b 100644 --- a/wp-admin/css/ie-rtl.css +++ b/wp-admin/css/ie-rtl.css @@ -1 +1 @@ -body{direction:rtl;width:99.5%;}.rtl #adminmenuback{left:auto;right:0;background-image:none;}.rtl #adminmenuback,.rtl #adminmenuwrap{border-width:0 0 0 1px;}#plupload-upload-ui{zoom:1;}.post-com-count-wrapper a.post-com-count{float:none;}#adminmenu .wp-submenu ul{width:99%;}#adminmenu .wp-submenu .wp-submenu .wp-submenu-wrap,#adminmenu .wp-menu-open .wp-submenu .wp-submenu-wrap{border:1px solid #dfdfdf;}.folded #adminmenu .wp-submenu{right:30px;top:-4px;}#adminmenu .wp-submenu .wp-submenu-head{padding:6px 10px 6px 4px;}#adminmenu .wp-menu-arrow{display:none!important;}#wpcontent #adminmenu .wp-submenu li.wp-submenu-head{padding:3px 10px 4px 4px;}div.quicktags-toolbar input{min-width:0;}.inline-edit-row fieldset label span.title{float:right;}.inline-edit-row fieldset label span.input-text-wrap{margin-right:0;}p.search-box{float:left;}#bh{margin:7px 10px 0 0;float:left;}.postbox div.inside,.wp-editor-wrap .wp-editor-container .wp-editor-area,#nav-menu-theme-locations .howto select{width:97.5%;}div#dashboard-widgets{padding-right:0;padding-left:1px;}#dashboard_quick_press h4{text-align:right;}.tagchecklist span a{margin:4px -9px 0 0;}.widefat th input{margin:0 5px 0 0;}#TB_window{width:670px;position:absolute;top:50%;left:50%;margin-right:335px!important;}#dashboard_plugins{direction:ltr;}#dashboard_plugins h3.hndle{direction:rtl;}#dashboard_incoming_links ul li,#dashboard_secondary ul li,#dashboard_primary ul li,p.row-actions{width:100%;}#post-status-info{height:25px;}p.submit{height:22px;}.inner-sidebar{position:static;}form#widgets-filter{position:static;}.menu-item-depth-0{margin-left:0;}.menu-item-depth-1{margin-left:-30px;}.menu-item-depth-2{margin-left:-60px;}.menu-item-depth-3{margin-left:-90px;}.menu-item-depth-4{margin-left:-120px;}.menu-item-depth-5{margin-left:-150px;}.menu-item-depth-6{margin-left:-180px;}.menu-item-depth-7{margin-left:-210px;}.menu-item-depth-8{margin-left:-240px;}.menu-item-depth-9{margin-left:-270px;}.menu-item-depth-10{margin-left:-300px;}.menu-item-depth-11{margin-left:-330px;}#menu-management,.nav-menus-php .menu-edit,#nav-menu-header .submitbox{zoom:1;}.nav-menus-php label{max-width:90%!important;}p.button-controls,.nav-menus-php .tabs-panel{max-width:90%;}.nav-menus-php .major-publishing-actions .publishing-action{float:none;}#wpbody #nav-menu-header label{float:none;}#nav-menu-header{margin-top:-10px;}#nav-menu-footer{margin-bottom:-20px;}#update-nav-menu .publishing-action{max-width:200px;}#nav-menus-frame #update-nav-menu .delete-action{margin-top:-25px;float:left;}#menu-to-edit li{margin-top:-10px;margin-bottom:-10px;}.sortable-placeholder{margin-top:0!important;margin-left:0!important;margin-bottom:13px!important;padding:0!important;}.auto-add-pages{clear:both;float:none;}#nav-menus-frame .open-label span{float:none;display:inline-block;}#nav-menus-frame .delete-action{float:none;} \ No newline at end of file +body{direction:rtl;width:99.5%}.rtl #adminmenuback{left:auto;right:0;background-image:none}.rtl #adminmenuback,.rtl #adminmenuwrap{border-width:0 0 0 1px}#plupload-upload-ui{zoom:1}.post-com-count-wrapper a.post-com-count{float:none}#adminmenu .wp-submenu ul{width:99%}#adminmenu .wp-submenu .wp-submenu .wp-submenu-wrap,#adminmenu .wp-menu-open .wp-submenu .wp-submenu-wrap{border:1px solid #dfdfdf}.folded #adminmenu .wp-submenu{right:30px;top:-4px}#adminmenu .wp-submenu .wp-submenu-head{padding:6px 10px 6px 4px}#adminmenu .wp-menu-arrow{display:none!important}#wpcontent #adminmenu .wp-submenu li.wp-submenu-head{padding:3px 10px 4px 4px}div.quicktags-toolbar input{min-width:0}.inline-edit-row fieldset label span.title{float:right}.inline-edit-row fieldset label span.input-text-wrap{margin-right:0}p.search-box{float:left}#bh{margin:7px 10px 0 0;float:left}.postbox div.inside,.wp-editor-wrap .wp-editor-container .wp-editor-area,#nav-menu-theme-locations .howto select{width:97.5%}div#dashboard-widgets{padding-right:0;padding-left:1px}#dashboard_quick_press h4{text-align:right}.tagchecklist span a{margin:4px -9px 0 0}.widefat th input{margin:0 5px 0 0}#TB_window{width:670px;position:absolute;top:50%;left:50%;margin-right:335px!important}#dashboard_plugins{direction:ltr}#dashboard_plugins h3.hndle{direction:rtl}#dashboard_incoming_links ul li,#dashboard_secondary ul li,#dashboard_primary ul li,p.row-actions{width:100%}#post-status-info{height:25px}p.submit{height:22px}form#widgets-filter{position:static}.menu-item-depth-0{margin-left:0}.menu-item-depth-1{margin-left:-30px}.menu-item-depth-2{margin-left:-60px}.menu-item-depth-3{margin-left:-90px}.menu-item-depth-4{margin-left:-120px}.menu-item-depth-5{margin-left:-150px}.menu-item-depth-6{margin-left:-180px}.menu-item-depth-7{margin-left:-210px}.menu-item-depth-8{margin-left:-240px}.menu-item-depth-9{margin-left:-270px}.menu-item-depth-10{margin-left:-300px}.menu-item-depth-11{margin-left:-330px}#menu-management,.nav-menus-php .menu-edit,#nav-menu-header .submitbox{zoom:1}.nav-menus-php label{max-width:90%!important}p.button-controls,.nav-menus-php .tabs-panel{max-width:90%}.nav-menus-php .major-publishing-actions .publishing-action{float:none}#wpbody #nav-menu-header label{float:none}#nav-menu-header{margin-top:-10px}#nav-menu-footer{margin-bottom:-20px}#update-nav-menu .publishing-action{max-width:200px}#nav-menus-frame #update-nav-menu .delete-action{margin-top:-25px;float:left}#menu-to-edit li{margin-top:-10px;margin-bottom:-10px}.sortable-placeholder{margin-top:0!important;margin-left:0!important;margin-bottom:13px!important;padding:0!important}.auto-add-pages{clear:both;float:none}#nav-menus-frame .open-label span{float:none;display:inline-block}#nav-menus-frame .delete-action{float:none} \ No newline at end of file diff --git a/wp-admin/css/ie-rtl.dev.css b/wp-admin/css/ie-rtl.dev.css index 78417d7d..16357de5 100644 --- a/wp-admin/css/ie-rtl.dev.css +++ b/wp-admin/css/ie-rtl.dev.css @@ -126,10 +126,6 @@ p.submit { /* quick edit and reply in edit-comments.php */ height:22px; } -.inner-sidebar { /* fix edit single comment */ - position: static; -} - form#widgets-filter { /* fix widget page */ position: static; } @@ -241,4 +237,3 @@ p.button-controls, #nav-menus-frame .delete-action { float: none; } - diff --git a/wp-admin/css/ie.css b/wp-admin/css/ie.css index d8c9a5e0..ec4709cd 100644 --- a/wp-admin/css/ie.css +++ b/wp-admin/css/ie.css @@ -1 +1 @@ -.welcome-panel .wp-badge{position:absolute;}.welcome-panel .welcome-panel-column{margin:0 -25px 0 4%;}#wp-fullscreen-title{width:97%;}#wp_mce_fullscreen_ifr{background-color:#f9f9f9;}#wp-fullscreen-tagline{color:#888;font-size:14px;}#adminmenushadow{display:none;}#adminmenuback{left:0;background-image:none;}#adminmenuwrap{position:static;}#adminmenu{position:relative;}#adminmenu li.wp-menu-separator,#adminmenu li.wp-menu-separator-last{font-size:1px;line-height:1;}#adminmenu a.menu-top{border-bottom:0 none;border-top:1px solid #ddd;}#adminmenu .separator{font-size:1px;line-height:1px;}#adminmenu .wp-submenu ul{margin:0;}.folded #adminmenu .wp-submenu ul{margin-left:5px;}#adminmenu li.menu-top{margin-bottom:-2px;}#adminmenu li.wp-not-current-submenu:hover .wp-menu-arrow{display:none;}#wpcontent #adminmenu .wp-submenu li.wp-submenu-head{padding:3px 4px 4px 10px;zoom:100%;}.js.folded #adminmenu .menu-top{height:30px;}.js.folded #adminmenu .wp-submenu{margin:-1px 0 0 0;}.js.folded #adminmenu li.menu-top{display:block;zoom:100%;}ul#adminmenu{z-index:99;}#adminmenu li.menu-top a.menu-top{min-width:auto;width:auto;}#wpcontent #adminmenu li.wp-has-current-submenu a.wp-has-submenu{font-style:normal;}#wpcontent #adminmenu .wp-submenu li{padding:0;}#collapse-menu{line-height:23px;}#wpadminbar .ab-comments-icon{padding-top:7px;}table.fixed th,table.fixed td{border-top:1px solid #ddd;}#wpbody-content input.button,#wpbody-content input.button-primary,#wpbody-content input.button-secondary,#wpbody-content input.button-highlighted{overflow:visible;}#dashboard-widgets #dashboard_quick_press form p.submit #publish{float:none;}#dashboard-widgets h3 a{height:14px;line-height:14px;}#dashboard_browser_nag{color:#fff;}#dashboard_browser_nag .browser-icon{position:relative;}.tablenav-pages .current-page{vertical-align:middle;}#wpbody-content .postbox{border:1px solid #dfdfdf;}#wpbody-content .postbox h3{margin-bottom:-1px;}.major-publishing-actions,.wp-submenu,.wp-submenu li,.wp-menu-toggle,#template,#template div,#editcat,#addcat{zoom:100%;}.wp-menu-arrow{height:28px;}.submitbox{margin-top:10px;}#wpbody-content .quick-edit-row-post .inline-edit-col-left{width:39%;}#wpbody-content .inline-edit-row-post .inline-edit-col-center{width:19%;}#wpbody-content .quick-edit-row-page .inline-edit-col-left{width:49%;}#wpbody-content .bulk-edit-row .inline-edit-col-left{width:29%;}.inline-edit-row p.submit{zoom:100%;}.inline-edit-row fieldset label span.title{display:block;float:left;width:5em;}.inline-edit-row fieldset label span.input-text-wrap{margin-left:0;zoom:100%;}#wpbody-content .inline-edit-row fieldset label span.input-text-wrap input{line-height:130%;}#wpbody-content .inline-edit-row .input-text-wrap input{width:95%;}#wpbody-content .inline-edit-row .input-text-wrap input.inline-edit-password-input{width:8em;}#titlediv #title{width:98%;}a.button{line-height:1.4em;margin:1px;padding:2px 6px;}#screen-options-wrap{overflow:hidden;}#the-comment-list .comment-item,#post-status-info,#wpwrap,#wrap,#postdivrich,#postdiv,#poststuff,.metabox-holder,#titlediv,#post-body,#editorcontainer,.tablenav,.widget-liquid-left,.widget-liquid-right,#widgets-left,.widgets-sortables,#dragHelper,.widget .widget-top,.widget,.widget-control-actions,.tagchecklist,#col-container,#col-left,#col-right,.fileedit-sub{display:block;zoom:100%;}p.search-box{position:static;float:right;margin:-3px 0 4px;}#editorcontainer #content{overflow:auto;margin:auto;width:98%;}form#template div{width:100%;}#ed_toolbar input,#ed_reply_toolbar input{overflow:visible;padding:0 4px;}#poststuff h2{font-size:1.6em;}#bh{margin:7px 10px 0 0;float:right;}div#dashboard-widgets{padding-right:1px;}.tagchecklist span,.tagchecklist span a{display:inline-block;display:block;}.tagchecklist span a{margin:4px 0 0 -9px;}.tablenav .button-secondary,.nav .button-secondary{padding-top:2px;padding-bottom:2px;}.tablenav select{font-size:13px;display:inline-block;vertical-align:top;margin-top:2px;}.tablenav .actions select{width:155px;}table.ie-fixed{table-layout:fixed;}.widefat tr,.widefat th{margin-bottom:0;border-spacing:0;}.widefat th input{margin:0 0 0 5px;}.widefat .check-column{padding:6px 0 2px;}.widefat tbody th.check-column{padding:4px 0 22px;}.widefat{empty-cells:show;border-collapse:collapse;}.tablenav a.button-secondary{display:inline-block;padding:2px 5px;}.inactive-sidebar .widgets-sortables{padding-bottom:8px;}#available-widgets .widget-holder{padding-bottom:65px;}#widgets-left .inactive{padding-bottom:10px;}.widget-liquid-right .widget,.inactive-sidebar .widget{position:relative;}#wpcontent .button-primary-disabled{color:#9FD0D5;background:#298CBA;}#wpcontent #ajax-loading,#wpcontent .ajax-loading{vertical-align:baseline;}#the-comment-list .unapproved tr,#the-comment-list .unapproved td{background-color:#ffffe0;}.imgedit-submit{width:300px;}#nav-menus-frame,#wpbody,.menu li{zoom:100%;}#update-nav-menu #post-body{overflow:hidden;}.menu li{min-width:100%;}.menu li.sortable-placeholder{min-width:400px;}.about-wrap img.element-screenshot{padding:2px;}.about-wrap .feature-section img,.about-wrap .feature-section .image-mask{border-width:1px;border-style:solid;}.about-wrap .feature-section.three-col img{margin-left:0;}* html .row-actions{visibility:visible;}* html div.widget-liquid-left,* html div.widget-liquid-right{display:block;position:relative;}* html #editorcontainer{padding:0;}* html #poststuff h2{margin-left:0;}* html .stuffbox,* html .stuffbox input,* html .stuffbox textarea{border:1px solid #DFDFDF;}* html .feature-filter .feature-group li{width:145px;}* html .widget-top .widget-title-action a{background:url("../images/menu-bits.gif?ver=20100610") no-repeat scroll 0 -110px;}* html div.widget-liquid-left{width:99%;}* html .widgets-sortables{height:50px;}* html a#content_resize{right:-2px;}* html .widget-title h4{width:205px;}* html #removing-widget .in-widget-title{display:none;}* html .media-item .pinkynail{height:32px;width:40px;}* html .describe .field input.text,* html .describe .field textarea{width:440px;}* html input{border:1px solid #dfdfdf;}* 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;}* html #wpbody-content #screen-options-link-wrap{display:inline-block;width:150px;text-align:center;}* html #wpbody-content #contextual-help-link-wrap{display:inline-block;width:100px;text-align:center;}* html #adminmenu{margin-left:-80px;}* html .folded #adminmenu{margin-left:-22px;}* html #wpcontent #adminmenu li.menu-top{display:inline;padding:0;margin:0;}* html #footer{margin:0;}* html #wpcontent #adminmenu .wp-menu-open .wp-menu-toggle{background:none;}* html #wpcontent #adminmenu .wp-has-submenu .wp-menu-toggle{background:url(../images/menu-bits.gif?ver=20100610) no-repeat scroll left -109px;}* html #wpcontent #adminmenu li.wp-has-current-submenu .wp-menu-toggle{background:url(../images/menu-bits.gif?ver=20100610) no-repeat scroll left -206px;}* html #adminmenu div.wp-menu-image{height:29px;} \ No newline at end of file +.wp-editor-wrap .wp-editor-container textarea.wp-editor-area{width:97%}#post-body.columns-2 #postbox-container-1{padding-left:19px}.welcome-panel .wp-badge{position:absolute}.welcome-panel .welcome-panel-column{margin:0 -25px 0 4%}#wp-fullscreen-title{width:97%}#wp_mce_fullscreen_ifr{background-color:#f9f9f9}#wp-fullscreen-tagline{color:#888;font-size:14px}#adminmenushadow{display:none}#adminmenuback{left:0;background-image:none}#adminmenuwrap{position:static}#adminmenu{position:relative}#adminmenu li.wp-menu-separator,#adminmenu li.wp-menu-separator-last{font-size:1px;line-height:1}#adminmenu a.menu-top{border-bottom:0 none;border-top:1px solid #ddd}#adminmenu .separator{font-size:1px;line-height:1px}#adminmenu .wp-submenu ul{margin:0}.folded #adminmenu .wp-submenu ul{margin-left:5px}#adminmenu li.menu-top{margin-bottom:-2px}#adminmenu li.wp-not-current-submenu:hover .wp-menu-arrow{display:none}#wpcontent #adminmenu .wp-submenu li.wp-submenu-head{padding:3px 4px 4px 10px;zoom:100%}.js.folded #adminmenu .menu-top{height:30px}.js.folded #adminmenu .wp-submenu{margin:-1px 0 0 0}.js.folded #adminmenu li.menu-top{display:block;zoom:100%}ul#adminmenu{z-index:99}#adminmenu li.menu-top a.menu-top{min-width:auto;width:auto}#wpcontent #adminmenu li.wp-has-current-submenu a.wp-has-submenu{font-style:normal}#wpcontent #adminmenu .wp-submenu li{padding:0}#collapse-menu{line-height:23px}#wpadminbar .ab-comments-icon{padding-top:7px}table.fixed th,table.fixed td{border-top:1px solid #ddd}#wpbody-content input.button,#wpbody-content input.button-primary,#wpbody-content input.button-secondary,#wpbody-content input.button-highlighted{overflow:visible}#dashboard-widgets #dashboard_quick_press form p.submit #publish{float:none}#dashboard-widgets h3 a{height:14px;line-height:14px}#dashboard_browser_nag{color:#fff}#dashboard_browser_nag .browser-icon{position:relative}.tablenav-pages .current-page{vertical-align:middle}#wpbody-content .postbox{border:1px solid #dfdfdf}#wpbody-content .postbox h3{margin-bottom:-1px}.major-publishing-actions,.wp-submenu,.wp-submenu li,.wp-menu-toggle,#template,#template div,#editcat,#addcat{zoom:100%}.wp-menu-arrow{height:28px}.submitbox{margin-top:10px}#wpbody-content .quick-edit-row-post .inline-edit-col-left{width:39%}#wpbody-content .inline-edit-row-post .inline-edit-col-center{width:19%}#wpbody-content .quick-edit-row-page .inline-edit-col-left{width:49%}#wpbody-content .bulk-edit-row .inline-edit-col-left{width:29%}.inline-edit-row p.submit{zoom:100%}.inline-edit-row fieldset label span.title{display:block;float:left;width:5em}.inline-edit-row fieldset label span.input-text-wrap{margin-left:0;zoom:100%}#wpbody-content .inline-edit-row fieldset label span.input-text-wrap input{line-height:130%}#wpbody-content .inline-edit-row .input-text-wrap input{width:95%}#wpbody-content .inline-edit-row .input-text-wrap input.inline-edit-password-input{width:8em}#titlediv #title{width:98%}a.button{line-height:1.4em;margin:1px;padding:2px 6px}#screen-options-wrap{overflow:hidden}#the-comment-list .comment-item,#post-status-info,#wpwrap,#wrap,#postdivrich,#postdiv,#poststuff,.metabox-holder,#titlediv,#post-body,#editorcontainer,.tablenav,.widget-liquid-left,.widget-liquid-right,#widgets-left,.widgets-sortables,#dragHelper,.widget .widget-top,.widget,.widget-control-actions,.tagchecklist,#col-container,#col-left,#col-right,.fileedit-sub{display:block;zoom:100%}p.search-box{position:static;float:right;margin:-3px 0 4px}#editorcontainer #content{overflow:auto;margin:auto;width:98%}form#template div{width:100%}.wp-editor-container .quicktags-toolbar input{overflow:visible;padding:0 4px}#poststuff h2{font-size:1.6em}#bh{margin:7px 10px 0 0;float:right}div#dashboard-widgets{padding-right:1px}.tagchecklist span,.tagchecklist span a{display:inline-block;display:block}.tagchecklist span a{margin:4px 0 0 -9px}.tablenav .button-secondary,.nav .button-secondary{padding-top:2px;padding-bottom:2px}.tablenav select{font-size:13px;display:inline-block;vertical-align:top;margin-top:2px}.tablenav .actions select{width:155px}table.ie-fixed{table-layout:fixed}.widefat tr,.widefat th{margin-bottom:0;border-spacing:0}.widefat th input{margin:0 0 0 5px}.widefat .check-column{padding:6px 0 2px}.widefat tbody th.check-column{padding:4px 0 22px}.widefat{empty-cells:show;border-collapse:collapse}.tablenav a.button-secondary{display:inline-block;padding:2px 5px}.inactive-sidebar .widgets-sortables{padding-bottom:8px}#available-widgets .widget-holder{padding-bottom:65px}#widgets-left .inactive{padding-bottom:10px}.widget-liquid-right .widget,.inactive-sidebar .widget{position:relative}#wpcontent .button-primary-disabled{color:#9fd0d5;background:#298cba}#wpcontent #ajax-loading,#wpcontent .ajax-loading{vertical-align:baseline}#the-comment-list .unapproved tr,#the-comment-list .unapproved td{background-color:#ffffe0}.imgedit-submit{width:300px}#nav-menus-frame,#wpbody,.menu li{zoom:100%}#update-nav-menu #post-body{overflow:hidden}.menu li{min-width:100%}.menu li.sortable-placeholder{min-width:400px}.about-wrap img.element-screenshot{padding:2px}.about-wrap .feature-section img,.about-wrap .feature-section .image-mask{border-width:1px;border-style:solid}.about-wrap .feature-section.three-col img{margin-left:0}.available-theme{display:inline}.available-theme ul{margin:0}.about-wrap .three-col-images img{margin:0 .6% 10px}.about-wrap .three-col-images .last-feature,.about-wrap .three-col-images .first-feature{float:none}* html .row-actions{visibility:visible}* html div.widget-liquid-left,* html div.widget-liquid-right{display:block;position:relative}* html #editorcontainer{padding:0}* html #poststuff h2{margin-left:0}* html .stuffbox,* html .stuffbox input,* html .stuffbox textarea{border:1px solid #dfdfdf}* html .feature-filter .feature-group li{width:145px}* html .widget-top .widget-title-action a{background:url("../images/menu-bits.gif?ver=20100610") no-repeat scroll 0 -110px}* html div.widget-liquid-left{width:99%}* html .widgets-sortables{height:50px}* html a#content_resize{right:-2px}* html .widget-title h4{width:205px}* html #removing-widget .in-widget-title{display:none}* html .media-item .pinkynail{height:32px;width:40px}* html .describe .field input.text,* html .describe .field textarea{width:440px}* html input{border:1px solid #dfdfdf}* 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 .postbox-container .meta-box-sortables{height:300px}* html #wpbody-content #screen-options-link-wrap{display:inline-block;width:150px;text-align:center}* html #wpbody-content #contextual-help-link-wrap{display:inline-block;width:100px;text-align:center}* html #adminmenu{margin-left:-80px}* html .folded #adminmenu{margin-left:-22px}* html #wpcontent #adminmenu li.menu-top{display:inline;padding:0;margin:0}* html #footer{margin:0}* html #wpcontent #adminmenu .wp-menu-open .wp-menu-toggle{background:0}* html #wpcontent #adminmenu .wp-has-submenu .wp-menu-toggle{background:url(../images/menu-bits.gif?ver=20100610) no-repeat scroll left -109px}* html #wpcontent #adminmenu li.wp-has-current-submenu .wp-menu-toggle{background:url(../images/menu-bits.gif?ver=20100610) no-repeat scroll left -206px}* html #adminmenu div.wp-menu-image{height:29px} \ No newline at end of file diff --git a/wp-admin/css/ie.dev.css b/wp-admin/css/ie.dev.css index fa9f12ba..b14f5586 100644 --- a/wp-admin/css/ie.dev.css +++ b/wp-admin/css/ie.dev.css @@ -1,4 +1,13 @@ -/* Fixes for IE bugs */ +/* Fixes for IE 7 bugs */ + +.wp-editor-wrap .wp-editor-container textarea.wp-editor-area { + width: 97%; +} + +#post-body.columns-2 #postbox-container-1 { + padding-left: 19px; +} + .welcome-panel .wp-badge { position: absolute; } @@ -277,8 +286,7 @@ form#template div { width: 100%; } -#ed_toolbar input, -#ed_reply_toolbar input { +.wp-editor-container .quicktags-toolbar input { overflow: visible; padding: 0 4px; } @@ -371,8 +379,6 @@ table.ie-fixed { position: relative; } - - #wpcontent .button-primary-disabled { color: #9FD0D5; background: #298CBA; @@ -424,6 +430,22 @@ table.ie-fixed { margin-left: 0; } +.available-theme { + display: inline; +} + +.available-theme ul { + margin: 0; +} + +.about-wrap .three-col-images img { + margin: 0 0.6% 10px; +} + +.about-wrap .three-col-images .last-feature, +.about-wrap .three-col-images .first-feature { + float: none; +} /* IE6 leftovers */ * html .row-actions { @@ -500,7 +522,6 @@ table.ie-fixed { display: inline; } -* html .inner-sidebar #side-sortables, * html .postbox-container .meta-box-sortables { height: 300px; } @@ -550,4 +571,3 @@ table.ie-fixed { * html #adminmenu div.wp-menu-image { height: 29px; } - diff --git a/wp-admin/css/install.css b/wp-admin/css/install.css index 868b9810..184969b0 100644 --- a/wp-admin/css/install.css +++ b/wp-admin/css/install.css @@ -1 +1 @@ -html{background:#f9f9f9;}body{background:#fff;color:#333;font-family:sans-serif;margin:2em auto;padding:1em 2em;-webkit-border-radius:3px;border-radius:3px;border:1px solid #dfdfdf;max-width:700px;}a{color:#21759B;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:30px 0 0 0;padding:0;padding-bottom:7px;}h2{font-size:16px;}p,li,dd,dt{padding-bottom:2px;font-size:14px;line-height:1.5;}code,.code{font-size:14px;}ul,ol,dl{padding:5px 5px 5px 22px;}a img{border:0;}abbr{border:0;font-variant:normal;}#logo{margin:6px 0 14px 0;border-bottom:none;text-align:center;}.step{margin:20px 0 15px;}.step,th{text-align:left;padding:0;}.submit input,.button,.button-secondary{font-family:sans-serif;text-decoration:none;font-size:14px!important;line-height:16px;padding:6px 12px;cursor:pointer;border:1px solid #bbb;color:#464646;-webkit-border-radius:15px;border-radius:15px;-moz-box-sizing:content-box;-webkit-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;}textarea{border:1px solid #dfdfdf;-webkit-border-radius:3px;border-radius:3px;font-family:sans-serif;width:695px;}.form-table{border-collapse:collapse;margin-top:1em;width:100%;}.form-table td{margin-bottom:9px;padding:10px 20px 10px 0;border-bottom:8px solid #fff;font-size:14px;vertical-align:top;}.form-table th{font-size:14px;text-align:left;padding:16px 20px 10px 0;border-bottom:8px solid #fff;width:140px;vertical-align:top;}.form-table code{line-height:18px;font-size:14px;}.form-table p{margin:4px 0 0 0;font-size:11px;}.form-table input{line-height:20px;font-size:15px;padding:2px;border:1px #DFDFDF solid;-webkit-border-radius:3px;border-radius:3px;font-family:sans-serif;}.form-table input[type=text],.form-table input[type=password]{width:206px;}.form-table th p{font-weight:normal;}.form-table.install-success td{vertical-align:middle;padding:16px 20px 10px 0;}.form-table.install-success td p{margin:0;font-size:14px;}.form-table.install-success td code{margin:0;font-size:18px;}#error-page{margin-top:50px;}#error-page p{font-size:14px;line-height:18px;margin:25px 0 20px;}#error-page code,.code{font-family:Consolas,Monaco,monospace;}#pass-strength-result{background-color:#eee;border-color:#ddd!important;border-style:solid;border-width:1px;margin:5px 5px 5px 0;padding:5px;text-align:center;width:200px;display:none;}#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;}.message{border:1px solid #e6db55;padding:.3em .6em;margin:5px 0 15px;background-color:#ffffe0;}body.rtl{font-family:Tahoma,arial;}.rtl h1{font-family:arial;margin:5px -4px 0 0;}.rtl ul,.rtl ol{padding:5px 22px 5px 5px;}.rtl .step,.rtl th,.rtl .form-table th{text-align:right;}.rtl .submit input,.rtl .button,.rtl .button-secondary{margin-right:0;}.rtl #user_login,.rtl #admin_email,.rtl #pass1,.rtl #pass2{direction:ltr;} \ No newline at end of file +html{background:#f9f9f9}body{background:#fff;color:#333;font-family:sans-serif;margin:2em auto;padding:1em 2em;-webkit-border-radius:3px;border-radius:3px;border:1px solid #dfdfdf;max-width:700px}a{color:#21759b;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:30px 0 0 0;padding:0;padding-bottom:7px}h2{font-size:16px}p,li,dd,dt{padding-bottom:2px;font-size:14px;line-height:1.5}code,.code{font-size:14px}ul,ol,dl{padding:5px 5px 5px 22px}a img{border:0}abbr{border:0;font-variant:normal}#logo{margin:6px 0 14px 0;border-bottom:0;text-align:center}.step{margin:20px 0 15px}.step,th{text-align:left;padding:0}.submit input,.button,.button-secondary{font-family:sans-serif;text-decoration:none;font-size:14px!important;line-height:16px;padding:6px 12px;cursor:pointer;border:1px solid #bbb;color:#464646;-webkit-border-radius:15px;border-radius:15px;-moz-box-sizing:content-box;-webkit-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}textarea{border:1px solid #dfdfdf;-webkit-border-radius:3px;border-radius:3px;font-family:sans-serif;width:695px}.form-table{border-collapse:collapse;margin-top:1em;width:100%}.form-table td{margin-bottom:9px;padding:10px 20px 10px 0;border-bottom:8px solid #fff;font-size:14px;vertical-align:top}.form-table th{font-size:14px;text-align:left;padding:16px 20px 10px 0;border-bottom:8px solid #fff;width:140px;vertical-align:top}.form-table code{line-height:18px;font-size:14px}.form-table p{margin:4px 0 0 0;font-size:11px}.form-table input{line-height:20px;font-size:15px;padding:2px;border:1px #dfdfdf solid;-webkit-border-radius:3px;border-radius:3px;font-family:sans-serif}.form-table input[type=text],.form-table input[type=password]{width:206px}.form-table th p{font-weight:normal}.form-table.install-success td{vertical-align:middle;padding:16px 20px 10px 0}.form-table.install-success td p{margin:0;font-size:14px}.form-table.install-success td code{margin:0;font-size:18px}#error-page{margin-top:50px}#error-page p{font-size:14px;line-height:18px;margin:25px 0 20px}#error-page code,.code{font-family:Consolas,Monaco,monospace}#pass-strength-result{background-color:#eee;border-color:#ddd!important;border-style:solid;border-width:1px;margin:5px 5px 5px 0;padding:5px;text-align:center;width:200px;display:none}#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}.message{border:1px solid #e6db55;padding:.3em .6em;margin:5px 0 15px;background-color:#ffffe0}body.rtl{font-family:Tahoma,arial}.rtl h1{font-family:arial;margin:5px -4px 0 0}.rtl ul,.rtl ol{padding:5px 22px 5px 5px}.rtl .step,.rtl th,.rtl .form-table th{text-align:right}.rtl .submit input,.rtl .button,.rtl .button-secondary{margin-right:0}.rtl #dbname,.rtl #uname,.rtl #pwd,.rtl #dbhost,.rtl #prefix,.rtl #user_login,.rtl #admin_email,.rtl #pass1,.rtl #pass2{direction:ltr} \ No newline at end of file diff --git a/wp-admin/css/install.dev.css b/wp-admin/css/install.dev.css index 04ff488b..d77260a8 100644 --- a/wp-admin/css/install.dev.css +++ b/wp-admin/css/install.dev.css @@ -228,7 +228,6 @@ textarea { background-color: #ffffe0; } - /* install-rtl */ body.rtl { font-family: Tahoma, arial; @@ -240,7 +239,7 @@ body.rtl { } .rtl ul, -.rtl ol { +.rtl ol { padding: 5px 22px 5px 5px; } @@ -256,10 +255,14 @@ body.rtl { margin-right: 0; } +.rtl #dbname, +.rtl #uname, +.rtl #pwd, +.rtl #dbhost, +.rtl #prefix, .rtl #user_login, .rtl #admin_email, .rtl #pass1, .rtl #pass2 { direction: ltr; } - diff --git a/wp-admin/css/media-rtl.css b/wp-admin/css/media-rtl.css index d5f7ef55..5f51b606 100644 --- a/wp-admin/css/media-rtl.css +++ b/wp-admin/css/media-rtl.css @@ -1 +1 @@ -body#media-upload ul#sidemenu{left:auto;right:0;}#search-filter{text-align:left;}.align .field label{padding:0 23px 0 0;margin:0 3px 0 1em;}.image-align-none-label,.image-align-left-label,.image-align-center-label,.image-align-right-label{background-position:center right;}tr.image-size label{margin:0 5px 0 0;}.file-error{margin:0 50px 5px 0;}.progress{left:auto;right:0;}.describe td{padding:0 0 0 5px;}#media-upload .describe th.label{text-align:right;}.menu_order{float:left;}.media-upload-form label.form-help,td.help,#media-upload p.help,#media-upload label.help{font-family:Tahoma,Arial;}#gallery-settings #basic th.label{padding:5px 0 5px 5px;}#gallery-settings .title,h3.media-title{font-family:Tahoma,Arial;}#gallery-settings .describe th.label{text-align:right;}#gallery-settings label,#gallery-settings legend{margin-right:0;margin-left:15px;}#gallery-settings .align .field label{margin:0 3px 0 1em;}#sort-buttons{margin:3px 0 -8px 25px;text-align:left;}#sort-buttons #asc,#sort-buttons #showall{padding-left:0;padding-right:5px;}#sort-buttons span{margin-right:0;margin-left:25px;} \ No newline at end of file +body#media-upload ul#sidemenu{left:auto;right:0}#search-filter{text-align:left}.align .field label{padding:0 23px 0 0;margin:0 3px 0 1em}.image-align-none-label,.image-align-left-label,.image-align-center-label,.image-align-right-label{background-position:center right}tr.image-size label{margin:0 5px 0 0}.file-error{margin:0 50px 5px 0}.progress{left:auto;right:0}.describe td{padding:0 0 0 5px}#media-upload .describe th.label{text-align:right}.menu_order{float:left}.media-upload-form label.form-help,td.help,#media-upload p.help,#media-upload label.help{font-family:Tahoma,Arial}#gallery-settings #basic th.label{padding:5px 0 5px 5px}#gallery-settings .title,h3.media-title{font-family:Tahoma,Arial}#gallery-settings .describe th.label{text-align:right}#gallery-settings label,#gallery-settings legend{margin-right:0;margin-left:15px}#gallery-settings .align .field label{margin:0 3px 0 1em}#sort-buttons{margin:3px 0 -8px 25px;text-align:left}#sort-buttons #asc,#sort-buttons #showall{padding-left:0;padding-right:5px}#sort-buttons span{margin-right:0;margin-left:25px} \ No newline at end of file diff --git a/wp-admin/css/media.css b/wp-admin/css/media.css index 88b5f031..272ce3b2 100644 --- a/wp-admin/css/media.css +++ b/wp-admin/css/media.css @@ -1 +1 @@ -div#media-upload-header{margin:0;padding:5px 5px 0;font-weight:bold;position:relative;border-bottom-width:1px;border-bottom-style:solid;}body#media-upload ul#sidemenu{font-weight:normal;margin:0 5px;left:0;bottom:-1px;float:none;overflow:hidden;}form{margin:1em;}#search-filter{text-align:right;}th{position:relative;}.media-upload-form label.form-help,td.help{font-family: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{margin:0 0 5px;}#library-form .progress,#gallery-form .progress,.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;}.form-table thead.media-item-info{border:8px solid #fff;}abbr.required{text-decoration:none;border:none;}.describe label{display:inline;}.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;}#media-upload p.ml-submit{padding:1em 0;}#media-upload p.help,#media-upload label.help{font-family:sans-serif;font-style:italic;font-weight:normal;}#media-upload .ui-sortable .media-item{cursor:move;}#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 1em 0 3px;}#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;}p.media-types{margin:1em;}tr.not-image{display:none;}table.not-image tr.not-image{display:table-row;}table.not-image tr.image-only{display:none;} \ No newline at end of file +div#media-upload-header{margin:0;padding:5px 5px 0;font-weight:bold;position:relative;border-bottom-width:1px;border-bottom-style:solid}body#media-upload ul#sidemenu{font-weight:normal;margin:0 5px;left:0;bottom:-1px;float:none;overflow:hidden}form{margin:1em}#search-filter{text-align:right}th{position:relative}.media-upload-form label.form-help,td.help{font-family:sans-serif;font-style:italic;font-weight:normal}.media-upload-form p.help{margin:0;padding:0}.media-upload-form fieldset{width:100%;border:0;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{margin:0 0 5px}#library-form .progress,#gallery-form .progress,.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}.form-table thead.media-item-info{border:8px solid #fff}abbr.required{text-decoration:none;border:0}.describe label{display:inline}.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}#media-upload p.ml-submit{padding:1em 0}#media-upload p.help,#media-upload label.help{font-family:sans-serif;font-style:italic;font-weight:normal}#media-upload .ui-sortable .media-item{cursor:move}#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 1em 0 3px}#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}p.media-types{margin:1em}tr.not-image{display:none}table.not-image tr.not-image{display:table-row}table.not-image tr.image-only{display:none} \ No newline at end of file diff --git a/wp-admin/css/media.dev.css b/wp-admin/css/media.dev.css index 38361bb4..24b163eb 100644 --- a/wp-admin/css/media.dev.css +++ b/wp-admin/css/media.dev.css @@ -51,7 +51,6 @@ th { /* specific to the image upload form */ - .image-align-none-label { background: url(../images/align-none.png) no-repeat center left; } diff --git a/wp-admin/css/wp-admin-rtl.css b/wp-admin/css/wp-admin-rtl.css index c00bcec3..7cae6f16 100644 --- a/wp-admin/css/wp-admin-rtl.css +++ b/wp-admin/css/wp-admin-rtl.css @@ -1 +1 @@ -ol{margin-left:0;margin-right:2em;}.code,code{font-family:Tahoma,Arial,sans-serif;}.quicktags,.search{font:12px Tahoma,Arial,sans-serif;}.icon32{float:right;margin-right:0;margin-left:8px;}.icon16{float:right;margin-right:-8px;margin-left:0;}.howto{font-style:normal;font-family:Tahoma,Arial,sans-serif;}p.install-help{font-style:normal;}#doaction,#doaction2,#post-query-submit{margin-right:0;margin-left:8px;}#timezone_string option{margin-left:0;margin-right:1em;}#pass-strength-result{float:right;margin:13px 1px 5px 5px;}p.search-box{float:left;}#delete-action{float:right;}#publishing-action{float:left;}#post-body .misc-pub-section{border-right:0;border-left-width:1px;border-left-style:solid;float:right;}#post-body .misc-pub-section-last{border-left:0;}#minor-publishing-actions{padding:10px 8px 2px 10px;text-align:left;}#save-post{float:right;}#minor-publishing .ajax-loading{padding:3px 4px 0 0;float:right;}.preview{float:left;}#sticky-span{margin-left:0;margin-right:18px;}.side-info ul{padding-left:0;padding-right:18px;}td.action-links,th.action-links{text-align:left;}.describe .del-link{padding-left:0;padding-right:5px;}form.upgrade .hint{font-style:normal;}#ajax-response.alignleft{margin-left:0;margin-right:2em;}#quicktags{background-position:right top;}#ed_reply_toolbar input{margin:1px 1px 1px 2px;}#wp-fullscreen-body{right:0;left:auto;}#wp-fullscreen-tagline{float:left;}#fullscreen-topbar{left:auto;right:0;}#wp-fullscreen-mode-bar,#wp-fullscreen-button-bar,#wp-fullscreen-close,#wp-fullscreen-count{float:right;}#wp-fullscreen-save{float:left;}#wp-fullscreen-save{padding:2px 5px 0 2px;}#wp-fullscreen-buttons>div{float:right;}#wp-fullscreen-mode-bar{padding:1px 0 0 14px;}#wp-fullscreen-modes a{float:right;border-width:1px 0 1px 1px;}#wp-fullscreen-modes a:first-child{-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:3px;-webkit-border-bottom-left-radius:0;-webkit-border-bottom-right-radius:3px;border-width:1px;border-top-left-radius:0;border-top-right-radius:3px;border-bottom-right-left:0;border-bottom-right-radius:3px;}#wp-fullscreen-modes a:last-child{-webkit-border-top-right-radius:0;-webkit-border-top-left-radius:3px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:3px;border-top-right-radius:0;border-top-left-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:3px;}#wp-fullscreen-save img,#wp-fullscreen-save span{padding-right:0;padding-left:4px;}#wphead{height:32px;margin-left:15px;margin-right:2px;}#header-logo{float:right;}#wphead h1{float:right;}#screen-meta-links{margin-right:0;margin-left:24px;}#screen-meta{margin-right:5px;margin-left:15px;}#screen-options-link-wrap,#contextual-help-link-wrap{float:left;margin-left:0;margin-right:6px;}#screen-meta-links a.show-settings{padding-right:6px;padding-left:16px;}.toggle-arrow{background-position:top right;}.toggle-arrow-active{background-position:bottom right;}.metabox-prefs label{padding-right:0;padding-left:15px;}.metabox-prefs label input{margin-right:2px;margin-left:5px;}#contextual-help-wrap{margin-left:0;margin-right:-4px;}#contextual-help-back{left:170px;right:150px;}#contextual-help-wrap.no-sidebar #contextual-help-back{left:0;right:150px;border-right-width:1px;border-left-width:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;-webkit-border-bottom-left-radius:2px;border-bottom-left-radius:2px;}.contextual-help-tabs{float:right;}.contextual-help-tabs a{padding-left:5px;padding-right:12px;}.contextual-help-tabs .active{margin-right:0;margin-left:-1px;}.contextual-help-tabs .active,.contextual-help-tabs-wrap{border-left:0;border-right-width:1px;}.help-tab-content{margin-right:0;margin-left:22px;}.help-tab-content li{margin-left:0;margin-right:18px;}.contextual-help-sidebar{float:left;padding-right:12px;padding-left:8px;}#adminmenuback,#adminmenuwrap{border-width:0 0 0 1px;}#adminmenushadow{right:auto;left:0;}#adminmenu li .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{left:auto;right:146px;}.folded #adminmenu .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{left:auto;right:26px;}#adminmenu .wp-submenu.sub-open,#adminmenu li.focused.wp-not-current-submenu .wp-submenu,.folded #adminmenu li.focused.wp-has-current-submenu .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu.sub-open,.no-js #adminmenu .wp-has-submenu:hover .wp-submenu,.no-js.folded #adminmenu .wp-has-current-submenu:hover .wp-submenu{padding:0 0 8px 8px;}#adminmenu div.wp-menu-image{float:right;}#adminmenu li li{margin-left:0;margin-right:8px;}#adminmenu .wp-submenu a,#adminmenu li li a,.folded #adminmenu .wp-not-current-submenu li a{padding-left:0;padding-right:12px;}#adminmenu .wp-not-current-submenu li a{padding-left:0;padding-right:18px;}.folded #adminmenu li li{margin-left:inherit;margin-right:0;}.folded #adminmenu li li a{padding-left:inherit;padding-right:0;}.wp-menu-arrow{right:0;-moz-transform:translate(-139px);-webkit-transform:translate(-139px);-o-transform:translate(-139px);-ms-transform:translate(-139px);transform:translate(-139px);}.ie8 .wp-menu-arrow{right:-20px;}#adminmenu .wp-menu-arrow div{left:-8px;width:16px;}#adminmenu li.wp-not-current-submenu .wp-menu-arrow{-moz-transform:translate(-138px);-webkit-transform:translate(-138px);-o-transform:translate(-138px);-ms-transform:translate(-138px);transform:translate(-138px);}.folded .wp-menu-arrow{-moz-transform:translate(-27px);-webkit-transform:translate(-27px);-o-transform:translate(-27px);-ms-transform:translate(-27px);transform:translate(-27px);}#adminmenu .wp-not-current-submenu .wp-menu-arrow div{border-style:solid solid none none;border-width:1px 1px 0 0;}#adminmenu .wp-menu-image img{float:right;padding:5px 2px 0 0;}#adminmenu .wp-submenu .wp-submenu-head{padding:6px 10px 5px 4px;}#adminmenu li .wp-submenu-wrap{border-width:1px 0 1px 1px;border-style:solid none solid solid;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:3px;-webkit-border-top-right-radius:0;-webkit-border-top-left-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:3px;border-top-right-radius:0;border-top-left-radius:3px;}.folded #adminmenu .wp-submenu ul{border-width:0 1px 0 0;}.folded #adminmenu .wp-submenu a{padding-left:0;padding-right:10px;}.folded #adminmenu a.wp-has-submenu{margin-left:0;margin-right:40px;}#adminmenu .wp-menu-toggle{clear:left;float:left;padding:1px 0 0 2px;}#adminmenu .awaiting-mod,#adminmenu span.update-plugins,#sidemenu li a span.update-plugins{font-family:Tahoma,Arial,sans-serif;margin-left:0;margin-right:7px;}#collapse-button{float:right;}.post-com-count-wrapper{font-family:Tahoma,Arial,sans-serif;}.column-response .post-com-count{float:right;margin-right:0;margin-left:5px;}.response-links{float:right;}.widefat th{font-family:Tahoma,Arial,sans-serif;}.widefat td p{margin:2px 0 .8em;}.postbox-container{float:right;}.postbox .handlediv{float:left;}#the-comment-list p.comment-author img{float:right;margin-right:0;margin-left:8px;}#dashboard_browser_nag p.browser-update-nag.has-browser-icon{padding-right:0;padding-left:125px;}.welcome-panel .welcome-panel-close{right:auto;left:10px;}.welcome-panel .welcome-panel-close:before{left:auto;right:-12px;}.welcome-panel .wp-badge{float:right;}.welcome-panel-content .about-description,.welcome-panel h3{margin-left:0;margin-right:190px;}.welcome-panel .welcome-panel-column{margin:0 -25px 0 5%;padding-left:0;padding-right:25px;float:right;}.welcome-panel .welcome-panel-column.welcome-panel-last{margin-right:auto;padding-right:0;margin-left:0;}.welcome-panel h4 .icon16{margin-left:0;margin-right:-32px;}.welcome-panel .welcome-panel-column-container{padding:0 25px 0 0;}.welcome-panel .welcome-panel-column ul{margin:1.6em 1.3em 1em 1em;}.welcome-panel .welcome-panel-column li{padding-left:0;padding-right:2px;}.fixed .column-comments{text-align:right;}.fixed .column-comments .vers{padding-left:0;padding-right:3px;}.fixed .column-comments a{float:right;}.sorting-indicator{margin-left:0;margin-right:7px;}th.sortable a span,th.sorted a span{float:right;}.tablenav-pages a{margin-right:0;margin-left:1px;}.tablenav-pages .next-page{margin-left:0;margin-right:2px;}.tablenav a.button-secondary{margin:3px 0 0 8px;}.tablenav .tablenav-pages{float:left;}.tablenav .displaying-num{margin-right:0;margin-left:10px;font-family:Tahoma,Arial,sans-serif;font-style:bold;}.tablenav .actions{padding:2px 0 0 8px;}.tablenav .delete{margin-right:0;margin-left:20px;}.view-switch{float:left;}.filter{float:right;margin:-5px 10px 0 0;}.filter .subsubsub{margin-left:0;margin-right:-10px;}#posts-filter fieldset{float:right;margin:0 0 1em 1.5ex;}#posts-filter fieldset legend{padding:0 1px .2em 0;}#wpbody-content .inline-edit-row fieldset{float:right;}#wpbody-content .quick-edit-row-page fieldset.inline-edit-col-right .inline-edit-col{border-width:0 1px 0 0;}#wpbody-content .bulk-edit-row .inline-edit-col-bottom{float:left;}.inline-edit-row fieldset label span.title{float:right;}.inline-edit-row fieldset label span.input-text-wrap{margin-left:0;margin-right:5em;}.quick-edit-row-post fieldset.inline-edit-col-right label span.title{padding-right:0;padding-left:.5em;}#wpbody-content .quick-edit-row fieldset .inline-edit-group label.alignleft:first-child{margin-right:0;margin-left:.5em;}.inline-edit-row fieldset span.title,.inline-edit-row fieldset span.checkbox-title{font-family:Tahoma,Arial,sans-serif;font-style:normal;}.inline-edit-row fieldset .inline-edit-date{float:right;}.inline-edit-row fieldset ul.cat-checklist label,.inline-edit-row .catshow,.inline-edit-row .cathide,.inline-edit-row #bulk-titles div{font-family:Tahoma,Arial,sans-serif;}.quick-edit-row-post fieldset label.inline-edit-status{float:right;}#bulk-titles div a{float:right;margin:3px -2px 0 3px;overflow:hidden;text-indent:-9999px;}#titlediv #title-prompt-text,#wp-fullscreen-title-prompt-text{right:0;}#sample-permalink{direction:ltr;}#sample-permalink #editable-post-name{unicode-bidi:embed;}#wp-fullscreen-title-prompt-text{left:auto;right:0;}.postarea h3 label{float:right;}.submitbox .submit{text-align:right;}.inside-submitbox #post_status{margin:2px -2px 2px 0;}.submitbox .submit input{margin-right:0;margin-left:4px;}#normal-sortables .postbox .submit{float:left;}#post-body ul.category-tabs,#post-body ul.add-menu-item-tabs{float:right;text-align:left;margin:0 5px 0 -120px;}#post-body ul.category-tabs li.tabs,#post-body ul.add-menu-item-tabs li.tabs{-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:3px;-webkit-border-bottom-left-radius:0;-webkit-border-bottom-right-radius:3px;border-top-left-radius:0;border-top-right-radius:3px;border-bottom-left-radius:0;border-bottom-right-radius:3px;}#post-body .categorydiv div.tabs-panel,.taxonomy div.tabs-panel,#post-body #linkcategorydiv div.tabs-panel{margin:0 125px 0 5px;}#side-sortables .comments-box thead th,#normal-sortables .comments-box thead th{font-style:normal;}#commentsdiv img.waiting{padding-left:0;padding-right:5px;}#post-body .category-tabs li.tabs,#post-body .add-menu-item-tabs li.tabs{border-width:1px 1px 1px 0;margin-right:0;margin-left:-1px;}#posts-filter fieldset{float:right;margin:0 0 1em 1.5ex;}#posts-filter fieldset legend{padding:0 1px .2em 0;}#post-body .tagsdiv #newtag{margin-right:0;margin-left:5px;}.autosave-info{padding:2px 2px 2px 15px;text-align:left;}#post-body .wp_themeSkin .mceStatusbar a.mceResize{background:transparent url(../images/resize-rtl.gif) no-repeat scroll left bottom;cursor:sw-resize;}.curtime #timestamp{background-position:right top;padding-left:0;padding-right:18px;}#postcustomstuff table input,#postcustomstuff table select,#postcustomstuff table textarea{margin:8px 8px 8px 0;}table.diff td,table.diff th{font-family:Consolas,Monaco,monospace;}.category-adder{margin-left:0;margin-right:120px;}#post-body ul.category-tabs,#post-body ul.add-menu-item-tabs{float:right;text-align:left;margin:0 5px 0 -120px;}#post-body ul.category-tabs li.tabs,#post-body ul.add-menu-item-tabs li.tabs{-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:3px;-webkit-border-bottom-left-radius:0;-webkit-border-bottom-right-radius:3px;border-top-left-radius:0;border-top-right-radius:3px;border-bottom-left-radius:0;border-bottom-right-radius:3px;}#front-page-warning,#front-static-pages ul,ul.export-filters,.inline-editor ul.cat-checklist ul,.categorydiv ul.categorychecklist ul,.customlinkdiv ul.categorychecklist ul,.posttypediv ul.categorychecklist ul,.taxonomydiv ul.categorychecklist ul,#linkcategorydiv ul.categorychecklist ul{margin-left:0;margin-right:18px;}#post-body .category-tabs li.tabs,#post-body .add-menu-item-tabs li.tabs{border-style:solid solid solid none;border-width:1px 1px 1px 0;margin-right:0;margin-left:-1px;}p.help,p.description,span.description,.form-wrap p{font-style:normal;font-family:Tahoma,Arial,sans-serif;}.taghint{margin:15px 12px -24px 0;}#poststuff .tagsdiv .howto{margin:0 8px 6px 0;}.ac_results li{text-align:right;}#wpbody-content .describe th{text-align:right;}.describe .media-item-info .A1B1{padding:0 10px 0 0;}.media-upload-form td label{margin-left:6px;margin-right:2px;}.media-upload-form .align .field label{padding:0 23px 0 0;margin:0 3px 0 1em;}.media-upload-form tr.image-size label{margin:0 5px 0 0;}#wpbody-content .describe p.help{padding:0 5px 0 0;}.media-item .error-div a.dismiss,.describe-toggle-on,.describe-toggle-off{float:left;margin-right:0;margin-left:15px;}.media-item .error-div a.dismiss{padding:0 15px 0 0;}.media-item .error-div{padding-left:0;padding-right:10px;}.media-item .pinkynail{float:right;}.media-item .describe td{padding:0 0 8px 8px;}.media-item .progress{float:left;margin:6px 0 0 10px;}#find-posts-response .found-radio{padding:5px 8px 0 0;}.find-box-search label{padding-right:0;padding-left:6px;}.find-box #resize-se{right:auto;left:1px;}form.upgrade .hint{font-style:normal;}.imgedit-menu div{float:right;}.imgedit-help{font-style:normal;}.imgedit-submit-btn{margin-left:0;margin-right:20px;}.form-table th{text-align:right;}.form-table input.tog{margin-right:0;margin-left:2px;float:right;}.form-table table.color-palette{float:right;}#replysubmit img.waiting,.inline-edit-save img.waiting{float:left;}#replysubmit .button{margin-right:0;margin-left:5px;}#edithead .inside{float:right;padding:3px 5px 2px 0;}.comment-ays th{border-right-style:none;border-left-style:solid;border-right-width:0;border-left-width:1px;}.spam-undo-inside .avatar,.trash-undo-inside .avatar{margin-left:8px;}#comment-status-radio input{margin:2px 0 5px 3px;}td.available-theme{text-align:right;}#current-theme img{float:right;margin-right:0;margin-left:1em;}#broken-themes{text-align:right;}.appearance_page_custom-header .available-headers .default-header{float:right;margin:0 0 20px 20px;}.appearance_page_custom-header .random-header{margin:0 0 20px 20px;}.appearance_page_custom-header .available-headers label input,.appearance_page_custom-header .random-header label input{margin-right:0;margin-left:10px;}.nav-tab{margin:0 0 -1px 6px;}h2 .nav-tab{font-family:Tahoma,Arial,sans-serif;}.plugins .desc ul,.plugins .desc ol{margin:0 2em 0 0;}#wpbody-content .plugins .plugin-title,#wpbody-content .plugins .theme-title{padding-right:0;padding-left:12px;}#profile-page .form-table #rich_editing{margin-right:0;margin-left:5px;}#your-profile legend{font-family:Tahoma,Arial,sans-serif;}.pressthis a span{background-position:-20px 5px;padding:8px 32px 8px 0;}.pressthis a:after{right:auto;left:10px;background:transparent;transform:skew(-20deg) rotate(-6deg);-webkit-transform:skew(-20deg) rotate(-6deg);-moz-transform:skew(-20deg) rotate(-6deg);}.pressthis a:hover:after{transform:skew(-20deg) rotate(-9deg);-webkit-transform:skew(-20deg) rotate(-9deg);-moz-transform:skew(-20deg) rotate(-9deg);}#utc-time,#local-time{padding-left:0;padding-right:25px;font-style:normal;font-family:Tahoma,Arial,sans-serif;}#footer{margin-left:20px;}#wpcontent,#footer{margin-right:165px;}.wrap.about-wrap{margin-left:40px;margin-right:20px;}.about-wrap h1,.about-text{margin-right:0;margin-left:200px;}.about-wrap h2.nav-tab-wrapper{padding-left:0;padding-right:6px;}.about-wrap .wp-badge{right:auto;left:0;}.about-wrap h2 .nav-tab{margin-right:0;margin-left:3px;}.about-wrap .changelog li{margin-left:0;margin-right:3em;}.about-wrap .feature-section .left-feature,.about-wrap .feature-section img,.about-wrap .feature-section .right-feature{float:right;}.about-wrap .feature-section .left-feature{margin-right:0;margin-left:0;}.about-wrap .feature-section .right-feature{margin-left:0;margin-right:0;}.about-wrap .feature-section.text-features{float:right;}.about-wrap .feature-section.screenshot-features{float:left;}.about-wrap .feature-section.screenshot-features .angled-right{margin-left:0;margin-right:2.5em;}.about-wrap .feature-section.screenshot-features .angled-right p{margin-left:0;margin-right:290px;}.about-wrap .feature-section .angled-right img,.about-wrap .feature-section .angled-left img{margin-right:0;margin-left:30px;}.about-wrap .feature-section.three-col div{margin-right:0;margin-left:4.999999999%;float:right;}.about-wrap .feature-section.three-col h4{text-align:right;}.about-wrap .feature-section.three-col img{margin-right:5px;margin-left:0;}.about-wrap .feature-section.three-col .last-feature{margin-left:0;}.about-wrap .feature-section .feature-images img{margin-right:auto;margin-left:5px;}.about-wrap .feature-section.images-stagger-left .angled-left{margin-left:auto;margin-right:5px;}.about-wrap .feature-section .angled-right{float:left;}.about-wrap .feature-section.images-stagger-right .feature-images{right:auto;left:0;}.about-wrap .feature-section.images-stagger-left .feature-images{left:auto;right:0;}.about-wrap .feature-section.images-stagger-right .left-feature{margin-right:0;margin-left:350px;}.about-wrap .feature-section.images-stagger-left .right-feature{margin-left:0;margin-right:350px;}.about-wrap li.wp-person,.about-wrap li.wp-person img.gravatar{float:right;margin-right:0;margin-left:10px;}#template div{margin-right:0;margin-left:190px;}.column-author img,.column-username img{float:right;margin-right:0;margin-left:10px;}.tagchecklist{margin-left:0;margin-right:14px;}.tagchecklist strong{margin-left:0;margin-right:-8px;}.tagchecklist span{margin-right:0;margin-left:25px;float:right;}.tagchecklist span a{margin:6px -9px 0 0;float:right;}#poststuff h2{clear:right;}#poststuff h3,.metabox-holder h3{font-family:Tahoma,Arial,sans-serif;}.tool-box .title{font-family:Tahoma,Arial,sans-serif;}#sidemenu{margin:-30px 315px 0 15px;float:left;padding-left:0;padding-right:10px;}#sidemenu a{float:right;}table .vers,table .column-visible,table .column-rating{text-align:right;}.screen-meta-toggle{right:auto;left:15px;}* html #template div{margin-left:0;}.list-ajax-loading{float:left;margin-right:0;margin-left:9px;}#editorcontainer .wp_themeSkin .mceStatusbar{padding-left:0;padding-right:5px;}#editorcontainer .wp_themeSkin .mceStatusbar div{float:right;}#editorcontainer .wp_themeSkin .mceStatusbar a.mceResize{float:left;}#wpcontent{margin-left:0;margin-right:165px;}.folded #wpcontent{margin-left:0;margin-right:52px;}.folded.wp-admin #footer{margin-left:15px;margin-right:52px;}#wpbody-content{float:right;}#adminmenuwrap{float:right;}#adminmenu{clear:right;}.inner-sidebar{float:left;clear:left;}.has-right-sidebar #post-body{float:right;clear:right;margin-right:0;margin-left:-340px;}.has-right-sidebar #post-body-content{margin-right:0;margin-left:300px;}#col-right{float:left;clear:left;}.alignleft{float:right;}.alignright{float:left;}.textleft{text-align:right;}.textright{text-align:left;}.screen-reader-text,.screen-reader-text span{left:auto;right:-1000em;}body,td,textarea,input,select{font-family:Tahoma,Arial,sans-serif;}ul.ul-disc,ul.ul-square,ol.ol-decimal{margin-left:0;margin-right:1.8em;}.subsubsub{float:right;}.widefat thead th:first-of-type{-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:3px;border-top-left-radius:0;border-top-right-radius:3px;}.widefat thead th:last-of-type{-webkit-border-top-right-radius:0;-webkit-border-top-left-radius:3px;border-top-right-radius:0;border-top-left-radius:3px;}.widefat tfoot th:first-of-type{-webkit-border-bottom-left-radius:0;-webkit-border-bottom-right-radius:3px;border-bottom-left-radius:0;border-bottom-right-radius:3px;}.widefat tfoot th:last-of-type{-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:3px;}.widefat th{text-align:right;}.widefat th input{margin:0 8px 0 0;}.wrap{margin-right:0;margin-left:15px;}.wrap h2,.subtitle{font-family:Tahoma,Arial,sans-serif;}.wrap h2{padding-right:0;padding-left:15px;}.subtitle{padding-left:0;padding-right:25px;}.wrap .add-new-h2{font-family:Tahoma,Arial,sans-serif;margin-left:0;margin-right:4px;}.wrap h2.long-header{padding-left:0;}#dashboard-widgets-wrap .has-sidebar{margin-right:0;margin-left:-51%;}#dashboard-widgets-wrap .has-sidebar .has-sidebar-content{margin-right:0;margin-left:51%;}.view-all{right:auto;left:0;}#dashboard_right_now p.sub,#dashboard-widgets h4,a.rsswidget,#dashboard_plugins h4,#dashboard_plugins h5,#dashboard_recent_comments .comment-meta .approve{font-family:Tahoma,Arial;}#dashboard_right_now p.sub{left:auto;right:15px;}#dashboard_right_now td.b{padding-right:0;padding-left:6px;text-align:left;font-family:Tahoma,Arial;}#dashboard_right_now .t{padding-right:0;padding-left:12px;}#dashboard_right_now .table_content{float:right;}#dashboard_right_now .table_discussion{float:left;}#dashboard_right_now .versions a{font-family:Tahoma,Arial;}#dashboard_right_now a.button{float:left;clear:left;}#dashboard_plugins .inside span{padding-left:0;padding-right:5px;}#dashboard-widgets h3 .postbox-title-action{right:auto;left:30px;}#the-comment-list .pingback{padding-left:0!important;padding-right:9px!important;}#the-comment-list .comment-item{padding:1em 70px 1em 10px;}#the-comment-list .comment-item .avatar{float:right;margin-left:0;margin-right:-60px;}.rss-widget cite{text-align:left;}.rss-widget span.rss-date{font-family:Tahoma,Arial;margin-left:0;margin-right:3px;}#dashboard_quick_press h4{float:right;text-align:left;}#dashboard_quick_press .wp-media-buttons{margin:0 5em .5em 0;}#dashboard_quick_press h4 label{margin-right:0;margin-left:10px;}#dashboard_quick_press .input-text-wrap,#dashboard_quick_press .textarea-wrap{margin:0 5em 1em 0;}#dashboard_quick_press #media-buttons{margin:0 5em .5em 0;padding:0;}#dashboard-widgets #dashboard_quick_press form p.submit{margin-left:0;margin-right:4.6em;}#dashboard-widgets #dashboard_quick_press form p.submit input{float:right;}#dashboard-widgets #dashboard_quick_press form p.submit #save-post{margin:0 10px 0 1em;}#dashboard-widgets #dashboard_quick_press form p.submit #publish{float:left;}#dashboard-widgets #dashboard_quick_press form p.submit img.waiting{margin:4px 0 0 6px;}#dashboard_recent_drafts h4 abbr{font-family:Tahoma,Arial;margin-left:0;margin-right:3px;}body.login{font-family:Tahoma,arial;}.login form{margin-right:8px;margin-left:0;}.login form .forgetmenot{float:right;}.login form .submit{float:left;}#login form .submit input{font-family:Tahoma,arial;}.login #nav,.login #backtoblog{margin:0 16px 0 0;}#login_error,.login .message{margin:0 8px 16px 0;}.login #user_pass,.login #user_login,.login #user_email{margin-left:6px;margin-right:0;direction:ltr;}.login h1 a{text-decoration:none;}.login .button-primary{float:left;}#nav-menus-frame{margin-right:300px;margin-left:0;}#wpbody-content #menu-settings-column{margin-right:-300px;margin-left:0;float:right;}#menu-management-liquid{float:right;}#menu-management{margin-left:20px;margin-right:0;}.post-body-plain{padding:10px 0 0 10px;}#menu-management .nav-tabs-arrow-left{right:0;left:auto;}#menu-management .nav-tabs-arrow-right{left:0;right:auto;text-align:left;font-family:Tahoma,Arial,sans-serif;}#menu-management .nav-tabs{padding-right:20px;padding-left:10px;}.js #menu-management .nav-tabs{float:right;margin-right:0;margin-left:-400px;}#select-nav-menu-container{text-align:left;}#wpbody .open-label{float:right;}#wpbody .open-label span{padding-left:10px;padding-right:0;}.js .input-with-default-title{font-style:normal;font-weight:bold;}.postbox .howto input{float:left;}#nav-menu-theme-locations .button-controls{text-align:left;}.meta-sep,.submitcancel{float:right;}#cancel-save{margin-left:0;margin-right:20px;}.list-controls{float:right;}.add-to-menu{float:left;}#add-custom-link label span{float:right;padding-left:5px;padding-right:0;}.howto span{float:right;}.list li .menu-item-title input{margin-left:3px;margin-right:0;}.menu-item-handle{padding-right:10px;padding-left:0;}.menu-item-edit-active .menu-item-handle{-webkit-border-bottom-left-radius:0;-webkit-border-bottom-right-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0;}.menu-item-handle .item-title{margin-left:13em;margin-right:0;}.menu-item-depth-0{margin-right:0;margin-left:0;}.menu-item-depth-1{margin-right:30px;margin-left:0;}.menu-item-depth-2{margin-right:60px;margin-left:0;}.menu-item-depth-3{margin-right:90px;margin-left:0;}.menu-item-depth-4{margin-right:120px;margin-left:0;}.menu-item-depth-5{margin-right:150px;margin-left:0;}.menu-item-depth-6{margin-right:180px;margin-left:0;}.menu-item-depth-7{margin-right:210px;margin-left:0;}.menu-item-depth-8{margin-right:240px;margin-left:0;}.menu-item-depth-9{margin-right:270px;margin-left:0;}.menu-item-depth-10{margin-right:300px;margin-left:0;}.menu-item-depth-11{margin-right:330px;margin-left:0;}.menu-item-depth-0 .menu-item-transport{margin-right:0;margin-left:0;}.menu-item-depth-1 .menu-item-transport{margin-right:-30px;margin-left:0;}.menu-item-depth-2 .menu-item-transport{margin-right:-60px;margin-left:0;}.menu-item-depth-3 .menu-item-transport{margin-right:-90px;margin-left:0;}.menu-item-depth-4 .menu-item-transport{margin-right:-120px;margin-left:0;}.menu-item-depth-5 .menu-item-transport{margin-right:-150px;margin-left:0;}.menu-item-depth-6 .menu-item-transport{margin-right:-180px;margin-left:0;}.menu-item-depth-7 .menu-item-transport{margin-right:-210px;margin-left:0;}.menu-item-depth-8 .menu-item-transport{margin-right:-240px;margin-left:0;}.menu-item-depth-9 .menu-item-transport{margin-right:-270px;margin-left:0;}.menu-item-depth-10 .menu-item-transport{margin-right:-300px;margin-left:0;}.menu-item-depth-11 .menu-item-transport{margin-right:-330px;margin-left:0;}.item-type{padding-left:10px;padding-right:0;}.item-controls{left:20px;right:auto;}.item-controls .item-order{padding-left:10px;padding-right:0;}.item-edit{left:-20px;right:auto;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:0;}.menu-item-settings{padding:10px 10px 10px 0;border-width:0 1px 1px 1px;}.link-to-original{font-style:normal;font-weight:bold;}.link-to-original a{padding-right:4px;padding-left:0;}.menu-item-settings .description-thin,.menu-item-settings .description-wide{margin-left:10px;margin-right:0;float:right;}.major-publishing-actions .publishing-action{text-align:left;float:left;}.major-publishing-actions .delete-action{text-align:right;float:right;padding-left:15px;padding-right:0;}.menu-name-label{margin-left:15px;margin-right:0;}.auto-add-pages{float:right;}div.star{left:auto;right:0;letter-spacing:0;}.star img,div.star a,div.star a:hover,div.star a:visited{right:auto;left:0;}#plugin-information ul#sidemenu{left:auto;right:0;}#plugin-information h2{margin-right:0;margin-left:200px;}#plugin-information .fyi{margin-left:5px;margin-right:20px;}#plugin-information .fyi h2{margin-left:0;}#plugin-information .fyi ul{padding:10px 7px 10px 5px;}#plugin-information #section-screenshots li p{padding-left:0;padding-right:20px;}#plugin-information .updated,#plugin-information pre{margin-right:0;margin-left:215px;}#plugin-information .updated,#plugin-information .error{clear:none;direction:rtl;}#section-description{direction:ltr;}.posting{margin-left:212px;margin-right:0;position:relative;}#side-info-column{float:left;right:auto;left:0;}h3.tb{margin-left:0;margin-right:5px;}#publish{float:left;}.postbox .handlediv{float:left;}.actions li{float:right;margin-right:0;margin-left:10px;}#extra-fields .actions{margin:-23px 0 0 -7px;}#img_container a{float:right;}#category-add input,#category-add select{font-family:Tahoma,Arial;}.inline-editor ul.cat-checklist ul,.categorydiv ul.categorychecklist ul,#linkcategorydiv ul.categorychecklist ul{margin-left:0;margin-right:18px;}.category-tabs li{padding-left:0;padding-right:8px;}#tagsdiv #newtag{margin-right:0;margin-left:5px;}#tagadd{margin-left:0;margin-right:3px;}#tagchecklist span{margin-left:.5em;margin-right:10px;float:right;}#tagchecklist span a{margin:6px -9px 0 0;float:right;}.submit input,.button,.button-primary,.button-secondary,.button-highlighted,#postcustomstuff .submit input{font-family:Tahoma,Arial,sans-serif;}.ac_results li{text-align:right;}#TB_ajaxContent #options{right:auto;left:25px;}#post_status{margin-left:0;margin-right:10px;}#templateside{float:left;}#template textarea{direction:ltr;}div.star{left:auto;right:0;}.star img,div.star a,div.star a:hover,div.star a:visited{right:auto;left:0;}.theme-listing .theme-item h3{font-style:normal;}#theme-information .theme-preview-img{float:right;margin:5px 15px 10px 25px;}#theme-information .action-button #cancel{float:right;}#theme-information .action-button #install{float:left;}.feature-filter .feature-group{float:right;}.feature-filter .feature-name{float:right;text-align:left;}.feature-filter .feature-group li{float:right;padding-right:0;padding-left:25px;}div.widget-liquid-left{float:right;clear:right;margin-right:0;margin-left:-325px;}div#widgets-left{margin-right:5px;margin-left:325px;}div.widget-liquid-right{float:left;clear:left;}.inactive-sidebar .widget{float:right;}div.sidebar-name h3{font-family:Tahoma,Arial,sans-serif;}#widget-list .widget{float:right;}.inactive-sidebar .widget-placeholder{float:right;}.widget-top .widget-title-action{float:left;}.widget-control-edit{padding:0 0 0 8px;}.sidebar-name-arrow{float:left;}.press-this-sidebar{float:left;} \ No newline at end of file +ol{margin-left:0;margin-right:2em}.code,code{font-family:monospace;direction:ltr}.quicktags,.search{font:12px Tahoma,Arial,sans-serif}.icon32{float:right;margin-right:0;margin-left:8px}.icon16{float:right;margin-right:-8px;margin-left:0}.howto{font-style:normal;font-family:Tahoma,Arial,sans-serif}p.install-help{font-style:normal}#doaction,#doaction2,#post-query-submit{margin-right:0;margin-left:8px}#timezone_string option{margin-left:0;margin-right:1em}#pass-strength-result{float:right;margin:13px 1px 5px 5px}p.search-box{float:left}input[type=password]{direction:ltr}input[type="text"].ui-autocomplete-loading{background:transparent url('../images/loading.gif') no-repeat left center}ul#add-to-blog-users{margin:0 14px 0 0}.ui-autocomplete li{text-align:right}#delete-action{float:right}#publishing-action{float:left}#post-body .misc-pub-section{border-right:0;border-left-width:1px;border-left-style:solid}#post-body .misc-pub-section-last{border-left:0}#minor-publishing-actions{padding:10px 8px 2px 10px;text-align:left}#save-post{float:right}#minor-publishing .ajax-loading{padding:3px 4px 0 0;float:right}.preview{float:left}#sticky-span{margin-left:0;margin-right:18px}.side-info ul{padding-left:0;padding-right:18px}td.action-links,th.action-links{text-align:left}.describe .del-link{padding-left:0;padding-right:5px}form.upgrade .hint{font-style:normal}#ajax-response.alignleft{margin-left:0;margin-right:2em}#quicktags{background-position:right top}#ed_reply_toolbar input{margin:1px 1px 1px 2px}#wphead{height:32px;margin-left:15px;margin-right:2px}#header-logo{float:right}#wphead h1{float:right}#screen-meta-links{margin-right:0;margin-left:24px}#screen-meta{margin-right:5px;margin-left:15px}#screen-options-link-wrap,#contextual-help-link-wrap{float:left;margin-left:0;margin-right:6px}#screen-meta-links a.show-settings{padding-right:6px;padding-left:16px}.toggle-arrow{background-position:top right}.toggle-arrow-active{background-position:bottom right}.metabox-prefs label{padding-right:0;padding-left:15px}.metabox-prefs label input{margin-right:2px;margin-left:5px}#contextual-help-wrap{margin-left:0;margin-right:-4px}#contextual-help-back{left:170px;right:150px}#contextual-help-wrap.no-sidebar #contextual-help-back{left:0;right:150px;border-right-width:1px;border-left-width:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;-webkit-border-bottom-left-radius:2px;border-bottom-left-radius:2px}.contextual-help-tabs{float:right}.contextual-help-tabs a{padding-left:5px;padding-right:12px}.contextual-help-tabs .active{margin-right:0;margin-left:-1px}.contextual-help-tabs .active,.contextual-help-tabs-wrap{border-left:0;border-right-width:1px}.help-tab-content{margin-right:0;margin-left:22px}.help-tab-content li{margin-left:0;margin-right:18px}.contextual-help-sidebar{float:left;padding-right:12px;padding-left:8px}#adminmenuback,#adminmenuwrap{border-width:0 0 0 1px}#adminmenushadow{right:auto;left:0}#adminmenu li .wp-submenu{left:auto;right:146px}.folded #adminmenu .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{left:auto;right:26px}#adminmenu .wp-submenu.sub-open,#adminmenu li.focused.wp-not-current-submenu .wp-submenu,.folded #adminmenu li.focused.wp-has-current-submenu .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu.sub-open,.no-js #adminmenu .wp-has-submenu:hover .wp-submenu,.no-js.folded #adminmenu .wp-has-current-submenu:hover .wp-submenu{padding:0 0 8px 8px}#adminmenu div.wp-menu-image{float:right}#adminmenu li li{margin-left:0;margin-right:8px}#adminmenu .wp-submenu a,#adminmenu li li a,.folded #adminmenu .wp-not-current-submenu li a{padding-left:0;padding-right:12px}#adminmenu .wp-not-current-submenu li a{padding-left:0;padding-right:18px}.folded #adminmenu li li{margin-left:inherit;margin-right:0}.folded #adminmenu li li a{padding-left:inherit;padding-right:0}.wp-menu-arrow{right:0;-moz-transform:translate(-139px);-webkit-transform:translate(-139px);-o-transform:translate(-139px);-ms-transform:translate(-139px);transform:translate(-139px)}.ie8 .wp-menu-arrow{right:-20px}#adminmenu .wp-menu-arrow div{left:-8px;width:16px}#adminmenu li.wp-not-current-submenu .wp-menu-arrow{-moz-transform:translate(-138px);-webkit-transform:translate(-138px);-o-transform:translate(-138px);-ms-transform:translate(-138px);transform:translate(-138px)}.folded .wp-menu-arrow{-moz-transform:translate(-27px);-webkit-transform:translate(-27px);-o-transform:translate(-27px);-ms-transform:translate(-27px);transform:translate(-27px)}#adminmenu .wp-not-current-submenu .wp-menu-arrow div{border-style:solid solid none none;border-width:1px 1px 0 0}#adminmenu .wp-menu-image img{float:right;padding:5px 2px 0 0}#adminmenu .wp-submenu .wp-submenu-head{padding:6px 10px 5px 4px}#adminmenu li .wp-submenu-wrap{border-width:1px 0 1px 1px;border-style:solid none solid solid;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:3px;-webkit-border-top-right-radius:0;-webkit-border-top-left-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:3px;border-top-right-radius:0;border-top-left-radius:3px}.folded #adminmenu .wp-submenu ul{border-width:0 1px 0 0}.folded #adminmenu .wp-submenu a{padding-left:0;padding-right:10px}.folded #adminmenu a.wp-has-submenu{margin-left:0;margin-right:40px}#adminmenu .wp-menu-toggle{clear:left;float:left;padding:1px 0 0 2px}#adminmenu .awaiting-mod,#adminmenu span.update-plugins,#sidemenu li a span.update-plugins{font-family:Tahoma,Arial,sans-serif;margin-left:0;margin-right:7px}#collapse-button{float:right}@media only screen and (max-width:900px){#adminmenu li .wp-submenu,#adminmenu .wp-has-current-submenu .wp-submenu{left:auto;right:26px}#adminmenu li.focused.wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu .wp-submenu.sub-open{padding:0 0 8px 8px}.folded #adminmenu .wp-not-current-submenu li a{padding-left:0;padding-right:12px}#adminmenu li li,#adminmenu li li a{padding-left:inherit;padding-right:0}.wp-menu-arrow{-moz-transform:translate(-27px);-webkit-transform:translate(-27px);-o-transform:translate(-27px);-ms-transform:translate(-27px);transform:translate(-27px)}#adminmenu .wp-submenu ul{border-width:0 1px 0 0}#adminmenu .wp-submenu a{padding-left:0;padding-right:10px}#adminmenu a.wp-has-submenu{margin-left:0;margin-right:40px}body #wpcontent{margin-left:0;margin-right:52px}body .wp-admin #footer{margin-left:15px;margin-right:52px}}.post-com-count-wrapper{font-family:Tahoma,Arial,sans-serif}.column-response .post-com-count{float:right;margin-right:0;margin-left:5px}.response-links{float:right}.widefat th{font-family:Tahoma,Arial,sans-serif}.widefat td p{margin:2px 0 .8em}.postbox-container{float:right}.postbox .handlediv{float:left}#the-comment-list p.comment-author img{float:right;margin-right:0;margin-left:8px}#dashboard_browser_nag p.browser-update-nag.has-browser-icon{padding-right:0;padding-left:125px}.welcome-panel .welcome-panel-close{right:auto;left:10px}.welcome-panel .welcome-panel-close:before{left:auto;right:-12px}.welcome-panel .wp-badge{float:right}.welcome-panel-content .about-description,.welcome-panel h3{margin-left:0;margin-right:190px}.welcome-panel .welcome-panel-column{margin:0 -25px 0 5%;padding-left:0;padding-right:25px;float:right}.welcome-panel .welcome-panel-column.welcome-panel-last{margin-right:auto;padding-right:0;margin-left:0}.welcome-panel h4 .icon16{margin-left:0;margin-right:-32px}.welcome-panel .welcome-panel-column-container{padding:0 25px 0 0}.welcome-panel .welcome-panel-column ul{margin:1.6em 1.3em 1em 1em}.welcome-panel .welcome-panel-column li{padding-left:0;padding-right:2px}.fixed .column-comments{text-align:right}.fixed .column-comments .vers{padding-left:0;padding-right:3px}.fixed .column-comments a{float:right}.sorting-indicator{margin-left:0;margin-right:7px}th.sortable a span,th.sorted a span{float:right}.tablenav-pages a{margin-right:0;margin-left:1px}.tablenav-pages .next-page{margin-left:0;margin-right:2px}.tablenav a.button-secondary{margin:3px 0 0 8px}.tablenav .tablenav-pages{float:left}.tablenav .displaying-num{margin-right:0;margin-left:10px;font-family:Tahoma,Arial,sans-serif;font-style:normal}.tablenav .actions{padding:2px 0 0 8px}.tablenav .delete{margin-right:0;margin-left:20px}.view-switch{float:left}.filter{float:right;margin:-5px 10px 0 0}.filter .subsubsub{margin-left:0;margin-right:-10px}#posts-filter fieldset{float:right;margin:0 0 1em 1.5ex}#posts-filter fieldset legend{padding:0 1px .2em 0}#wpbody-content .inline-edit-row fieldset{float:right}#wpbody-content .quick-edit-row-page fieldset.inline-edit-col-right .inline-edit-col{border-width:0 1px 0 0}#wpbody-content .bulk-edit-row .inline-edit-col-bottom{float:left}.inline-edit-row fieldset label span.title{float:right}.inline-edit-row fieldset label span.input-text-wrap{margin-left:0;margin-right:5em}.quick-edit-row-post fieldset.inline-edit-col-right label span.title{padding-right:0;padding-left:.5em}#wpbody-content .quick-edit-row fieldset .inline-edit-group label.alignleft:first-child{margin-right:0;margin-left:.5em}.inline-edit-row fieldset span.title,.inline-edit-row fieldset span.checkbox-title{font-family:Tahoma,Arial,sans-serif;font-style:normal}.inline-edit-row fieldset .inline-edit-date{float:right}.inline-edit-row fieldset ul.cat-checklist label,.inline-edit-row .catshow,.inline-edit-row .cathide,.inline-edit-row #bulk-titles div{font-family:Tahoma,Arial,sans-serif}.quick-edit-row-post fieldset label.inline-edit-status{float:right}#bulk-titles div a{float:right;margin:3px -2px 0 3px;overflow:hidden;text-indent:-9999px}#post-body-content{float:right}#poststuff #post-body.columns-2{margin-left:300px;margin-right:0}#post-body.columns-2 #postbox-container-1{float:left;margin-left:-300px;margin-right:0}@media only screen and (max-width:850px){#wpbody-content #post-body.columns-2 #postbox-container-1{margin-left:0}}#titlediv #title-prompt-text,#wp-fullscreen-title-prompt-text{right:0}#sample-permalink{direction:ltr}#sample-permalink #editable-post-name{unicode-bidi:embed}#wp-fullscreen-title-prompt-text{left:auto;right:0}.postarea h3 label{float:right}.submitbox .submit{text-align:right}.inside-submitbox #post_status{margin:2px -2px 2px 0}.submitbox .submit input{margin-right:0;margin-left:4px}#normal-sortables .postbox .submit{float:left}.taxonomy div.tabs-panel{margin:0 125px 0 5px}#side-sortables .comments-box thead th,#normal-sortables .comments-box thead th{font-style:normal}#commentsdiv img.waiting{padding-left:0;padding-right:5px}#post-body .add-menu-item-tabs li.tabs{border-width:1px 1px 1px 0;margin-right:0;margin-left:-1px}#post-body .tagsdiv #newtag{margin-right:0;margin-left:5px}.autosave-info{padding:2px 2px 2px 15px;text-align:left}#post-body .wp_themeSkin .mceStatusbar a.mceResize{background:transparent url(../images/resize-rtl.gif) no-repeat scroll left bottom;cursor:sw-resize}.curtime #timestamp{background-position:right top;padding-left:0;padding-right:18px}#postcustomstuff table input,#postcustomstuff table select,#postcustomstuff table textarea{margin:8px 8px 8px 0}table.diff td,table.diff th{font-family:Consolas,Monaco,monospace}.category-adder{margin-left:0;margin-right:120px}#post-body ul.add-menu-item-tabs{float:right;text-align:left;margin:0 5px 0 -120px}#post-body ul.add-menu-item-tabs li.tabs{-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:3px;-webkit-border-bottom-left-radius:0;-webkit-border-bottom-right-radius:3px;border-top-left-radius:0;border-top-right-radius:3px;border-bottom-left-radius:0;border-bottom-right-radius:3px}#front-page-warning,#front-static-pages ul,ul.export-filters,.inline-editor ul.cat-checklist ul,.categorydiv ul.categorychecklist ul,.customlinkdiv ul.categorychecklist ul,.posttypediv ul.categorychecklist ul,.taxonomydiv ul.categorychecklist ul{margin-left:0;margin-right:18px}#post-body .add-menu-item-tabs li.tabs{border-style:solid solid solid none;border-width:1px 1px 1px 0;margin-right:0;margin-left:-1px}p.help,p.description,span.description,.form-wrap p{font-style:normal;font-family:Tahoma,Arial,sans-serif}.taghint{margin:15px 12px -24px 0}#poststuff .tagsdiv .howto{margin:0 8px 6px 0}.ac_results li{text-align:right}.links-table th{text-align:right}#wpbody-content .describe th{text-align:right}.describe .media-item-info .A1B1{padding:0 10px 0 0}.media-upload-form td label{margin-left:6px;margin-right:2px}.media-upload-form .align .field label{padding:0 23px 0 0;margin:0 3px 0 1em}.media-upload-form tr.image-size label{margin:0 5px 0 0}#wpbody-content .describe p.help{padding:0 5px 0 0}.media-item .error-div a.dismiss,.describe-toggle-on,.describe-toggle-off{float:left;margin-right:0;margin-left:15px}.media-item .error-div a.dismiss{padding:0 15px 0 0}.media-item .error-div{padding-left:0;padding-right:10px}.media-item .pinkynail{float:right}.media-item .describe td{padding:0 0 8px 8px}.media-item .progress{float:left;margin:6px 0 0 10px}#find-posts-response .found-radio{padding:5px 8px 0 0}.find-box-search label{padding-right:0;padding-left:6px}.find-box #resize-se{right:auto;left:1px}form.upgrade .hint{font-style:normal}.imgedit-menu div{float:right}.imgedit-help{font-style:normal}.imgedit-submit-btn{margin-left:0;margin-right:20px}.form-table th{text-align:right}.form-table input.tog{margin-right:0;margin-left:2px;float:right}.form-table table.color-palette{float:right}#replysubmit img.waiting,.inline-edit-save img.waiting{float:left}#replysubmit .button{margin-right:0;margin-left:5px}#edithead .inside{float:right;padding:3px 5px 2px 0}.comment-ays th{border-right-style:none;border-left-style:solid;border-right-width:0;border-left-width:1px}.spam-undo-inside .avatar,.trash-undo-inside .avatar{margin-left:8px}#comment-status-radio input{margin:2px 0 5px 3px}h3.available-themes{float:right}.available-theme{margin-right:0;margin-left:10px;padding:20px 0 20px 20px}#current-theme .theme-info li,.theme-options li,.available-theme .action-links li{float:right;padding-right:0;padding-left:10px;margin-right:0;margin-left:10px;border-right:0;border-left:1px solid #dfdfdf}.available-theme .action-links li{padding-left:8px;margin-left:8px}#current-theme .theme-info li:last-child,.theme-options li:last-child,.available-theme .action-links li:last-child{padding-left:0;margin-right:0;border-left:0}.available-theme .action-links .delete-theme{float:left;margin-left:0;margin-right:8px}.available-theme .action-links p{float:right}#current-theme.has-screenshot{padding-left:0;padding-right:330px}#current-theme h4 span{margin-left:0;margin-right:20px}#current-theme img{float:right;width:300px;margin-left:0;margin-right:-330px}.theme-options .load-customize{margin-right:0;margin-left:30px;float:right}.theme-options span{float:right;margin-right:0;margin-left:10px}.theme-options ul{float:right}@media only screen and (max-width:1200px){#current-theme.has-screenshot{padding-right:270px}#current-theme img{margin-right:-270px;width:240px}}#broken-themes{text-align:right}.appearance_page_custom-header .available-headers .default-header{float:right;margin:0 0 20px 20px}.appearance_page_custom-header .random-header{margin:0 0 20px 20px}.appearance_page_custom-header .available-headers label input,.appearance_page_custom-header .random-header label input{margin-right:0;margin-left:10px}.nav-tab{margin:0 0 -1px 6px}h2 .nav-tab{font-family:Tahoma,Arial,sans-serif}.plugins .desc ul,.plugins .desc ol{margin:0 2em 0 0}#wpbody-content .plugins .plugin-title,#wpbody-content .plugins .theme-title{padding-right:0;padding-left:12px}#profile-page .form-table #rich_editing{margin-right:0;margin-left:5px}#profile-page #pass1,#profile-page #pass2,#profile-page #user_login{direction:ltr}#your-profile legend{font-family:Tahoma,Arial,sans-serif}.pressthis a span{background-position:right 5px;padding:8px 27px 8px 11px}.pressthis a:after{right:auto;left:10px;background:transparent;transform:skew(-20deg) rotate(-6deg);-webkit-transform:skew(-20deg) rotate(-6deg);-moz-transform:skew(-20deg) rotate(-6deg)}.pressthis a:hover:after{transform:skew(-20deg) rotate(-9deg);-webkit-transform:skew(-20deg) rotate(-9deg);-moz-transform:skew(-20deg) rotate(-9deg)}#utc-time,#local-time{padding-left:0;padding-right:25px;font-style:normal;font-family:Tahoma,Arial,sans-serif}#footer{margin-left:20px}#wpcontent,#footer{margin-right:165px}.wrap.about-wrap{margin-left:40px;margin-right:20px}.about-wrap h1,.about-text{margin-right:0;margin-left:200px}.about-wrap h2.nav-tab-wrapper{padding-left:0;padding-right:6px}.about-wrap .wp-badge{right:auto;left:0}.about-wrap h2 .nav-tab{margin-right:0;margin-left:3px}.about-wrap .changelog li{margin-left:0;margin-right:3em}.about-wrap .three-col-images .last-feature{float:left}.about-wrap .three-col-images .first-feature{float:right}.about-wrap .feature-section.three-col div{margin-right:0;margin-left:4.999999999%;float:right}.about-wrap .feature-section.three-col h4{text-align:right}.about-wrap .feature-section.three-col img{margin-right:5px;margin-left:0}.about-wrap .feature-section.three-col .last-feature{margin-left:0}.about-wrap .feature-section img{margin:0 0 10px .7%}.about-wrap .feature-section.images-stagger-right img{float:left;margin:0 12px 12px 5px}.about-wrap .feature-section.images-stagger-left img{float:right;margin:0 5px 12px 12px}.about-wrap li.wp-person,.about-wrap li.wp-person img.gravatar{float:right;margin-right:0;margin-left:10px}#template div{margin-right:0;margin-left:190px}.column-author img,.column-username img{float:right;margin-right:0;margin-left:10px}.tagchecklist{margin-left:0;margin-right:14px}.tagchecklist strong{margin-left:0;margin-right:-8px}.tagchecklist span{margin-right:0;margin-left:25px;float:right}.tagchecklist span a{margin:6px -9px 0 0;float:right}#poststuff h2{clear:right}#poststuff h3,.metabox-holder h3{font-family:Tahoma,Arial,sans-serif}.tool-box .title{font-family:Tahoma,Arial,sans-serif}#sidemenu{margin:-30px 315px 0 15px;float:left;padding-left:0;padding-right:10px}#sidemenu a{float:right}table .vers,table .column-visible,table .column-rating{text-align:right}.screen-meta-toggle{right:auto;left:15px}* html #template div{margin-left:0}.list-ajax-loading{float:left;margin-right:0;margin-left:9px}#editorcontainer .wp_themeSkin .mceStatusbar{padding-left:0;padding-right:5px}#editorcontainer .wp_themeSkin .mceStatusbar div{float:right}#editorcontainer .wp_themeSkin .mceStatusbar a.mceResize{float:left}.wp-full-overlay .wp-full-overlay-sidebar{margin:0;left:auto;right:0;border-right:0;border-left:1px solid rgba(0,0,0,0.2)}.wp-full-overlay-sidebar:after{right:auto;left:0;box-shadow:inset 5px 0 4px -4px rgba(0,0,0,0.1)}.wp-full-overlay.collapsed,.wp-full-overlay.expanded .wp-full-overlay-sidebar{margin-right:0!important}.wp-full-overlay.expanded{margin-right:300px;margin-left:0}.wp-full-overlay.collapsed .wp-full-overlay-sidebar{margin-right:-300px;margin-left:0}.wp-full-overlay .collapse-sidebar{right:0;left:auto;margin-right:15px}.wp-full-overlay.collapsed .collapse-sidebar{right:100%}.wp-full-overlay .collapse-sidebar-arrow{margin-right:2px;margin-left:0;background:transparent url('../../wp-admin/images/arrows.png') no-repeat 0 -108px}.wp-full-overlay.collapsed .collapse-sidebar-arrow{background-position:0 -72px}.wp-full-overlay .collapse-sidebar-label{right:100%;left:auto;margin-right:10px;margin-left:0}.install-theme-info .theme-install{float:left}#wpcontent{margin-left:0;margin-right:165px}.folded #wpcontent{margin-left:0;margin-right:52px}.folded.wp-admin #footer{margin-left:15px;margin-right:52px}#wpbody-content{float:right}#adminmenuwrap{float:right}#adminmenu{clear:right}.inner-sidebar{float:left;clear:left}.has-right-sidebar #post-body{float:right;clear:right;margin-right:0;margin-left:-340px}.has-right-sidebar #post-body-content{margin-right:0;margin-left:300px}#col-right{float:left;clear:left}.alignleft{float:right}.alignright{float:left}.textleft{text-align:right}.textright{text-align:left}.screen-reader-text,.screen-reader-text span{left:auto;right:-1000em}body,td,textarea,input,select{font-family:Tahoma,Arial,sans-serif}ul.ul-disc,ul.ul-square,ol.ol-decimal{margin-left:0;margin-right:1.8em}.subsubsub{float:right}.widefat thead th:first-of-type{-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:3px;border-top-left-radius:0;border-top-right-radius:3px}.widefat thead th:last-of-type{-webkit-border-top-right-radius:0;-webkit-border-top-left-radius:3px;border-top-right-radius:0;border-top-left-radius:3px}.widefat tfoot th:first-of-type{-webkit-border-bottom-left-radius:0;-webkit-border-bottom-right-radius:3px;border-bottom-left-radius:0;border-bottom-right-radius:3px}.widefat tfoot th:last-of-type{-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:3px;border-bottom-right-radius:0;border-bottom-left-radius:3px}.widefat th{text-align:right}.widefat th input{margin:0 8px 0 0}.wrap{margin-right:0;margin-left:15px}.wrap h2,.subtitle{font-family:Tahoma,Arial,sans-serif}.wrap h2{padding-right:0;padding-left:15px}.subtitle{padding-left:0;padding-right:25px}.wrap .add-new-h2{font-family:Tahoma,Arial,sans-serif;margin-left:0;margin-right:4px}.wrap h2.long-header{padding-left:0}#dashboard-widgets-wrap .has-sidebar{margin-right:0;margin-left:-51%}#dashboard-widgets-wrap .has-sidebar .has-sidebar-content{margin-right:0;margin-left:51%}.view-all{right:auto;left:0}#dashboard_right_now p.sub,#dashboard-widgets h4,a.rsswidget,#dashboard_plugins h4,#dashboard_plugins h5,#dashboard_recent_comments .comment-meta .approve,#dashboard_right_now td.b,#dashboard_right_now .versions a{font-family:Tahoma,Arial,sans-serif}#dashboard_right_now p.sub{left:auto;right:15px}#dashboard_right_now td.b{padding-right:0;padding-left:6px;text-align:left}#dashboard_right_now .t{padding-right:0;padding-left:12px}#dashboard_right_now .table_content{float:right}#dashboard_right_now .table_discussion{float:left}#dashboard_right_now a.button{float:left;clear:left}#dashboard_plugins .inside span{padding-left:0;padding-right:5px}#dashboard-widgets h3 .postbox-title-action{right:auto;left:30px}#the-comment-list .pingback{padding-left:0!important;padding-right:9px!important}#the-comment-list .comment-item{padding:1em 70px 1em 10px}#the-comment-list .comment-item .avatar{float:right;margin-left:0;margin-right:-60px}.rss-widget cite{text-align:left}.rss-widget span.rss-date{font-family:Tahoma,Arial,sans-serif;margin-left:0;margin-right:3px}#dashboard_quick_press h4{float:right;text-align:left}#dashboard_quick_press .wp-media-buttons{margin:0 5em .5em 0}#dashboard_quick_press h4 label{margin-right:0;margin-left:10px}#dashboard_quick_press .input-text-wrap,#dashboard_quick_press .textarea-wrap{margin:0 5em 1em 0}#dashboard_quick_press #media-buttons{margin:0 5em .5em 0;padding:0}#dashboard-widgets #dashboard_quick_press form p.submit{margin-left:0;margin-right:4.6em}#dashboard-widgets #dashboard_quick_press form p.submit input{float:right}#dashboard-widgets #dashboard_quick_press form p.submit #save-post{margin:0 10px 0 1em}#dashboard-widgets #dashboard_quick_press form p.submit #publish{float:left}#dashboard-widgets #dashboard_quick_press form p.submit img.waiting{margin:4px 0 0 6px}#dashboard_recent_drafts h4 abbr{font-family:Tahoma,Arial,sans-serif;margin-left:0;margin-right:3px}body.login{font-family:Tahoma,Arial,sans-serif}.login form{margin-right:8px;margin-left:0}.login form .forgetmenot{float:right}.login form .submit{float:left}#login form .submit input{font-family:Tahoma,Arial,sans-serif}.login #nav,.login #backtoblog{margin:0 16px 0 0}#login_error,.login .message{margin:0 8px 16px 0}.login #user_pass,.login #user_login,.login #user_email{margin-left:6px;margin-right:0;direction:ltr}.login h1 a{text-decoration:none}.login .button-primary{float:left}#nav-menus-frame{margin-right:300px;margin-left:0}#wpbody-content #menu-settings-column{margin-right:-300px;margin-left:0;float:right}#menu-management-liquid{float:right}#menu-management{margin-left:20px;margin-right:0}.post-body-plain{padding:10px 0 0 10px}#menu-management .nav-tabs-arrow-left{right:0;left:auto}#menu-management .nav-tabs-arrow-right{left:0;right:auto;text-align:left;font-family:Tahoma,Arial,sans-serif}#menu-management .nav-tabs{padding-right:20px;padding-left:10px}.js #menu-management .nav-tabs{float:right;margin-right:0;margin-left:-400px}#select-nav-menu-container{text-align:left}#wpbody .open-label{float:right}#wpbody .open-label span{padding-left:10px;padding-right:0}.js .input-with-default-title{font-style:normal;font-weight:bold}.postbox .howto input{float:left}#nav-menu-theme-locations .button-controls{text-align:left}.meta-sep,.submitcancel{float:right}#cancel-save{margin-left:0;margin-right:20px}.list-controls{float:right}.add-to-menu{float:left}#add-custom-link label span{float:right;padding-left:5px;padding-right:0}.nav-menus-php .howto span{float:right}.list li .menu-item-title input{margin-left:3px;margin-right:0}.menu-item-handle{padding-right:10px;padding-left:0}.menu-item-edit-active .menu-item-handle{-webkit-border-bottom-left-radius:0;-webkit-border-bottom-right-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0}.menu-item-handle .item-title{margin-left:13em;margin-right:0}.menu-item-handle .item-edit{right:auto;left:-20px}.menu-item-depth-0{margin-right:0;margin-left:0}.menu-item-depth-1{margin-right:30px;margin-left:0}.menu-item-depth-2{margin-right:60px;margin-left:0}.menu-item-depth-3{margin-right:90px;margin-left:0}.menu-item-depth-4{margin-right:120px;margin-left:0}.menu-item-depth-5{margin-right:150px;margin-left:0}.menu-item-depth-6{margin-right:180px;margin-left:0}.menu-item-depth-7{margin-right:210px;margin-left:0}.menu-item-depth-8{margin-right:240px;margin-left:0}.menu-item-depth-9{margin-right:270px;margin-left:0}.menu-item-depth-10{margin-right:300px;margin-left:0}.menu-item-depth-11{margin-right:330px;margin-left:0}.menu-item-depth-0 .menu-item-transport{margin-right:0;margin-left:0}.menu-item-depth-1 .menu-item-transport{margin-right:-30px;margin-left:0}.menu-item-depth-2 .menu-item-transport{margin-right:-60px;margin-left:0}.menu-item-depth-3 .menu-item-transport{margin-right:-90px;margin-left:0}.menu-item-depth-4 .menu-item-transport{margin-right:-120px;margin-left:0}.menu-item-depth-5 .menu-item-transport{margin-right:-150px;margin-left:0}.menu-item-depth-6 .menu-item-transport{margin-right:-180px;margin-left:0}.menu-item-depth-7 .menu-item-transport{margin-right:-210px;margin-left:0}.menu-item-depth-8 .menu-item-transport{margin-right:-240px;margin-left:0}.menu-item-depth-9 .menu-item-transport{margin-right:-270px;margin-left:0}.menu-item-depth-10 .menu-item-transport{margin-right:-300px;margin-left:0}.menu-item-depth-11 .menu-item-transport{margin-right:-330px;margin-left:0}.item-type{padding-left:10px;padding-right:0}.item-controls{left:20px;right:auto}.item-controls .item-order{padding-left:10px;padding-right:0}.item-edit{left:-20px;right:auto;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:0}.menu-item-settings{padding:10px 10px 10px 0;border-width:0 1px 1px 1px}#custom-menu-item-url{direction:ltr}.link-to-original{font-style:normal;font-weight:bold}.link-to-original a{padding-right:4px;padding-left:0}.menu-item-settings .description-thin,.menu-item-settings .description-wide{margin-left:10px;margin-right:0;float:right}.major-publishing-actions .publishing-action{text-align:left;float:left}.major-publishing-actions .delete-action{text-align:right;float:right;padding-left:15px;padding-right:0}.menu-name-label{margin-left:15px;margin-right:0}.auto-add-pages{float:right}div.star-holder{background:url('../images/stars-rtl.png?ver=20120506.png') repeat-x bottom right}div.star-holder .star-rating{background:url('../images/stars-rtl.png?ver=20120506.png') repeat-x top right;float:right}#plugin-information ul#sidemenu{left:auto;right:0}#plugin-information h2{margin-right:0;margin-left:200px}#plugin-information .fyi{margin-left:5px;margin-right:20px}#plugin-information .fyi h2{margin-left:0}#plugin-information .fyi ul{padding:10px 7px 10px 5px}#plugin-information #section-screenshots li p{padding-left:0;padding-right:20px}#plugin-information #section-screenshots ol,#plugin-information .updated,#plugin-information pre{margin-right:0;margin-left:215px}#plugin-information .updated,#plugin-information .error{clear:none;direction:rtl}#plugin-information #section-holder .section{direction:ltr}.posting{margin-left:212px;margin-right:0;position:relative}h3.tb{margin-left:0;margin-right:5px}#publish{float:left}.postbox .handlediv{float:left}.actions li{float:right;margin-right:0;margin-left:10px}#extra-fields .actions{margin:-23px 0 0 -7px}#img_container a{float:right}#category-add input,#category-add select{font-family:Tahoma,Arial,sans-serif}#tagsdiv #newtag{margin-right:0;margin-left:5px}#tagadd{margin-left:0;margin-right:3px}#tagchecklist span{margin-left:.5em;margin-right:10px;float:right}#tagchecklist span a{margin:6px -9px 0 0;float:right}.submit input,.button,.button-primary,.button-secondary,.button-highlighted,#postcustomstuff .submit input{font-family:Tahoma,Arial,sans-serif}.ac_results li{text-align:right}#TB_ajaxContent #options{right:auto;left:25px}#post_status{margin-left:0;margin-right:10px}#templateside{float:left}#template textarea,#docs-list{direction:ltr}.theme-details .theme-version{float:right}.theme-details .star-holder{float:left}.feature-filter .feature-group{float:right}.feature-filter .feature-name{float:right;text-align:left}.feature-filter .feature-group li{float:right;padding-right:0;padding-left:25px}div.widget-liquid-left{float:right;clear:right;margin-right:0;margin-left:-325px}div#widgets-left{margin-right:5px;margin-left:325px}div.widget-liquid-right{float:left;clear:left}.inactive-sidebar .widget{float:right}div.sidebar-name h3{font-family:Tahoma,Arial,sans-serif}#widget-list .widget{float:right}.inactive-sidebar .widget-placeholder{float:right}.widget-top .widget-title-action{float:left}.widget-control-edit{padding:0 0 0 8px}.sidebar-name-arrow{float:left}.press-this-sidebar{float:left}.press-this #header-logo,.press-this #wphead h1{float:right}.ltr{direction:ltr}body.locale-he-il,.locale-he-il .quicktags,.locale-he-il .search,.locale-he-il .howto,.locale-he-il #adminmenu .awaiting-mod,.locale-he-il #adminmenu span.update-plugins,.locale-he-il #sidemenu li a span.update-plugins,.locale-he-il .post-com-count-wrapper,.locale-he-il .widefat th,.locale-he-il .tablenav .displaying-num,.locale-he-il .inline-edit-row fieldset span.title,.locale-he-il .inline-edit-row fieldset span.checkbox-title,.locale-he-il .inline-edit-row fieldset ul.cat-checklist label,.locale-he-il .inline-edit-row .catshow,.locale-he-il .inline-edit-row .cathide,.locale-he-il .inline-edit-row #bulk-titles div,.locale-he-il p.help,.locale-he-il p.description,.locale-he-il span.description,.locale-he-il .form-wrap p,.locale-he-il h2 .nav-tab,.locale-he-il #your-profile legend,.locale-he-il #utc-time,.locale-he-il #local-time,.locale-he-il #poststuff h3,.locale-he-il .metabox-holder h3,.locale-he-il .tool-box .title,.locale-he-il td,.locale-he-il textarea,.locale-he-il input,.locale-he-il select,.locale-he-il .wrap h2,.locale-he-il .subtitle,.locale-he-il .wrap .add-new-h2,.locale-he-il #dashboard_right_now p.sub,.locale-he-il #dashboard-widgets h4,.locale-he-il a.rsswidget,.locale-he-il #dashboard_plugins h4,.locale-he-il #dashboard_plugins h5,.locale-he-il #dashboard_recent_comments .comment-meta .approve,.locale-he-il #dashboard_right_now td.b,.locale-he-il #dashboard_right_now .versions a,.locale-he-il .rss-widget span.rss-date,.locale-he-il #dashboard_recent_drafts h4 abbr,body.login.locale-he-il,.locale-he-il #login form .submit input,.locale-he-il #menu-management .nav-tabs-arrow-right,.locale-he-il #category-add input,.locale-he-il #category-add select,.locale-he-il .submit input,.locale-he-il .button,.locale-he-il .button-primary,.locale-he-il .button-secondary,.locale-he-il .button-highlighted,.locale-he-il #postcustomstuff .submit input,.locale-he-il div.sidebar-name h3{font-family:Arial,sans-serif}.locale-he-il em{font-style:normal;font-weight:bold} \ No newline at end of file diff --git a/wp-admin/css/wp-admin-rtl.dev.css b/wp-admin/css/wp-admin-rtl.dev.css index 3bf4c0fb..84c6c35d 100644 --- a/wp-admin/css/wp-admin-rtl.dev.css +++ b/wp-admin/css/wp-admin-rtl.dev.css @@ -41,13 +41,13 @@ TABLE OF CONTENTS: 23.0 - Misc 24.0 - Dead 25.0 - TinyMCE tweaks +26.0 - Full Overlay w/ Sidebar +27.0 - Customize Loader ------------------------------------------------------------------------------*/ - - /*------------------------------------------------------------------------------ 1.0 - Text Styles ------------------------------------------------------------------------------*/ @@ -58,10 +58,10 @@ ol { } .code, code { - font-family: Tahoma, Arial, sans-serif; + font-family: monospace; + direction: ltr; } - .quicktags, .search { font: 12px Tahoma, Arial, sans-serif; } @@ -113,6 +113,21 @@ p.search-box { float: left; } +input[type=password] { + direction: ltr; +} + +input[type="text"].ui-autocomplete-loading { + background: transparent url('../images/loading.gif') no-repeat left center; +} + +ul#add-to-blog-users { + margin: 0 14px 0 0; +} + +.ui-autocomplete li { + text-align: right; +} /*------------------------------------------------------------------------------ 3.0 - Actions @@ -130,7 +145,6 @@ p.search-box { border-right:0; border-left-width: 1px; border-left-style: solid; - float: right; } #post-body .misc-pub-section-last { @@ -202,98 +216,6 @@ form.upgrade .hint { margin: 1px 1px 1px 2px; } -/* Distraction Free Writing mode - * =Overlay Styles --------------------------------------------------------------- */ - -/* No RTL for now, this space intentionally left blank */ - -/* =Overlay Body --------------------------------------------------------------- */ -#wp-fullscreen-body { - right: 0; - left:auto; -} - -#wp-fullscreen-tagline { - float: left; -} - -/* =Top bar --------------------------------------------------------------- */ -#fullscreen-topbar { - left:auto; - right: 0; -} - -#wp-fullscreen-mode-bar, -#wp-fullscreen-button-bar, -#wp-fullscreen-close, -#wp-fullscreen-count { - float: right; -} - -#wp-fullscreen-save { - float: left; -} - -#wp-fullscreen-save { - padding: 2px 5px 0 2px; -} - -#wp-fullscreen-buttons > div { - float: right; -} - -#wp-fullscreen-mode-bar { - padding: 1px 0 0 14px; -} - -#wp-fullscreen-modes a { - float: right; - border-width: 1px 0 1px 1px; -} - -#wp-fullscreen-modes a:first-child { - -webkit-border-top-left-radius: 0; - -webkit-border-top-right-radius: 3px; - -webkit-border-bottom-left-radius: 0; - -webkit-border-bottom-right-radius: 3px; - border-width: 1px; - border-top-left-radius: 0; - border-top-right-radius: 3px; - border-bottom-right-left: 0; - border-bottom-right-radius: 3px; -} - -#wp-fullscreen-modes a:last-child { - -webkit-border-top-right-radius: 0; - -webkit-border-top-left-radius: 3px; - -webkit-border-bottom-right-radius: 0; - -webkit-border-bottom-left-radius: 3px; - border-top-right-radius: 0; - border-top-left-radius: 3px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 3px; -} - -#wp-fullscreen-save img, -#wp-fullscreen-save span { - padding-right: 0; - padding-left: 4px; -} - -/* =Thickbox Adjustments --------------------------------------------------------------- */ -/* No RTL for now, this space intentionally left blank */ - - -/* =TinyMCE Adjustments --------------------------------------------------------------- */ -/* No RTL for now, this space intentionally left blank */ - - - /*------------------------------------------------------------------------------ 6.0 - Admin Header ------------------------------------------------------------------------------*/ @@ -430,8 +352,7 @@ form.upgrade .hint { left: 0; } -#adminmenu li .wp-submenu, -.folded #adminmenu .wp-has-current-submenu .wp-submenu { +#adminmenu li .wp-submenu { left: auto; right: 146px; } @@ -576,6 +497,62 @@ form.upgrade .hint { float: right; } +/* Auto-folding of the admin menu */ +@media only screen and (max-width: 900px) { + #adminmenu li .wp-submenu, + #adminmenu .wp-has-current-submenu .wp-submenu { + left: auto; + right: 26px; + } + + #adminmenu li.focused.wp-has-current-submenu .wp-submenu, + #adminmenu .wp-has-current-submenu .wp-submenu.sub-open { + padding: 0 0 8px 8px; + } + + .folded #adminmenu .wp-not-current-submenu li a { + padding-left: 0; + padding-right: 12px; + } + + #adminmenu li li, + #adminmenu li li a { + padding-left: inherit; + padding-right: 0 + } + + .wp-menu-arrow { + -moz-transform: translate( -27px ); + -webkit-transform: translate( -27px ); + -o-transform: translate( -27px ); + -ms-transform: translate( -27px ); + transform: translate( -27px ); + } + + #adminmenu .wp-submenu ul { + border-width: 0 1px 0 0; + } + + #adminmenu .wp-submenu a { + padding-left: 0; + padding-right: 10px; + } + + #adminmenu a.wp-has-submenu { + margin-left: 0; + margin-right: 40px; + } + + body #wpcontent { + margin-left: 0; + margin-right: 52px; + } + + body .wp-admin #footer { + margin-left: 15px; + margin-right: 52px; + } +} /* List table styles */ .post-com-count-wrapper { @@ -725,7 +702,7 @@ th.sorted a span { margin-right: 0; margin-left: 10px; font-family: Tahoma, Arial, sans-serif; - font-style: bold; + font-style: normal; } .tablenav .actions { @@ -829,6 +806,27 @@ th.sorted a span { /*------------------------------------------------------------------------------ 11.0 - Write/Edit Post Screen ------------------------------------------------------------------------------*/ +/* structural/layout */ +#post-body-content { + float: right; +} + +#poststuff #post-body.columns-2 { + margin-left: 300px; + margin-right: 0; +} + +#post-body.columns-2 #postbox-container-1 { + float: left; + margin-left: -300px; + margin-right: 0; +} + +@media only screen and (max-width: 850px) { + #wpbody-content #post-body.columns-2 #postbox-container-1 { + margin-left: 0; + } +} #titlediv #title-prompt-text, #wp-fullscreen-title-prompt-text { @@ -868,31 +866,7 @@ th.sorted a span { float: left; } - -#post-body ul.category-tabs, -#post-body ul.add-menu-item-tabs { - float: right; - text-align: left; - /* Negative margin for the sake of those without JS: all tabs display */ - margin: 0 5px 0 -120px; -} - - -#post-body ul.category-tabs li.tabs, -#post-body ul.add-menu-item-tabs li.tabs { - -webkit-border-top-left-radius: 0; - -webkit-border-top-right-radius: 3px; - -webkit-border-bottom-left-radius: 0; - -webkit-border-bottom-right-radius: 3px; - border-top-left-radius: 0; - border-top-right-radius: 3px; - border-bottom-left-radius: 0; - border-bottom-right-radius: 3px; -} - -#post-body .categorydiv div.tabs-panel, -.taxonomy div.tabs-panel, -#post-body #linkcategorydiv div.tabs-panel { +.taxonomy div.tabs-panel { margin: 0 125px 0 5px; } @@ -906,24 +880,12 @@ th.sorted a span { padding-right: 5px; } -#post-body .category-tabs li.tabs, #post-body .add-menu-item-tabs li.tabs { border-width: 1px 1px 1px 0; margin-right: 0; margin-left: -1px; } -/* positioning etc. */ - -#posts-filter fieldset { - float: right; - margin: 0 0 1em 1.5ex; -} - -#posts-filter fieldset legend { - padding: 0 1px .2em 0; -} - /* Global classes */ #post-body .tagsdiv #newtag { @@ -974,8 +936,6 @@ table.diff td, table.diff th { margin-right: 120px; } - -#post-body ul.category-tabs, #post-body ul.add-menu-item-tabs { float: right; text-align: left; @@ -983,7 +943,6 @@ table.diff td, table.diff th { margin: 0 5px 0 -120px; } -#post-body ul.category-tabs li.tabs, #post-body ul.add-menu-item-tabs li.tabs { -webkit-border-top-left-radius: 0; -webkit-border-top-right-radius: 3px; @@ -1002,13 +961,11 @@ ul.export-filters, .categorydiv ul.categorychecklist ul, .customlinkdiv ul.categorychecklist ul, .posttypediv ul.categorychecklist ul, -.taxonomydiv ul.categorychecklist ul, -#linkcategorydiv ul.categorychecklist ul { +.taxonomydiv ul.categorychecklist ul { margin-left: 0; margin-right: 18px; } -#post-body .category-tabs li.tabs, #post-body .add-menu-item-tabs li.tabs { border-style: solid solid solid none; border-width: 1px 1px 1px 0; @@ -1040,6 +997,10 @@ span.description, text-align: right; } +.links-table th { + text-align: right; +} + /*------------------------------------------------------------------------------ 14.0 - Media Screen ------------------------------------------------------------------------------*/ @@ -1109,7 +1070,6 @@ span.description, padding: 5px 8px 0 0; } - .find-box-search label { padding-right: 0; padding-left: 6px; @@ -1120,7 +1080,6 @@ span.description, left: 1px; } - form.upgrade .hint { font-style: normal; } @@ -1195,20 +1154,98 @@ form.upgrade .hint { margin: 2px 0 5px 3px; } - - /*------------------------------------------------------------------------------ 16.0 - Themes ------------------------------------------------------------------------------*/ -td.available-theme { - text-align: right; +h3.available-themes { + float: right; +} + +.available-theme { + margin-right: 0; + margin-left: 10px; + padding: 20px 0 20px 20px; +} + +#current-theme .theme-info li, +.theme-options li, +.available-theme .action-links li { + float: right; + padding-right: 0; + padding-left: 10px; + margin-right: 0; + margin-left: 10px; + border-right: none; + border-left: 1px solid #dfdfdf; +} + +.available-theme .action-links li { + padding-left: 8px; + margin-left: 8px; +} + +#current-theme .theme-info li:last-child, +.theme-options li:last-child, +.available-theme .action-links li:last-child { + padding-left: 0; + margin-right: 0; + border-left: 0; +} + +.available-theme .action-links .delete-theme { + float: left; + margin-left: 0; + margin-right: 8px; +} + +.available-theme .action-links p { + float: right; +} + +#current-theme.has-screenshot { + padding-left: 0; + padding-right: 330px; +} + +#current-theme h4 span { + margin-left: 0; + margin-right: 20px; } #current-theme img { + float: right; + width: 300px; + margin-left: 0; + margin-right: -330px; +} + +.theme-options .load-customize { + margin-right: 0; + margin-left: 30px; + float: right; +} + +.theme-options span { float: right; margin-right: 0; - margin-left: 1em; + margin-left: 10px; +} + +.theme-options ul { + float: right; +} + +/* Allow for three-up on 1024px wide screens, e.g. tablets */ +@media only screen and (max-width: 1200px) { + #current-theme.has-screenshot { + padding-right: 270px; + } + + #current-theme img { + margin-right: -270px; + width: 240px; + } } #broken-themes { @@ -1278,6 +1315,12 @@ h2 .nav-tab { margin-left: 5px } +#profile-page #pass1, +#profile-page #pass2, +#profile-page #user_login { + direction: ltr; +} + #your-profile legend { font-family: Tahoma, Arial, sans-serif; } @@ -1287,8 +1330,8 @@ h2 .nav-tab { ------------------------------------------------------------------------------*/ .pressthis a span { - background-position: -20px 5px ; - padding: 8px 32px 8px 0; + background-position: right 5px; + padding: 8px 27px 8px 11px; } .pressthis a:after { @@ -1366,41 +1409,12 @@ h2 .nav-tab { margin-right: 3em; } -.about-wrap .feature-section .left-feature, -.about-wrap .feature-section img, -.about-wrap .feature-section .right-feature { - float: right; -} - -.about-wrap .feature-section .left-feature { - margin-right: 0; - margin-left: 0; -} - -.about-wrap .feature-section .right-feature { - margin-left: 0; - margin-right: 0; -} - -.about-wrap .feature-section.text-features { - float: right; -} -.about-wrap .feature-section.screenshot-features { +.about-wrap .three-col-images .last-feature { float: left; } -.about-wrap .feature-section.screenshot-features .angled-right { - margin-left: 0; - margin-right: 2.5em; -} -.about-wrap .feature-section.screenshot-features .angled-right p { - margin-left: 0; - margin-right: 290px; -} -.about-wrap .feature-section .angled-right img, -.about-wrap .feature-section .angled-left img { - margin-right: 0; - margin-left: 30px; +.about-wrap .three-col-images .first-feature { + float: right; } .about-wrap .feature-section.three-col div { @@ -1408,43 +1422,32 @@ h2 .nav-tab { margin-left: 4.999999999%; float: right; } + .about-wrap .feature-section.three-col h4 { text-align: right; } + .about-wrap .feature-section.three-col img { margin-right: 5px; margin-left: 0; } + .about-wrap .feature-section.three-col .last-feature { margin-left: 0; } -.about-wrap .feature-section .feature-images img { - margin-right: auto; - margin-left: 5px; +.about-wrap .feature-section img { + margin: 0 0 10px 0.7%; } -.about-wrap .feature-section.images-stagger-left .angled-left { - margin-left: auto; - margin-right: 5px; -} -.about-wrap .feature-section .angled-right { + +.about-wrap .feature-section.images-stagger-right img { float: left; + margin: 0 12px 12px 5px; } -.about-wrap .feature-section.images-stagger-right .feature-images { - right: auto; - left: 0; -} -.about-wrap .feature-section.images-stagger-left .feature-images { - left: auto; - right: 0; -} -.about-wrap .feature-section.images-stagger-right .left-feature { - margin-right: 0; - margin-left: 350px; -} -.about-wrap .feature-section.images-stagger-left .right-feature { - margin-left: 0; - margin-right: 350px; + +.about-wrap .feature-section.images-stagger-left img { + float: right; + margin: 0 5px 12px 12px; } .about-wrap li.wp-person, @@ -1566,6 +1569,72 @@ table .column-rating { float: left; } +/*------------------------------------------------------------------------------ + 26.0 - Full Overlay w/ Sidebar +------------------------------------------------------------------------------*/ +.wp-full-overlay .wp-full-overlay-sidebar { + margin: 0; + left: auto; + right: 0; + border-right: 0; + border-left: 1px solid rgba( 0, 0, 0, 0.2 ); +} + +.wp-full-overlay-sidebar:after { + right: auto; + left: 0; + box-shadow: inset 5px 0 4px -4px rgba(0, 0, 0, 0.1); +} + +.wp-full-overlay.collapsed, +.wp-full-overlay.expanded .wp-full-overlay-sidebar { + margin-right: 0 !important; +} + +.wp-full-overlay.expanded { + margin-right: 300px; + margin-left: 0; +} + +.wp-full-overlay.collapsed .wp-full-overlay-sidebar { + margin-right: -300px; + margin-left: 0; +} + +/* Collapse Button */ +.wp-full-overlay .collapse-sidebar { + right: 0; + left: auto; + margin-right: 15px; +} + +.wp-full-overlay.collapsed .collapse-sidebar { + right: 100%; +} + +.wp-full-overlay .collapse-sidebar-arrow { + margin-right: 2px; + margin-left: 0; + background: transparent url('../../wp-admin/images/arrows.png') no-repeat 0 -108px; +} + +.wp-full-overlay.collapsed .collapse-sidebar-arrow { + background-position: 0 -72px; +} + +.wp-full-overlay .collapse-sidebar-label { + right: 100%; + left: auto; + margin-right: 10px; + margin-left: 0; +} + +/*------------------------------------------------------------------------------ + 27.0 - Customize Loader +------------------------------------------------------------------------------*/ +.install-theme-info .theme-install { + float: left; +} /* MERGED */ @@ -1708,11 +1777,11 @@ ol.ol-decimal { margin-left: 15px; } - .wrap h2, .subtitle { font-family: Tahoma, Arial, sans-serif; } + .wrap h2 { padding-right: 0; padding-left: 15px; @@ -1733,7 +1802,6 @@ ol.ol-decimal { padding-left: 0; } - /* dashboard */ #dashboard-widgets-wrap .has-sidebar { margin-right: 0; @@ -1755,8 +1823,10 @@ ol.ol-decimal { a.rsswidget, #dashboard_plugins h4, #dashboard_plugins h5, -#dashboard_recent_comments .comment-meta .approve { - font-family: Tahoma, Arial; +#dashboard_recent_comments .comment-meta .approve, +#dashboard_right_now td.b, +#dashboard_right_now .versions a { + font-family: Tahoma, Arial, sans-serif; } #dashboard_right_now p.sub { @@ -1768,7 +1838,6 @@ a.rsswidget, padding-right: 0; padding-left: 6px; text-align: left; - font-family: Tahoma, Arial; } #dashboard_right_now .t { @@ -1784,10 +1853,6 @@ a.rsswidget, float:left; } -#dashboard_right_now .versions a { - font-family: Tahoma, Arial; -} - #dashboard_right_now a.button { float: left; clear: left; @@ -1825,7 +1890,7 @@ a.rsswidget, } .rss-widget span.rss-date { - font-family: Tahoma, Arial; + font-family: Tahoma, Arial, sans-serif; margin-left: 0; margin-right: 3px; } @@ -1878,14 +1943,14 @@ a.rsswidget, /* Recent Drafts */ #dashboard_recent_drafts h4 abbr { - font-family: Tahoma, Arial; + font-family: Tahoma, Arial, sans-serif; margin-left:0; margin-right: 3px; } /* login */ body.login { - font-family: Tahoma, arial; + font-family: Tahoma, Arial, sans-serif; } .login form { @@ -1902,7 +1967,7 @@ body.login { } #login form .submit input { - font-family: Tahoma, arial; + font-family: Tahoma, Arial, sans-serif; } .login #nav, @@ -1920,7 +1985,7 @@ body.login { .login #user_email { margin-left: 6px; margin-right: 0; - direction:ltr; + direction: ltr; } .login h1 a { @@ -1931,7 +1996,6 @@ body.login { float: left; } - /* nav-menu */ #nav-menus-frame { margin-right: 300px; @@ -2030,10 +2094,20 @@ body.login { } /* Custom Links */ -#add-custom-link label span { float: right; padding-left: 5px; padding-right:0;} -.howto span { float: right; } +#add-custom-link label span { + float: right; + padding-left: 5px; + padding-right: 0; +} -.list li .menu-item-title input { margin-left: 3px; margin-right: 0 } +.nav-menus-php .howto span { + float: right; +} + +.list li .menu-item-title input { + margin-left: 3px; + margin-right: 0; +} /* Nav Menu */ .menu-item-handle { @@ -2050,7 +2124,10 @@ body.login { margin-left:13em; margin-right:0; } - +.menu-item-handle .item-edit { + right: auto; + left: -20px; +} /* WARNING: The factor of 30px is hardcoded into the nav-menus javascript. */ .menu-item-depth-0 { margin-right: 0px; margin-left:0;} @@ -2110,14 +2187,19 @@ body.login { border-width: 0 1px 1px 1px; } +#custom-menu-item-url { + direction: ltr; +} + .link-to-original { font-style: normal; font-weight: bold; } - .link-to-original a { - padding-right: 4px; - padding-left:0; - } + +.link-to-original a { + padding-right: 4px; + padding-left:0; +} .menu-item-settings .description-thin, .menu-item-settings .description-wide { @@ -2148,17 +2230,13 @@ body.login { float: right; } - -/* plugin-install */ -div.star { - left: auto; - right: 0; - letter-spacing: 0; +/* Star ratings */ +div.star-holder { + background: url('../images/stars-rtl.png?ver=20120506.png') repeat-x bottom right; } - -.star img, div.star a, div.star a:hover, div.star a:visited { - right: auto; - left: 0; +div.star-holder .star-rating { + background: url('../images/stars-rtl.png?ver=20120506.png') repeat-x top right; + float: right; } #plugin-information ul#sidemenu { @@ -2189,6 +2267,7 @@ div.star { padding-right: 20px; } +#plugin-information #section-screenshots ol, #plugin-information .updated, #plugin-information pre { margin-right: 0; @@ -2201,7 +2280,7 @@ div.star { direction: rtl; } -#section-description { +#plugin-information #section-holder .section { direction: ltr; } @@ -2212,12 +2291,6 @@ div.star { position: relative; } -#side-info-column { - float: left; - right: auto; - left: 0; -} - h3.tb { margin-left: 0; margin-right: 5px; @@ -2248,20 +2321,7 @@ h3.tb { #category-add input, #category-add select { - font-family: Tahoma, Arial; -} - -.inline-editor ul.cat-checklist ul, -.categorydiv ul.categorychecklist ul, -#linkcategorydiv ul.categorychecklist ul { - margin-left: 0; - margin-right: 18px; -} - -/* Categories */ -.category-tabs li { - padding-left: 0; - padding-right: 8px; + font-family: Tahoma, Arial, sans-serif; } /* Tags */ @@ -2308,43 +2368,22 @@ h3.tb { margin-right: 10px; } -/* theme-editor */ +/* theme-editor, plugin-editor */ #templateside { float: left; } -#template textarea { +#template textarea, +#docs-list { direction: ltr; } /* theme-install */ -div.star { - left:auto; - right: 0; -} - -.star img, -div.star a, -div.star a:hover, -div.star a:visited { - right: auto; - left: 0; -} - -.theme-listing .theme-item h3 { - font-style: normal; -} - -#theme-information .theme-preview-img { +.theme-details .theme-version { float: right; - margin: 5px 15px 10px 25px; } -#theme-information .action-button #cancel { - float: right; -} - -#theme-information .action-button #install { +.theme-details .star-holder { float: left; } @@ -2415,4 +2454,79 @@ div.sidebar-name h3 { float: left; } +.press-this #header-logo, +.press-this #wphead h1 { + float: right; +} + +/* RTL */ +.ltr { + direction: ltr; +} +/* =Localized CSS +-------------------------------------------------------------- */ + +/* he_IL: Remove Tahoma from the font stack. Arial is best for Hebrew. */ +body.locale-he-il, +.locale-he-il .quicktags, .locale-he-il .search, +.locale-he-il .howto, +.locale-he-il #adminmenu .awaiting-mod, +.locale-he-il #adminmenu span.update-plugins, +.locale-he-il #sidemenu li a span.update-plugins, +.locale-he-il .post-com-count-wrapper, +.locale-he-il .widefat th, +.locale-he-il .tablenav .displaying-num, +.locale-he-il .inline-edit-row fieldset span.title, +.locale-he-il .inline-edit-row fieldset span.checkbox-title, +.locale-he-il .inline-edit-row fieldset ul.cat-checklist label, +.locale-he-il .inline-edit-row .catshow, +.locale-he-il .inline-edit-row .cathide, +.locale-he-il .inline-edit-row #bulk-titles div, +.locale-he-il p.help, +.locale-he-il p.description, +.locale-he-il span.description, +.locale-he-il .form-wrap p, +.locale-he-il h2 .nav-tab, +.locale-he-il #your-profile legend, +.locale-he-il #utc-time, .locale-he-il #local-time, +.locale-he-il #poststuff h3, +.locale-he-il .metabox-holder h3, +.locale-he-il .tool-box .title, +.locale-he-il td, +.locale-he-il textarea, +.locale-he-il input, +.locale-he-il select, +.locale-he-il .wrap h2, +.locale-he-il .subtitle, +.locale-he-il .wrap .add-new-h2, +.locale-he-il #dashboard_right_now p.sub, +.locale-he-il #dashboard-widgets h4, +.locale-he-il a.rsswidget, +.locale-he-il #dashboard_plugins h4, +.locale-he-il #dashboard_plugins h5, +.locale-he-il #dashboard_recent_comments .comment-meta .approve, +.locale-he-il #dashboard_right_now td.b, +.locale-he-il #dashboard_right_now .versions a, +.locale-he-il .rss-widget span.rss-date, +.locale-he-il #dashboard_recent_drafts h4 abbr, +body.login.locale-he-il, +.locale-he-il #login form .submit input, +.locale-he-il #menu-management .nav-tabs-arrow-right, +.locale-he-il #category-add input, +.locale-he-il #category-add select, +.locale-he-il .submit input, +.locale-he-il .button, +.locale-he-il .button-primary, +.locale-he-il .button-secondary, +.locale-he-il .button-highlighted, +.locale-he-il #postcustomstuff .submit input, +.locale-he-il div.sidebar-name h3 { + font-family: Arial, sans-serif; +} + +/* he_IL: Have be bold rather than italic. */ +.locale-he-il em { + font-style: normal; + font-weight: bold; +} diff --git a/wp-admin/css/wp-admin.css b/wp-admin/css/wp-admin.css index 006b1971..3c41a559 100644 --- a/wp-admin/css/wp-admin.css +++ b/wp-admin/css/wp-admin.css @@ -1 +1 @@ -#wpwrap{height:auto;min-height:100%;width:100%;position:relative;}#wpcontent{height:100%;}#wpcontent,#footer{margin-left:165px;}.folded #wpcontent,.folded #footer{margin-left:52px;}#wpbody-content{padding-bottom:65px;float:left;width:100%;}#adminmenuback,#adminmenuwrap,#adminmenu,#adminmenu .wp-submenu,#adminmenu .wp-submenu-wrap,.folded #adminmenu .wp-has-current-submenu .wp-submenu{width:145px;}#adminmenuback{position:absolute;top:0;bottom:0;z-index:-1;}#adminmenu{clear:left;margin:0;padding:0;list-style:none;}.folded #adminmenuback,.folded #adminmenuwrap,.folded #adminmenu,.folded #adminmenu li.menu-top{width:32px;}.inner-sidebar{float:right;clear:right;display:none;width:281px;position:relative;}.columns-2 .inner-sidebar{margin-right:auto;width:286px;display:block;}.inner-sidebar #side-sortables,.columns-2 .inner-sidebar #side-sortables{min-height:300px;width:280px;padding:0;}.has-right-sidebar .inner-sidebar{display:block;}.has-right-sidebar #post-body{float:left;clear:left;width:100%;margin-right:-2000px;}.has-right-sidebar #post-body-content{margin-right:300px;}#post-body-content #side-sortables.empty-container{border:0 none;height:0;}#col-container,#col-left,#col-right{overflow:hidden;padding:0;margin:0;}#col-left{width:35%;}#col-right{float:right;clear:right;width:65%;}.col-wrap{padding:0 7px;}.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:text-bottom;}html,body{height:100%;margin:0;padding:0;}body{font-family:sans-serif;font-size:12px;line-height:1.4em;min-width:600px;}body.iframe{min-width:0;}body.login{background:#fbfbfb;min-width:0;}iframe,img{border:0;}td,textarea,input,select{font-family:inherit;font-size:inherit;font-weight:inherit;}td,textarea{line-height:inherit;}input,select{line-height:15px;}a,input,select{outline:0;}blockquote,q{quotes:none;}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}p{margin:1em 0;}blockquote{margin:1em;}label{cursor:pointer;}li,dd{margin-bottom:6px;}textarea,input,select{margin:1px;padding:3px;}h1,h2,h3,h4,h5,h6{display:block;font-weight:bold;}h1{font-size:2em;margin:.67em 0;}h2{font-size:1.5em;margin:.83em 0;}h3{font-size:1.17em;margin:1em 0;}h4{font-size:1em;margin:1.33em 0;}h5{font-size:.83em;margin:1.67em 0;}h6{font-size:.67em;margin:2.33em 0;}ul,ol{padding:0;}ul{list-style:none;}ol{list-style-type:decimal;margin-left:2em;}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;}.code,code{font-family:Consolas,Monaco,monospace;}kbd,code{padding:1px 3px;margin:0 1px;font-size:11px;}.subsubsub{list-style:none;margin:8px 0 5px;padding:0;white-space:nowrap;font-size:12px;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,div.updated,div.error,.wrap .add-new-h2,textarea,input[type="text"],input[type="password"],input[type="file"],input[type="button"],input[type="submit"],input[type="reset"],input[type="email"],input[type="number"],input[type="search"],input[type="tel"],input[type="url"],select,.tablenav .tablenav-pages a,.tablenav-pages span.current,#titlediv #title,.postbox,#postcustomstuff table,#postcustomstuff input,#postcustomstuff textarea,.imgedit-menu div,.plugin-update-tr .update-message,#poststuff .inside .the-tagcloud,.login form,#login_error,.login .message,#menu-management .menu-edit,.nav-menus-php .list-container,.menu-item-handle,.link-to-original,.nav-menus-php .major-publishing-actions .form-invalid,.press-this #message,#TB_window,.tbtitle,.highlight,.feature-filter,#widget-list .widget-top,.editwidget .widget-inside{-webkit-border-radius:3px;border-radius:3px;border-width:1px;border-style:solid;}.widefat{border-spacing:0;width:100%;clear:both;margin:0;}.widefat *{word-wrap:break-word;}.widefat a{text-decoration:none;}.widefat thead th:first-of-type{-webkit-border-top-left-radius:3px;border-top-left-radius:3px;}.widefat thead th:last-of-type{-webkit-border-top-right-radius:3px;border-top-right-radius:3px;}.widefat tfoot th:first-of-type{-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;}.widefat tfoot th:last-of-type{-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;}.widefat td,.widefat th{border-width:1px 0;border-style:solid;}.widefat tfoot th{border-bottom:none;}.widefat .no-items td{border-bottom-width:0;}.widefat td{font-size:12px;padding:4px 7px 2px;vertical-align:top;}.widefat td p,.widefat td ol,.widefat td ul{font-size:12px;}.widefat th{padding:7px 7px 8px;text-align:left;line-height:1.3em;font-size:14px;}.widefat th input{margin:0 0 0 8px;padding:0;vertical-align:text-top;}.widefat .check-column{width:2.2em;padding:11px 0 0;vertical-align:top;}.widefat tbody th.check-column{padding:9px 0 22px;}.widefat .num,.column-comments,.column-links,.column-posts{text-align:center;}.widefat th#comments{vertical-align:middle;}.wrap{margin:4px 15px 0 0;}div.updated,div.error{padding:0 .6em;margin:5px 15px 2px;}div.updated p,div.error p{margin:.5em 0;padding:2px;}.wrap div.updated,.wrap div.error,.media-upload-form div.error{margin:5px 0 15px;}.wrap h2,.subtitle{font-weight:normal;margin:0;text-shadow:#fff 0 1px 0;}.wrap h2{font-size:23px;padding:9px 15px 4px 0;line-height:29px;}.subtitle{font-size:14px;padding-left:25px;}.wrap .add-new-h2{font-family:sans-serif;margin-left:4px;padding:3px 8px;position:relative;top:-3px;text-decoration:none;font-size:12px;border:0 none;}.wrap h2.long-header{padding-right:0;}.fade-1000,.fade-600,.fade-400,.fade-300{opacity:0;-moz-transition-property:opacity;-webkit-transition-property:opacity;-o-transition-property:opacity;transition-property:opacity;}.fade-1000{-moz-transition-duration:1s;-webkit-transition-duration:1s;-o-transition-duration:1s;transition-duration:1s;}.fade-600{-moz-transition-duration:.6s;-webkit-transition-duration:.6s;-o-transition-duration:.6s;transition-duration:.6s;}.fade-400{-moz-transition-duration:.4s;-webkit-transition-duration:.4s;-o-transition-duration:.4s;transition-duration:.4s;}.fade-300{-moz-transition-duration:.3s;-webkit-transition-duration:.3s;-o-transition-duration:.3s;transition-duration:.3s;}.fade-trigger{opacity:1;}div.sidebar-name h3,#menu-management .nav-tab,#dashboard_plugins h5,a.rsswidget,#dashboard_right_now td.b,#dashboard-widgets h4,.tool-box .title,#poststuff h3,.metabox-holder h3,.pressthis a,#your-profile legend,.inline-edit-row fieldset span.title,.inline-edit-row fieldset span.checkbox-title,.tablenav .displaying-num,.widefat th,.quicktags,.search{font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;}h2 .nav-tab,.wrap h2,.subtitle,.login form .input{font-family:"HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",sans-serif;}.quicktags,.search{font-size:12px;}.icon32{float:left;height:34px;margin:7px 8px 0 0;width:36px;}.icon16{height:18px;width:18px;padding:6px 6px;margin:-6px 0 0 -8px;float:left;}.key-labels label{line-height:24px;}.pre{white-space:pre-wrap;white-space:-moz-pre-wrap!important;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;}.howto{font-style:italic;display:block;font-family:sans-serif;}p.install-help{margin:8px 0;font-style:italic;}.no-break{white-space:nowrap;}.wp-admin select{padding:2px;height:2em;}.wp-admin select[multiple]{height:auto;}select option{padding:2px;}.submit{padding:1.5em 0;margin:5px 0;-webkit-border-bottom-left-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-left-radius:3px;border-bottom-right-radius:3px;}form p.submit a.cancel:hover{text-decoration:none;}.submit input,.button,input.button,.button-primary,input.button-primary,.button-secondary,input.button-secondary,.button-highlighted,input.button-highlighted,#postcustomstuff .submit input{text-decoration:none;font-size:12px!important;line-height:13px;padding:3px 8px;cursor:pointer;border-width:1px;border-style:solid;-webkit-border-radius:11px;border-radius:11px;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;}#minor-publishing-actions input,#major-publishing-actions input,#minor-publishing-actions .preview{min-width:80px;text-align:center;}textarea.all-options,input.all-options{width:250px;}input.large-text,textarea.large-text{width:99%;}input.regular-text,#adduser .form-field input{width:25em;}input.small-text{width:50px;}#doaction,#doaction2,#post-query-submit{margin-right:8px;}.tablenav select[name="action"],.tablenav select[name="action2"]{width:130px;}.tablenav select[name="m"]{width:155px;}.tablenav select#cat{width:170px;}#wpcontent option{padding:2px;}#timezone_string option{margin-left:1em;}label,#your-profile label+a{vertical-align:middle;}#misc-publishing-actions label{vertical-align:baseline;}#pass-strength-result{border-style:solid;border-width:1px;float:left;margin:13px 5px 5px 1px;padding:3px 5px;text-align:center;width:200px;display:none;}.indicator-hint{padding-top:8px;}p.search-box{float:right;margin:0;}#major-publishing-actions{padding:10px 10px 8px;clear:both;border-top:none;}#delete-action{line-height:25px;vertical-align:middle;text-align:left;float:left;}#publishing-action{text-align:right;float:right;line-height:23px;}#post-body #minor-publishing{padding-bottom:10px;}#post-body #misc-publishing-actions{padding:0;}#post-body .misc-pub-section{border-right-width:1px;border-right-style:solid;border-top:0;border-bottom:0;min-height:30px;float:left;max-width:32%;}#post-body .misc-pub-section-last{border-right:0;}#misc-publishing-actions{padding:6px 0 0;}.misc-pub-section{padding:6px 10px 8px;border-width:1px 0;border-style:solid;}.misc-pub-section:first-child{border-top-width:0;}.misc-pub-section-last{border-bottom-width:0;}#minor-publishing-actions{padding:10px 10px 2px 8px;text-align:right;}#minor-publishing{border-bottom-width:1px;border-bottom-style:solid;-webkit-box-shadow:0 1px 0 #fff;-moz-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff;}#save-post{float:left;}#minor-publishing .ajax-loading{padding:3px 0 0 4px;float:left;}.preview{float:right;}#sticky-span{margin-left:18px;}.side-info{margin:0;padding:4px;font-size:11px;}.side-info h5{padding-bottom:7px;font-size:14px;margin:12px 2px 5px;border-bottom-width:1px;border-bottom-style:solid;}.side-info ul{margin:0;padding-left:18px;list-style:square;}a.button,a.button-primary,a.button-secondary{line-height:15px;padding:3px 10px;white-space:nowrap;-webkit-border-radius:10px;}.approve,.unapproved .unapprove{display:none;}.unapproved .approve,.spam .approve,.trash .approve{display:inline;}td.action-links,th.action-links{text-align:right;}.describe .del-link{padding-left:5px;}#update-nag,.update-nag{line-height:19px;padding:5px 0;font-size:12px;text-align:center;margin:-1px 15px 0 5px;border-width:1px;border-style:solid;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;}.plugins .plugin-update{padding:0;}.plugin-update .update-message{margin:0 10px 8px 31px;font-weight:bold;}ul#dismissed-updates{display:none;}form.upgrade{margin-top:8px;}form.upgrade .hint{font-style:italic;font-size:85%;margin:-0.5em 0 2em 0;}.ajax-feedback{visibility:hidden;vertical-align:bottom;}#ajax-response.alignleft{margin-left:2em;}.fullscreen-overlay{z-index:149999;display:none;position:fixed;top:0;bottom:0;left:0;right:0;filter:inherit;}.fullscreen-active .fullscreen-overlay,.fullscreen-active #wp-fullscreen-body{display:block;}.fullscreen-fader{z-index:200000;}.fullscreen-active .fullscreen-fader{display:none;}#wp-fullscreen-body{width:100%;z-index:150005;display:none;position:absolute;top:0;left:0;}#wp-fullscreen-wrap{margin:0 auto 50px;position:relative;padding-top:60px;}#wp-fullscreen-title{font-size:1.7em;line-height:100%;outline:medium none;padding:6px 7px;width:100%;margin-bottom:30px;}#wp-fullscreen-container{padding:4px 10px 50px;}#wp-fullscreen-title,#wp-fullscreen-container{-webkit-border-radius:0;border-radius:0;border:1px dashed transparent;background:transparent;-moz-transition-property:border-color;-moz-transition-duration:.6s;-webkit-transition-property:border-color;-webkit-transition-duration:.6s;-o-transition-property:border-color;-o-transition-duration:.6s;transition-property:border-color;transition-duration:.6s;}#wp_mce_fullscreen{width:100%;min-height:300px;border:0;background:transparent;font-family:Consolas,Monaco,monospace;line-height:1.6em;padding:0;overflow-y:hidden;outline:none;resize:none;}#wp-fullscreen-tagline{color:#BBB;font-size:18px;float:right;padding-top:5px;}#fullscreen-topbar{position:fixed;top:0;left:0;z-index:150050;border-bottom-style:solid;border-bottom-width:1px;min-width:800px;width:100%;height:40px;}#wp-fullscreen-toolbar{padding:6px 10px 0;clear:both;max-width:1100px;min-width:820px;margin:0 auto;}#wp-fullscreen-mode-bar,#wp-fullscreen-button-bar,#wp-fullscreen-close,#wp-fullscreen-count{float:left;}#wp-fullscreen-save{float:right;padding:2px 2px 0 5px;}#wp-fullscreen-count,#wp-fullscreen-close{padding-top:5px;}#wp-fullscreen-central-toolbar{margin:auto;padding:0;}#wp-fullscreen-buttons>div{float:left;}#wp-fullscreen-mode-bar{padding:1px 14px 0 0;}#wp-fullscreen-modes a{display:block;font-size:11px;text-decoration:none;float:left;margin:1px 0 0 0;padding:2px 6px 2px;border-width:1px 1px 1px 0;border-style:solid;border-color:#bbb;color:#777;text-shadow:0 1px 0 #fff;background-color:#f4f4f4;background-image:-moz-linear-gradient(bottom,#e4e4e4,#f9f9f9);background-image:-webkit-gradient(linear,left bottom,left top,from(#e4e4e4),to(#f9f9f9));}#wp-fullscreen-modes a:hover,.wp-html-mode #wp-fullscreen-modes a:last-child,.wp-tmce-mode #wp-fullscreen-modes a:first-child{color:#333;border-color:#999;background-color:#eee;background-image:-moz-linear-gradient(bottom,#f9f9f9,#e0e0e0);background-image:-webkit-gradient(linear,left bottom,left top,from(#f9f9f9),to(#e0e0e0));}#wp-fullscreen-modes a:first-child{border-width:1px;-webkit-border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;border-top-left-radius:3px;border-bottom-left-radius:3px;}#wp-fullscreen-modes a:last-child{-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;}#wp-fullscreen-buttons .active a{background:inherit;}#wp-fullscreen-buttons .hidden{display:none;}#wp-fullscreen-buttons .disabled{opacity:.5;}.wp-html-mode #wp-fullscreen-buttons div{display:none;}.wp-html-mode #wp-fullscreen-buttons div.wp-fullscreen-both{display:block;}#fullscreen-topbar.fullscreen-make-sticky{display:block!important;}#wp-fullscreen-save img{vertical-align:middle;}#wp-fullscreen-save img,#wp-fullscreen-save span{padding-right:4px;display:none;}#wp-fullscreen-buttons .mce_image .mce_image{background-image:url('../images/menu.png?ver=20111128');background-position:-124px -38px;}#wp-fullscreen-buttons .mce_image .mce_image:hover{background-position:-124px -6px;}.fullscreen-active #TB_overlay{z-index:150100;}.fullscreen-active #TB_window{z-index:150102;}#wp_mce_fullscreen_ifr{background:transparent;}#wp_mce_fullscreen_parent #wp_mce_fullscreen_tbl tr.mceFirst{display:none;}#wp-fullscreen-container .wp_themeSkin table td{vertical-align:top;}#adminmenu a,#sidemenu a,#taglist a,#catlist a{text-decoration:none;}#screen-options-wrap,#contextual-help-wrap{margin:0;padding:8px 20px 12px;position:relative;overflow:auto;}#screen-meta .screen-reader-text{visibility:hidden;}#screen-meta-links{margin:0 24px 0 0;}#screen-meta{display:none;position:relative;margin:0 15px 0 5px;border-width:0 1px 1px;border-style:none solid solid;}#screen-options-link-wrap,#contextual-help-link-wrap{float:right;height:22px;padding:0;margin:0 0 0 6px;font-family:sans-serif;}#screen-options-link-wrap,#contextual-help-link-wrap,#screen-meta{-webkit-border-bottom-left-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-left-radius:3px;border-bottom-right-radius:3px;}#screen-meta-links a.show-settings{text-decoration:none;z-index:1;padding:0 16px 0 6px;height:22px;line-height:22px;font-size:12px;display:block;text-shadow:rgba(255,255,255,0.7) 0 1px 0;}#screen-meta-links a.show-settings:hover{text-decoration:none;}.toggle-arrow{background-repeat:no-repeat;background-position:top left;background-color:transparent;height:22px;line-height:22px;display:block;}.toggle-arrow-active{background-position:bottom left;}#screen-options-wrap h5,#contextual-help-wrap h5{margin:8px 0;font-size:13px;}.metabox-prefs label{display:inline-block;padding-right:15px;white-space:nowrap;line-height:30px;}.metabox-prefs label input{margin:0 5px 0 2px;}.metabox-prefs label a{display:none;}#contextual-help-wrap{padding:0;margin-left:-4px;}#contextual-help-columns{position:relative;}#contextual-help-back{position:absolute;top:0;bottom:0;left:150px;right:170px;border-width:0 1px;border-style:solid;}#contextual-help-wrap.no-sidebar #contextual-help-back{right:0;border-right-width:0;-webkit-border-bottom-right-radius:2px;border-bottom-right-radius:2px;}.contextual-help-tabs{float:left;width:150px;margin:0;}.contextual-help-tabs ul{margin:1em 0;}.contextual-help-tabs li{margin-bottom:0;list-style-type:none;border-style:solid;border-width:1px 0;border-color:transparent;}.contextual-help-tabs a{display:block;padding:5px 5px 5px 12px;line-height:18px;text-decoration:none;}.contextual-help-tabs .active{padding:0;margin:0 -1px 0 0;border-width:1px 0 1px 1px;border-style:solid;}.contextual-help-tabs-wrap{padding:0 20px;overflow:auto;}.help-tab-content{display:none;margin:0 22px 12px 0;line-height:1.6em;}.help-tab-content.active{display:block;}.help-tab-content li{list-style-type:disc;margin-left:18px;}.contextual-help-sidebar{width:150px;float:right;padding:0 8px 0 12px;overflow:auto;}#adminmenuback,#adminmenuwrap{border-width:0 1px 0 0;border-style:solid;}#adminmenuwrap{position:relative;float:left;}#adminmenushadow{position:absolute;top:0;right:0;bottom:0;width:6px;z-index:20;}#adminmenu *{-webkit-user-select:none;-moz-user-select:none;user-select:none;}#adminmenu .wp-submenu{list-style:none;padding:0;margin:0;overflow:hidden;}#adminmenu li .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{display:none;position:absolute;top:-1px;left:146px;z-index:999;overflow:hidden;}.js #adminmenu .wp-submenu.sub-open,.folded #adminmenu .wp-has-current-submenu .wp-submenu.sub-open,.no-js #adminmenu .wp-has-submenu:hover .wp-submenu,#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu li.focused .wp-submenu{display:block;}#adminmenu .wp-has-current-submenu .wp-submenu{position:relative;z-index:2;top:auto;left:auto;right:auto;bottom:auto;padding:0;}#adminmenu .wp-has-current-submenu .wp-submenu-wrap{-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;}.folded #adminmenu .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{top:-5px;left:26px;}#adminmenu .wp-submenu.sub-open,#adminmenu li.focused.wp-not-current-submenu .wp-submenu,.folded #adminmenu li.focused.wp-has-current-submenu .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu.sub-open,.no-js #adminmenu .wp-has-submenu:hover .wp-submenu,.no-js.folded #adminmenu .wp-has-current-submenu:hover .wp-submenu{padding:0 8px 8px 0;}.no-js #adminmenu .wp-has-current-submenu:hover .wp-submenu,#adminmenu .wp-has-current-submenu .wp-submenu{padding:0;}#adminmenu .wp-submenu a{font-size:12px;line-height:18px;}#adminmenu a.menu-top,#adminmenu .wp-submenu-head{font-size:13px;line-height:18px;}#adminmenu div.wp-submenu-head{display:none;}.folded #adminmenu div.wp-submenu-head{display:block;}.folded #adminmenu a.menu-top,body.no-js #adminmenu .wp-menu-toggle,.folded #adminmenu div.wp-menu-toggle{display:none;}#adminmenu div.wp-menu-image{float:left;width:28px;height:28px;}.folded #adminmenu div.wp-menu-image{width:32px;}#adminmenu li{margin:0;padding:0;cursor:pointer;}#adminmenu a{display:block;line-height:18px;padding:2px 5px;}#adminmenu li.menu-top{min-height:29px;position:relative;}#adminmenu a.menu-top{font-weight:bold;line-height:18px;min-width:10em;padding:5px 5px;border-width:1px 0 1px;border-style:solid;}#adminmenu li.wp-menu-open{border-width:0 0 1px;border-style:solid;}#adminmenu .wp-submenu ul{padding:4px 0;}#adminmenu .wp-submenu a{margin:0;}#adminmenu li li{margin-left:8px;}#adminmenu .wp-submenu a,#adminmenu li li a,.folded #adminmenu .wp-not-current-submenu li a{padding-left:12px;}#adminmenu .wp-not-current-submenu li a{padding-left:18px;}.folded #adminmenu li li{margin-left:0;}.folded #adminmenu li li a{padding-left:0;}.wp-menu-arrow{display:none;cursor:auto;z-index:25;position:absolute;right:100%;margin:0;height:30px;width:6px;-moz-transform:translate(146px);-webkit-transform:translate(146px);-o-transform:translate(146px);-ms-transform:translate(146px);transform:translate(146px);}#adminmenu li.wp-has-current-submenu .wp-menu-arrow,#adminmenu li.menu-top:hover .wp-menu-arrow,#adminmenu li.current .wp-menu-arrow,#adminmenu li.focused .wp-menu-arrow,#adminmenu li.menu-top.wp-has-submenu:hover .wp-menu-arrow div{display:block;}#adminmenu li.wp-not-current-submenu:hover .wp-menu-arrow div{display:none;}#adminmenu li.menu-top:hover .wp-menu-arrow,#adminmenu li.menu-top.focused .wp-menu-arrow{z-index:1001;}#adminmenu .wp-menu-arrow div{position:absolute;top:7px;left:-1px;width:14px;height:15px;-moz-transform:matrix(-0.6,1,0.6,1,0,0);-webkit-transform:matrix(-0.6,1,0.6,1,0,0);-o-transform:matrix(-0.6,1,0.6,1,0,0);-ms-transform:matrix(-0.6,1,0.6,1,0,0);transform:matrix(-0.6,1,0.6,1,0,0);}#adminmenu li.wp-not-current-submenu .wp-menu-arrow{-moz-transform:translate(145px);-webkit-transform:translate(145px);-o-transform:translate(145px);-ms-transform:translate(145px);transform:translate(145px);height:28px;border-width:1px 0;border-style:solid;}.folded .wp-menu-arrow{-moz-transform:translate(33px);-webkit-transform:translate(33px);-o-transform:translate(33px);-ms-transform:translate(33px);transform:translate(33px);}#adminmenu .wp-not-current-submenu .wp-menu-arrow div{width:15px;top:6px;border-width:0 0 1px 1px;border-style:solid;}.wp-menu-arrow,.folded #adminmenu li.menu-top:hover .wp-menu-arrow{display:none;}.folded #adminmenu li.current:hover .wp-menu-arrow,.folded #adminmenu li.menu-top.wp-menu-open:hover .wp-menu-arrow{display:block;z-index:125;}#adminmenu .wp-submenu li{padding:0;margin:0;}.folded #adminmenu li.menu-top{border-width:1px 0;border-style:solid none;}#adminmenu .wp-menu-image img{float:left;padding:5px 0 0 2px;opacity:.6;filter:alpha(opacity=60);}#adminmenu li.menu-top:hover .wp-menu-image img,#adminmenu li.wp-has-current-submenu .wp-menu-image img{opacity:1;filter:alpha(opacity=100);}#adminmenu li.wp-menu-separator{height:3px;padding:0;margin:0;border-width:1px 0;border-style:solid;cursor:inherit;}#adminmenu div.separator{height:1px;padding:0;border-width:1px 0 0 0;border-style:solid;}#adminmenu .wp-submenu .wp-submenu-head{padding:6px 4px 5px 10px;cursor:default;border-width:1px 0;border-style:solid;}#adminmenu li .wp-submenu-wrap{border-width:1px 1px 1px 0;border-style:solid solid solid none;position:relative;-webkit-border-bottom-right-radius:3px;-webkit-border-top-right-radius:3px;border-bottom-right-radius:3px;border-top-right-radius:3px;}#adminmenu li.wp-menu-open .wp-submenu-wrap{border:0 none;}.folded #adminmenu .wp-submenu .wp-submenu-wrap{margin-top:3px;}.folded #adminmenu .wp-has-current-submenu{margin-bottom:1px;}.folded #adminmenu .wp-has-current-submenu.menu-top-last{margin-bottom:0;}.folded #adminmenu .wp-has-current-submenu .wp-submenu-wrap{margin-top:4px;}.folded #adminmenu .wp-submenu ul{border-width:0 0 0 1px;border-style:solid;}.folded #adminmenu .wp-submenu a{padding-left:10px;}.folded #adminmenu a.wp-has-submenu{margin-left:40px;}#adminmenu .wp-menu-toggle{width:18px;clear:right;float:right;margin:1px 0 0;height:27px;padding:1px 2px 0 0;cursor:pointer;}#adminmenu .wp-menu-image a{height:24px;}#adminmenu .awaiting-mod,#adminmenu span.update-plugins,#sidemenu li a span.update-plugins{position:absolute;font-family:sans-serif;font-size:9px;line-height:17px;font-weight:bold;margin-top:1px;margin-left:7px;-webkit-border-radius:10px;border-radius:10px;}#adminmenu li .awaiting-mod span,#adminmenu li span.update-plugins span,#sidemenu li a span.update-plugins span{display:block;padding:0 6px;}#adminmenu li span.count-0,#sidemenu li a .count-0{display:none;}#collapse-menu{font-size:12px;line-height:34px;}.folded #collapse-menu span{display:none;}#collapse-button,#collapse-button div{width:15px;height:15px;}#collapse-button{float:left;margin:8px 6px;border-width:1px;border-style:solid;-webkit-border-radius:10px;border-radius:10px;}.post-com-count-wrapper{min-width:22px;font-family:sans-serif;}.post-com-count{height:1.3em;line-height:1.1em;display:block;text-decoration:none;padding:0 0 6px;cursor:pointer;background-position:center -80px;background-repeat:no-repeat;}.post-com-count span{font-size:11px;font-weight:bold;height:1.4em;line-height:1.4em;min-width:.7em;padding:0 6px;display:inline-block;-webkit-border-radius:5px;border-radius:5px;}strong .post-com-count{background-position:center -55px;}.post-com-count:hover{background-position:center -3px;}.column-response .post-com-count{float:left;margin-right:5px;text-align:center;}.response-links{float:left;}#the-comment-list .attachment-80x60{padding:4px 8px;}body.admin-bar #wpcontent,body.admin-bar #adminmenu{padding-top:28px;}.narrow{width:70%;margin-bottom:40px;}.narrow p{line-height:150%;}.widefat th,.widefat td{overflow:hidden;}.widefat th{font-weight:normal;}.widefat td p{margin:2px 0 .8em;}.widefat .column-comment p{margin:.6em 0;}.postbox-container{float:left;}.postbox-container .meta-box-sortables{min-height:350px;}.postbox-container .meta-box-sortables.empty-container,#side-sortables.empty-container{border:3px dashed #CCC;height:350px;}.postbox .hndle{cursor:move;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;border-top-left-radius:3px;border-top-right-radius:3px;}.postbox.closed .hndle{-webkit-border-radius:3px;border-radius:3px;}.hndle a{font-size:11px;font-weight:normal;}.postbox .handlediv{float:right;width:27px;height:30px;cursor:pointer;}.sortable-placeholder{border-width:1px;border-style:dashed;margin-bottom:20px;}.widget,.postbox,.stuffbox{margin-bottom:20px;padding:0;border-width:1px;border-style:solid;line-height:1;}.widget .widget-top,.postbox h3,.stuffbox h3{margin-top:1px;border-bottom-width:1px;border-bottom-style:solid;cursor:move;-webkit-user-select:none;-moz-user-select:none;user-select:none;}.postbox .inside,.stuffbox .inside{padding:0 10px;line-height:1.4em;}.postbox .inside{margin:10px 0;position:relative;}.postbox.closed h3{border:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;}.postbox table.form-table{margin-bottom:0;}.temp-border{border:1px dotted #ccc;}.columns-prefs label{padding:0 5px;}#wpbody-content .metabox-holder{padding-top:10px;}#dashboard-widgets .meta-box-sortables{margin:0 8px;}#dashboard_recent_comments div.undo{border-top-style:solid;border-top-width:1px;margin:0 -10px;padding:3px 8px;font-size:11px;}#the-comment-list td.comment p.comment-author{margin-top:0;margin-left:0;}#the-comment-list p.comment-author img{float:left;margin-right:8px;}#the-comment-list p.comment-author strong a{border:none;}#the-comment-list td{vertical-align:top;}#the-comment-list td.comment{word-wrap:break-word;}.welcome-panel{margin:20px 8px;padding:30px 10px 20px;border-width:1px 0;border-style:solid;position:relative;line-height:1.6em;overflow:auto;}.welcome-panel h3{font-family:"HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",sans-serif;font-size:32px;font-weight:normal;line-height:1.2;margin:.1em 0 .8em;}.welcome-panel h4{font-size:14px;}.welcome-panel .welcome-panel-close{position:absolute;top:0;right:10px;padding:8px 3px;font-size:13px;text-decoration:none;}.welcome-panel .welcome-panel-close:before{background:url('../images/xit.gif') 0 17% no-repeat;content:' ';height:100%;width:10px;left:-12px;position:absolute;}.welcome-panel .welcome-panel-close:hover:before{background-position:100% 17%;}.welcome-panel .wp-badge{float:left;margin-bottom:20px;}.welcome-panel-content{max-width:1500px;}.welcome-panel-content .about-description,.welcome-panel h3{margin-left:190px;}.welcome-panel p.welcome-panel-dismiss{clear:both;padding:1em 0 0 0;}.welcome-panel .welcome-panel-column-container{clear:both;overflow:hidden;position:relative;padding-left:25px;}.welcome-panel .welcome-panel-column{margin:0 5% 0 -25px;padding-left:25px;width:30%;min-width:200px;float:left;}.welcome-panel .welcome-panel-column.welcome-panel-last{margin-right:0;}.welcome-panel h4 .icon16{margin-left:-32px;}.welcome-panel .welcome-panel-column ul{margin:1.6em 1em 1em 1.3em;}.welcome-panel .welcome-panel-column li{list-style-type:disc;padding-left:2px;}table.fixed{table-layout:fixed;}.fixed .column-rating,.fixed .column-visible{width:8%;}.fixed .column-date,.fixed .column-parent,.fixed .column-links{width:10%;}.fixed .column-response,.fixed .column-author,.fixed .column-categories,.fixed .column-tags,.fixed .column-rel,.fixed .column-role{width:15%;}.fixed .column-comments{width:4em;padding:8px 0;text-align:left;}.fixed .column-comments .vers{padding-left:3px;}.fixed .column-comments a{float:left;}.fixed .column-slug{width:25%;}.fixed .column-posts{width:10%;}.fixed .column-icon{width:80px;}#commentsdiv .fixed .column-author,#comments-form .fixed .column-author{width:20%;}#commentsdiv.postbox .inside{margin:0;padding:0;}#commentsdiv.postbox .inside .row-actions{line-height:18px;}#commentsdiv.postbox .inside td{padding:1em 10px;}#commentsdiv.postbox .inside .column-author{width:33%;}#commentsdiv.postbox .inside p{margin:6px 10px 8px;}#commentsdiv.postbox .column-comment p{margin:.6em 0;}#commentsdiv.postbox #replyrow td{padding:0;}.sorting-indicator{display:none;width:7px;height:4px;margin-top:8px;margin-left:7px;background-image:url(../images/sort.gif);background-repeat:no-repeat;}.fixed .column-comments .sorting-indicator{margin-top:3px;}.widefat th.sortable,.widefat th.sorted{padding:0;}th.sortable a,th.sorted a{display:block;overflow:hidden;padding:7px 7px 8px;}.fixed .column-comments.sortable a,.fixed .column-comments.sorted a{padding:8px 0;}th.sortable a span,th.sorted a span{float:left;cursor:pointer;}th.sorted.asc .sorting-indicator,th.desc:hover span.sorting-indicator{display:block;background-position:0 0;}th.sorted.desc .sorting-indicator,th.asc:hover span.sorting-indicator{display:block;background-position:-7px 0;}.tablenav-pages a{border-bottom-style:solid;border-bottom-width:2px;font-weight:bold;margin-right:1px;padding:0 2px;}.tablenav-pages .current-page{text-align:center;}.tablenav-pages .next-page{margin-left:2px;}.tablenav a.button-secondary{display:block;margin:3px 8px 0 0;}.tablenav{clear:both;height:30px;margin:6px 0 4px;vertical-align:middle;}.tablenav.themes{max-width:98%;}.tablenav .tablenav-pages{float:right;display:block;cursor:default;height:30px;line-height:30px;font-size:12px;}.tablenav .no-pages,.tablenav .one-page .pagination-links{display:none;}.tablenav .tablenav-pages a,.tablenav-pages span.current{text-decoration:none;padding:3px 6px;}.tablenav .tablenav-pages a.disabled:hover,.tablenav .tablenav-pages a.disabled:active{cursor:default;}.tablenav .displaying-num{margin-right:10px;font-size:12px;font-style:italic;}.tablenav .actions{padding:2px 8px 0 0;}.tablenav .delete{margin-right:20px;}.view-switch{float:right;margin:6px 8px 0;}.view-switch a{text-decoration:none;}.filter{float:left;margin:-5px 0 0 10px;}.filter .subsubsub{margin-left:-10px;margin-top:13px;}.screen-per-page{width:3em;}#posts-filter fieldset{float:left;margin:0 1.5ex 1em 0;padding:0;}#posts-filter fieldset legend{padding:0 0 .2em 1px;}span.post-state-format{font-weight:normal;}#wpbody-content .inline-edit-row fieldset{font-size:12px;float:left;margin:0;padding:0;width:100%;}tr.inline-edit-row td,#wpbody-content .inline-edit-row fieldset .inline-edit-col{padding:0 .5em;}#wpbody-content .quick-edit-row-page fieldset.inline-edit-col-right .inline-edit-col{border-width:0 0 0 1px;border-style:none none none solid;}#wpbody-content .quick-edit-row-post .inline-edit-col-left{width:40%;}#wpbody-content .quick-edit-row-post .inline-edit-col-right{width:39%;}#wpbody-content .inline-edit-row-post .inline-edit-col-center{width:20%;}#wpbody-content .quick-edit-row-page .inline-edit-col-left{width:50%;}#wpbody-content .quick-edit-row-page .inline-edit-col-right,#wpbody-content .bulk-edit-row-post .inline-edit-col-right{width:49%;}#wpbody-content .bulk-edit-row .inline-edit-col-left{width:30%;}#wpbody-content .bulk-edit-row-page .inline-edit-col-right{width:69%;}#wpbody-content .bulk-edit-row .inline-edit-col-bottom{float:right;width:69%;}#wpbody-content .inline-edit-row-page .inline-edit-col-right{margin-top:27px;}.inline-edit-row fieldset .inline-edit-group{clear:both;}.inline-edit-row fieldset .inline-edit-group:after{content:".";display:block;height:0;clear:both;visibility:hidden;}.inline-edit-row p.submit{clear:both;padding:.5em;margin:.5em 0 0;}.inline-edit-row span.error{line-height:22px;margin:0 15px;padding:3px 5px;}.inline-edit-row h4{margin:.2em 0;padding:0;line-height:23px;}.inline-edit-row fieldset span.title,.inline-edit-row fieldset span.checkbox-title{margin:0;padding:0;line-height:27px;}.inline-edit-row fieldset label,.inline-edit-row fieldset span.inline-edit-categories-label{display:block;margin:.2em 0;}.inline-edit-row fieldset label.inline-edit-tags{margin-top:0;}.inline-edit-row fieldset label.inline-edit-tags span.title{margin:.2em 0;}.inline-edit-row fieldset label span.title{display:block;float:left;width:5em;}.inline-edit-row fieldset label span.input-text-wrap{display:block;margin-left:5em;}.quick-edit-row-post fieldset.inline-edit-col-right label span.title{width:auto;padding-right:.5em;}.inline-edit-row .input-text-wrap input[type=text]{width:100%;}.inline-edit-row fieldset label input[type=checkbox]{vertical-align:text-bottom;}.inline-edit-row fieldset label textarea{width:100%;height:4em;}#wpbody-content .bulk-edit-row fieldset .inline-edit-group label{max-width:50%;}#wpbody-content .quick-edit-row fieldset .inline-edit-group label.alignleft:first-child{margin-right:.5em;}.inline-edit-col-right .input-text-wrap input.inline-edit-menu-order-input{width:6em;}.inline-edit-row h4{text-transform:uppercase;}.inline-edit-row fieldset span.title,.inline-edit-row fieldset span.checkbox-title{font-style:italic;line-height:1.8em;}.inline-edit-row fieldset input[type="text"],.inline-edit-row fieldset textarea{border-style:solid;border-width:1px;}.inline-edit-row fieldset .inline-edit-date{float:left;}.inline-edit-row fieldset input[name=jj],.inline-edit-row fieldset input[name=hh],.inline-edit-row fieldset input[name=mn]{font-size:12px;width:2.1em;}.inline-edit-row fieldset input[name=aa]{font-size:12px;width:3.5em;}.inline-edit-row fieldset label input.inline-edit-password-input{width:8em;}.inline-edit-row .catshow,.inline-edit-row .cathide{cursor:pointer;}ul.cat-checklist{height:12em;border-style:solid;border-width:1px;overflow-y:scroll;padding:0 5px;margin:0;}#bulk-titles{display:block;height:12em;border-style:solid;border-width:1px;overflow-y:scroll;padding:0 5px;margin:0 0 5px;}.inline-edit-row fieldset ul.cat-checklist li,.inline-edit-row fieldset ul.cat-checklist input{margin:0;}.inline-edit-row fieldset ul.cat-checklist label,.inline-edit-row .catshow,.inline-edit-row .cathide,.inline-edit-row #bulk-titles div{font-family:sans-serif;font-style:normal;font-size:11px;}table .inline-edit-row fieldset ul.cat-hover{height:auto;max-height:30em;overflow-y:auto;position:absolute;}.inline-edit-row fieldset label input.inline-edit-menu-order-input{width:3em;}.inline-edit-row fieldset label input.inline-edit-slug-input{width:75%;}.quick-edit-row-post fieldset label.inline-edit-status{float:left;}#bulk-titles{line-height:140%;}#bulk-titles div{margin:.2em .3em;}#bulk-titles div a{cursor:pointer;display:block;float:left;height:10px;margin:3px 3px 0 -2px;overflow:hidden;position:relative;text-indent:-9999px;width:10px;}#titlediv{position:relative;margin-bottom:20px;}#titlediv label{cursor:text;}#titlediv div.inside{margin:0;}#poststuff #titlewrap{border:0;padding:0;}#titlediv #title{padding:3px 8px;font-size:1.7em;line-height:100%;width:100%;outline:none;}#titlediv #title-prompt-text,#wp-fullscreen-title-prompt-text{color:#bbb;position:absolute;font-size:1.7em;padding:8px 10px;}#wp-fullscreen-title-prompt-text{left:0;padding:11px;}#poststuff .inside-submitbox,#side-sortables .inside-submitbox{margin:0 3px;font-size:11px;}input#link_description,input#link_url{width:98%;}#pending{background:0 none;border:0 none;padding:0;font-size:11px;margin-top:-1px;}#edit-slug-box{height:1em;margin-top:8px;padding:0 10px;}#editable-post-name-full{display:none;}#editable-post-name input{width:16em;}.postarea h3 label{float:left;}#submitpost #ajax-loading,#submitpost .ajax-loading{vertical-align:middle;}#wpcontent .ajax-loading{visibility:hidden;}.submitbox .submit{text-align:left;padding:12px 10px 10px;font-size:11px;}.submitbox .submitdelete{text-decoration:none;padding:1px 2px;}.submitbox .submitdelete,.submitbox .submit a:hover{border-bottom-width:1px;border-bottom-style:solid;}.submitbox .submit input{margin-bottom:8px;margin-right:4px;padding:6px;}.inside-submitbox #post_status{margin:2px 0 2px -2px;}#post-status-select,#post-format{line-height:2.5em;margin-top:3px;}#post-body #normal-sortables{min-height:50px;}.postbox{position:relative;min-width:255px;}#trackback_url{width:99%;}#normal-sortables .postbox .submit{background:transparent none;border:0 none;float:right;padding:0 12px;margin:0;}.category-add input[type="text"],.category-add select{width:100%;max-width:260px;}#post-body ul.category-tabs,#post-body ul.add-menu-item-tabs{float:left;width:120px;text-align:right;margin:0 -120px 0 5px;padding:0;}#post-body ul.category-tabs li,#post-body ul.add-menu-item-tabs li{padding:8px;}#post-body ul.category-tabs li.tabs,#post-body ul.add-menu-item-tabs li.tabs{-webkit-border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;border-top-left-radius:3px;border-bottom-left-radius:3px;}.wp-tab-panel,.categorydiv div.tabs-panel,.customlinkdiv div.tabs-panel,.posttypediv div.tabs-panel,.taxonomydiv div.tabs-panel,#linkcategorydiv div.tabs-panel{height:200px;overflow:auto;padding:.5em .9em;border-style:solid;border-width:1px;}.nav-menus-php .customlinkdiv div.tabs-panel,.nav-menus-php .posttypediv div.tabs-panel,.nav-menus-php .taxonomydiv div.tabs-panel{height:auto;max-height:205px;}div.tabs-panel-active{display:block;}div.tabs-panel-inactive{display:none;}#post-body .categorydiv div.tabs-panel,.taxonomy div.tabs-panel,#post-body #linkcategorydiv div.tabs-panel{margin:0 5px 0 125px;}.press-this #side-sortables .category-tabs li,.has-right-sidebar #side-sortables .category-tabs li,#side-sortables .add-menu-item-tabs li,.wp-tab-bar li{display:inline;line-height:1.35em;}.no-js #side-sortables .category-tabs li.hide-if-no-js{display:none;}#side-sortables .category-tabs a,#side-sortables .add-menu-item-tabs a,.wp-tab-bar a{text-decoration:none;}#side-sortables .category-tabs{margin:8px 0 3px;}#category-adder h4{margin:10px 0;}#side-sortables .add-menu-item-tabs,.wp-tab-bar{margin-bottom:3px;}.categorydiv ul,.customlinkdiv ul,.posttypediv ul,.taxonomydiv ul,#linkcategorydiv ul{list-style:none;padding:0;margin:0;}#normal-sortables .postbox #replyrow .submit{float:none;margin:0;padding:3px 7px;}#side-sortables .submitbox .submit input,#side-sortables .submitbox .submit .preview,#side-sortables .submitbox .submit a.preview:hover{border:0 none;}#side-sortables .inside-submitbox .insidebox,.stuffbox .insidebox{margin:11px 0;}#side-sortables .comments-box,#normal-sortables .comments-box{border:0 none;}ul.category-tabs,ul.add-menu-item-tabs,ul.wp-tab-bar{margin-top:12px;}#side-sortables .comments-box thead th,#normal-sortables .comments-box thead th{background:transparent;padding:0 7px 4px;font-style:italic;}ul.category-tabs li.tabs,ul.add-menu-item-tabs li.tabs,.wp-tab-active{border-style:solid solid none;border-width:1px 1px 0;}#commentsdiv img.waiting{padding-left:5px;}#post-body .category-tabs li.tabs,#post-body .add-menu-item-tabs li.tabs{border-style:solid none solid solid;border-width:1px 0 1px 1px;margin-right:-1px;}ul.category-tabs li,ul.add-menu-item-tabs li,ul.wp-tab-bar li{padding:3px 5px 5px;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;border-top-left-radius:3px;border-top-right-radius:3px;}form#tags-filter{position:relative;}.screen-per-page{width:3em;}#posts-filter fieldset{float:left;margin:0 1.5ex 1em 0;padding:0;}#posts-filter fieldset legend{padding:0 0 .2em 1px;}td.post-title strong,td.plugin-title strong{display:block;margin-bottom:.2em;}td.post-title p,td.plugin-title p{margin:6px 0;}.wp-hidden-children .wp-hidden-child,.ui-tabs-hide{display:none;}.commentlist .avatar{vertical-align:text-top;}#post-body .tagsdiv #newtag{margin-right:5px;width:16em;}#side-sortables input#post_password{width:94%;}#side-sortables .tagsdiv #newtag{width:68%;}#post-status-info{border-width:0 1px 1px;border-style:none solid solid;width:100%;-webkit-border-bottom-left-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-left-radius:3px;border-bottom-right-radius:3px;}#post-status-info td{font-size:12px;}.autosave-info{padding:2px 15px;text-align:right;}#editorcontent #post-status-info{border:none;}#post-body .wp_themeSkin .mceStatusbar a.mceResize{display:block;background:transparent url(../images/resize.gif) no-repeat scroll right bottom;width:12px;cursor:se-resize;margin:0 2px;position:relative;top:-2px;}#post-body .postarea .wp_themeSkin .mceStatusbar a.mceResize{top:20px;}#wp-word-count{display:block;padding:2px 10px;}#timestampdiv select{height:20px;line-height:14px;padding:0;vertical-align:top;}#aa,#jj,#hh,#mn{padding:1px;font-size:12px;}#jj,#hh,#mn{width:2em;}#aa{width:3.4em;}.curtime #timestamp{background-repeat:no-repeat;background-position:left top;padding-left:18px;}#timestampdiv{padding-top:5px;line-height:23px;}#timestampdiv p{margin:8px 0 6px;}#timestampdiv input{border-width:1px;border-style:solid;}#postcustomstuff .updatemeta,#postcustomstuff .deletemeta{margin:auto;}#postcustomstuff thead th{padding:5px 8px 8px;}#postcustom #postcustomstuff .submit{border:0 none;float:none;padding:5px 8px;}#side-sortables #postcustom #postcustomstuff .submit{padding:0 5px;}#side-sortables #postcustom #postcustomstuff td.left input{margin:3px 3px 0;}#side-sortables #postcustom #postcustomstuff #the-list textarea{height:85px;margin:3px;}#postcustomstuff table{margin:0;width:100%;border-width:1px;border-style:solid;border-spacing:0;}#postcustomstuff table input,#postcustomstuff table select,#postcustomstuff table textarea{width:95%;margin:8px 0 8px 8px;}#postcustomstuff th.left,#postcustomstuff td.left{width:38%;}#postcustomstuff #newmeta .submit{padding:0 8px;}#postcustomstuff .submit input,#postcustomstuff table #addmetasub{width:auto;}#postcustomstuff #newmetaleft{vertical-align:top;}#postcustomstuff #newmetaleft a{padding:0 10px;text-decoration:none;}table.diff{width:100%;}table.diff col.content{width:50%;}table.diff tr{background-color:transparent;}table.diff td,table.diff th{padding:.5em;font-family:Consolas,Monaco,monospace;border:none;}table.diff .diff-deletedline del,table.diff .diff-addedline ins{text-decoration:none;}.category-adder{margin-left:120px;padding:4px 0;}.category-adder h4{margin:0 0 8px;}#side-sortables .category-adder{margin:0;}#post-body ul.category-tabs,#post-body ul.add-menu-item-tabs{float:left;width:120px;text-align:right;margin:0 -120px 0 5px;padding:0;}#post-body ul.category-tabs li,#post-body ul.add-menu-item-tabs li{padding:8px;}#post-body ul.category-tabs li.tabs,#post-body ul.add-menu-item-tabs li.tabs{-webkit-border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;border-top-left-radius:3px;border-bottom-left-radius:3px;}.categorydiv div.tabs-panel,.customlinkdiv div.tabs-panel,.posttypediv div.tabs-panel,.taxonomydiv div.tabs-panel,#linkcategorydiv div.tabs-panel{height:200px;overflow:auto;padding:.5em .9em;border-style:solid;border-width:1px;}.nav-menus-php .customlinkdiv div.tabs-panel,.nav-menus-php .posttypediv div.tabs-panel,.nav-menus-php .taxonomydiv div.tabs-panel{height:auto;max-height:205px;}div.tabs-panel-active{display:block;}div.tabs-panel-inactive{display:none;}#post-body .categorydiv div.tabs-panel,.taxonomy div.tabs-panel,#post-body #linkcategorydiv div.tabs-panel{margin:0 5px 0 125px;}.categorydiv ul,.customlinkdiv ul,.posttypediv ul,.taxonomydiv ul,#linkcategorydiv ul{list-style:none;padding:0;margin:0;}#front-page-warning,#front-static-pages ul,ul.export-filters,.inline-editor ul.cat-checklist ul,.categorydiv ul.categorychecklist ul,.customlinkdiv ul.categorychecklist ul,.posttypediv ul.categorychecklist ul,.taxonomydiv ul.categorychecklist ul,#linkcategorydiv ul.categorychecklist ul{margin-left:18px;}ul.categorychecklist li{margin:0;padding:0;line-height:19px;word-wrap:break-word;}.categorydiv .tabs-panel,.customlinkdiv .tabs-panel,.posttypediv .tabs-panel,.taxonomydiv .tabs-panel{border-width:3px;border-style:solid;}.form-wrap p,.form-wrap label{font-size:11px;}.form-wrap label{display:block;padding:2px;font-size:12px;}.form-field input,.form-field textarea{border-style:solid;border-width:1px;width:95%;}p.description,.form-wrap p{margin:2px 0 5px;}p.help,p.description,span.description,.form-wrap p{font-size:12px;font-style:italic;font-family:sans-serif;}.form-wrap .form-field{margin:0 0 10px;padding:8px;}.col-wrap h3{margin:12px 0;font-size:1.1em;}.col-wrap p.submit{margin-top:-10px;}#poststuff .taghint{color:#aaa;margin:15px 0 -24px 12px;}#poststuff .tagsdiv .howto{margin:0 0 6px 8px;}.ajaxtag .newtag{position:relative;}.tagsdiv .newtag{width:180px;}.tagsdiv .the-tags{display:block;height:60px;margin:0 auto;overflow:auto;width:260px;}#post-body-content .tagsdiv .the-tags{margin:0 5px;}p.popular-tags{-webkit-border-radius:8px;border-radius:8px;border-width:1px;border-style:solid;line-height:2em;max-width:1000px;padding:8px 12px 12px;text-align:justify;}p.popular-tags a{padding:0 3px;}.tagcloud{width:97%;margin:0 0 40px;text-align:justify;}.tagcloud h3{margin:2px 0 12px;}.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;}.media-item .describe{border-collapse:collapse;width:100%;border-top-style:solid;border-top-width:1px;clear:both;cursor:default;}.media-item.media-blank .describe{border:0;}.media-item .describe th{vertical-align:top;text-align:left;padding:5px 10px 10px;width:140px;}.media-item .describe .align th{padding-top:0;}.media-item .media-item-info tr{background-color:transparent;}.media-item .describe td{padding:0 8px 8px 0;vertical-align:top;}.media-item thead.media-item-info td{padding:4px 10px 0;}.media-item .media-item-info .A1B1{padding:0 0 0 10px;}.media-item td.savesend{padding-bottom:15px;}.media-item .thumbnail{max-height:128px;max-width:128px;}#wpbody-content #async-upload-wrap a{display:none;}.media-upload-form{margin-top:20px;}.media-upload-form td label{margin-right:6px;margin-left:2px;}.media-upload-form .align .field label{display:inline;padding:0 0 0 23px;margin:0 1em 0 3px;font-weight:bold;}.media-upload-form tr.image-size label{margin:0 0 0 5px;font-weight:bold;}.media-upload-form th.label label{font-weight:bold;margin:.5em;font-size:13px;}.media-upload-form th.label label span{padding:0 5px;}abbr.required{border:medium none;text-decoration:none;}.media-item .describe input[type="text"],.media-item .describe textarea{width:460px;}.media-item .describe p.help{margin:0;padding:0 0 0 5px;}.describe-toggle-on,.describe-toggle-off{display:block;line-height:36px;float:right;margin-right:15px;}.media-item .describe-toggle-off,.media-item.open .describe-toggle-on,.media-item.open img.pinkynail{display:none;}.media-item.open .describe-toggle-off{display:block;}#media-items .media-item{border-style:solid;border-width:1px;min-height:36px;position:relative;margin-top:-1px;width:100%;}#media-items{width:623px;}#media-items:empty{border:0 none;}.media-item .filename{line-height:36px;overflow:hidden;padding:0 10px;}.media-item .error-div{padding-left:10px;}.media-item .pinkynail{float:left;margin:2px 2px 0;max-width:40px;max-height:32px;}.media-item .startopen,.media-item .startclosed{display:none;}.media-item .original{position:relative;height:34px;}.media-item .progress{float:right;height:22px;margin:6px 10px 0 0;width:200px;line-height:2em;padding:0;overflow:hidden;margin-bottom:2px;border:1px solid #d1d1d1;background:#fff;background-image:linear-gradient(bottom,#fff 0,#f7f7f7 100%);background-image:-o-linear-gradient(bottom,#fff 0,#f7f7f7 100%);background-image:-moz-linear-gradient(bottom,#fff 0,#f7f7f7 100%);background-image:-webkit-linear-gradient(bottom,#fff 0,#f7f7f7 100%);background-image:-ms-linear-gradient(bottom,#fff 0,#f7f7f7 100%);-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 0 3px rgba(0,0,0,0.1);box-shadow:inset 0 0 3px rgba(0,0,0,0.1);}.media-item .bar{z-index:9;width:0;height:100%;margin-top:-24px;background-color:#83B4D8;background-image:linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);background-image:-o-linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);background-image:-moz-linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);background-image:-webkit-linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);background-image:-ms-linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 0 3px rgba(0,0,0,0.3);box-shadow:0 0 3px rgba(0,0,0,0.3);}.media-item .progress .percent{z-index:10;position:relative;width:200px;padding:0 8px;text-shadow:0 1px 0 rgba(255,255,255,0.4);color:rgba(0,0,0,0.6);}.upload-php .fixed .column-parent{width:25%;}.js .html-uploader #plupload-upload-ui{display:none;}.js .html-uploader #html-upload-ui{display:block;}.media-upload-form .media-item.error{margin:0;padding:0;}.media-upload-form .media-item.error p,.media-item .error-div{line-height:16px;font-size:12px;margin:10px;padding:0;}.media-item .error-div a.dismiss{float:right;padding-left:15px;}.find-box{width:500px;height:300px;overflow:hidden;padding:33px 5px 40px;position:absolute;z-index:1000;}.find-box-head{cursor:move;font-weight:bold;height:2em;line-height:2em;padding:1px 12px;position:absolute;top:5px;width:100%;}.find-box-inside{overflow:auto;width:100%;height:100%;}.find-box-search{padding:12px;border-width:1px;border-style:none none solid;}#find-posts-response{margin:8px 0;padding:0 1px;}#find-posts-response table{width:100%;}#find-posts-response .found-radio{padding:5px 0 0 8px;width:15px;}.find-box-buttons{width:480px;margin:8px;}.find-box-search label{padding-right:6px;}.find-box #resize-se{position:absolute;right:1px;bottom:1px;}ul#dismissed-updates{display:none;}form.upgrade{margin-top:8px;}form.upgrade .hint{font-style:italic;font-size:85%;margin:-0.5em 0 2em 0;}#poststuff .inside .the-tagcloud{margin:5px 0 10px;padding:8px;border-width:1px;border-style:solid;line-height:1.8em;word-spacing:3px;-webkit-border-radius:6px;border-radius:6px;}.drag-drop #drag-drop-area{border:4px dashed #DDD;height:200px;}.drag-drop .drag-drop-inside{margin:70px auto 0;width:250px;}.drag-drop-inside p{color:#aaa;font-size:14px;margin:5px 0;display:none;}.drag-drop .drag-drop-inside p{text-align:center;}.drag-drop-inside p.drag-drop-info{font-size:20px;}.drag-drop .drag-drop-inside p,.drag-drop-inside p.drag-drop-buttons{display:block;}.drag-drop.drag-over #drag-drop-area{border-color:#83b4d8;}#plupload-upload-ui{position:relative;}.describe .image-editor{vertical-align:top;}.imgedit-wrap{position:relative;}.imgedit-settings p{margin:8px 0;}.describe .imgedit-wrap table td{vertical-align:top;padding-top:0;}.imgedit-wrap p,.describe .imgedit-wrap table td{font-size:11px;line-height:18px;}.describe .imgedit-wrap table td.imgedit-settings{padding:0 5px;}td.imgedit-settings input{vertical-align:middle;}.imgedit-wait{position:absolute;top:0;background:#FFF url(../images/wpspin_light.gif) no-repeat scroll 22px 10px;opacity:.7;filter:alpha(opacity=70);width:100%;height:500px;display:none;}.media-disabled,.imgedit-settings .disabled{color:grey;}.imgedit-wait-spin{padding:0 4px 4px;vertical-align:bottom;visibility:hidden;}.imgedit-menu{margin:0 0 12px;min-width:300px;}.imgedit-menu div{float:left;width:32px;height:32px;}.imgedit-crop-wrap{position:relative;}.imgedit-crop{background:transparent url(../images/imgedit-icons.png) no-repeat scroll -9px -31px;margin:0 8px 0 0;}.imgedit-crop.disabled:hover{background-position:-9px -31px;}.imgedit-crop:hover{background-position:-9px -1px;}.imgedit-rleft{background:transparent url(../images/imgedit-icons.png) no-repeat scroll -46px -31px;margin:0 3px;}.imgedit-rleft.disabled:hover{background-position:-46px -31px;}.imgedit-rleft:hover{background-position:-46px -1px;}.imgedit-rright{background:transparent url(../images/imgedit-icons.png) no-repeat scroll -77px -31px;margin:0 8px 0 3px;}.imgedit-rright.disabled:hover{background-position:-77px -31px;}.imgedit-rright:hover{background-position:-77px -1px;}.imgedit-flipv{background:transparent url(../images/imgedit-icons.png) no-repeat scroll -115px -31px;margin:0 3px;}.imgedit-flipv.disabled:hover{background-position:-115px -31px;}.imgedit-flipv:hover{background-position:-115px -1px;}.imgedit-fliph{background:transparent url(../images/imgedit-icons.png) no-repeat scroll -147px -31px;margin:0 8px 0 3px;}.imgedit-fliph.disabled:hover{background-position:-147px -31px;}.imgedit-fliph:hover{background-position:-147px -1px;}.imgedit-undo{background:transparent url(../images/imgedit-icons.png) no-repeat scroll -184px -31px;margin:0 3px;}.imgedit-undo.disabled:hover{background-position:-184px -31px;}.imgedit-undo:hover{background-position:-184px -1px;}.imgedit-redo{background:transparent url(../images/imgedit-icons.png) no-repeat scroll -215px -31px;margin:0 8px 0 3px;}.imgedit-redo.disabled:hover{background-position:-215px -31px;}.imgedit-redo:hover{background-position:-215px -1px;}.imgedit-applyto img{margin:0 8px 0 0;}.imgedit-group-top{margin:5px 0;}.imgedit-applyto .imgedit-label{padding:2px 0 0;display:block;}.imgedit-help{display:none;font-style:italic;margin-bottom:8px;}.imgedit-help ul li{font-size:11px;}a.imgedit-help-toggle{text-decoration:none;}#wpbody-content .imgedit-response div{width:600px;margin:8px;}.form-table td.imgedit-response{padding:0;}.imgedit-submit{margin:8px 0;}.imgedit-submit-btn{margin-left:20px;}.imgedit-wrap .nowrap{white-space:nowrap;}span.imgedit-scale-warn{color:red;font-size:20px;font-style:normal;visibility:hidden;vertical-align:middle;}.imgedit-group{border-width:1px;border-style:solid;-webkit-border-radius:8px;border-radius:8px;margin-bottom:8px;padding:2px 10px;}.form-table{border-collapse:collapse;margin-top:.5em;width:100%;margin-bottom:-8px;clear:both;}.form-table td{margin-bottom:9px;padding:8px 10px;line-height:20px;font-size:12px;}.form-table th,.form-wrap label{font-weight:normal;text-shadow:#fff 0 1px 0;}.form-table th{vertical-align:top;text-align:left;padding:10px;width:200px;}.form-table th.th-full{width:auto;}.form-table div.color-option{display:block;clear:both;margin-top:12px;}.form-table input.tog{margin-top:2px;margin-right:2px;float:left;}.form-table td p{margin-top:4px;}.form-table table.color-palette{vertical-align:bottom;float:left;margin:-12px 3px 11px;}.form-table .color-palette td{border-width:1px 1px 0;border-style:solid solid none;height:10px;line-height:20px;width:10px;}.commentlist li{padding:1em 1em .2em;margin:0;border-bottom-width:1px;border-bottom-style:solid;}.commentlist li li{border-bottom:0;padding:0;}.commentlist p{padding:0;margin:0 0 .8em;}#replyrow input{border-width:1px;border-style:solid;}#replyrow td{padding:2px;}#replysubmit{margin:0;padding:0 7px 3px;text-align:center;}#replysubmit img.waiting,.inline-edit-save img.waiting{padding:4px 10px 0;vertical-align:top;float:right;}#replysubmit .button{margin-right:5px;}#replysubmit .error{color:red;line-height:21px;text-align:center;vertical-align:center;}#replyrow h5{margin:.2em 0 0;padding:0 5px;line-height:1.4em;font-size:1em;}#edithead .inside{float:left;padding:3px 0 2px 5px;margin:0;text-align:center;}#edithead .inside input{width:180px;}#edithead label{padding:2px 0;}#replycontainer{padding:5px;}#replycontent{height:120px;}.comment-ays{margin-bottom:0;border-style:solid;border-width:1px;}.comment-ays th{border-right-style:solid;border-right-width:1px;}.trash-undo-inside,.spam-undo-inside{margin:1px 8px 1px 0;line-height:16px;}.spam-undo-inside .avatar,.trash-undo-inside .avatar{height:20px;width:20px;margin-right:8px;vertical-align:middle;}.stuffbox .editcomment{clear:none;}#comment-status-radio p{margin:3px 0 5px;}#comment-status-radio input{margin:2px 3px 5px 0;vertical-align:middle;}#comment-status-radio label{padding:5px 0;}.commentlist .avatar{vertical-align:text-top;}.theme-install-php .tablenav{height:auto;}.available-theme{display:inline-block;margin-bottom:10px;margin-right:25px;overflow:hidden;padding:20px;vertical-align:top;width:240px;}.available-theme a.screenshot{width:240px;height:180px;display:block;border-width:1px;border-style:solid;margin-bottom:10px;overflow:hidden;}.available-theme img{width:240px;}.available-theme h3{margin:15px 0 5px;}#current-theme{margin:1em 0 1.5em;}#current-theme a{border-bottom:none;}#current-theme h3{font-size:17px;font-weight:normal;margin:0;}#current-theme .theme-description{margin-top:5px;}#current-theme img{float:left;border-width:1px;border-style:solid;margin-right:1em;margin-bottom:1.5em;width:150px;}.theme-options span{text-transform:uppercase;font-size:13px;}.theme-options a{font-size:15px;}#post-body ul.category-tabs li.tabs a,#post-body ul.add-menu-item-tabs li.tabs a,#TB_window #TB_title a.tb-theme-preview-link,#TB_window #TB_title a.tb-theme-preview-link:visited{font-weight:bold;text-decoration:none;}#TB_window #TB_title{background-color:#222;color:#cfcfcf;}#broken-themes{text-align:left;width:50%;border-spacing:3px;padding:3px;}.theme-install-php h4{margin:2.5em 0 8px;}.appearance_page_custom-header #headimg{border:1px solid #DFDFDF;min-height:100px;width:100%;}.appearance_page_custom-header #upload-form p label{font-size:12px;}.appearance_page_custom-header .available-headers .default-header{float:left;margin:0 20px 20px 0;}.appearance_page_custom-header .random-header{clear:both;margin:0 20px 20px 0;vertical-align:middle;}.appearance_page_custom-header .available-headers label input,.appearance_page_custom-header .random-header label input{margin-right:10px;}.appearance_page_custom-header .available-headers label img{vertical-align:middle;}div#custom-background-image{min-height:100px;border:1px solid #dfdfdf;}div#custom-background-image img{max-width:400px;max-height:300px;}.nav-tab{border-style:solid;border-color:#dfdfdf #dfdfdf #fff;border-width:1px 1px 0;color:#aaa;text-shadow:#fff 0 1px 0;font-size:12px;line-height:16px;display:inline-block;padding:4px 14px 6px;text-decoration:none;margin:0 6px -1px 0;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;border-top-left-radius:3px;border-top-right-radius:3px;}.nav-tab-active{border-width:1px;color:#464646;}.nav-tab:hover,.nav-tab-active{border-color:#ccc #ccc #fff;}h2.nav-tab-wrapper,h3.nav-tab-wrapper{border-bottom:1px solid #ccc;padding-bottom:0;}h2 .nav-tab{padding:4px 10px 6px;font-weight:200;font-size:20px;line-height:24px;}#dashboard_right_now .versions .b,#post-status-display,#post-visibility-display,#adminmenu .wp-submenu li.current,#adminmenu .wp-submenu li.current a,#adminmenu .wp-submenu li.current a:hover,.media-item .percent,.plugins .name,#pass-strength-result.strong,#pass-strength-result.short,.button-highlighted,input.button-highlighted,#quicktags #ed_strong,#ed_reply_toolbar #ed_reply_strong,.item-controls .item-order a,.feature-filter .feature-name{font-weight:bold;}.plugins p{margin:0 4px;padding:0;}.plugins .desc p{margin:0 0 8px;}.plugins td.desc{line-height:1.5em;}.plugins .desc ul,.plugins .desc ol{margin:0 0 0 2em;}.plugins .desc ul{list-style-type:disc;}.plugins .row-actions-visible{padding:0;}.plugins tbody th.check-column{padding:7px 0;}.plugins .inactive td,.plugins .inactive th,.plugins .active td,.plugins .active th{border-top-style:solid;border-top-width:1px;padding:5px 7px 0;}#wpbody-content .plugins .plugin-title,#wpbody-content .plugins .theme-title{padding-right:12px;white-space:nowrap;}.plugins .second,.plugins .row-actions-visible{padding:0 0 5px;}.plugins-php .widefat tfoot th,.plugins-php .widefat tfoot td{border-top-style:solid;border-top-width:1px;}.plugin-update-tr .update-message{margin:5px;padding:3px 5px;}.plugin-install-php h4{margin:2.5em 0 8px;}#profile-page .form-table textarea{width:500px;margin-bottom:6px;}#profile-page .form-table #rich_editing{margin-right:5px;}#your-profile legend{font-size:22px;}#your-profile #rich_editing{border:none;}#display_name{width:15em;}#createuser .form-field input{width:25em;}.pressthis{margin:20px 0;}.pressthis a{display:inline-block;width:113px;position:relative;cursor:move;color:#333;background:#dfdfdf;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0.07,#e6e6e6),color-stop(0.77,#d8d8d8));background-image:-moz-linear-gradient(center bottom,#e6e6e6 7%,#d8d8d8 77%);background-repeat:no-repeat;background-image-position:10px 8px;-webkit-border-radius:5px;border-radius:5px;border:1px #b4b4b4 solid;font-style:normal;line-height:16px;font-size:14px;text-decoration:none;text-shadow:#fff 0 1px 0;}.pressthis a:hover,.pressthis a:active{color:#333;}.pressthis a:hover:after{transform:skew(20deg) rotate(9deg);-webkit-transform:skew(20deg) rotate(9deg);-moz-transform:skew(20deg) rotate(9deg);box-shadow:0 10px 8px rgba(0,0,0,0.7);-webkit-box-shadow:0 10px 8px rgba(0,0,0,0.7);-moz-box-shadow:0 10px 8px rgba(0,0,0,0.7);}.pressthis a span{background:url(../images/press-this.png) no-repeat -45px 5px;padding:8px 0 8px 32px;display:inline-block;}.pressthis a:after{content:'';width:70%;height:55%;z-index:-1;position:absolute;right:10px;bottom:9px;background:transparent;transform:skew(20deg) rotate(6deg);-webkit-transform:skew(20deg) rotate(6deg);-moz-transform:skew(20deg) rotate(6deg);box-shadow:0 10px 8px rgba(0,0,0,0.6);-webkit-box-shadow:0 10px 8px rgba(0,0,0,0.6);-moz-box-shadow:0 10px 8px rgba(0,0,0,0.6);}#utc-time,#local-time{padding-left:25px;font-style:italic;font-family:sans-serif;}.defaultavatarpicker .avatar{margin:2px 0;vertical-align:middle;}#footer{position:absolute;bottom:0;left:0;right:0;padding:10px 0;margin-right:20px;border-top-width:1px;border-top-style:solid;}#footer p{margin:0;line-height:20px;}#footer a{text-decoration:none;}#footer a:hover{text-decoration:underline;}.about-wrap{position:relative;margin:25px 40px 0 20px;min-width:770px;max-width:1050px;font-size:15px;}.about-wrap div.updated,.about-wrap div.error{display:none!important;}.about-wrap p{line-height:1.6em;}.about-wrap h1{margin:.2em 200px 0 0;line-height:1.2em;font-size:2.8em;font-weight:200;}.about-text,.about-description,.about-wrap li.wp-person a.web{font-family:"HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",sans-serif;font-weight:normal;line-height:1.6em;font-size:20px;}.about-description{margin-top:1.4em;}.about-text{margin:1em 200px 1.4em 0;min-height:60px;font-size:24px;}.about-wrap h3{font-size:24px;margin-bottom:1em;padding-top:20px;}.about-wrap .changelog{padding-bottom:10px;overflow:hidden;}.about-wrap .changelog li{list-style-type:disc;margin-left:3em;}.about-wrap .feature-section h4{margin-bottom:.6em;}.about-wrap .feature-section p{margin-top:.6em;}.about-wrap code{font-size:14px;}html.ie8 .about-wrap img.element-screenshot{padding:2px;}.about-wrap .point-releases{margin-top:5px;}.about-wrap .changelog.point-releases h3{padding-top:35px;}.about-wrap .changelog.point-releases h3:first-child{padding-top:7px;}.wp-badge{padding-top:142px;height:50px;width:173px;font-weight:bold;font-size:14px;text-align:center;margin:0 -5px;background:url('../images/wp-badge.png?ver=20111120') no-repeat;}.about-wrap .wp-badge{position:absolute;top:0;right:0;}.about-wrap h2.nav-tab-wrapper{padding-left:6px;}.about-wrap h2 .nav-tab{padding:4px 10px 6px;margin:0 3px -1px 0;font-size:18px;vertical-align:top;}.about-wrap h2 .nav-tab-active{font-weight:bold;padding-top:3px;}.about-wrap .feature-section .left-feature,.about-wrap .feature-section img,.about-wrap .feature-section .right-feature{float:left;}.about-wrap .feature-section{min-height:100px;overflow:hidden;clear:both;}.about-wrap .feature-section img{margin:5px auto;border:none;-webkit-border-radius:3px;border-radius:3px;}html.ie8 .about-wrap .feature-section img,html.ie8 .about-wrap .feature-section .image-mask{border-width:1px;border-style:solid;}.about-wrap .feature-section.text-features{width:31%;float:left;overflow:visible;}.about-wrap .feature-section.text-features div{width:112%;}.about-wrap .feature-section.screenshot-features{width:67%;margin-top:1.33em;float:right;clear:none;overflow:visible;}.about-wrap .feature-section.screenshot-features .angled-right{margin-top:-1em;margin-left:2.5em;}.about-wrap .feature-section.screenshot-features .angled-right p{margin-left:290px;}.about-wrap .feature-section .angled-right h4,.about-wrap .feature-section .angled-left h4{margin-top:0;}.about-wrap .feature-section .angled-right img,.about-wrap .feature-section .angled-left img{margin-top:.1em;margin-right:30px;}.about-wrap .feature-section.three-col{padding-top:15px;margin-bottom:0;}.about-wrap .feature-section.three-col div{width:30%;margin-right:4.999999999%;float:left;}.about-wrap .feature-section.three-col h4{margin:0 0 .6em 0;}.about-wrap .feature-section.three-col img{margin:.5em 0 .5em 5px;max-width:100%;float:none;}html.ie8 .about-wrap .feature-section.three-col img{margin-left:0;}.about-wrap .feature-section.three-col .last-feature{margin-right:0;}.about-wrap .feature-section .feature-images{width:300px;position:absolute;margin-top:1.1em;}.about-wrap .feature-section .feature-images img{width:250px;height:150px;margin-right:5px;}.about-wrap .feature-section.images-stagger-left,.about-wrap .feature-section.images-stagger-right{min-height:265px;}.about-wrap .feature-section.images-stagger-right .angled-right,.about-wrap .feature-section.images-stagger-left .angled-left{margin-bottom:-30px;}.about-wrap .feature-section.images-stagger-left .angled-left{margin-left:5px;}.about-wrap .feature-section .angled-right{float:right;}.about-wrap .feature-section.images-stagger-right .feature-images{right:0;}.about-wrap .feature-section.images-stagger-left .feature-images{left:0;}.about-wrap .feature-section.images-stagger-right .left-feature{margin-right:350px;}.about-wrap .feature-section.images-stagger-left .right-feature{margin-left:350px;}.about-wrap .return-to-dashboard{margin:30px 0 0 -5px;font-size:14px;font-weight:bold;}.about-wrap .return-to-dashboard a{text-decoration:none;padding:0 5px;}.about-wrap h4.wp-people-group{margin-top:2.6em;font-size:16px;}.about-wrap ul.wp-people-group{overflow:hidden;padding:5px;margin:0 -15px 0 -5px;}.about-wrap ul.compact{margin-bottom:0;}.about-wrap li.wp-person{float:left;margin-right:10px;}.about-wrap li.wp-person img.gravatar{float:left;margin:0 10px 10px 0;padding:2px;width:60px;height:60px;}.about-wrap ul.compact li.wp-person img.gravatar{width:30px;height:30px;}.about-wrap li.wp-person{height:70px;width:280px;padding-bottom:15px;}.about-wrap ul.compact li.wp-person{height:auto;width:180px;padding-bottom:0;margin-bottom:0;}.about-wrap #wp-people-group-validators+p.wp-credits-list{margin-top:0;}.about-wrap li.wp-person a.web{display:block;margin:6px 0 2px;font-size:16px;text-decoration:none;}.about-wrap p.wp-credits-list a{white-space:nowrap;}.freedoms-php .about-wrap ol{margin:40px 60px;}.freedoms-php .about-wrap ol li{list-style-type:decimal;font-weight:bold;}.freedoms-php .about-wrap ol p{font-weight:normal;margin:.6em 0;}#excerpt,.attachmentlinks{margin:0;height:4em;width:98%;}.wp-editor-container textarea.wp-editor-area{width:99.9%;}#template div{margin-right:190px;}p.pagenav{margin:0;display:inline;}.pagenav span{font-weight:bold;margin:0 6px;}.row-title{font-size:13px!important;font-weight:bold;}.column-author img,.column-username img{float:left;margin-right:10px;margin-top:1px;}.row-actions{visibility:hidden;padding:2px 0 0;}tr:hover .row-actions,div.comment-item:hover .row-actions{visibility:visible;}.row-actions-visible{padding:2px 0 0;}.form-table .pre{padding:8px;margin:0;}table.form-table td .updated{font-size:13px;}.tagchecklist{margin-left:14px;font-size:12px;overflow:auto;}.tagchecklist strong{margin-left:-8px;position:absolute;}.tagchecklist span{margin-right:25px;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;}#poststuff h2{margin-top:20px;font-size:1.5em;margin-bottom:15px;padding:0 0 3px;clear:left;}#poststuff h3,.metabox-holder h3{font-size:15px;font-weight:normal;padding:7px 10px;margin:0;line-height:1;}#poststuff .inside{margin:6px 0 8px;}#post-visibility-select,#post-formats-select{line-height:1.5em;margin-top:3px;}#poststuff #submitdiv .inside{margin:0;padding:0;}#titlediv,#poststuff .postarea{margin-bottom:20px;}td.post-title strong,td.plugin-title strong{display:block;margin-bottom:.2em;}td.post-title p,td.plugin-title p{margin:6px 0;}#templateside ul li a{text-decoration:none;}.tool-box .title{margin:8px 0;font-size:18px;font-weight:normal;line-height:24px;}#sidemenu{margin:-30px 15px 0 315px;list-style:none;position:relative;float:right;padding-left:10px;font-size:12px;}#sidemenu a{padding:0 7px;display:block;float:left;line-height:28px;border-top-width:1px;border-top-style:solid;border-bottom-width:1px;border-bottom-style:solid;}#sidemenu li{display:inline;line-height:200%;list-style:none;text-align:center;white-space:nowrap;margin:0;padding:0;}#sidemenu a.current{font-weight:normal;padding-left:6px;padding-right:6px;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;border-top-left-radius:3px;border-top-right-radius:3px;border-width:1px;border-style:solid;}#sidemenu li a .count-0{display:none;}.plugin-install #description,.plugin-install-network #description{width:60%;}table .vers,table .column-visible,table .column-rating{text-align:left;}.error-message{color:red;font-weight:bold;}body.iframe{height:98%;}td.media-icon{text-align:center;width:80px;padding-top:8px;padding-bottom:8px;}td.media-icon img{max-width:80px;max-height:60px;}.screen-per-page{width:3em;}.list-ajax-loading{float:right;margin-right:9px;margin-top:-1px;}.tablenav .list-ajax-loading{margin-top:7px;}#howto{font-size:11px;margin:0 5px;display:block;}.importers td{padding-right:14px;}.importers{font-size:16px;width:auto;}#namediv table{width:100%;}#namediv td.first{width:10px;white-space:nowrap;}#namediv input{width:98%;}#namediv p{margin:10px 0;}#submitdiv h3{margin-bottom:0!important;}.zerosize{height:0;width:0;margin:0;border:0;padding:0;overflow:hidden;position:absolute;}br.clear{height:2px;line-height:2px;}.checkbox{border:none;margin:0;padding:0;}fieldset{border:0;padding:0;margin:0;}.post-categories{display:inline;margin:0;padding:0;}.post-categories li{display:inline;}.edit-box{display:none;}h3:hover .edit-box{display:inline;}.index-php form .input-text-wrap{background:#fff;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{background:#fff;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;}#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;top:5px;}#dashboard-widgets h4{font-weight:normal;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;padding-top:20px;}#dashboard_right_now p.sub{padding:5px 0 15px;color:#8f8f8f;font-size:14px;position:absolute;top:-17px;left:15px;}#dashboard_right_now .table{margin:0;padding:0;position:relative;}#dashboard_right_now .table_content{float:left;border-top:#ececec 1px solid;width:45%;}#dashboard_right_now .table_discussion{float:right;border-top:#ececec 1px solid;width:45%;}#dashboard_right_now table td{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-size:14px;width:1%;}#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 .spam{color:red;}#dashboard_right_now .waiting{color:#e66f00;}#dashboard_right_now .approved{color:green;}#dashboard_right_now .versions{padding:6px 10px 12px;clear:both;}#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:sans-serif;font-size:10px;}#dashboard_recent_comments .subsubsub{float:none;white-space:normal;}#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.7em;margin-top:-0.4em;color:#777;}#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:12px;}#dashboard_quick_press h4{font-family:sans-serif;float:left;width:5em;clear:both;font-weight:normal;text-align:right;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 .wp-media-buttons{margin:0 0 .5em 5em;padding:0;}#dashboard_quick_press .wp-media-buttons a{color:#777;}#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-widgets #dashboard_quick_press form p.submit img.waiting{vertical-align:middle;visibility:hidden;margin:4px 6px 0 0;}#dashboard_recent_drafts ul,#dashboard_recent_drafts p{margin:0;padding:0;}#dashboard_recent_drafts ul{list-style:none;}#dashboard_recent_drafts ul li{margin-bottom:1em;}#dashboard_recent_drafts h4{line-height:1.7em;}#dashboard_recent_drafts h4 abbr{font-weight:normal;font-family:sans-serif;font-size:12px;color:#999;margin-left:3px;}.rss-widget ul{margin:0;padding:0;list-style:none;}a.rsswidget{font-size:13px;line-height:1.7em;}.rss-widget ul li{line-height:1.5em;margin-bottom:12px;}.rss-widget span.rss-date{color:#999;font-size:12px;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{line-height:1.7em;}#dashboard_plugins h5{font-weight:normal;font-size:13px;margin:0;display:inline;line-height:1.4em;}#dashboard_plugins h5 a{line-height:1.4em;}#dashboard_plugins .inside span{font-size:12px;padding-left:5px;}#dashboard_plugins p{margin:.3em 0 1.4em;line-height:1.4em;}.dashboard-comment-wrap{overflow:hidden;word-wrap:break-word;}#dashboard_browser_nag a.update-browser-link{font-size:1.2em;font-weight:bold;}#dashboard_browser_nag a{text-decoration:underline;}#dashboard_browser_nag p.browser-update-nag.has-browser-icon{padding-right:125px;}#dashboard_browser_nag .browser-icon{margin-top:-35px;}#dashboard_browser_nag.postbox.browser-insecure{background-color:#ac1b1b;border-color:#ac1b1b;}#dashboard_browser_nag.postbox{background-color:#e29808;background-image:none;border-color:#edc048;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;color:#fff;}#dashboard_browser_nag.postbox.browser-insecure h3{border-bottom-color:#cd5a5a;color:#fff;}#dashboard_browser_nag.postbox h3{border-bottom-color:#f6e2ac;text-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;background:transparent none;color:#fff;}#dashboard_browser_nag a{color:#fff;}#dashboard_browser_nag.browser-insecure a.browse-happy-link,#dashboard_browser_nag.browser-insecure a.update-browser-link{text-shadow:#871b15 0 1px 0;}#dashboard_browser_nag a.browse-happy-link,#dashboard_browser_nag a.update-browser-link{text-shadow:#d29a04 0 1px 0;}.login *{margin:0;padding:0;}.login form{margin-left:8px;padding:26px 24px 46px;font-weight:normal;background:#fff;border:1px solid #e5e5e5;-moz-box-shadow:rgba(200,200,200,0.7) 0 4px 10px -1px;-webkit-box-shadow:rgba(200,200,200,0.7) 0 4px 10px -1px;box-shadow:rgba(200,200,200,0.7) 0 4px 10px -1px;}.login form .forgetmenot{font-weight:normal;float:left;margin-bottom:0;}.login .button-primary{font-size:13px!important;line-height:16px;padding:3px 10px;float:right;}#login form p{margin-bottom:0;}#login form p.submit{padding:0;}.login label{color:#777;font-size:14px;}.login form .forgetmenot label{font-size:12px;line-height:19px;}.login form p{margin-bottom:24px;}.login h1 a{background:url(../images/logo-login.png) no-repeat top center;width:326px;height:67px;text-indent:-9999px;overflow:hidden;padding-bottom:15px;display:block;}#login{width:320px;padding:114px 0 0;margin:auto;}#login_error,.login .message{margin:0 0 16px 8px;padding:12px;}.login #nav,.login #backtoblog{text-shadow:#fff 0 1px 0;margin:0 0 0 16px;padding:16px 16px 0;}#backtoblog{padding:12px 16px 0;}.login form .input{font-weight:200;font-size:24px;line-height:1;width:100%;padding:3px;margin-top:2px;margin-right:6px;margin-bottom:16px;border:1px solid #e5e5e5;background:#fbfbfb;outline:none;-moz-box-shadow:inset 1px 1px 2px rgba(200,200,200,0.2);-webkit-box-shadow:inset 1px 1px 2px rgba(200,200,200,0.2);box-shadow:inset 1px 1px 2px rgba(200,200,200,0.2);}.login input{color:#555;}.login #pass-strength-result{width:250px;font-weight:bold;border-style:solid;border-width:1px;margin:12px 0 6px;padding:6px 5px;text-align:center;}#dashboard_right_now p.musub{margin-top:12px;border-top:1px solid #ececec;padding-left:16px;position:static;}.rtl #dashboard_right_now p.musub{padding-left:0;padding-right:16px;}#dashboard_right_now td.b a.musublink{font-size:16px;}#dashboard_right_now div.musubtable{border-top:none;}#dashboard_right_now div.musubtable .t{white-space:normal;}.wp-list-table .site-deleted{background:#ff8573;}.wp-list-table .site-spammed{background:#faafaa;}.wp-list-table .site-archived{background:#ffebe8;}.wp-list-table .site-mature{background:#fecac2;}#nav-menus-frame{margin-left:300px;}#wpbody-content #menu-settings-column{display:inline;width:281px;margin-left:-300px;clear:both;float:left;padding-top:24px;}.no-js #wpbody-content #menu-settings-column{padding-top:31px;}#menu-settings-column .inside{clear:both;}.metabox-holder-disabled .postbox{opacity:.5;filter:alpha(opacity=50);}.metabox-holder-disabled .button-controls .select-all{display:none;}#wpbody{position:relative;}#menu-management-liquid{float:left;min-width:100%;}#menu-management{position:relative;margin-right:20px;margin-top:-3px;width:100%;}#menu-management .menu-edit{margin-bottom:20px;}.nav-menus-php #post-body{padding:10px;border-width:1px 0;border-style:solid;}#nav-menu-header,#nav-menu-footer{padding:0 10px;}#nav-menu-header{border-bottom:1px solid;}#nav-menu-footer{border-top:1px solid;}.nav-menus-php #post-body div.updated,.nav-menus-php #post-body div.error{margin:0;}.nav-menus-php #post-body-content{position:relative;}#menu-management .menu-add-new abbr{font-weight:bold;}#menu-management .nav-tabs-nav{margin:0 20px;}#menu-management .nav-tabs-arrow{width:10px;padding:0 5px 4px;cursor:pointer;position:absolute;top:0;line-height:22px;font-size:18px;text-shadow:0 1px 0 #fff;}#menu-management .nav-tabs-arrow-left{left:0;}#menu-management .nav-tabs-arrow-right{right:0;text-align:right;}#menu-management .nav-tabs-wrapper{width:100%;height:28px;margin-bottom:-1px;overflow:hidden;}#menu-management .nav-tabs{padding-left:20px;padding-right:10px;}.js #menu-management .nav-tabs{float:left;margin-left:0;margin-right:-400px;}#menu-management .nav-tab{margin-bottom:0;font-size:14px;}#select-nav-menu-container{text-align:right;padding:0 10px 3px 10px;margin-bottom:5px;}#select-nav-menu{width:100px;display:inline;}#menu-name-label{margin-top:-2px;}#wpbody .open-label{display:block;float:left;}#wpbody .open-label span{padding-right:10px;}.js .input-with-default-title{font-style:italic;}#menu-management .inside{padding:0 10px;}.postbox .howto input{width:180px;float:right;}.customlinkdiv .howto input{width:200px;}#nav-menu-theme-locations .howto select{width:100%;}#nav-menu-theme-locations .button-controls{text-align:right;}.add-menu-item-view-all{height:400px;}#menu-container .submit{margin:0 0 10px;padding:0;}.nav-menus-php .meta-sep,.nav-menus-php .submitdelete,.nav-menus-php .submitcancel{display:block;float:left;margin:4px 0;line-height:15px;}.meta-sep{padding:0 2px;}#cancel-save{text-decoration:underline;font-size:12px;margin-left:20px;margin-top:5px;}.list-controls{float:left;margin-top:5px;}.add-to-menu{float:right;}.postbox img.waiting{display:none;vertical-align:middle;}.button-controls{clear:both;margin:10px 0;}.show-all,.hide-all{cursor:pointer;}.hide-all{display:none;}#menu-name{width:270px;}#manage-menu .inside{padding:0;}#available-links dt{display:block;}#add-custom-link .howto{font-size:12px;}#add-custom-link label span{display:block;float:left;margin-top:5px;padding-right:5px;}.menu-item-textbox{width:180px;}.nav-menus-php .howto span{margin-top:4px;display:block;float:left;}.quick-search{width:190px;}.nav-menus-php .list-wrap{display:none;clear:both;margin-bottom:10px;}.nav-menus-php .list-container{max-height:200px;overflow-y:auto;padding:10px 10px 5px;}.nav-menus-php .postbox p.submit{margin-bottom:0;}.nav-menus-php .list li{display:none;margin:0;margin-bottom:5px;}.nav-menus-php .list li .menu-item-title{cursor:pointer;display:block;}.nav-menus-php .list li .menu-item-title input{margin-right:3px;margin-top:-3px;}#menu-container .inside{padding-bottom:10px;}.menu{padding-top:1em;}#menu-to-edit{padding:1em 0;}.menu ul{width:100%;}.menu li{margin-bottom:0;position:relative;}.menu-item-bar{clear:both;line-height:1.5em;position:relative;margin:13px 0 0 0;}.menu-item-handle{border:1px solid #dfdfdf;position:relative;padding-left:10px;height:auto;width:400px;line-height:35px;text-shadow:0 1px 0 #FFF;overflow:hidden;word-wrap:break-word;}#menu-to-edit .menu-item-invalid .menu-item-handle{background-color:#f6c9cc;background-image:-ms-linear-gradient(bottom,#f6c9cc,#fdf8ff);background-image:-moz-linear-gradient(bottom,#f6c9cc,#fdf8ff);background-image:-o-linear-gradient(bottom,#f6c9cc,#fdf8ff);background-image:-webkit-gradient(linear,left bottom,left top,from(#f6c9cc),to(#fdf8ff));background-image:-webkit-linear-gradient(bottom,#f6c9cc,#fdf8ff);background-image:linear-gradient(bottom,#f6c9cc,#fdf8ff);}.menu-item-edit-active .menu-item-handle{-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0;}.no-js .menu-item-edit-active .item-edit{display:none;}.js .menu-item-handle{cursor:move;}.menu li.deleting .menu-item-handle{background-image:none;text-shadow:0;}.menu-item-handle .item-title{font-size:12px;font-weight:bold;padding:7px 0;line-height:20px;display:block;margin-right:13em;}li.menu-item.ui-sortable-helper dl{margin-top:0;}li.menu-item.ui-sortable-helper .menu-item-transport dl{margin-top:13px;}.menu .sortable-placeholder{height:35px;width:410px;margin-top:13px;}.menu-item-depth-0{margin-left:0;}.menu-item-depth-1{margin-left:30px;}.menu-item-depth-2{margin-left:60px;}.menu-item-depth-3{margin-left:90px;}.menu-item-depth-4{margin-left:120px;}.menu-item-depth-5{margin-left:150px;}.menu-item-depth-6{margin-left:180px;}.menu-item-depth-7{margin-left:210px;}.menu-item-depth-8{margin-left:240px;}.menu-item-depth-9{margin-left:270px;}.menu-item-depth-10{margin-left:300px;}.menu-item-depth-11{margin-left:330px;}.menu-item-depth-0 .menu-item-transport{margin-left:0;}.menu-item-depth-1 .menu-item-transport{margin-left:-30px;}.menu-item-depth-2 .menu-item-transport{margin-left:-60px;}.menu-item-depth-3 .menu-item-transport{margin-left:-90px;}.menu-item-depth-4 .menu-item-transport{margin-left:-120px;}.menu-item-depth-5 .menu-item-transport{margin-left:-150px;}.menu-item-depth-6 .menu-item-transport{margin-left:-180px;}.menu-item-depth-7 .menu-item-transport{margin-left:-210px;}.menu-item-depth-8 .menu-item-transport{margin-left:-240px;}.menu-item-depth-9 .menu-item-transport{margin-left:-270px;}.menu-item-depth-10 .menu-item-transport{margin-left:-300px;}.menu-item-depth-11 .menu-item-transport{margin-left:-330px;}body.menu-max-depth-0{min-width:950px!important;}body.menu-max-depth-1{min-width:980px!important;}body.menu-max-depth-2{min-width:1010px!important;}body.menu-max-depth-3{min-width:1040px!important;}body.menu-max-depth-4{min-width:1070px!important;}body.menu-max-depth-5{min-width:1100px!important;}body.menu-max-depth-6{min-width:1130px!important;}body.menu-max-depth-7{min-width:1160px!important;}body.menu-max-depth-8{min-width:1190px!important;}body.menu-max-depth-9{min-width:1220px!important;}body.menu-max-depth-10{min-width:1250px!important;}body.menu-max-depth-11{min-width:1280px!important;}.item-type{font-size:12px;padding-right:10px;}.item-controls{font-size:12px;position:absolute;right:20px;top:-1px;}.item-controls a{text-decoration:none;}.item-controls a:hover{cursor:pointer;}.item-controls .item-order{padding-right:10px;}.nav-menus-php .item-edit{position:absolute;right:-20px;top:0;display:block;width:30px;height:36px;overflow:hidden;text-indent:-999em;border-bottom:1px solid;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;}.menu-instructions-inactive{display:none;}.menu-item-settings{display:block;width:400px;padding:10px 0 10px 10px;border:solid;border-width:0 1px 1px 1px;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;border-bottom-right-radius:3px;}.menu-item-edit-active .menu-item-settings{display:block;}.menu-item-edit-inactive .menu-item-settings{display:none;}.add-menu-item-pagelinks{margin:.5em auto;text-align:center;}.link-to-original{display:block;margin:0 0 10px;padding:3px 5px 5px;font-size:12px;font-style:italic;}.link-to-original a{padding-left:4px;font-style:normal;}.hidden-field{display:none;}.menu-item-settings .description-thin,.menu-item-settings .description-wide{margin-right:10px;float:left;}.description-thin{width:190px;height:40px;}.description-wide{width:390px;}.menu-item-actions{padding-top:15px;}#cancel-save{cursor:pointer;}.nav-menus-php .major-publishing-actions{clear:both;padding:3px 0 5px;}.nav-menus-php .major-publishing-actions .publishing-action{text-align:right;float:right;line-height:23px;margin:5px 0 1px;}.nav-menus-php .major-publishing-actions .delete-action{vertical-align:middle;text-align:left;float:left;padding-right:15px;margin-top:5px;}.menu-name-label span,.auto-add-pages label{font-size:12px;font-style:normal;}.menu-name-label{margin-right:15px;}.auto-add-pages input{margin-top:0;}.auto-add-pages{margin-top:4px;float:left;}.nav-menus-php .submitbox .submitcancel{border-bottom:1px solid;padding:1px 2px;text-decoration:none;}.nav-menus-php .major-publishing-actions .form-invalid{padding-left:4px;margin-left:-4px;border:0 none;}#menu-item-name-wrap:after,#menu-item-url-wrap:after,#menu-name-label:after,#menu-settings-column .inside:after,#nav-menus-frame:after,.nav-menus-php #post-body-content:after,.nav-menus-php .button-controls:after,.nav-menus-php .major-publishing-actions:after,.nav-menus-php .menu-item-settings:after{clear:both;content:".";display:block;height:0;visibility:hidden;}#nav-menus-frame,.button-controls,#menu-item-url-wrap,#menu-item-name-wrap{display:block;}div.star-holder{position:relative;height:19px;width:100px;font-size:19px;}div.action-links{font-weight:normal;margin:6px 0 0;}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;}#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;-webkit-border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;border-top-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;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;}#plugin-information .fyi ul{padding:10px 5px 10px 7px;margin:0;list-style:none;-webkit-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;overflow:auto;}body.press-this{color:#333;margin:0;padding:0;min-width:675px;min-height:400px;}img{border:none;}.press-this #wphead{height:32px;margin-right:5px;margin-bottom:5px;}.press-this #header-logo{float:left;margin:7px 7px 0;-webkit-user-select:none;-moz-user-select:none;user-select:none;}.press-this #wphead h1{font-weight:normal;font-size:16px;line-height:32px;margin:0;float:left;}.press-this #wphead h1 a{text-decoration:none;}.press-this #wphead h1 a:hover{text-decoration:underline;}.press-this-sidebar{float:right;width:200px;padding-top:10px;}.press-this #title{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;}.press-this .tagchecklist span a{background:transparent url(../images/xit.gif) no-repeat 0 0;}.press-this #titlediv{margin:0;}.press-this .wp-media-buttons{cursor:default;padding:8px 8px 0;}.press-this .howto{margin-top:2px;margin-bottom:3px;font-size:12px;font-style:italic;display:block;}.press-this #poststuff{margin:0 10px 10px;}#poststuff #editor-toolbar{height:30px;}div.zerosize{border:0 none;height:0;margin:0;overflow:hidden;padding:0;width:0;}.posting{margin-right:212px;position:relative;}.press-this .inner-sidebar{width:200px;}.press-this .inner-sidebar .sleeve{padding-top:5px;}.press-this #submitdiv p{margin:0;padding:6px;}.press-this #submitdiv #publishing-actions{border-bottom:1px solid #dfdfdf;}.press-this #publish{float:right;}.press-this #poststuff h2,.press-this #poststuff h3{font-size:14px;line-height:1;}.press-this #tagsdiv-post_tag h3,.press-this #categorydiv h3{cursor:pointer;}.press-this #submitdiv h3{cursor:default;}h3.tb{text-shadow:0 1px 0 #fff;font-weight:bold;font-size:12px;margin-left:5px;}#TB_window{border:1px solid #333;}.press-this .postbox,.press-this .stuffbox{margin-bottom:10px;min-width:0;}.postbox:hover .handlediv,.stuffbox:hover .handlediv{background:transparent url(../images/arrows.png) no-repeat 6px 7px;}.press-this #submitdiv:hover .handlediv{background:none;}.tbtitle{font-size:1.7em;outline:none;padding:3px 4px;border-color:#dfdfdf;}.press-this .actions{float:right;margin:-19px 0 0;}.press-this #extra-fields .actions{margin:-25px -7px 0 0;}.press-this .actions li{float:left;list-style:none;margin-right:10px;}#extra-fields .button{margin-right:5px;}#photo_saving{margin:0 8px 8px;vertical-align:middle;}#img_container_container{overflow:auto;}#extra-fields{margin-top:10px;position:relative;}#extra-fields h2{margin:12px;}#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;}.press-this .categorydiv div.tabs-panel{height:100px;}.press-this .tagsdiv .newtag{width:130px;}.press-this #content{margin:5px 0;padding:0 5px;border:0 none;height:357px;font-family:Consolas,Monaco,monospace;font-size:13px;line-height:19px;background:transparent;}#saving{display:inline;vertical-align:middle;}#TB_ajaxContent #options{position:absolute;top:20px;right:25px;padding:5px;}#TB_ajaxContent h3{margin-bottom:.25em;}.error a{text-decoration:underline;}.updated a{text-decoration:none;padding-bottom:2px;}.taghint{color:#aaa;margin:-17px 0 0 7px;visibility:hidden;}input.newtag ~ div.taghint{visibility:visible;}input.newtag:focus ~ div.taghint{visibility:hidden;}#mce_fullscreen_container{background:#fff;}#photo-add-url-div input[type="text"]{width:300px;}.alignleft h3{margin:0;}h3 span{font-weight:normal;}#template textarea{font-family:Consolas,Monaco,monospace;font-size:12px;width:97%;background:#f9f9f9;outline:none;}#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;}#templateside ul li a span.highlight{display:block;}.nonessential{font-size:11px;font-style:italic;padding-left:12px;}.highlight{padding:3px 3px 3px 12px;margin-left:-12px;font-weight:bold;border:0 none;}#documentation{margin-top:10px;}#documentation label{line-height:22px;vertical-align:top;font-weight:bold;}.fileedit-sub{padding:10px 0 8px;line-height:180%;}.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,.theme-listing .theme-item:hover .theme-item-info span.dots{display:none;}.theme-listing .theme-item:hover .theme-item-info span{display:inline;}.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;}#theme-information .available-theme,.available-theme{padding:20px 15px;}#theme-information .available-theme{overflow:visible;width:440px;}#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 0;}#theme-information .action-button #cancel,#theme-information .action-button #install{margin:10px 5px;}#theme-information .action-button #cancel{float:left;}#theme-information .action-button #install{float:right;}#theme-information .available-theme h3{margin:1em 0;}body#theme-information{height:auto;}.feature-filter{padding:8px 12px 0;}.feature-filter .feature-group{float:left;margin:5px 10px 10px;}.feature-filter .feature-group li{display:inline;float:left;list-style-type:none;padding-right:25px;min-width:150px;}.feature-container{width:100%;overflow:auto;margin-bottom:10px;}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,.inactive-sidebar .widget,.widget-liquid-right .sidebar-description{width:250px;margin:0 auto 20px;overflow:hidden;}.widget-liquid-right .sidebar-description{margin-bottom:10px;}.inactive-sidebar .widget{margin:0 10px 20px;float:left;}div.sidebar-name h3{font-weight:normal;font-size:15px;margin:0;padding:8px 10px;overflow:hidden;white-space:nowrap;}div.sidebar-name{cursor:pointer;font-size:13px;border-width:1px;border-style:solid;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;}.js .closed .sidebar-name{-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;}.widget-liquid-right .widgets-sortables,#widgets-left .widget-holder{border-width:0 1px 1px;border-style:none solid solid;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;}.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;}#available-widgets .widget{-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;}.inactive-sidebar{padding:5px 5px 0;}#widget-list .widget{width:250px;margin:0 10px 15px;border:0 none;background:transparent;float:left;}#widget-list .widget-description{padding:5px 8px;}.widget-placeholder{border-width:1px;border-style:dashed;margin:0 auto 20px;height:26px;width:250px;}.inactive-sidebar .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{margin-bottom:-1px;font-size:12px;font-weight:bold;height:26px;overflow:hidden;}.widget-top .widget-title{padding:7px 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:transparent url(../images/arrows.png) no-repeat 4px 6px;}.widget-top a.widget-action:hover{background:transparent url(../images/arrows-dark.png) no-repeat 4px 6px;}.widget .widget-inside,.widget .widget-description{padding:12px 12px 10px;font-size:12px;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;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:12px;}.widget-title a,.widget-title a:hover{text-decoration:none;border-bottom:none;}.widget-control-edit{display:block;font-size:12px;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,.inactive-sidebar .widget-control-edit .edit{display:inline;}.editwidget{margin:0 auto 15px;}.editwidget .widget-inside{display:block;padding:10px;}.inactive p.description{margin:5px 15px 10px;}#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:12px;white-space:nowrap;}#removing-widget{display:none;font-weight:normal;padding-left:15px;font-size:12px;line-height:1;}.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{-webkit-border-bottom-right-radius:0;-webkit-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;}@media only screen and(max-width:768px){#col-left{width:100%;}#col-right{width:100%;}}@media only screen and(min-width:769px){#col-left{width:35%;}#col-right{width:65%;}}@media only screen and(max-width:860px){#col-left{width:35%;}#col-right{width:65%;}}@media only screen and(min-width:980px){#col-left{width:35%;}#col-right{width:65%;}}@media only screen and(max-width:768px){#col-left{width:100%;}#col-right{width:100%;}.form-field input,.form-field textarea{width:99%;}.form-wrap .form-field{padding:0;}#profile-page .form-table textarea{max-width:400px;width:auto;}} \ No newline at end of file +#wpwrap{height:auto;min-height:100%;width:100%;position:relative}#wpcontent{height:100%}#wpcontent,#footer{margin-left:165px}.folded #wpcontent,.folded #footer{margin-left:52px}#wpbody-content{padding-bottom:65px;float:left;width:100%}#adminmenuback,#adminmenuwrap,#adminmenu,#adminmenu .wp-submenu,#adminmenu .wp-submenu-wrap,.folded #adminmenu .wp-has-current-submenu .wp-submenu{width:145px}#adminmenuback{position:absolute;top:0;bottom:0;z-index:-1}#adminmenu{clear:left;margin:0;padding:0;list-style:none}.folded #adminmenuback,.folded #adminmenuwrap,.folded #adminmenu,.folded #adminmenu li.menu-top{width:32px}.inner-sidebar{float:right;clear:right;display:none;width:281px;position:relative}.columns-2 .inner-sidebar{margin-right:auto;width:286px;display:block}.inner-sidebar #side-sortables,.columns-2 .inner-sidebar #side-sortables{min-height:300px;width:280px;padding:0}.has-right-sidebar .inner-sidebar{display:block}.has-right-sidebar #post-body{float:left;clear:left;width:100%;margin-right:-2000px}.has-right-sidebar #post-body-content{margin-right:300px;float:none;width:auto}#col-container,#col-left,#col-right{overflow:hidden;padding:0;margin:0}#col-left{width:35%}#col-right{float:right;clear:right;width:65%}.col-wrap{padding:0 7px}.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"],input[type="number"],input[type="search"],input[type="email"],input[type="url"],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:text-top;padding:0;margin:1px 0 0}input[type="search"]{-webkit-appearance:textfield}input[type="search"]::-webkit-search-decoration{display:none}html,body{height:100%;margin:0;padding:0}body{font-family:sans-serif;font-size:12px;line-height:1.4em;min-width:600px}body.iframe{min-width:0}body.login{background:#fbfbfb;min-width:0}iframe,img{border:0}td,textarea,input,select{font-family:inherit;font-size:inherit;font-weight:inherit}td,textarea{line-height:inherit}input,select{line-height:15px}a,input,select{outline:0}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}p{margin:1em 0}blockquote{margin:1em}label{cursor:pointer}li,dd{margin-bottom:6px}textarea,input,select{margin:1px;padding:3px}h1,h2,h3,h4,h5,h6{display:block;font-weight:bold}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em;margin:.83em 0}h3{font-size:1.17em;margin:1em 0}h4{font-size:1em;margin:1.33em 0}h5{font-size:.83em;margin:1.67em 0}h6{font-size:.67em;margin:2.33em 0}ul,ol{padding:0}ul{list-style:none}ol{list-style-type:decimal;margin-left:2em}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}.code,code{font-family:Consolas,Monaco,monospace}kbd,code{padding:1px 3px;margin:0 1px;font-size:11px}.subsubsub{list-style:none;margin:8px 0 5px;padding:0;white-space:nowrap;font-size:12px;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:0;border:0}.subsubsub li{display:inline;margin:0;padding:0}.widefat,div.updated,div.error,.wrap .add-new-h2,textarea,input[type="text"],input[type="password"],input[type="file"],input[type="button"],input[type="submit"],input[type="reset"],input[type="email"],input[type="number"],input[type="search"],input[type="tel"],input[type="url"],select,.tablenav .tablenav-pages a,.tablenav-pages span.current,#titlediv #title,.postbox,#postcustomstuff table,#postcustomstuff input,#postcustomstuff textarea,.imgedit-menu div,.plugin-update-tr .update-message,#poststuff .inside .the-tagcloud,.login form,#login_error,.login .message,#menu-management .menu-edit,.nav-menus-php .list-container,.menu-item-handle,.link-to-original,.nav-menus-php .major-publishing-actions .form-invalid,.press-this #message,#TB_window,.tbtitle,.highlight,.feature-filter,#widget-list .widget-top,.editwidget .widget-inside{-webkit-border-radius:3px;border-radius:3px;border-width:1px;border-style:solid}.widefat{border-spacing:0;width:100%;clear:both;margin:0}.widefat *{word-wrap:break-word}.widefat a{text-decoration:none}.widefat thead th:first-of-type{-webkit-border-top-left-radius:3px;border-top-left-radius:3px}.widefat thead th:last-of-type{-webkit-border-top-right-radius:3px;border-top-right-radius:3px}.widefat tfoot th:first-of-type{-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px}.widefat tfoot th:last-of-type{-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}.widefat td,.widefat th{border-width:1px 0;border-style:solid}.widefat tfoot th{border-bottom:0}.widefat .no-items td{border-bottom-width:0}.widefat td{font-size:12px;padding:4px 7px 2px;vertical-align:top}.widefat td p,.widefat td ol,.widefat td ul{font-size:12px}.widefat th{padding:7px 7px 8px;text-align:left;line-height:1.3em;font-size:14px}.widefat th input{margin:0 0 0 8px;padding:0;vertical-align:text-top}.widefat .check-column{width:2.2em;padding:11px 0 0;vertical-align:top}.widefat tbody th.check-column{padding:9px 0 22px}.widefat .num,.column-comments,.column-links,.column-posts{text-align:center}.widefat th#comments{vertical-align:middle}.wrap{margin:4px 15px 0 0}div.updated,div.error{padding:0 .6em;margin:5px 15px 2px}div.updated p,div.error p{margin:.5em 0;padding:2px}.wrap div.updated,.wrap div.error,.media-upload-form div.error{margin:5px 0 15px}.wrap h2,.subtitle{font-weight:normal;margin:0;text-shadow:#fff 0 1px 0}.wrap h2{font-size:23px;padding:9px 15px 4px 0;line-height:29px}.subtitle{font-size:14px;padding-left:25px}.wrap .add-new-h2{font-family:sans-serif;margin-left:4px;padding:3px 8px;position:relative;top:-3px;text-decoration:none;font-size:12px;border:0 none}.wrap h2.long-header{padding-right:0}div.sidebar-name h3,#menu-management .nav-tab,#dashboard_plugins h5,a.rsswidget,#dashboard_right_now td.b,#dashboard-widgets h4,.tool-box .title,#poststuff h3,.metabox-holder h3,.pressthis a,#your-profile legend,.inline-edit-row fieldset span.title,.inline-edit-row fieldset span.checkbox-title,.tablenav .displaying-num,.widefat th,.quicktags,.search{font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif}h2 .nav-tab,.wrap h2,.subtitle,.login form .input{font-family:"HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",sans-serif}.quicktags,.search{font-size:12px}.icon32{float:left;height:34px;margin:7px 8px 0 0;width:36px}.icon16{height:18px;width:18px;padding:6px 6px;margin:-6px 0 0 -8px;float:left}.key-labels label{line-height:24px}.pre{white-space:pre-wrap;white-space:-moz-pre-wrap!important;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}.howto{font-style:italic;display:block;font-family:sans-serif}p.install-help{margin:8px 0;font-style:italic}.no-break{white-space:nowrap}.wp-admin select{padding:2px;height:2em}.wp-admin select[multiple]{height:auto}select option{padding:2px}.submit{padding:1.5em 0;margin:5px 0;-webkit-border-bottom-left-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-left-radius:3px;border-bottom-right-radius:3px}form p.submit a.cancel:hover{text-decoration:none}.submit input,.button,input.button,.button-primary,input.button-primary,.button-secondary,input.button-secondary,.button-highlighted,input.button-highlighted,#postcustomstuff .submit input{text-decoration:none;font-size:12px!important;line-height:13px;padding:3px 8px;cursor:pointer;border-width:1px;border-style:solid;-webkit-border-radius:11px;border-radius:11px;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}#minor-publishing-actions input,#major-publishing-actions input,#minor-publishing-actions .preview{min-width:80px;text-align:center}textarea.all-options,input.all-options{width:250px}input.large-text,textarea.large-text{width:99%}input.regular-text,#adduser .form-field input{width:25em}input.small-text{width:50px}input[type="number"].small-text{width:60px}#doaction,#doaction2,#post-query-submit{margin-right:8px}.tablenav select[name="action"],.tablenav select[name="action2"]{width:130px}.tablenav select[name="m"]{width:155px}.tablenav select#cat{width:170px}#wpcontent option{padding:2px}#timezone_string option{margin-left:1em}label,#your-profile label+a{vertical-align:middle}#misc-publishing-actions label{vertical-align:baseline}#pass-strength-result{border-style:solid;border-width:1px;float:left;margin:13px 5px 5px 1px;padding:3px 5px;text-align:center;width:200px;display:none}.indicator-hint{padding-top:8px}p.search-box{float:right;margin:0}input[type="text"].ui-autocomplete-loading{background:transparent url('../images/loading.gif') no-repeat right center;visibility:visible}ul#add-to-blog-users{margin:0 0 0 14px}.ui-autocomplete-input.open{border-bottom-right-radius:0;border-bottom-left-radius:0}.ui-autocomplete{padding:0;margin:0;list-style:none;position:absolute;z-index:10000;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border-width:1px;border-style:solid}.ui-autocomplete li{margin-bottom:0;white-space:nowrap;text-align:left}.ui-autocomplete li a{display:block;height:100%;padding:4px 10px}.ui-autocomplete li a.ui-state-hover{cursor:pointer}#major-publishing-actions{padding:10px 10px 8px;clear:both;border-top:1px solid #f5f5f5;margin-top:-2px}#delete-action{line-height:25px;vertical-align:middle;text-align:left;float:left}#publishing-action{text-align:right;float:right;line-height:23px}#misc-publishing-actions{padding:6px 0 0}.misc-pub-section{padding:6px 10px 8px;border-width:1px 0;border-style:solid}.misc-pub-section:first-child{border-top-width:0}.misc-pub-section-last{border-bottom-width:0}#minor-publishing-actions{padding:10px 10px 2px 8px;text-align:right}#minor-publishing{border-bottom-width:1px;border-bottom-style:solid;-webkit-box-shadow:0 1px 0 #fff;-moz-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff}#save-post{float:left}#minor-publishing .ajax-loading{padding:3px 0 0 4px;float:left}.preview{float:right}#sticky-span{margin-left:18px}.side-info{margin:0;padding:4px;font-size:11px}.side-info h5{padding-bottom:7px;font-size:14px;margin:12px 2px 5px;border-bottom-width:1px;border-bottom-style:solid}.side-info ul{margin:0;padding-left:18px;list-style:square}a.button,a.button-primary,a.button-secondary{line-height:15px;padding:3px 10px;white-space:nowrap;-webkit-border-radius:10px}.approve,.unapproved .unapprove{display:none}.unapproved .approve,.spam .approve,.trash .approve{display:inline}td.action-links,th.action-links{text-align:right}.describe .del-link{padding-left:5px}#update-nag,.update-nag{line-height:19px;padding:5px 0;font-size:12px;text-align:center;margin:-1px 15px 0 5px;border-width:1px;border-style:solid;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.plugins .plugin-update{padding:0}.plugin-update .update-message{margin:0 10px 8px 31px;font-weight:bold}ul#dismissed-updates{display:none}form.upgrade{margin-top:8px}form.upgrade .hint{font-style:italic;font-size:85%;margin:-0.5em 0 2em 0}.ajax-feedback{visibility:hidden;vertical-align:bottom}#ajax-response.alignleft{margin-left:2em}#adminmenu a,#sidemenu a,#taglist a,#catlist a{text-decoration:none}#screen-options-wrap,#contextual-help-wrap{margin:0;padding:8px 20px 12px;position:relative;overflow:auto}#screen-meta .screen-reader-text{visibility:hidden}#screen-meta-links{margin:0 24px 0 0}#screen-meta{display:none;position:relative;margin:0 15px 0 5px;border-width:0 1px 1px;border-style:none solid solid}#screen-options-link-wrap,#contextual-help-link-wrap{float:right;height:23px;padding:0;margin:0 0 0 6px;font-family:sans-serif}#screen-options-link-wrap,#contextual-help-link-wrap,#screen-meta{-webkit-border-bottom-left-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-left-radius:3px;border-bottom-right-radius:3px}#screen-meta-links .screen-meta-toggle{position:relative;top:-1px}#screen-meta-links a.show-settings{text-decoration:none;z-index:1;padding:1px 16px 0 6px;height:22px;line-height:22px;font-size:12px;display:block;text-shadow:rgba(255,255,255,0.7) 0 1px 0}#screen-meta-links a.show-settings:hover{text-decoration:none}.toggle-arrow{background-repeat:no-repeat;background-position:top left;background-color:transparent;height:22px;line-height:22px;display:block}.toggle-arrow-active{background-position:bottom left}#screen-options-wrap h5,#contextual-help-wrap h5{margin:8px 0;font-size:13px}.metabox-prefs label{display:inline-block;padding-right:15px;white-space:nowrap;line-height:30px}.metabox-prefs label input{margin:0 5px 0 2px}.metabox-prefs .columns-prefs label input{margin:0 2px}.metabox-prefs label a{display:none}#contextual-help-wrap{padding:0;margin-left:-4px}#contextual-help-columns{position:relative}#contextual-help-back{position:absolute;top:0;bottom:0;left:150px;right:170px;border-width:0 1px;border-style:solid}#contextual-help-wrap.no-sidebar #contextual-help-back{right:0;border-right-width:0;-webkit-border-bottom-right-radius:2px;border-bottom-right-radius:2px}.contextual-help-tabs{float:left;width:150px;margin:0}.contextual-help-tabs ul{margin:1em 0}.contextual-help-tabs li{margin-bottom:0;list-style-type:none;border-style:solid;border-width:1px 0;border-color:transparent}.contextual-help-tabs a{display:block;padding:5px 5px 5px 12px;line-height:18px;text-decoration:none}.contextual-help-tabs .active{padding:0;margin:0 -1px 0 0;border-width:1px 0 1px 1px;border-style:solid}.contextual-help-tabs-wrap{padding:0 20px;overflow:auto}.help-tab-content{display:none;margin:0 22px 12px 0;line-height:1.6em}.help-tab-content.active{display:block}.help-tab-content li{list-style-type:disc;margin-left:18px}.contextual-help-sidebar{width:150px;float:right;padding:0 8px 0 12px;overflow:auto}#adminmenuback,#adminmenuwrap{border-width:0 1px 0 0;border-style:solid}#adminmenuwrap{position:relative;float:left}#adminmenushadow{position:absolute;top:0;right:0;bottom:0;width:6px;z-index:20}#adminmenu *{-webkit-user-select:none;-moz-user-select:none;user-select:none}#adminmenu .wp-submenu{list-style:none;padding:0;margin:0;overflow:hidden}#adminmenu li .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{display:none;position:absolute;top:-1px;left:146px;z-index:999;overflow:hidden}.js #adminmenu .wp-submenu.sub-open,.folded #adminmenu .wp-has-current-submenu .wp-submenu.sub-open,.no-js #adminmenu .wp-has-submenu:hover .wp-submenu,#adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu li.focused .wp-submenu{display:block}#adminmenu .wp-has-current-submenu .wp-submenu{position:relative;z-index:2;top:auto;left:auto;right:auto;bottom:auto;padding:0}#adminmenu .wp-has-current-submenu .wp-submenu-wrap{-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.folded #adminmenu .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{top:-5px;left:26px}#adminmenu .wp-submenu.sub-open,#adminmenu li.focused.wp-not-current-submenu .wp-submenu,.folded #adminmenu li.focused.wp-has-current-submenu .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu.sub-open,.no-js #adminmenu .wp-has-submenu:hover .wp-submenu,.no-js.folded #adminmenu .wp-has-current-submenu:hover .wp-submenu{padding:0 8px 8px 0}.no-js #adminmenu .wp-has-current-submenu:hover .wp-submenu,#adminmenu .wp-has-current-submenu .wp-submenu{padding:0}#adminmenu .wp-submenu a{font-size:12px;line-height:18px}#adminmenu a.menu-top,#adminmenu .wp-submenu-head{font-size:13px;line-height:18px}#adminmenu div.wp-submenu-head{display:none}.folded #adminmenu div.wp-submenu-head{display:block}.folded #adminmenu a.menu-top,body.no-js #adminmenu .wp-menu-toggle,.folded #adminmenu div.wp-menu-toggle{display:none}#adminmenu div.wp-menu-image{float:left;width:28px;height:28px}.folded #adminmenu div.wp-menu-image{width:30px}#adminmenu li{margin:0;padding:0;cursor:pointer}#adminmenu a{display:block;line-height:18px;padding:2px 5px}#adminmenu li.menu-top{min-height:29px;position:relative}#adminmenu a.menu-top{font-weight:bold;line-height:18px;min-width:10em;padding:5px 5px;border-width:1px 0 1px;border-style:solid}#adminmenu li.wp-menu-open{border-width:0 0 1px;border-style:solid}#adminmenu .wp-submenu ul{padding:4px 0}#adminmenu .wp-submenu a{margin:0}#adminmenu li li{margin-left:8px}#adminmenu .wp-submenu a,#adminmenu li li a,.folded #adminmenu .wp-not-current-submenu li a{padding-left:12px}#adminmenu .wp-not-current-submenu li a{padding-left:18px}.folded #adminmenu li li{margin-left:0}.folded #adminmenu li li a{padding-left:0}.wp-menu-arrow{display:none;cursor:auto;z-index:25;position:absolute;right:100%;margin:0;height:30px;width:6px;-moz-transform:translate(146px);-webkit-transform:translate(146px);-o-transform:translate(146px);-ms-transform:translate(146px);transform:translate(146px)}#adminmenu li.wp-has-current-submenu .wp-menu-arrow,#adminmenu li.menu-top:hover .wp-menu-arrow,#adminmenu li.current .wp-menu-arrow,#adminmenu li.focused .wp-menu-arrow,#adminmenu li.menu-top.wp-has-submenu:hover .wp-menu-arrow div{display:block}#adminmenu li.wp-not-current-submenu:hover .wp-menu-arrow div{display:none}#adminmenu li.menu-top:hover .wp-menu-arrow,#adminmenu li.menu-top.focused .wp-menu-arrow{z-index:1001}.ie8 #adminmenu li.menu-top:hover .wp-menu-arrow{display:none}#adminmenu .wp-menu-arrow div{position:absolute;top:7px;left:-1px;width:14px;height:15px;-moz-transform:matrix(-0.6,1,0.6,1,0,0);-webkit-transform:matrix(-0.6,1,0.6,1,0,0);-o-transform:matrix(-0.6,1,0.6,1,0,0);-ms-transform:matrix(-0.6,1,0.6,1,0,0);transform:matrix(-0.6,1,0.6,1,0,0)}#adminmenu li.wp-not-current-submenu .wp-menu-arrow{-moz-transform:translate(145px);-webkit-transform:translate(145px);-o-transform:translate(145px);-ms-transform:translate(145px);transform:translate(145px);height:28px;border-width:1px 0;border-style:solid}.folded .wp-menu-arrow{-moz-transform:translate(33px);-webkit-transform:translate(33px);-o-transform:translate(33px);-ms-transform:translate(33px);transform:translate(33px)}#adminmenu .wp-not-current-submenu .wp-menu-arrow div{width:15px;top:6px;border-width:0 0 1px 1px;border-style:solid}.wp-menu-arrow,.folded #adminmenu li.menu-top:hover .wp-menu-arrow{display:none}.folded #adminmenu li.current:hover .wp-menu-arrow,.folded #adminmenu li.menu-top.wp-menu-open:hover .wp-menu-arrow{display:block;z-index:125}#adminmenu .wp-submenu li{padding:0;margin:0}.folded #adminmenu li.menu-top{border-width:1px 0;border-style:solid none}#adminmenu .wp-menu-image img{float:left;padding:5px 0 0 2px;opacity:.6;filter:alpha(opacity=60)}#adminmenu li.menu-top:hover .wp-menu-image img,#adminmenu li.wp-has-current-submenu .wp-menu-image img{opacity:1;filter:alpha(opacity=100)}#adminmenu li.wp-menu-separator{height:3px;padding:0;margin:0;border-width:1px 0;border-style:solid;cursor:inherit}#adminmenu div.separator{height:1px;padding:0;border-width:1px 0 0 0;border-style:solid}#adminmenu .wp-submenu .wp-submenu-head{padding:6px 4px 5px 10px;cursor:default;border-width:1px 0;border-style:solid}#adminmenu li .wp-submenu-wrap{border-width:1px 1px 1px 0;border-style:solid solid solid none;position:relative;-webkit-border-bottom-right-radius:3px;-webkit-border-top-right-radius:3px;border-bottom-right-radius:3px;border-top-right-radius:3px}#adminmenu li.wp-menu-open .wp-submenu-wrap{border:0 none}.folded #adminmenu .wp-submenu .wp-submenu-wrap{margin-top:3px}.folded #adminmenu .wp-has-current-submenu{margin-bottom:1px}.folded #adminmenu .wp-has-current-submenu.menu-top-last{margin-bottom:0}.folded #adminmenu .wp-has-current-submenu .wp-submenu-wrap{margin-top:4px}.folded #adminmenu .wp-submenu ul{border-width:0 0 0 1px;border-style:solid}.folded #adminmenu .wp-submenu a{padding-left:10px}.folded #adminmenu a.wp-has-submenu{margin-left:40px}#adminmenu .wp-menu-toggle{width:18px;clear:right;float:right;margin:1px 0 0;height:27px;padding:1px 2px 0 0;cursor:pointer}#adminmenu .wp-menu-image a{height:24px}#adminmenu .awaiting-mod,#adminmenu span.update-plugins,#sidemenu li a span.update-plugins{position:absolute;font-family:sans-serif;font-size:9px;line-height:17px;font-weight:bold;margin-top:1px;margin-left:7px;-webkit-border-radius:10px;border-radius:10px}#adminmenu li .awaiting-mod span,#adminmenu li span.update-plugins span,#sidemenu li a span.update-plugins span{display:block;padding:0 6px}#adminmenu li span.count-0,#sidemenu li a .count-0{display:none}#collapse-menu{font-size:12px;line-height:34px}.folded #collapse-menu span{display:none}#collapse-button,#collapse-button div{width:15px;height:15px}#collapse-button{float:left;margin:8px 6px;border-width:1px;border-style:solid;-webkit-border-radius:10px;border-radius:10px}@media only screen and (max-width:900px){#wpcontent,#footer{margin-left:52px}#adminmenuback,#adminmenuwrap,#adminmenu,#adminmenu li.menu-top{width:32px}#adminmenu .wp-has-current-submenu .wp-submenu{display:none;position:absolute;width:145px;z-index:999;overflow:hidden}#adminmenu .wp-has-current-submenu .wp-submenu.sub-open{display:block}#adminmenu li .wp-submenu,#adminmenu .wp-has-current-submenu .wp-submenu{top:-5px;left:26px}#adminmenu li.focused.wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu .wp-submenu.sub-open{padding:0 8px 8px 0}#adminmenu div.wp-submenu-head{display:block}#adminmenu a.menu-top,#adminmenu div.wp-menu-toggle{display:none}#adminmenu div.wp-menu-image{width:30px}#adminmenu .wp-not-current-submenu li a{padding-left:12px}#adminmenu li li{margin-left:0}#adminmenu li li a{padding-left:0}.wp-menu-arrow{-moz-transform:translate(33px);-webkit-transform:translate(33px);-o-transform:translate(33px);-ms-transform:translate(33px);transform:translate(33px)}#adminmenu li.menu-top:hover .wp-menu-arrow{display:none}#adminmenu li.current:hover .wp-menu-arrow,#adminmenu li.menu-top.wp-menu-open:hover .wp-menu-arrow{display:block;z-index:125}#adminmenu li.menu-top{border-width:1px 0;border-style:solid none}#adminmenu .wp-submenu .wp-submenu-wrap{margin-top:3px}#adminmenu .wp-has-current-submenu{margin-bottom:1px}#adminmenu .wp-has-current-submenu.menu-top-last{margin-bottom:0}#adminmenu .wp-has-current-submenu .wp-submenu-wrap{margin-top:4px}#adminmenu .wp-submenu ul{border-width:0 0 0 1px;border-style:solid}#adminmenu .wp-submenu a{padding-left:10px}#adminmenu a.wp-has-submenu{margin-left:40px}#collapse-menu{display:none}}.post-com-count-wrapper{min-width:22px;font-family:sans-serif}.post-com-count{height:1.3em;line-height:1.1em;display:block;text-decoration:none;padding:0 0 6px;cursor:pointer;background-position:center -80px;background-repeat:no-repeat}.post-com-count span{font-size:11px;font-weight:bold;height:1.4em;line-height:1.4em;min-width:.7em;padding:0 6px;display:inline-block;-webkit-border-radius:5px;border-radius:5px}strong .post-com-count{background-position:center -55px}.post-com-count:hover{background-position:center -3px}.column-response .post-com-count{float:left;margin-right:5px;text-align:center}.response-links{float:left}#the-comment-list .attachment-80x60{padding:4px 8px}html.wp-toolbar{padding-top:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.narrow{width:70%;margin-bottom:40px}.narrow p{line-height:150%}.widefat th,.widefat td{overflow:hidden}.widefat th{font-weight:normal}.widefat td p{margin:2px 0 .8em}.widefat .column-comment p{margin:.6em 0}.postbox-container{float:left}#dashboard-widgets.columns-1 .postbox-container{width:100%}#dashboard-widgets.columns-2 .postbox-container{width:49.5%}#dashboard-widgets.columns-2 #postbox-container-2,#dashboard-widgets.columns-2 #postbox-container-3,#dashboard-widgets.columns-2 #postbox-container-4{float:right;width:50.5%}#dashboard-widgets.columns-3 .postbox-container{width:33.5%}#dashboard-widgets.columns-3 #postbox-container-1{width:33%}#dashboard-widgets.columns-3 #postbox-container-3,#dashboard-widgets.columns-3 #postbox-container-4{float:right}#dashboard-widgets.columns-4 .postbox-container{width:25%}.postbox-container .meta-box-sortables{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.postbox-container .meta-box-sortables:empty{min-height:0;height:0}.metabox-holder .postbox-container .empty-container,#post-body.columns-2 #side-sortables:empty{border:3px dashed #ccc;height:250px}.metabox-holder.columns-1 .postbox-container .empty-container,.columns-2 #postbox-container-3 .empty-container,.columns-2 #postbox-container-4 .empty-container,.columns-3 #postbox-container-4 .empty-container{border:0 none;height:0;min-height:0}#poststuff{padding-top:10px}#poststuff #post-body{padding:0}#post-body-content{width:100%;float:left}#poststuff .postbox-container{width:100%}#poststuff #post-body.columns-2{margin-right:300px}#post-body.columns-2 #postbox-container-1{float:right;margin-right:-300px;width:280px}#post-body.columns-2 #side-sortables{min-height:250px}@media only screen and (max-width:799px){#wpbody-content #dashboard-widgets .postbox-container{width:100%}#wpbody-content .metabox-holder .postbox-container .empty-container{border:0 none;height:0;min-height:0}}@media only screen and (min-width:800px) and (max-width:1200px){#wpbody-content #dashboard-widgets .postbox-container{width:49.5%}#wpbody-content #dashboard-widgets #postbox-container-2,#wpbody-content #dashboard-widgets #postbox-container-3,#wpbody-content #dashboard-widgets #postbox-container-4{float:right;width:50.5%}#dashboard-widgets.metabox-holder .postbox-container .empty-container,#dashboard-widgets #postbox-container-3 .empty-container,#dashboard-widgets #postbox-container-4 .empty-container{border:0 none;height:0;min-height:0}#wpbody #wpbody-content #dashboard-widgets.columns-1 .postbox-container{width:100%}#wpbody #wpbody-content .metabox-holder.columns-1 .postbox-container .empty-container{border:0 none;height:0;min-height:0}.index-php .screen-layout,.index-php .columns-prefs{display:block}.columns-prefs .columns-prefs-3,.columns-prefs .columns-prefs-4{display:none}}@media only screen and (max-width:850px){#wpbody-content #poststuff #post-body{margin:0}#wpbody-content #post-body.columns-2 #postbox-container-1{margin-right:0;width:100%}#poststuff #postbox-container-1 .empty-container,#poststuff #postbox-container-1 #side-sortables:empty{border:0 none;height:0;min-height:0}#poststuff #post-body.columns-2 #side-sortables{min-height:0}.screen-layout,.columns-prefs{display:none}}.postbox .hndle{cursor:move;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;border-top-left-radius:3px;border-top-right-radius:3px}.postbox.closed .hndle{-webkit-border-radius:3px;border-radius:3px}.hndle a{font-size:11px;font-weight:normal}.postbox .handlediv{float:right;width:27px;height:30px;cursor:pointer}.sortable-placeholder{border-width:1px;border-style:dashed;margin-bottom:20px}.widget,.postbox,.stuffbox{margin-bottom:20px;padding:0;border-width:1px;border-style:solid;line-height:1}.widget .widget-top,.postbox h3,.stuffbox h3{margin-top:1px;border-bottom-width:1px;border-bottom-style:solid;cursor:move;-webkit-user-select:none;-moz-user-select:none;user-select:none}.stuffbox h3{cursor:auto}.postbox .inside,.stuffbox .inside{padding:0 10px;line-height:1.4em}.postbox .inside{margin:10px 0;position:relative}.postbox.closed h3{border:0;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.postbox table.form-table{margin-bottom:0}.temp-border{border:1px dotted #ccc}.columns-prefs label{padding:0 5px}#dashboard-widgets-wrap{margin:0 -8px}#wpbody-content .metabox-holder{padding-top:10px}#dashboard-widgets .meta-box-sortables{margin:0 8px}#dashboard_recent_comments div.undo{border-top-style:solid;border-top-width:1px;margin:0 -10px;padding:3px 8px;font-size:11px}#the-comment-list td.comment p.comment-author{margin-top:0;margin-left:0}#the-comment-list p.comment-author img{float:left;margin-right:8px}#the-comment-list p.comment-author strong a{border:0}#the-comment-list td{vertical-align:top}#the-comment-list td.comment{word-wrap:break-word}.welcome-panel{margin:20px 8px;padding:30px 10px 20px;border-width:1px 0;border-style:solid;position:relative;line-height:1.6em;overflow:auto}.welcome-panel h3{font-family:"HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",sans-serif;font-size:32px;font-weight:normal;line-height:1.2;margin:.1em 0 .8em}.welcome-panel h4{font-size:14px}.welcome-panel .welcome-panel-close{position:absolute;top:0;right:10px;padding:8px 3px;font-size:13px;text-decoration:none}.welcome-panel .welcome-panel-close:before{background:url('../images/xit.gif') 0 17% no-repeat;content:' ';height:100%;width:10px;left:-12px;position:absolute}.welcome-panel .welcome-panel-close:hover:before{background-position:100% 17%}.welcome-panel .wp-badge{float:left;margin-bottom:20px}.welcome-panel-content{max-width:1500px}.welcome-panel-content .about-description,.welcome-panel h3{margin-left:190px}.welcome-panel p.welcome-panel-dismiss{clear:both;padding:1em 0 0 0}.welcome-panel .welcome-panel-column-container{clear:both;overflow:hidden;position:relative;padding-left:26px}.welcome-panel .welcome-panel-column{margin:0 5% 0 -25px;padding-left:25px;width:30%;min-width:200px;float:left}.welcome-panel .welcome-panel-column.welcome-panel-last{margin-right:0}.welcome-panel h4 .icon16{margin-left:-32px}.welcome-panel .welcome-panel-column ul{margin:1.6em 1em 1em 1.3em}.welcome-panel .welcome-panel-column li{list-style-type:disc;padding-left:2px}table.fixed{table-layout:fixed}.fixed .column-rating,.fixed .column-visible{width:8%}.fixed .column-date,.fixed .column-parent,.fixed .column-links{width:10%}.fixed .column-response,.fixed .column-author,.fixed .column-categories,.fixed .column-tags,.fixed .column-rel,.fixed .column-role{width:15%}.fixed .column-comments{width:4em;padding:8px 0;text-align:left}.fixed .column-comments .vers{padding-left:3px}.fixed .column-comments a{float:left}.fixed .column-slug{width:25%}.fixed .column-posts{width:10%}.fixed .column-icon{width:80px}#comments-form .fixed .column-author{width:20%}#commentsdiv.postbox .inside{margin:0;padding:0}#commentsdiv .inside .row-actions{line-height:18px}#commentsdiv .inside .column-author{width:25%}#commentsdiv .column-comment p{margin:.6em 0;padding:0}#commentsdiv #replyrow td{padding:0}#commentsdiv p{padding:8px 10px;margin:0}#commentsdiv #add-new-comment{border-width:0 0 1px;border-style:none none solid}#commentsdiv .comments-box{border:0 none}#commentsdiv .comments-box thead th{background:transparent;padding:0 7px 4px;font-style:italic}#commentsdiv .comments-box tr:last-child td{border-bottom:0 none}#commentsdiv img.waiting{padding-left:5px}.sorting-indicator{display:none;width:7px;height:4px;margin-top:8px;margin-left:7px;background-image:url(../images/sort.gif);background-repeat:no-repeat}.fixed .column-comments .sorting-indicator{margin-top:3px}.widefat th.sortable,.widefat th.sorted{padding:0}th.sortable a,th.sorted a{display:block;overflow:hidden;padding:7px 7px 8px}.fixed .column-comments.sortable a,.fixed .column-comments.sorted a{padding:8px 0}th.sortable a span,th.sorted a span{float:left;cursor:pointer}th.sorted.asc .sorting-indicator,th.desc:hover span.sorting-indicator{display:block;background-position:0 0}th.sorted.desc .sorting-indicator,th.asc:hover span.sorting-indicator{display:block;background-position:-7px 0}.tablenav-pages a{border-bottom-style:solid;border-bottom-width:2px;font-weight:bold;margin-right:1px;padding:0 2px}.tablenav-pages .current-page{text-align:center}.tablenav-pages .next-page{margin-left:2px}.tablenav a.button-secondary{display:block;margin:3px 8px 0 0}.tablenav{clear:both;height:30px;margin:6px 0 4px;vertical-align:middle}.tablenav.themes{max-width:98%}.tablenav .tablenav-pages{float:right;display:block;cursor:default;height:30px;line-height:30px;font-size:12px}.tablenav .no-pages,.tablenav .one-page .pagination-links{display:none}.tablenav .tablenav-pages a,.tablenav-pages span.current{text-decoration:none;padding:3px 6px}.tablenav .tablenav-pages a.disabled:hover,.tablenav .tablenav-pages a.disabled:active{cursor:default}.tablenav .displaying-num{margin-right:10px;font-size:12px;font-style:italic}.tablenav .actions{padding:2px 8px 0 0}.tablenav .delete{margin-right:20px}.view-switch{float:right;margin:6px 8px 0}.view-switch a{text-decoration:none}.filter{float:left;margin:-5px 0 0 10px}.filter .subsubsub{margin-left:-10px;margin-top:13px}.screen-per-page{width:4em}#posts-filter fieldset{float:left;margin:0 1.5ex 1em 0;padding:0}#posts-filter fieldset legend{padding:0 0 .2em 1px}span.post-state-format{font-weight:normal}#wpbody-content .inline-edit-row fieldset{font-size:12px;float:left;margin:0;padding:0;width:100%}tr.inline-edit-row td,#wpbody-content .inline-edit-row fieldset .inline-edit-col{padding:0 .5em}#wpbody-content .quick-edit-row-page fieldset.inline-edit-col-right .inline-edit-col{border-width:0 0 0 1px;border-style:none none none solid}#wpbody-content .quick-edit-row-post .inline-edit-col-left{width:40%}#wpbody-content .quick-edit-row-post .inline-edit-col-right{width:39%}#wpbody-content .inline-edit-row-post .inline-edit-col-center{width:20%}#wpbody-content .quick-edit-row-page .inline-edit-col-left{width:50%}#wpbody-content .quick-edit-row-page .inline-edit-col-right,#wpbody-content .bulk-edit-row-post .inline-edit-col-right{width:49%}#wpbody-content .bulk-edit-row .inline-edit-col-left{width:30%}#wpbody-content .bulk-edit-row-page .inline-edit-col-right{width:69%}#wpbody-content .bulk-edit-row .inline-edit-col-bottom{float:right;width:69%}#wpbody-content .inline-edit-row-page .inline-edit-col-right{margin-top:27px}.inline-edit-row fieldset .inline-edit-group{clear:both}.inline-edit-row fieldset .inline-edit-group:after{content:".";display:block;height:0;clear:both;visibility:hidden}.inline-edit-row p.submit{clear:both;padding:.5em;margin:.5em 0 0}.inline-edit-row span.error{line-height:22px;margin:0 15px;padding:3px 5px}.inline-edit-row h4{margin:.2em 0;padding:0;line-height:23px}.inline-edit-row fieldset span.title,.inline-edit-row fieldset span.checkbox-title{margin:0;padding:0;line-height:27px}.inline-edit-row fieldset label,.inline-edit-row fieldset span.inline-edit-categories-label{display:block;margin:.2em 0}.inline-edit-row fieldset label.inline-edit-tags{margin-top:0}.inline-edit-row fieldset label.inline-edit-tags span.title{margin:.2em 0}.inline-edit-row fieldset label span.title{display:block;float:left;width:5em}.inline-edit-row fieldset label span.input-text-wrap{display:block;margin-left:5em}.quick-edit-row-post fieldset.inline-edit-col-right label span.title{width:auto;padding-right:.5em}.inline-edit-row .input-text-wrap input[type=text]{width:100%}.inline-edit-row fieldset label input[type=checkbox]{vertical-align:text-bottom}.inline-edit-row fieldset label textarea{width:100%;height:4em}#wpbody-content .bulk-edit-row fieldset .inline-edit-group label{max-width:50%}#wpbody-content .quick-edit-row fieldset .inline-edit-group label.alignleft:first-child{margin-right:.5em}.inline-edit-col-right .input-text-wrap input.inline-edit-menu-order-input{width:6em}.inline-edit-row h4{text-transform:uppercase}.inline-edit-row fieldset span.title,.inline-edit-row fieldset span.checkbox-title{font-style:italic;line-height:1.8em}.inline-edit-row fieldset input[type="text"],.inline-edit-row fieldset textarea{border-style:solid;border-width:1px}.inline-edit-row fieldset .inline-edit-date{float:left}.inline-edit-row fieldset input[name=jj],.inline-edit-row fieldset input[name=hh],.inline-edit-row fieldset input[name=mn]{font-size:12px;width:2.1em}.inline-edit-row fieldset input[name=aa]{font-size:12px;width:3.5em}.inline-edit-row fieldset label input.inline-edit-password-input{width:8em}.inline-edit-row .catshow,.inline-edit-row .cathide{cursor:pointer}ul.cat-checklist{height:12em;border-style:solid;border-width:1px;overflow-y:scroll;padding:0 5px;margin:0}#bulk-titles{display:block;height:12em;border-style:solid;border-width:1px;overflow-y:scroll;padding:0 5px;margin:0 0 5px}.inline-edit-row fieldset ul.cat-checklist li,.inline-edit-row fieldset ul.cat-checklist input{margin:0}.inline-edit-row fieldset ul.cat-checklist label,.inline-edit-row .catshow,.inline-edit-row .cathide,.inline-edit-row #bulk-titles div{font-family:sans-serif;font-style:normal;font-size:11px}table .inline-edit-row fieldset ul.cat-hover{height:auto;max-height:30em;overflow-y:auto;position:absolute}.inline-edit-row fieldset label input.inline-edit-menu-order-input{width:3em}.inline-edit-row fieldset label input.inline-edit-slug-input{width:75%}.quick-edit-row-post fieldset label.inline-edit-status{float:left}#bulk-titles{line-height:140%}#bulk-titles div{margin:.2em .3em}#bulk-titles div a{cursor:pointer;display:block;float:left;height:10px;margin:3px 3px 0 -2px;overflow:hidden;position:relative;text-indent:-9999px;width:10px}#titlediv{position:relative;margin-bottom:20px}#titlediv label{cursor:text}#titlediv div.inside{margin:0}#poststuff #titlewrap{border:0;padding:0}#titlediv #title{padding:3px 8px;font-size:1.7em;line-height:100%;width:100%;outline:0}#titlediv #title-prompt-text,#wp-fullscreen-title-prompt-text{color:#bbb;position:absolute;font-size:1.7em;padding:8px 10px}#wp-fullscreen-title-prompt-text{left:0;padding:11px}#poststuff .inside-submitbox,#side-sortables .inside-submitbox{margin:0 3px;font-size:11px}input#link_description,input#link_url{width:98%}#pending{background:0 none;border:0 none;padding:0;font-size:11px;margin-top:-1px}#edit-slug-box{height:1em;margin-top:8px;padding:0 10px}#editable-post-name-full{display:none}#editable-post-name input{width:16em}.postarea h3 label{float:left}#submitpost #ajax-loading,#submitpost .ajax-loading{vertical-align:middle}#wpcontent .ajax-loading{visibility:hidden}.submitbox .submit{text-align:left;padding:12px 10px 10px;font-size:11px}.submitbox .submitdelete{text-decoration:none;padding:1px 2px}.submitbox .submitdelete,.submitbox .submit a:hover{border-bottom-width:1px;border-bottom-style:solid}.submitbox .submit input{margin-bottom:8px;margin-right:4px;padding:6px}.inside-submitbox #post_status{margin:2px 0 2px -2px}#post-status-select,#post-format{line-height:2.5em;margin-top:3px}#post-body #normal-sortables{min-height:50px}.postbox{position:relative;min-width:255px}#trackback_url{width:99%}#normal-sortables .postbox .submit{background:transparent none;border:0 none;float:right;padding:0 12px;margin:0}.category-add input[type="text"],.category-add select{width:100%;max-width:260px}.press-this #side-sortables .category-tabs li,ul.category-tabs li,#side-sortables .add-menu-item-tabs li,.wp-tab-bar li{display:inline;line-height:1.35em}.no-js .category-tabs li.hide-if-no-js{display:none}.category-tabs a,#side-sortables .add-menu-item-tabs a,.wp-tab-bar a{text-decoration:none}.category-tabs{margin:8px 0 3px}#category-adder h4{margin:10px 0}#side-sortables .add-menu-item-tabs,.wp-tab-bar{margin-bottom:3px}#normal-sortables .postbox #replyrow .submit{float:none;margin:0;padding:0 7px 5px}#side-sortables .submitbox .submit input,#side-sortables .submitbox .submit .preview,#side-sortables .submitbox .submit a.preview:hover{border:0 none}#side-sortables .inside-submitbox .insidebox,.stuffbox .insidebox{margin:11px 0}ul.category-tabs,ul.add-menu-item-tabs,ul.wp-tab-bar{margin-top:12px}ul.category-tabs li,ul.add-menu-item-tabs li.tabs,.wp-tab-active{border-style:solid solid none;border-width:1px 1px 0}#post-body .add-menu-item-tabs li.tabs{border-style:solid none solid solid;border-width:1px 0 1px 1px;margin-right:-1px}ul.category-tabs li,ul.add-menu-item-tabs li,ul.wp-tab-bar li{padding:3px 5px 5px;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;border-top-left-radius:3px;border-top-right-radius:3px}form#tags-filter{position:relative}td.post-title strong,td.plugin-title strong{display:block;margin-bottom:.2em}td.post-title p,td.plugin-title p{margin:6px 0}.wp-hidden-children .wp-hidden-child,.ui-tabs-hide{display:none}.commentlist .avatar{vertical-align:text-top}#post-body .tagsdiv #newtag{margin-right:5px;width:16em}#side-sortables input#post_password{width:94%}#side-sortables .tagsdiv #newtag{width:68%}#post-status-info{border-width:0 1px 1px;border-style:none solid solid;width:100%;-webkit-border-bottom-left-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-left-radius:3px;border-bottom-right-radius:3px}#post-status-info td{font-size:12px}.autosave-info{padding:2px 15px;text-align:right}#editorcontent #post-status-info{border:0}#post-body .wp_themeSkin .mceStatusbar a.mceResize{display:block;background:transparent url(../images/resize.gif) no-repeat scroll right bottom;width:12px;cursor:se-resize;margin:0 2px;position:relative;top:-2px}#post-body .postarea .wp_themeSkin .mceStatusbar a.mceResize{top:20px}#wp-word-count{display:block;padding:2px 10px}#timestampdiv select{height:20px;line-height:14px;padding:0;vertical-align:top}#aa,#jj,#hh,#mn{padding:1px;font-size:12px}#jj,#hh,#mn{width:2em}#aa{width:3.4em}.curtime #timestamp{background-repeat:no-repeat;background-position:left top;padding-left:18px}#timestampdiv{padding-top:5px;line-height:23px}#timestampdiv p{margin:8px 0 6px}#timestampdiv input{border-width:1px;border-style:solid}#postcustomstuff .updatemeta,#postcustomstuff .deletemeta{margin:auto}#postcustomstuff thead th{padding:5px 8px 8px}#postcustom #postcustomstuff .submit{border:0 none;float:none;padding:5px 8px}#side-sortables #postcustom #postcustomstuff .submit{padding:0 5px}#side-sortables #postcustom #postcustomstuff td.left input{margin:3px 3px 0}#side-sortables #postcustom #postcustomstuff #the-list textarea{height:85px;margin:3px}#postcustomstuff table{margin:0;width:100%;border-width:1px;border-style:solid;border-spacing:0}#postcustomstuff table input,#postcustomstuff table select,#postcustomstuff table textarea{width:95%;margin:8px 0 8px 8px}#postcustomstuff th.left,#postcustomstuff td.left{width:38%}#postcustomstuff #newmeta .submit{padding:0 8px}#postcustomstuff .submit input,#postcustomstuff table #addmetasub{width:auto}#postcustomstuff #newmetaleft{vertical-align:top}#postcustomstuff #newmetaleft a{padding:0 10px;text-decoration:none}table.diff{width:100%}table.diff col.content{width:50%}table.diff tr{background-color:transparent}table.diff td,table.diff th{padding:.5em;font-family:Consolas,Monaco,monospace;border:0}table.diff .diff-deletedline del,table.diff .diff-addedline ins{text-decoration:none}.category-adder{margin-left:120px;padding:4px 0}.category-adder h4{margin:0 0 8px}#side-sortables .category-adder{margin:0}#post-body ul.add-menu-item-tabs{float:left;width:120px;text-align:right;margin:0 -120px 0 5px;padding:0}#post-body ul.add-menu-item-tabs li{padding:8px}#post-body ul.add-menu-item-tabs li.tabs{-webkit-border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;border-top-left-radius:3px;border-bottom-left-radius:3px}.wp-tab-panel,.categorydiv div.tabs-panel,.customlinkdiv div.tabs-panel,.posttypediv div.tabs-panel,.taxonomydiv div.tabs-panel{height:200px;overflow:auto;padding:.5em .9em;border-style:solid;border-width:1px}.nav-menus-php .customlinkdiv div.tabs-panel,.nav-menus-php .posttypediv div.tabs-panel,.nav-menus-php .taxonomydiv div.tabs-panel{height:auto;max-height:205px}div.tabs-panel-active{display:block}div.tabs-panel-inactive{display:none}.colunms-1 .categorydiv div.tabs-panel,.taxonomy div.tabs-panel{margin:0 5px 0 125px}.customlinkdiv ul,.posttypediv ul,.taxonomydiv ul{list-style:none;padding:0;margin:0}#front-page-warning,#front-static-pages ul,ul.export-filters,.inline-editor ul.cat-checklist ul,.categorydiv ul.categorychecklist ul,.customlinkdiv ul.categorychecklist ul,.posttypediv ul.categorychecklist ul,.taxonomydiv ul.categorychecklist ul{margin-left:18px}ul.categorychecklist li{margin:0;padding:0;line-height:19px;word-wrap:break-word}.categorydiv .tabs-panel,.customlinkdiv .tabs-panel,.posttypediv .tabs-panel,.taxonomydiv .tabs-panel{border-width:3px;border-style:solid}.form-wrap p,.form-wrap label{font-size:11px}.form-wrap label{display:block;padding:2px;font-size:12px}.form-field input,.form-field textarea{border-style:solid;border-width:1px;width:95%}p.description,.form-wrap p{margin:2px 0 5px}p.help,p.description,span.description,.form-wrap p{font-size:12px;font-style:italic;font-family:sans-serif}.form-wrap .form-field{margin:0 0 10px;padding:8px}.col-wrap h3{margin:12px 0;font-size:1.1em}.col-wrap p.submit{margin-top:-10px}#poststuff .taghint{color:#aaa;margin:15px 0 -24px 12px}#poststuff .tagsdiv .howto{margin:0 0 6px 8px}.ajaxtag .newtag{position:relative}.tagsdiv .newtag{width:180px}.tagsdiv .the-tags{display:block;height:60px;margin:0 auto;overflow:auto;width:260px}#post-body-content .tagsdiv .the-tags{margin:0 5px}p.popular-tags{-webkit-border-radius:8px;border-radius:8px;border-width:1px;border-style:solid;line-height:2em;max-width:1000px;padding:8px 12px 12px;text-align:justify}p.popular-tags a{padding:0 3px}.tagcloud{width:97%;margin:0 0 40px;text-align:justify}.tagcloud h3{margin:2px 0 12px}.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}table.links-table{width:100%}.links-table th{font-weight:normal;text-align:left;vertical-align:top;min-width:80px;width:20%;word-wrap:break-word}.links-table th,.links-table td{padding:5px 0}.links-table td label{margin-right:8px}.links-table td input[type="text"],.links-table td textarea{width:100%}.links-table #link_rel{max-width:280px}.media-item .describe{border-collapse:collapse;width:100%;border-top-style:solid;border-top-width:1px;clear:both;cursor:default}.media-item.media-blank .describe{border:0}.media-item .describe th{vertical-align:top;text-align:left;padding:5px 10px 10px;width:140px}.media-item .describe .align th{padding-top:0}.media-item .media-item-info tr{background-color:transparent}.media-item .describe td{padding:0 8px 8px 0;vertical-align:top}.media-item thead.media-item-info td{padding:4px 10px 0}.media-item .media-item-info .A1B1{padding:0 0 0 10px}.media-item td.savesend{padding-bottom:15px}.media-item .thumbnail{max-height:128px;max-width:128px}#wpbody-content #async-upload-wrap a{display:none}.media-upload-form{margin-top:20px}.media-upload-form td label{margin-right:6px;margin-left:2px}.media-upload-form .align .field label{display:inline;padding:0 0 0 23px;margin:0 1em 0 3px;font-weight:bold}.media-upload-form tr.image-size label{margin:0 0 0 5px;font-weight:bold}.media-upload-form th.label label{font-weight:bold;margin:.5em;font-size:13px}.media-upload-form th.label label span{padding:0 5px}abbr.required{border:medium none;text-decoration:none}.media-item .describe input[type="text"],.media-item .describe textarea{width:460px}.media-item .describe p.help{margin:0;padding:0 0 0 5px}.describe-toggle-on,.describe-toggle-off{display:block;line-height:36px;float:right;margin-right:15px}.media-item .describe-toggle-off,.media-item.open .describe-toggle-on,.media-item.open img.pinkynail{display:none}.media-item.open .describe-toggle-off{display:block}#media-items .media-item{border-style:solid;border-width:1px;min-height:36px;position:relative;margin-top:-1px;width:100%}#media-items{width:623px}#media-items:empty{border:0 none}.media-item .filename{line-height:36px;overflow:hidden;padding:0 10px}.media-item .error-div{padding-left:10px}.media-item .pinkynail{float:left;margin:2px 2px 0;max-width:40px;max-height:32px}.media-item .startopen,.media-item .startclosed{display:none}.media-item .original{position:relative;height:34px}.media-item .progress{float:right;height:22px;margin:6px 10px 0 0;width:200px;line-height:2em;padding:0;overflow:hidden;margin-bottom:2px;border:1px solid #d1d1d1;background:#fff;background-image:linear-gradient(bottom,#fff 0,#f7f7f7 100%);background-image:-o-linear-gradient(bottom,#fff 0,#f7f7f7 100%);background-image:-moz-linear-gradient(bottom,#fff 0,#f7f7f7 100%);background-image:-webkit-linear-gradient(bottom,#fff 0,#f7f7f7 100%);background-image:-ms-linear-gradient(bottom,#fff 0,#f7f7f7 100%);-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 0 3px rgba(0,0,0,0.1);box-shadow:inset 0 0 3px rgba(0,0,0,0.1)}.media-item .bar{z-index:9;width:0;height:100%;margin-top:-24px;background-color:#83b4d8;background-image:linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);background-image:-o-linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);background-image:-moz-linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);background-image:-webkit-linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);background-image:-ms-linear-gradient(bottom,#72a7cf 0,#90c5ee 100%);-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 0 3px rgba(0,0,0,0.3);box-shadow:0 0 3px rgba(0,0,0,0.3)}.media-item .progress .percent{z-index:10;position:relative;width:200px;padding:0 8px;text-shadow:0 1px 0 rgba(255,255,255,0.4);color:rgba(0,0,0,0.6)}.upload-php .fixed .column-parent{width:25%}.js .html-uploader #plupload-upload-ui{display:none}.js .html-uploader #html-upload-ui{display:block}.media-upload-form .media-item.error{margin:0;padding:0}.media-upload-form .media-item.error p,.media-item .error-div{line-height:16px;margin:5px 10px;padding:0}.media-item .error-div a.dismiss{display:block;float:right;margin:5px 4px 0 15px}.find-box{width:500px;height:300px;overflow:hidden;padding:33px 5px 40px;position:absolute;z-index:1000}.find-box-head{cursor:move;font-weight:bold;height:2em;line-height:2em;padding:1px 12px;position:absolute;top:5px;width:100%}.find-box-inside{overflow:auto;width:100%;height:100%}.find-box-search{padding:12px;border-width:1px;border-style:none none solid}#find-posts-response{margin:8px 0;padding:0 1px}#find-posts-response table{width:100%}#find-posts-response .found-radio{padding:5px 0 0 8px;width:15px}.find-box-buttons{width:480px;margin:8px}.find-box-search label{padding-right:6px}.find-box #resize-se{position:absolute;right:1px;bottom:1px}ul#dismissed-updates{display:none}form.upgrade{margin-top:8px}form.upgrade .hint{font-style:italic;font-size:85%;margin:-0.5em 0 2em 0}#poststuff .inside .the-tagcloud{margin:5px 0 10px;padding:8px;border-width:1px;border-style:solid;line-height:1.8em;word-spacing:3px;-webkit-border-radius:6px;border-radius:6px}.drag-drop #drag-drop-area{border:4px dashed #ddd;height:200px}.drag-drop .drag-drop-inside{margin:70px auto 0;width:250px}.drag-drop-inside p{color:#aaa;font-size:14px;margin:5px 0;display:none}.drag-drop .drag-drop-inside p{text-align:center}.drag-drop-inside p.drag-drop-info{font-size:20px}.drag-drop .drag-drop-inside p,.drag-drop-inside p.drag-drop-buttons{display:block}.drag-drop.drag-over #drag-drop-area{border-color:#83b4d8}#plupload-upload-ui{position:relative}.describe .image-editor{vertical-align:top}.imgedit-wrap{position:relative}.imgedit-settings p{margin:8px 0}.describe .imgedit-wrap table td{vertical-align:top;padding-top:0}.imgedit-wrap p,.describe .imgedit-wrap table td{font-size:11px;line-height:18px}.describe .imgedit-wrap table td.imgedit-settings{padding:0 5px}td.imgedit-settings input{vertical-align:middle}.imgedit-wait{position:absolute;top:0;background:#fff url(../images/wpspin_light.gif) no-repeat scroll 22px 10px;opacity:.7;filter:alpha(opacity=70);width:100%;height:500px;display:none}.media-disabled,.imgedit-settings .disabled{color:grey}.imgedit-wait-spin{padding:0 4px 4px;vertical-align:bottom;visibility:hidden}.imgedit-menu{margin:0 0 12px;min-width:300px}.imgedit-menu div{float:left;width:32px;height:32px}.imgedit-crop-wrap{position:relative}.imgedit-crop{background:transparent url(../images/imgedit-icons.png) no-repeat scroll -9px -31px;margin:0 8px 0 0}.imgedit-crop.disabled:hover{background-position:-9px -31px}.imgedit-crop:hover{background-position:-9px -1px}.imgedit-rleft{background:transparent url(../images/imgedit-icons.png) no-repeat scroll -46px -31px;margin:0 3px}.imgedit-rleft.disabled:hover{background-position:-46px -31px}.imgedit-rleft:hover{background-position:-46px -1px}.imgedit-rright{background:transparent url(../images/imgedit-icons.png) no-repeat scroll -77px -31px;margin:0 8px 0 3px}.imgedit-rright.disabled:hover{background-position:-77px -31px}.imgedit-rright:hover{background-position:-77px -1px}.imgedit-flipv{background:transparent url(../images/imgedit-icons.png) no-repeat scroll -115px -31px;margin:0 3px}.imgedit-flipv.disabled:hover{background-position:-115px -31px}.imgedit-flipv:hover{background-position:-115px -1px}.imgedit-fliph{background:transparent url(../images/imgedit-icons.png) no-repeat scroll -147px -31px;margin:0 8px 0 3px}.imgedit-fliph.disabled:hover{background-position:-147px -31px}.imgedit-fliph:hover{background-position:-147px -1px}.imgedit-undo{background:transparent url(../images/imgedit-icons.png) no-repeat scroll -184px -31px;margin:0 3px}.imgedit-undo.disabled:hover{background-position:-184px -31px}.imgedit-undo:hover{background-position:-184px -1px}.imgedit-redo{background:transparent url(../images/imgedit-icons.png) no-repeat scroll -215px -31px;margin:0 8px 0 3px}.imgedit-redo.disabled:hover{background-position:-215px -31px}.imgedit-redo:hover{background-position:-215px -1px}.imgedit-applyto img{margin:0 8px 0 0}.imgedit-group-top{margin:5px 0}.imgedit-applyto .imgedit-label{padding:2px 0 0;display:block}.imgedit-help{display:none;font-style:italic;margin-bottom:8px}.imgedit-help ul li{font-size:11px}a.imgedit-help-toggle{text-decoration:none}#wpbody-content .imgedit-response div{width:600px;margin:8px}.form-table td.imgedit-response{padding:0}.imgedit-submit{margin:8px 0}.imgedit-submit-btn{margin-left:20px}.imgedit-wrap .nowrap{white-space:nowrap}span.imgedit-scale-warn{color:red;font-size:20px;font-style:normal;visibility:hidden;vertical-align:middle}.imgedit-group{border-width:1px;border-style:solid;-webkit-border-radius:8px;border-radius:8px;margin-bottom:8px;padding:2px 10px}.form-table{border-collapse:collapse;margin-top:.5em;width:100%;margin-bottom:-8px;clear:both}.form-table td{margin-bottom:9px;padding:8px 10px;line-height:20px;font-size:12px}.form-table th,.form-wrap label{font-weight:normal;text-shadow:#fff 0 1px 0}.form-table th{vertical-align:top;text-align:left;padding:10px;width:200px}.form-table th.th-full{width:auto}.form-table div.color-option{display:block;clear:both;margin-top:12px}.form-table input.tog{margin-top:2px;margin-right:2px;float:left}.form-table td p{margin-top:4px}.form-table table.color-palette{vertical-align:bottom;float:left;margin:-12px 3px 11px}.form-table .color-palette td{border-width:1px 1px 0;border-style:solid solid none;height:10px;line-height:20px;width:10px}.commentlist li{padding:1em 1em .2em;margin:0;border-bottom-width:1px;border-bottom-style:solid}.commentlist li li{border-bottom:0;padding:0}.commentlist p{padding:0;margin:0 0 .8em}#replyrow input{border-width:1px;border-style:solid}#replyrow td{padding:2px}#replysubmit{margin:0;padding:0 7px 3px;text-align:center}#replysubmit img.waiting,.inline-edit-save img.waiting{padding:4px 10px 0;vertical-align:top;float:right}#replysubmit .button{margin-right:5px}#replysubmit .error{color:red;line-height:21px;text-align:center;vertical-align:center}#replyrow h5{margin:.2em 0 0;padding:0 5px;line-height:1.4em;font-size:1em}#edithead .inside{float:left;padding:3px 0 2px 5px;margin:0;text-align:center}#edithead .inside input{width:180px}#edithead label{padding:2px 0}#replycontainer{padding:5px}#replycontent{height:120px}.comment-ays{margin-bottom:0;border-style:solid;border-width:1px}.comment-ays th{border-right-style:solid;border-right-width:1px}.trash-undo-inside,.spam-undo-inside{margin:1px 8px 1px 0;line-height:16px}.spam-undo-inside .avatar,.trash-undo-inside .avatar{height:20px;width:20px;margin-right:8px;vertical-align:middle}.stuffbox .editcomment{clear:none}#comment-status-radio p{margin:3px 0 5px}#comment-status-radio input{margin:2px 3px 5px 0;vertical-align:middle}#comment-status-radio label{padding:5px 0}.commentlist .avatar{vertical-align:text-top}.theme-install-php .tablenav{height:auto}h3.available-themes{margin:0 0 1em;float:left}.available-theme{display:inline-block;margin-right:10px;overflow:hidden;padding:20px 20px 20px 0;vertical-align:top;width:300px}.available-theme .screenshot{width:300px;height:225px;display:block;border-width:1px;border-style:solid;margin-bottom:10px;overflow:hidden}.available-theme img{width:300px}.available-theme h3{margin:15px 0 0}.available-theme .theme-author{line-height:18px}.available-theme .action-links{margin-top:10px;overflow:hidden}#current-theme .theme-info li,.theme-options li,.available-theme .action-links li{float:left;padding-right:10px;margin-right:10px;border-right:1px solid #dfdfdf}.available-theme .action-links li{padding-right:8px;margin-right:8px}#current-theme .theme-info li:last-child,.theme-options li:last-child,.available-theme .action-links li:last-child{padding-right:0;margin-right:0;border-right:0}.available-theme .action-links .delete-theme{float:right;margin-left:8px;margin-right:0}.available-theme .action-links .delete-theme a{color:red;padding:2px}.available-theme .action-links .delete-theme a:hover{background:red;color:#fff;text-decoration:none}.available-theme .action-links p{float:left}#current-theme{margin:20px 0 10px;padding:0 0 20px;border-bottom:1px solid #dfdfdf;overflow:hidden}#current-theme.has-screenshot{padding-left:330px}#current-theme h3{margin:0;font-size:12px;font-weight:normal;color:#999}#current-theme h4{margin:3px 0 16px;font-size:20px}#current-theme h4 span{margin-left:20px;font-size:12px;font-weight:normal}#current-theme a{border-bottom:0}#current-theme .theme-info{margin:1em 0;overflow:hidden}#current-theme .theme-description{margin-top:5px;max-width:600px;line-height:1.6em}#current-theme img{float:left;width:300px;margin-left:-330px;border-width:1px;border-style:solid}.theme-options{overflow:hidden;font-size:14px;padding-bottom:10px}.theme-options .load-customize{margin-right:30px;float:left}.theme-options span{float:left;margin-right:10px;text-transform:uppercase;font-size:11px;line-height:18px;color:#999}.theme-options ul{float:left;margin:0}@media only screen and (max-width:1200px){.available-theme,.available-theme .screenshot,#current-theme img{width:240px}.available-theme .screenshot{height:180px}.available-theme img{width:100%}#current-theme.has-screenshot{padding-left:270px}#current-theme img{margin-left:-270px}}#post-body ul.add-menu-item-tabs li.tabs a,#TB_window #TB_title a.tb-theme-preview-link,#TB_window #TB_title a.tb-theme-preview-link:visited{font-weight:bold;text-decoration:none}#TB_window #TB_title{background-color:#222;color:#cfcfcf}#broken-themes{text-align:left;width:50%;border-spacing:3px;padding:3px}.theme-install-php h4{margin:2.5em 0 8px}.appearance_page_custom-header #headimg{border:1px solid #dfdfdf;width:100%}.appearance_page_custom-header #upload-form p label{font-size:12px}.appearance_page_custom-header .available-headers .default-header{float:left;margin:0 20px 20px 0}.appearance_page_custom-header .random-header{clear:both;margin:0 20px 20px 0;vertical-align:middle}.appearance_page_custom-header .available-headers label input,.appearance_page_custom-header .random-header label input{margin-right:10px}.appearance_page_custom-header .available-headers label img{vertical-align:middle}div#custom-background-image{min-height:100px;border:1px solid #dfdfdf}div#custom-background-image img{max-width:400px;max-height:300px}.nav-tab{border-style:solid;border-color:#dfdfdf #dfdfdf #fff;border-width:1px 1px 0;color:#aaa;text-shadow:#fff 0 1px 0;font-size:12px;line-height:16px;display:inline-block;padding:4px 14px 6px;text-decoration:none;margin:0 6px -1px 0;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;border-top-left-radius:3px;border-top-right-radius:3px}.nav-tab-active{border-width:1px;color:#464646}.nav-tab:hover,.nav-tab-active{border-color:#ccc #ccc #fff}h2.nav-tab-wrapper,h3.nav-tab-wrapper{border-bottom:1px solid #ccc;padding-bottom:0}h2 .nav-tab{padding:4px 10px 6px;font-weight:200;font-size:20px;line-height:24px}#dashboard_right_now .versions .b,#post-status-display,#post-visibility-display,#adminmenu .wp-submenu li.current,#adminmenu .wp-submenu li.current a,#adminmenu .wp-submenu li.current a:hover,.media-item .percent,.plugins .name,#pass-strength-result.strong,#pass-strength-result.short,.button-highlighted,input.button-highlighted,#quicktags #ed_strong,#ed_reply_toolbar #ed_reply_strong,.item-controls .item-order a,.feature-filter .feature-name{font-weight:bold}.plugins p{margin:0 4px;padding:0}.plugins .desc p{margin:0 0 8px}.plugins td.desc{line-height:1.5em}.plugins .desc ul,.plugins .desc ol{margin:0 0 0 2em}.plugins .desc ul{list-style-type:disc}.plugins .row-actions-visible{padding:0}.plugins tbody th.check-column{padding:7px 0}.plugins .inactive td,.plugins .inactive th,.plugins .active td,.plugins .active th{border-top-style:solid;border-top-width:1px;padding:5px 7px 0}.plugins .update th,.plugins .update td{border-bottom:0}.plugin-update-tr td{border-top:0}#wpbody-content .plugins .plugin-title,#wpbody-content .plugins .theme-title{padding-right:12px;white-space:nowrap}.plugins .second,.plugins .row-actions-visible{padding:0 0 5px}.plugins .update .second,.plugins .update .row-actions-visible{padding-bottom:0}.plugins-php .widefat tfoot th,.plugins-php .widefat tfoot td{border-top-style:solid;border-top-width:1px}.plugin-update-tr .update-message{margin:5px;padding:3px 5px}.plugin-install-php h4{margin:2.5em 0 8px}#profile-page .form-table textarea{width:500px;margin-bottom:6px}#profile-page .form-table #rich_editing{margin-right:5px}#your-profile legend{font-size:22px}#your-profile #rich_editing{border:0}#display_name{width:15em}#createuser .form-field input{width:25em}.pressthis{margin:20px 0}.pressthis a{display:inline-block;position:relative;cursor:move;color:#333;background:#dfdfdf;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0.07,#e6e6e6),color-stop(0.77,#d8d8d8));background-image:-webkit-linear-gradient(bottom,#e6e6e6 7%,#d8d8d8 77%);background-image:-moz-linear-gradient(bottom,#e6e6e6 7%,#d8d8d8 77%);background-image:-ms-linear-gradient(bottom,#e6e6e6 7%,#d8d8d8 77%);background-image:-o-linear-gradient(bottom,#e6e6e6 7%,#d8d8d8 77%);background-image:linear-gradient(bottom,#e6e6e6 7%,#d8d8d8 77%);-webkit-border-radius:5px;border-radius:5px;border:1px solid #b4b4b4;font-style:normal;line-height:16px;font-size:14px;text-decoration:none;text-shadow:0 1px 0 #fff}.pressthis a:hover,.pressthis a:active{color:#333}.pressthis a:hover:after{transform:skew(20deg) rotate(9deg);-webkit-transform:skew(20deg) rotate(9deg);-moz-transform:skew(20deg) rotate(9deg);box-shadow:0 10px 8px rgba(0,0,0,0.7);-webkit-box-shadow:0 10px 8px rgba(0,0,0,0.7);-moz-box-shadow:0 10px 8px rgba(0,0,0,0.7)}.pressthis a span{background:url(../images/press-this.png?v=20120502) no-repeat 0 5px;padding:8px 11px 8px 27px;margin:0 5px;display:inline-block}.pressthis a:after{content:'';width:70%;height:55%;z-index:-1;position:absolute;right:10px;bottom:9px;background:transparent;transform:skew(20deg) rotate(6deg);-webkit-transform:skew(20deg) rotate(6deg);-moz-transform:skew(20deg) rotate(6deg);box-shadow:0 10px 8px rgba(0,0,0,0.6);-webkit-box-shadow:0 10px 8px rgba(0,0,0,0.6);-moz-box-shadow:0 10px 8px rgba(0,0,0,0.6)}#utc-time,#local-time{padding-left:25px;font-style:italic;font-family:sans-serif}.defaultavatarpicker .avatar{margin:2px 0;vertical-align:middle}#footer{position:absolute;bottom:0;left:0;right:0;padding:10px 0;margin-right:20px;border-top-width:1px;border-top-style:solid}#footer p{margin:0;line-height:20px}#footer a{text-decoration:none}#footer a:hover{text-decoration:underline}.about-wrap{position:relative;margin:25px 40px 0 20px;max-width:1050px;font-size:15px}.about-wrap div.updated,.about-wrap div.error{display:none!important}.about-wrap p{line-height:1.6em}.about-wrap h1{margin:.2em 200px 0 0;line-height:1.2em;font-size:2.8em;font-weight:200}.about-text,.about-description,.about-wrap li.wp-person a.web{font-family:"HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",sans-serif;font-weight:normal;line-height:1.6em;font-size:20px}.about-description{margin-top:1.4em}.about-text{margin:1em 200px 1.4em 0;min-height:60px;font-size:24px}.about-wrap h3{font-size:24px;margin-bottom:1em;padding-top:20px}.about-wrap .changelog{overflow:hidden}.about-wrap .changelog li{list-style-type:disc;margin-left:3em}.about-wrap .feature-section{padding-bottom:20px}.about-wrap .feature-section h4{margin-bottom:.6em}.about-wrap .feature-section p{margin-top:.6em}.about-wrap code{font-size:14px}.about-wrap .point-releases{margin-top:5px}.about-wrap .changelog.point-releases h3{padding-top:35px}.about-wrap .changelog.point-releases h3:first-child{padding-top:7px}.wp-badge{padding-top:142px;height:50px;width:173px;font-weight:bold;font-size:14px;text-align:center;margin:0 -5px;background:url('../images/wp-badge.png?ver=20111120') no-repeat}.about-wrap .wp-badge{position:absolute;top:0;right:0}.about-wrap h2.nav-tab-wrapper{padding-left:6px}.about-wrap h2 .nav-tab{padding:4px 10px 6px;margin:0 3px -1px 0;font-size:18px;vertical-align:top}.about-wrap h2 .nav-tab-active{font-weight:bold;padding-top:3px}.about-wrap .feature-section img{border:0;margin:0 1.94% 10px 0;-webkit-border-radius:3px;border-radius:3px}.about-wrap .feature-section img.image-50{max-width:50%}.about-wrap .feature-section img.image-30{max-width:31.2381%}.ie8 .about-wrap .feature-section img{border-width:1px;border-style:solid}.about-wrap .feature-section.three-col{padding-top:15px;margin-bottom:0}.about-wrap .feature-section.three-col div{width:30%;margin-right:4.999999999%;float:left}.about-wrap .feature-section.three-col h4{margin:0 0 .6em 0}.about-wrap .feature-section.three-col img{margin:.5em 0 .5em 5px;max-width:100%;float:none}.ie8 .about-wrap .feature-section.three-col img{margin-left:0}.about-wrap .feature-section.three-col .last-feature{margin-right:0}.about-wrap .three-col-images{text-align:center}.about-wrap .three-col-images img{margin:0 0 10px}.about-wrap .three-col-images .last-feature{float:right}.about-wrap .three-col-images .first-feature{float:left}.about-wrap .feature-section.images-stagger-right img{float:right;margin:0 5px 12px 12px}.about-wrap .feature-section.images-stagger-left img{float:left;margin:0 12px 12px 5px}@media only screen and (max-width:900px){.about-wrap .feature-section.images-stagger-left img,.about-wrap .feature-section.images-stagger-right img{clear:both}}.about-wrap .return-to-dashboard{margin:30px 0 0 -5px;font-size:14px;font-weight:bold}.about-wrap .return-to-dashboard a{text-decoration:none;padding:0 5px}.about-wrap h4.wp-people-group{margin-top:2.6em;font-size:16px}.about-wrap ul.wp-people-group{overflow:hidden;padding:5px;margin:0 -15px 0 -5px}.about-wrap ul.compact{margin-bottom:0}.about-wrap li.wp-person{float:left;margin-right:10px}.about-wrap li.wp-person img.gravatar{float:left;margin:0 10px 10px 0;padding:2px;width:60px;height:60px}.about-wrap ul.compact li.wp-person img.gravatar{width:30px;height:30px}.about-wrap li.wp-person{height:70px;width:280px;padding-bottom:15px}.about-wrap ul.compact li.wp-person{height:auto;width:180px;padding-bottom:0;margin-bottom:0}.about-wrap #wp-people-group-validators+p.wp-credits-list{margin-top:0}.about-wrap li.wp-person a.web{display:block;margin:6px 0 2px;font-size:16px;text-decoration:none}.about-wrap p.wp-credits-list a{white-space:nowrap}.freedoms-php .about-wrap ol{margin:40px 60px}.freedoms-php .about-wrap ol li{list-style-type:decimal;font-weight:bold}.freedoms-php .about-wrap ol p{font-weight:normal;margin:.6em 0}body.full-overlay-active{overflow:hidden}.wp-full-overlay{background:#fff;z-index:500000;position:fixed;overflow:visible;top:0;bottom:0;left:0;right:0;height:100%;min-width:0}.wp-full-overlay-sidebar{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:fixed;width:300px;height:100%;top:0;bottom:0;left:0;padding:0;margin:0;z-index:10;overflow:auto;background:#f5f5f5;border-right:1px solid rgba(0,0,0,0.2)}.wp-full-overlay.collapsed .wp-full-overlay-sidebar{overflow:visible}.wp-full-overlay.collapsed,.wp-full-overlay.expanded .wp-full-overlay-sidebar{margin-left:0!important}.wp-full-overlay.expanded{margin-left:300px}.wp-full-overlay.collapsed .wp-full-overlay-sidebar{margin-left:-300px}.wp-full-overlay-sidebar:after{content:'';display:block;position:absolute;top:0;bottom:0;right:0;width:3px;box-shadow:-5px 0 4px -4px rgba(0,0,0,0.1) inset;z-index:1000}.wp-full-overlay-main{position:absolute;left:0;right:0;top:0;bottom:0;height:100%}.wp-full-overlay-sidebar .wp-full-overlay-header,.wp-full-overlay-sidebar .wp-full-overlay-footer{position:absolute;left:0;right:0;height:45px;padding:0 20px;line-height:45px;z-index:10;margin:0}.wp-full-overlay-sidebar .wp-full-overlay-header{top:0;border-top:0;border-bottom:1px solid #fff;box-shadow:inset 0 -1px 0 0 #dfdfdf}.wp-full-overlay-sidebar .wp-full-overlay-footer{bottom:0;border-bottom:0;border-top:1px solid #dfdfdf;box-shadow:inset 0 1px 0 0 #fff}.wp-full-overlay-sidebar .wp-full-overlay-sidebar-content{position:absolute;top:45px;bottom:45px;left:0;right:0;overflow:auto}.wp-full-overlay .close-full-overlay{text-decoration:none}.wp-full-overlay .collapse-sidebar{position:absolute;bottom:12px;left:0;z-index:50;display:block;width:19px;height:19px;margin-left:15px;padding:0;border-radius:50%;text-decoration:none}.wp-full-overlay.collapsed .collapse-sidebar{position:absolute;left:100%}.wp-full-overlay .collapse-sidebar-arrow{position:absolute;margin-top:2px;margin-left:2px;display:block;width:15px;height:15px;background:transparent url('../images/arrows.png') no-repeat 0 -72px}.wp-full-overlay.collapsed .collapse-sidebar-arrow{background-position:0 -108px}.wp-full-overlay .collapse-sidebar-label{position:absolute;left:100%;color:#808080;line-height:20px;margin-left:10px}.wp-full-overlay.collapsed .collapse-sidebar-label{display:none}.wp-full-overlay .collapse-sidebar:hover .collapse-sidebar-label{color:#666}.wp-full-overlay,.wp-full-overlay-sidebar,.wp-full-overlay .collapse-sidebar,.wp-full-overlay-main{-webkit-transition-property:left,right,top,bottom,width,margin;-moz-transition-property:left,right,top,bottom,width,margin;-ms-transition-property:left,right,top,bottom,width,margin;-o-transition-property:left,right,top,bottom,width,margin;transition-property:left,right,top,bottom,width,margin;-webkit-transition-duration:.2s;-moz-transition-duration:.2s;-ms-transition-duration:.2s;-o-transition-duration:.2s;transition-duration:.2s}.no-customize-support .hide-if-no-customize,.customize-support .hide-if-customize{display:none}#customize-container{display:none;background:#fff;z-index:500000;position:fixed;overflow:visible;top:0;bottom:0;left:0;right:0;height:100%}.customize-active #customize-container{display:block}.customize-loading #customize-container iframe{opacity:0}.customize-loading #customize-container{background:#fff url("../images/wpspin_light.gif") no-repeat fixed center center}#customize-container iframe,#theme-installer iframe{height:100%;width:100%;z-index:20;-webkit-transition:opacity .3s;-moz-transition:opacity .3s;-ms-transition:opacity .3s;-o-transition:opacity .3s;transition:opacity .3s}#customize-container .collapse-sidebar{bottom:16px}#theme-installer{display:none}#theme-installer.single-theme{display:block}.install-theme-info{display:none;padding:10px 20px 20px}.single-theme .install-theme-info{padding-top:15px}#theme-installer .install-theme-info{display:block}.install-theme-info .theme-install{float:right;margin-top:18px}.install-theme-info .theme-name{font-size:16px;line-height:24px;margin-bottom:0}.install-theme-info .theme-screenshot{margin-top:15px;width:258px;border:1px solid #ccc}.install-theme-info .theme-details{overflow:hidden}.theme-details .theme-version{margin:15px 0;float:left}.theme-details .star-holder{margin:14px 0;float:right}.theme-details .theme-description{float:left;color:#777;line-height:20px}#excerpt,.attachmentlinks{margin:0;height:4em;width:98%}#template div{margin-right:190px}p.pagenav{margin:0;display:inline}.pagenav span{font-weight:bold;margin:0 6px}.row-title{font-size:13px!important;font-weight:bold}.column-author img,.column-username img{float:left;margin-right:10px;margin-top:1px}.row-actions{visibility:hidden;padding:2px 0 0}.mobile .row-actions{visibility:visible}tr:hover .row-actions,div.comment-item:hover .row-actions{visibility:visible}.row-actions-visible{padding:2px 0 0}.form-table .pre{padding:8px;margin:0}table.form-table td .updated{font-size:13px}.tagchecklist{margin-left:14px;font-size:12px;overflow:auto}.tagchecklist strong{margin-left:-8px;position:absolute}.tagchecklist span{margin-right:25px;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}#poststuff h2{margin-top:20px;font-size:1.5em;margin-bottom:15px;padding:0 0 3px;clear:left}#poststuff h3,.metabox-holder h3{font-size:15px;font-weight:normal;padding:7px 10px;margin:0;line-height:1}#poststuff .inside{margin:6px 0 8px}#poststuff .inside #parent_id,.inline-edit-row #post_parent{max-width:100%}#post-visibility-select,#post-formats-select{line-height:1.5em;margin-top:3px}#poststuff #submitdiv .inside{margin:0;padding:0}#titlediv,#poststuff .postarea{margin-bottom:20px}#templateside ul li a{text-decoration:none}.tool-box .title{margin:8px 0;font-size:18px;font-weight:normal;line-height:24px}#sidemenu{margin:-30px 15px 0 315px;list-style:none;position:relative;float:right;padding-left:10px;font-size:12px}#sidemenu a{padding:0 7px;display:block;float:left;line-height:28px;border-top-width:1px;border-top-style:solid;border-bottom-width:1px;border-bottom-style:solid}#sidemenu li{display:inline;line-height:200%;list-style:none;text-align:center;white-space:nowrap;margin:0;padding:0}#sidemenu a.current{font-weight:normal;padding-left:6px;padding-right:6px;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;border-top-left-radius:3px;border-top-right-radius:3px;border-width:1px;border-style:solid}#sidemenu li a .count-0{display:none}.plugin-install #description,.plugin-install-network #description{width:60%}table .vers,table .column-visible,table .column-rating{text-align:left}.error-message{color:red;font-weight:bold}body.iframe{height:98%}td.media-icon{text-align:center;width:80px;padding-top:8px;padding-bottom:8px}td.media-icon img{max-width:80px;max-height:60px}.list-ajax-loading{float:right;margin-right:9px;margin-top:-1px}.tablenav .list-ajax-loading{margin-top:7px}#howto{font-size:11px;margin:0 5px;display:block}.importers td{padding-right:14px}.importers{font-size:16px;width:auto}#namediv table{width:100%}#namediv td.first{width:10px;white-space:nowrap}#namediv input{width:98%}#namediv p{margin:10px 0}#submitdiv h3{margin-bottom:0!important}.zerosize{height:0;width:0;margin:0;border:0;padding:0;overflow:hidden;position:absolute}br.clear{height:2px;line-height:2px}.checkbox{border:0;margin:0;padding:0}fieldset{border:0;padding:0;margin:0}.post-categories{display:inline;margin:0;padding:0}.post-categories li{display:inline}.edit-box{display:none}h3:hover .edit-box{display:inline}.index-php form .input-text-wrap{background:#fff;border-style:solid;border-width:1px;padding:2px 3px;border-color:#ccc}#dashboard-widgets form .input-text-wrap input{border:0 none;outline:0;margin:0;padding:0;width:99%;color:#333}form .textarea-wrap{background:#fff;border-style:solid;border-width:1px;padding:2px;border-color:#ccc}#dashboard-widgets form .textarea-wrap textarea{border:0 none;padding:0;outline:0;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:0}#dashboard-widgets-wrap #dashboard-widgets .postbox form .submit input{margin:0}#dashboard-widgets-wrap #dashboard-widgets .postbox form .submit #publish{min-width:0}#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;top:5px}#dashboard-widgets h4{font-weight:normal;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;padding-top:20px}#dashboard_right_now p.sub{padding:5px 0 15px;color:#8f8f8f;font-size:14px;position:absolute;top:-17px;left:15px}#dashboard_right_now .table{margin:0;padding:0;position:relative}#dashboard_right_now .table_content{float:left;border-top:#ececec 1px solid;width:45%}#dashboard_right_now .table_discussion{float:right;border-top:#ececec 1px solid;width:45%}#dashboard_right_now table td{padding:3px 0;white-space:nowrap}#dashboard_right_now table tr.first td{border-top:0}#dashboard_right_now td.b{padding-right:6px;text-align:right;font-size:14px;width:1%}#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 .spam{color:red}#dashboard_right_now .waiting{color:#e66f00}#dashboard_right_now .approved{color:green}#dashboard_right_now .versions{padding:6px 10px 12px;clear:both}#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:sans-serif;font-size:10px}#dashboard_recent_comments .subsubsub{float:none;white-space:normal}#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:0}#the-comment-list .comment-item .avatar{float:left;margin:0 10px 5px 0}#the-comment-list .comment-item h4{line-height:1.7em;margin-top:-0.4em;color:#777}#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:12px}#dashboard_quick_press h4{font-family:sans-serif;float:left;width:5em;clear:both;font-weight:normal;text-align:right;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 .wp-media-buttons{margin:0 0 .5em 5em;padding:0}#dashboard_quick_press .wp-media-buttons a{color:#777}#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-widgets #dashboard_quick_press form p.submit img.waiting{vertical-align:middle;visibility:hidden;margin:4px 6px 0 0}#dashboard_recent_drafts ul,#dashboard_recent_drafts p{margin:0;padding:0;word-wrap:break-word}#dashboard_recent_drafts ul{list-style:none}#dashboard_recent_drafts ul li{margin-bottom:1em}#dashboard_recent_drafts h4{line-height:1.7em;word-wrap:break-word}#dashboard_recent_drafts h4 abbr{font-weight:normal;font-family:sans-serif;font-size:12px;color:#999;margin-left:3px}.rss-widget ul{margin:0;padding:0;list-style:none}a.rsswidget{font-size:13px;line-height:1.7em}.rss-widget ul li{line-height:1.5em;margin-bottom:12px}.rss-widget span.rss-date{color:#999;font-size:12px;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{line-height:1.7em}#dashboard_plugins h5{font-weight:normal;font-size:13px;margin:0;display:inline;line-height:1.4em}#dashboard_plugins h5 a{line-height:1.4em}#dashboard_plugins .inside span{font-size:12px;padding-left:5px}#dashboard_plugins p{margin:.3em 0 1.4em;line-height:1.4em}.dashboard-comment-wrap{overflow:hidden;word-wrap:break-word}#dashboard_browser_nag a.update-browser-link{font-size:1.2em;font-weight:bold}#dashboard_browser_nag a{text-decoration:underline}#dashboard_browser_nag p.browser-update-nag.has-browser-icon{padding-right:125px}#dashboard_browser_nag .browser-icon{margin-top:-35px}#dashboard_browser_nag.postbox.browser-insecure{background-color:#ac1b1b;border-color:#ac1b1b}#dashboard_browser_nag.postbox{background-color:#e29808;background-image:none;border-color:#edc048;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;color:#fff}#dashboard_browser_nag.postbox.browser-insecure h3{border-bottom-color:#cd5a5a;color:#fff}#dashboard_browser_nag.postbox h3{border-bottom-color:#f6e2ac;text-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;background:transparent none;color:#fff}#dashboard_browser_nag a{color:#fff}#dashboard_browser_nag.browser-insecure a.browse-happy-link,#dashboard_browser_nag.browser-insecure a.update-browser-link{text-shadow:#871b15 0 1px 0}#dashboard_browser_nag a.browse-happy-link,#dashboard_browser_nag a.update-browser-link{text-shadow:#d29a04 0 1px 0}.login *{margin:0;padding:0}.login form{margin-left:8px;padding:26px 24px 46px;font-weight:normal;background:#fff;border:1px solid #e5e5e5;-moz-box-shadow:rgba(200,200,200,0.7) 0 4px 10px -1px;-webkit-box-shadow:rgba(200,200,200,0.7) 0 4px 10px -1px;box-shadow:rgba(200,200,200,0.7) 0 4px 10px -1px}.login form .forgetmenot{font-weight:normal;float:left;margin-bottom:0}.login .button-primary{font-size:13px!important;line-height:16px;padding:3px 10px;float:right}#login form p{margin-bottom:0}#login form p.submit{padding:0}.login label{color:#777;font-size:14px}.login form .forgetmenot label{font-size:12px;line-height:19px}.login form p{margin-bottom:24px}.login h1 a{background-image:url('../images/wordpress-logo.png?ver=20120216');background-size:274px 63px;background-position:top center;background-repeat:no-repeat;width:326px;height:67px;text-indent:-9999px;overflow:hidden;padding-bottom:15px;display:block}@media only screen and (-webkit-min-device-pixel-ratio:1.5){.login h1 a{background-image:url('../images/wordpress-logo-2x.png?ver=20120412');background-size:274px 63px}.wp-badge{background-image:url('../images/wp-badge-2x.png?ver=20120516');background-size:173px 194px}}#login{width:320px;padding:114px 0 0;margin:auto}#login_error,.login .message{margin:0 0 16px 8px;padding:12px}.login #nav,.login #backtoblog{text-shadow:#fff 0 1px 0;margin:0 0 0 16px;padding:16px 16px 0}#backtoblog{padding:12px 16px 0}.login form .input,.login input[type="text"]{color:#555;font-weight:200;font-size:24px;line-height:1;width:100%;padding:3px;margin-top:2px;margin-right:6px;margin-bottom:16px;border:1px solid #e5e5e5;background:#fbfbfb;outline:0;-moz-box-shadow:inset 1px 1px 2px rgba(200,200,200,0.2);-webkit-box-shadow:inset 1px 1px 2px rgba(200,200,200,0.2);box-shadow:inset 1px 1px 2px rgba(200,200,200,0.2)}.login #pass-strength-result{width:250px;font-weight:bold;border-style:solid;border-width:1px;margin:12px 0 6px;padding:6px 5px;text-align:center}.mobile #login{padding:20px 0}.mobile #login form,.mobile #login .message,.mobile #login_error{margin-left:0}.mobile #login #nav,.mobile #login #backtoblog{margin-left:8px}.mobile #login h1 a{width:auto}#dashboard_right_now p.musub{margin-top:12px;border-top:1px solid #ececec;padding-left:16px;position:static}.rtl #dashboard_right_now p.musub{padding-left:0;padding-right:16px}#dashboard_right_now td.b a.musublink{font-size:16px}#dashboard_right_now div.musubtable{border-top:0}#dashboard_right_now div.musubtable .t{white-space:normal}.wp-list-table .site-deleted{background:#ff8573}.wp-list-table .site-spammed{background:#faafaa}.wp-list-table .site-archived{background:#ffebe8}.wp-list-table .site-mature{background:#fecac2}#nav-menus-frame{margin-left:300px}#wpbody-content #menu-settings-column{display:inline;width:281px;margin-left:-300px;clear:both;float:left;padding-top:24px}.no-js #wpbody-content #menu-settings-column{padding-top:31px}#menu-settings-column .inside{clear:both}.metabox-holder-disabled .postbox{opacity:.5;filter:alpha(opacity=50)}.metabox-holder-disabled .button-controls .select-all{display:none}#wpbody{position:relative}#menu-management-liquid{float:left;min-width:100%}#menu-management{position:relative;margin-right:20px;margin-top:-3px;width:100%}#menu-management .menu-edit{margin-bottom:20px}.nav-menus-php #post-body{padding:10px;border-width:1px 0;border-style:solid}#nav-menu-header,#nav-menu-footer{padding:0 10px}#nav-menu-header{border-bottom:1px solid}#nav-menu-footer{border-top:1px solid}.nav-menus-php #post-body div.updated,.nav-menus-php #post-body div.error{margin:0}.nav-menus-php #post-body-content{position:relative;float:none}#menu-management .menu-add-new abbr{font-weight:bold}#menu-management .nav-tabs-nav{margin:0 20px}#menu-management .nav-tabs-arrow{width:10px;padding:0 5px 4px;cursor:pointer;position:absolute;top:0;line-height:22px;font-size:18px;text-shadow:0 1px 0 #fff}#menu-management .nav-tabs-arrow-left{left:0}#menu-management .nav-tabs-arrow-right{right:0;text-align:right}#menu-management .nav-tabs-wrapper{width:100%;height:28px;margin-bottom:-1px;overflow:hidden}#menu-management .nav-tabs{padding-left:20px;padding-right:10px}.js #menu-management .nav-tabs{float:left;margin-left:0;margin-right:-400px}#menu-management .nav-tab{margin-bottom:0;font-size:14px}#select-nav-menu-container{text-align:right;padding:0 10px 3px 10px;margin-bottom:5px}#select-nav-menu{width:100px;display:inline}#menu-name-label{margin-top:-2px}#wpbody .open-label{display:block;float:left}#wpbody .open-label span{padding-right:10px}.js .input-with-default-title{font-style:italic}#menu-management .inside{padding:0 10px}.postbox .howto input{width:180px;float:right}.customlinkdiv .howto input{width:200px}#nav-menu-theme-locations .howto select{width:100%}#nav-menu-theme-locations .button-controls{text-align:right}.add-menu-item-view-all{height:400px}#menu-container .submit{margin:0 0 10px;padding:0}.nav-menus-php .meta-sep,.nav-menus-php .submitdelete,.nav-menus-php .submitcancel{display:block;float:left;margin:4px 0;line-height:15px}.meta-sep{padding:0 2px}#cancel-save{text-decoration:underline;font-size:12px;margin-left:20px;margin-top:5px}.list-controls{float:left;margin-top:5px}.add-to-menu{float:right}.postbox img.waiting{display:none;vertical-align:middle}.button-controls{clear:both;margin:10px 0}.show-all,.hide-all{cursor:pointer}.hide-all{display:none}#menu-name{width:270px}#manage-menu .inside{padding:0}#available-links dt{display:block}#add-custom-link .howto{font-size:12px}#add-custom-link label span{display:block;float:left;margin-top:5px;padding-right:5px}.menu-item-textbox{width:180px}.nav-menus-php .howto span{margin-top:4px;display:block;float:left}.quick-search{width:190px}.nav-menus-php .list-wrap{display:none;clear:both;margin-bottom:10px}.nav-menus-php .list-container{max-height:200px;overflow-y:auto;padding:10px 10px 5px}.nav-menus-php .postbox p.submit{margin-bottom:0}.nav-menus-php .list li{display:none;margin:0;margin-bottom:5px}.nav-menus-php .list li .menu-item-title{cursor:pointer;display:block}.nav-menus-php .list li .menu-item-title input{margin-right:3px;margin-top:-3px}#menu-container .inside{padding-bottom:10px}.menu{padding-top:1em}#menu-to-edit{padding:1em 0}.menu ul{width:100%}.menu li{margin-bottom:0;position:relative}.menu-item-bar{clear:both;line-height:1.5em;position:relative;margin:13px 0 0 0}.menu-item-handle{border:1px solid #dfdfdf;position:relative;padding-left:10px;height:auto;width:400px;line-height:35px;text-shadow:0 1px 0 #fff;overflow:hidden;word-wrap:break-word}#menu-to-edit .menu-item-invalid .menu-item-handle{background-color:#f6c9cc;background-image:-ms-linear-gradient(bottom,#f6c9cc,#fdf8ff);background-image:-moz-linear-gradient(bottom,#f6c9cc,#fdf8ff);background-image:-o-linear-gradient(bottom,#f6c9cc,#fdf8ff);background-image:-webkit-gradient(linear,left bottom,left top,from(#f6c9cc),to(#fdf8ff));background-image:-webkit-linear-gradient(bottom,#f6c9cc,#fdf8ff);background-image:linear-gradient(bottom,#f6c9cc,#fdf8ff)}.menu-item-edit-active .menu-item-handle{-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.no-js .menu-item-edit-active .item-edit{display:none}.js .menu-item-handle{cursor:move}.menu li.deleting .menu-item-handle{background-image:none;text-shadow:0}.menu-item-handle .item-title{font-size:12px;font-weight:bold;padding:7px 0;line-height:20px;display:block;margin-right:13em}li.menu-item.ui-sortable-helper dl{margin-top:0}li.menu-item.ui-sortable-helper .menu-item-transport dl{margin-top:13px}.menu .sortable-placeholder{height:35px;width:410px;margin-top:13px}.menu-item-depth-0{margin-left:0}.menu-item-depth-1{margin-left:30px}.menu-item-depth-2{margin-left:60px}.menu-item-depth-3{margin-left:90px}.menu-item-depth-4{margin-left:120px}.menu-item-depth-5{margin-left:150px}.menu-item-depth-6{margin-left:180px}.menu-item-depth-7{margin-left:210px}.menu-item-depth-8{margin-left:240px}.menu-item-depth-9{margin-left:270px}.menu-item-depth-10{margin-left:300px}.menu-item-depth-11{margin-left:330px}.menu-item-depth-0 .menu-item-transport{margin-left:0}.menu-item-depth-1 .menu-item-transport{margin-left:-30px}.menu-item-depth-2 .menu-item-transport{margin-left:-60px}.menu-item-depth-3 .menu-item-transport{margin-left:-90px}.menu-item-depth-4 .menu-item-transport{margin-left:-120px}.menu-item-depth-5 .menu-item-transport{margin-left:-150px}.menu-item-depth-6 .menu-item-transport{margin-left:-180px}.menu-item-depth-7 .menu-item-transport{margin-left:-210px}.menu-item-depth-8 .menu-item-transport{margin-left:-240px}.menu-item-depth-9 .menu-item-transport{margin-left:-270px}.menu-item-depth-10 .menu-item-transport{margin-left:-300px}.menu-item-depth-11 .menu-item-transport{margin-left:-330px}body.menu-max-depth-0{min-width:950px!important}body.menu-max-depth-1{min-width:980px!important}body.menu-max-depth-2{min-width:1010px!important}body.menu-max-depth-3{min-width:1040px!important}body.menu-max-depth-4{min-width:1070px!important}body.menu-max-depth-5{min-width:1100px!important}body.menu-max-depth-6{min-width:1130px!important}body.menu-max-depth-7{min-width:1160px!important}body.menu-max-depth-8{min-width:1190px!important}body.menu-max-depth-9{min-width:1220px!important}body.menu-max-depth-10{min-width:1250px!important}body.menu-max-depth-11{min-width:1280px!important}.item-type{font-size:12px;padding-right:10px}.item-controls{font-size:12px;position:absolute;right:20px;top:-1px}.item-controls a{text-decoration:none}.item-controls a:hover{cursor:pointer}.item-controls .item-order{padding-right:10px}.nav-menus-php .item-edit{position:absolute;right:-20px;top:0;display:block;width:30px;height:36px;overflow:hidden;text-indent:-999em;border-bottom:1px solid;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px}.menu-instructions-inactive{display:none}.menu-item-settings{display:block;width:400px;padding:10px 0 10px 10px;border:solid;border-width:0 1px 1px 1px;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;border-bottom-right-radius:3px}.menu-item-edit-active .menu-item-settings{display:block}.menu-item-edit-inactive .menu-item-settings{display:none}.add-menu-item-pagelinks{margin:.5em auto;text-align:center}.link-to-original{display:block;margin:0 0 10px;padding:3px 5px 5px;font-size:12px;font-style:italic}.link-to-original a{padding-left:4px;font-style:normal}.hidden-field{display:none}.menu-item-settings .description-thin,.menu-item-settings .description-wide{margin-right:10px;float:left}.description-thin{width:190px;height:40px}.description-wide{width:390px}.menu-item-actions{padding-top:15px}#cancel-save{cursor:pointer}.nav-menus-php .major-publishing-actions{clear:both;padding:3px 0 5px}.nav-menus-php .major-publishing-actions .publishing-action{text-align:right;float:right;line-height:23px;margin:5px 0 1px}.nav-menus-php .major-publishing-actions .delete-action{vertical-align:middle;text-align:left;float:left;padding-right:15px;margin-top:5px}.menu-name-label span,.auto-add-pages label{font-size:12px;font-style:normal}.menu-name-label{margin-right:15px}.auto-add-pages input{margin-top:0}.auto-add-pages{margin-top:4px;float:left}.nav-menus-php .submitbox .submitcancel{border-bottom:1px solid;padding:1px 2px;text-decoration:none}.nav-menus-php .major-publishing-actions .form-invalid{padding-left:4px;margin-left:-4px;border:0 none}#menu-item-name-wrap:after,#menu-item-url-wrap:after,#menu-name-label:after,#menu-settings-column .inside:after,#nav-menus-frame:after,.nav-menus-php #post-body-content:after,.nav-menus-php .button-controls:after,.nav-menus-php .major-publishing-actions:after,.nav-menus-php .menu-item-settings:after{clear:both;content:".";display:block;height:0;visibility:hidden}#nav-menus-frame,.button-controls,#menu-item-url-wrap,#menu-item-name-wrap{display:block}div.star-holder{position:relative;height:17px;width:100px;background:url('../images/stars.png?ver=20120307') repeat-x bottom left}div.star-holder .star-rating{background:url('../images/stars.png?ver=20120307') repeat-x top left;height:17px;float:left}div.action-links{font-weight:normal;margin:6px 0 0}#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;-webkit-border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;border-top-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;-webkit-border-top-left-radius:3px;border-top-left-radius:3px}#plugin-information .fyi ul{padding:10px 5px 10px 7px;margin:0;list-style:none;-webkit-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 ol{list-style:none;margin:0}#plugin-information #section-screenshots li img{vertical-align:text-top;max-width:100%;width:auto;height:auto}#plugin-information #section-screenshots li p{font-style:italic;padding-left:20px;padding-bottom:2em}#plugin-information #section-screenshots ol,#plugin-information .updated,#plugin-information pre{margin-right:215px}#plugin-information pre{padding:7px;overflow:auto}body.press-this{color:#333;margin:0;padding:0;min-width:675px;min-height:400px}img{border:0}.press-this #wphead{height:32px;margin-left:0;margin-right:0;margin-bottom:5px}.press-this #header-logo{float:left;margin:7px 7px 0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.press-this #wphead h1{font-weight:normal;font-size:16px;line-height:32px;margin:0;float:left}.press-this #wphead h1 a{text-decoration:none}.press-this #wphead h1 a:hover{text-decoration:underline}.press-this #message{margin:10px 0}.press-this-sidebar{float:right;width:200px;padding-top:10px}.press-this #title{margin-left:0;margin-right:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.press-this .tagchecklist span a{background:transparent url(../images/xit.gif) no-repeat 0 0}.press-this #titlediv{margin:0}.press-this .wp-media-buttons{cursor:default;padding:8px 8px 0}.press-this .howto{margin-top:2px;margin-bottom:3px;font-size:12px;font-style:italic;display:block}.press-this #poststuff{margin:0 10px 10px}#poststuff #editor-toolbar{height:30px}div.zerosize{border:0 none;height:0;margin:0;overflow:hidden;padding:0;width:0}.posting{margin-right:212px;position:relative}.press-this .inner-sidebar{width:200px}.press-this .inner-sidebar .sleeve{padding-top:5px}.press-this #submitdiv p{margin:0;padding:6px}.press-this #submitdiv #publishing-actions{border-bottom:1px solid #dfdfdf}.press-this #publish{float:right}.press-this #poststuff h2,.press-this #poststuff h3{font-size:14px;line-height:1}.press-this #tagsdiv-post_tag h3,.press-this #categorydiv h3{cursor:pointer}.press-this #submitdiv h3{cursor:default}h3.tb{text-shadow:0 1px 0 #fff;font-weight:bold;font-size:12px;margin-left:5px}#TB_window{border:1px solid #333}.press-this .postbox,.press-this .stuffbox{margin-bottom:10px;min-width:0}.postbox:hover .handlediv,.stuffbox:hover .handlediv{background:transparent url(../images/arrows.png) no-repeat 6px 7px}.press-this #submitdiv:hover .handlediv{background:0}.tbtitle{font-size:1.7em;outline:0;padding:3px 4px;border-color:#dfdfdf}.press-this .actions{float:right;margin:-19px 0 0}.press-this #extra-fields .actions{margin:-25px -7px 0 0}.press-this .actions li{float:left;list-style:none;margin-right:10px}#extra-fields .button{margin-right:5px}#photo_saving{margin:0 8px 8px;vertical-align:middle}#img_container_container{overflow:auto}#extra-fields{margin-top:10px;position:relative}#extra-fields h2{margin:12px}#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:0;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}.press-this .categorydiv div.tabs-panel{height:100px}.press-this .tagsdiv .newtag{width:130px}.press-this #content{margin:5px 0;padding:0 5px;border:0 none;height:357px;font-family:Consolas,Monaco,monospace;font-size:13px;line-height:19px;background:transparent}#saving{display:inline;vertical-align:middle}#TB_ajaxContent #options{position:absolute;top:20px;right:25px;padding:5px}#TB_ajaxContent h3{margin-bottom:.25em}.error a{text-decoration:underline}.updated a{text-decoration:none;padding-bottom:2px}.taghint{color:#aaa;margin:-17px 0 0 7px;visibility:hidden}input.newtag ~ div.taghint{visibility:visible}input.newtag:focus ~ div.taghint{visibility:hidden}#mce_fullscreen_container{background:#fff}#photo-add-url-div input[type="text"]{width:300px}.alignleft h3{margin:0}h3 span{font-weight:normal}#template textarea{font-family:Consolas,Monaco,monospace;font-size:12px;width:97%;background:#f9f9f9;outline:0}#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}#templateside ul li a span.highlight{display:block}.nonessential{font-size:11px;font-style:italic;padding-left:12px}.highlight{padding:3px 3px 3px 12px;margin-left:-12px;font-weight:bold;border:0 none}#documentation{margin-top:10px}#documentation label{line-height:22px;vertical-align:top;font-weight:bold}.fileedit-sub{padding:10px 0 8px;line-height:180%}#filter-box{clear:both}.feature-filter{padding:8px 12px 0}.feature-filter .feature-group{float:left;margin:5px 10px 10px}.feature-filter .feature-group li{display:inline;float:left;list-style-type:none;padding-right:25px;width:150px}.feature-container{width:100%;overflow:auto;margin-bottom:10px}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,.inactive-sidebar .widget,.widget-liquid-right .sidebar-description{width:250px;margin:0 auto 20px;overflow:hidden}.widget-liquid-right .sidebar-description{margin-bottom:10px}.inactive-sidebar .widget{margin:0 10px 20px;float:left}div.sidebar-name h3{font-weight:normal;font-size:15px;margin:0;padding:8px 10px;overflow:hidden;white-space:nowrap}div.sidebar-name{cursor:pointer;font-size:13px;border-width:1px;border-style:solid;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px}.js .closed .sidebar-name{-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.widget-liquid-right .widgets-sortables,#widgets-left .widget-holder{border-width:0 1px 1px;border-style:none solid solid;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.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}#available-widgets .widget{-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.inactive-sidebar{padding:5px 5px 0}#widget-list .widget{width:250px;margin:0 10px 15px;border:0 none;background:transparent;float:left}#widget-list .widget-description{padding:5px 8px}.widget-placeholder{border-width:1px;border-style:dashed;margin:0 auto 20px;height:26px;width:250px}.inactive-sidebar .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{margin-bottom:-1px;font-size:12px;font-weight:bold;height:26px;overflow:hidden}.widget-top .widget-title{padding:7px 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:transparent url(../images/arrows.png) no-repeat 4px 6px}.widget-top a.widget-action:hover{background:transparent url(../images/arrows-dark.png) no-repeat 4px 6px}.widget .widget-inside,.widget .widget-description{padding:12px 12px 10px;font-size:12px;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;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:12px}.widget-title a,.widget-title a:hover{text-decoration:none;border-bottom:0}.widget-control-edit{display:block;font-size:12px;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,.inactive-sidebar .widget-control-edit .edit{display:inline}.editwidget{margin:0 auto 15px}.editwidget .widget-inside{display:block;padding:10px}.inactive p.description{margin:5px 15px 10px}#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:12px;white-space:nowrap}#removing-widget{display:none;font-weight:normal;padding-left:15px;font-size:12px;line-height:1}.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{-webkit-border-bottom-right-radius:0;-webkit-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}@media only screen and (max-width:768px){#col-left{width:100%}#col-right{width:100%}}@media only screen and (min-width:769px){#col-left{width:35%}#col-right{width:65%}}@media only screen and (max-width:860px){#col-left{width:35%}#col-right{width:65%}}@media only screen and (min-width:980px){#col-left{width:35%}#col-right{width:65%}}@media only screen and (max-width:768px){#col-left{width:100%}#col-right{width:100%}.form-field input,.form-field textarea{width:99%}.form-wrap .form-field{padding:0}#profile-page .form-table textarea{max-width:400px;width:auto}}.locale-zh-cn .howto,.locale-zh-cn .tablenav .displaying-num,.locale-zh-cn .js .input-with-default-title,.locale-zh-cn .link-to-original,.locale-zh-cn .inline-edit-row fieldset span.title,.locale-zh-cn .inline-edit-row fieldset span.checkbox-title,.locale-zh-cn #utc-time,.locale-zh-cn #local-time,.locale-zh-cn p.install-help,.locale-zh-cn p.help,.locale-zh-cn p.description,.locale-zh-cn span.description,.locale-zh-cn .form-wrap p{font-style:normal}.locale-zh-cn .hdnle a{font-size:12px}.locale-zh-cn form.upgrade .hint{font-style:normal;font-size:100%}.locale-zh-cn #wp-fullscreen-tagline{font-family:KaiTi,"楷体",sans-serif}.locale-zh-cn #wp-fullscreen-modes a{font-size:12px}.locale-zh-cn #sort-buttons{font-size:1em!important}.locale-ru-ru #dashboard_quick_press .input-text-wrap,.locale-ru-ru #dashboard_quick_press .textarea-wrap,.locale-ru-ru #dashboard_quick_press .wp-media-buttons{margin-left:5.7em}.locale-ru-ru #dashboard_quick_press h4{width:5.7em}.locale-ru-ru #dashboard-widgets #dashboard_quick_press form p.submit{margin-left:5.3em}.locale-ru-ru .inline-edit-row fieldset label span.title{width:auto;min-width:5em}.locale-ru-ru.press-this .posting{margin-right:257px}.locale-ru-ru.press-this #photo-add-url-div input[type="text"]{width:255px}.locale-ru-ru.press-this #side-sortables{width:245px}.locale-lt-lt #dashboard_quick_press .input-text-wrap,.locale-lt-lt #dashboard_quick_press .textarea-wrap,.locale-lt-lt #dashboard_quick_press .wp-media-buttons{margin-left:7em}.locale-lt-lt #dashboard_quick_press h4{width:7em}.locale-lt-lt .inline-edit-row fieldset label span.title{width:8em}.locale-lt-lt .inline-edit-row fieldset label span.input-text-wrap{margin-left:8em} \ No newline at end of file diff --git a/wp-admin/css/wp-admin.dev.css b/wp-admin/css/wp-admin.dev.css index 9051f836..8371546d 100644 --- a/wp-admin/css/wp-admin.dev.css +++ b/wp-admin/css/wp-admin.dev.css @@ -39,7 +39,9 @@ TABLE OF CONTENTS: 20.0 - Settings 21.0 - Admin Footer 22.0 - About Pages -23.0 - Misc +23.0 - Full Overlay w/ Sidebar +24.0 - Customize Loader +25.0 - Misc ------------------------------------------------------------------------*/ @@ -102,6 +104,7 @@ TABLE OF CONTENTS: } /* inner 2 column liquid layout */ + .inner-sidebar { float: right; clear: right; @@ -136,11 +139,8 @@ TABLE OF CONTENTS: .has-right-sidebar #post-body-content { margin-right: 300px; -} - -#post-body-content #side-sortables.empty-container { - border: 0 none; - height: 0; + float: none; + width: auto; } /* 2 columns main area */ @@ -208,6 +208,10 @@ TABLE OF CONTENTS: /* include margin and padding in the width calculation of input and textarea */ input[type="text"], input[type="password"], +input[type="number"], +input[type="search"], +input[type="email"], +input[type="url"], textarea { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; @@ -217,7 +221,17 @@ textarea { input[type="checkbox"], input[type="radio"] { - vertical-align: text-bottom; + vertical-align: text-top; + padding: 0; + margin: 1px 0 0; +} + +input[type="search"] { + -webkit-appearance: textfield; +} + +input[type="search"]::-webkit-search-decoration { + display: none; } /* general */ @@ -630,53 +644,6 @@ div.error p { } -/* =CSS 3 transitions --------------------------------------------------------------- */ - -.fade-1000, -.fade-600, -.fade-400, -.fade-300 { - opacity: 0; - -moz-transition-property: opacity; - -webkit-transition-property: opacity; - -o-transition-property: opacity; - transition-property: opacity; -} - -.fade-1000 { - -moz-transition-duration: 1s; - -webkit-transition-duration: 1s; - -o-transition-duration: 1s; - transition-duration: 1s; -} - -.fade-600 { - -moz-transition-duration: 0.6s; - -webkit-transition-duration: 0.6s; - -o-transition-duration: 0.6s; - transition-duration: 0.6s; -} - -.fade-400 { - -moz-transition-duration: 0.4s; - -webkit-transition-duration: 0.4s; - -o-transition-duration: 0.4s; - transition-duration: 0.4s; -} - -.fade-300 { - -moz-transition-duration: 0.3s; - -webkit-transition-duration: 0.3s; - -o-transition-duration: 0.3s; - transition-duration: 0.3s; -} - -.fade-trigger { - opacity: 1; -} - - /*------------------------------------------------------------------------------ 1.0 - Text Styles ------------------------------------------------------------------------------*/ @@ -837,6 +804,10 @@ input.small-text { width: 50px; } +input[type="number"].small-text { + width: 60px; +} + #doaction, #doaction2, #post-query-submit { @@ -892,6 +863,47 @@ p.search-box { margin: 0; } +input[type="text"].ui-autocomplete-loading { + background: transparent url('../images/loading.gif') no-repeat right center; + visibility: visible; +} + +ul#add-to-blog-users { + margin: 0 0 0 14px; +} + +.ui-autocomplete-input.open { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} + +.ui-autocomplete { + padding: 0; + margin: 0; + list-style: none; + position: absolute; + z-index: 10000; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; + border-width: 1px; + border-style: solid; +} + +.ui-autocomplete li { + margin-bottom: 0; + white-space: nowrap; + text-align: left; +} + +.ui-autocomplete li a { + display: block; + height: 100%; + padding: 4px 10px; +} + +.ui-autocomplete li a.ui-state-hover { + cursor: pointer; +} /*------------------------------------------------------------------------------ 3.0 - Actions @@ -900,7 +912,8 @@ p.search-box { #major-publishing-actions { padding: 10px 10px 8px; clear: both; - border-top: none; + border-top: 1px solid #f5f5f5; + margin-top: -2px; } #delete-action { @@ -916,28 +929,6 @@ p.search-box { line-height: 23px; } -#post-body #minor-publishing { - padding-bottom: 10px; -} - -#post-body #misc-publishing-actions { - padding: 0; -} - -#post-body .misc-pub-section { - border-right-width: 1px; - border-right-style: solid; - border-top: 0; - border-bottom: 0; - min-height: 30px; - float: left; - max-width: 32%; -} - -#post-body .misc-pub-section-last { - border-right: 0; -} - #misc-publishing-actions { padding: 6px 0 0; } @@ -951,6 +942,7 @@ p.search-box { .misc-pub-section:first-child { border-top-width: 0; } + .misc-pub-section-last { border-bottom-width: 0; } @@ -1087,261 +1079,6 @@ form.upgrade .hint { } -/* Distraction Free Writing mode - * =Overlay Styles --------------------------------------------------------------- */ -.fullscreen-overlay { - z-index: 149999; - display: none; - position: fixed; - top: 0; - bottom: 0; - left: 0; - right: 0; - filter: inherit; -} - -.fullscreen-active .fullscreen-overlay, -.fullscreen-active #wp-fullscreen-body { - display: block; -} - -.fullscreen-fader { - z-index: 200000; -} - -.fullscreen-active .fullscreen-fader { - display: none; -} - -/* =Overlay Body --------------------------------------------------------------- */ -#wp-fullscreen-body { - width: 100%; - z-index: 150005; - display: none; - position: absolute; - top: 0; - left: 0; -} - -#wp-fullscreen-wrap { - margin: 0 auto 50px; - position: relative; - padding-top: 60px; -} - -#wp-fullscreen-title { - font-size: 1.7em; - line-height: 100%; - outline: medium none; - padding: 6px 7px; - width: 100%; - margin-bottom: 30px; -} - -#wp-fullscreen-container { - padding: 4px 10px 50px; -} - -#wp-fullscreen-title, -#wp-fullscreen-container { - -webkit-border-radius: 0; - border-radius: 0; - border: 1px dashed transparent; - background: transparent; - -moz-transition-property: border-color; - -moz-transition-duration: 0.6s; - -webkit-transition-property: border-color; - -webkit-transition-duration: 0.6s; - -o-transition-property: border-color; - -o-transition-duration: 0.6s; - transition-property: border-color; - transition-duration: 0.6s; -} - -#wp_mce_fullscreen { - width: 100%; - min-height: 300px; - border: 0; - background: transparent; - font-family: Consolas, Monaco, monospace; - line-height: 1.6em; - padding: 0; - overflow-y: hidden; - outline: none; - resize: none; -} - -#wp-fullscreen-tagline { - color: #BBBBBB; - font-size: 18px; - float: right; - padding-top: 5px; -} - -/* =Top bar --------------------------------------------------------------- */ -#fullscreen-topbar { - position: fixed; - top: 0; - left: 0; - z-index: 150050; - border-bottom-style: solid; - border-bottom-width: 1px; - min-width: 800px; - width: 100%; - height: 40px; -} - -#wp-fullscreen-toolbar { - padding: 6px 10px 0; - clear: both; - max-width: 1100px; - min-width: 820px; - margin: 0 auto; -} - -#wp-fullscreen-mode-bar, -#wp-fullscreen-button-bar, -#wp-fullscreen-close, -#wp-fullscreen-count { - float: left; -} - -#wp-fullscreen-save { - float: right; - padding: 2px 2px 0 5px; -} - -#wp-fullscreen-count, -#wp-fullscreen-close { - padding-top: 5px; -} - -#wp-fullscreen-central-toolbar { - margin: auto; - padding: 0; -} - -#wp-fullscreen-buttons > div { - float: left; -} - -#wp-fullscreen-mode-bar { - padding: 1px 14px 0 0; -} - -#wp-fullscreen-modes a { - display: block; - font-size: 11px; - text-decoration: none; - float: left; - margin: 1px 0 0 0; - padding: 2px 6px 2px; - border-width: 1px 1px 1px 0; - border-style: solid; - border-color: #bbb; - color: #777; - text-shadow: 0 1px 0 #fff; - background-color: #f4f4f4; - background-image: -moz-linear-gradient(bottom, #e4e4e4, #f9f9f9); - background-image: -webkit-gradient(linear, left bottom, left top, from(#e4e4e4), to(#f9f9f9)); -} - -#wp-fullscreen-modes a:hover, -.wp-html-mode #wp-fullscreen-modes a:last-child, -.wp-tmce-mode #wp-fullscreen-modes a:first-child { - color: #333; - border-color: #999; - background-color: #eee; - background-image: -moz-linear-gradient(bottom, #f9f9f9, #e0e0e0); - background-image: -webkit-gradient(linear, left bottom, left top, from(#f9f9f9), to(#e0e0e0)); -} - -#wp-fullscreen-modes a:first-child { - border-width: 1px; - -webkit-border-top-left-radius: 3px; - -webkit-border-bottom-left-radius: 3px; - border-top-left-radius: 3px; - border-bottom-left-radius: 3px; -} - -#wp-fullscreen-modes a:last-child { - -webkit-border-top-right-radius: 3px; - -webkit-border-bottom-right-radius: 3px; - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; -} - -#wp-fullscreen-buttons .active a { - background: inherit; -} - -#wp-fullscreen-buttons .hidden { - display: none; -} - -#wp-fullscreen-buttons .disabled { - opacity: 0.5; -} - -.wp-html-mode #wp-fullscreen-buttons div { - display: none; -} - -.wp-html-mode #wp-fullscreen-buttons div.wp-fullscreen-both { - display: block; -} - -#fullscreen-topbar.fullscreen-make-sticky { - display: block !important; -} - -#wp-fullscreen-save img { - vertical-align: middle; -} - -#wp-fullscreen-save img, -#wp-fullscreen-save span { - padding-right: 4px; - display: none; -} - -#wp-fullscreen-buttons .mce_image .mce_image { - background-image: url('../images/menu.png?ver=20111128'); - background-position: -124px -38px; -} - -#wp-fullscreen-buttons .mce_image .mce_image:hover { - background-position: -124px -6px; -} - -/* =Thickbox Adjustments --------------------------------------------------------------- */ -.fullscreen-active #TB_overlay { - z-index: 150100; -} - -.fullscreen-active #TB_window { - z-index: 150102; -} - -/* =TinyMCE Adjustments --------------------------------------------------------------- */ -#wp_mce_fullscreen_ifr { - background: transparent; -} - -#wp_mce_fullscreen_parent #wp_mce_fullscreen_tbl tr.mceFirst { - display : none; -} - -#wp-fullscreen-container .wp_themeSkin table td { - vertical-align: top; -} - - /*------------------------------------------------------------------------------ 6.0 - Admin Header ------------------------------------------------------------------------------*/ @@ -1384,7 +1121,7 @@ form.upgrade .hint { #screen-options-link-wrap, #contextual-help-link-wrap { float: right; - height: 22px; + height: 23px; padding: 0; margin: 0 0 0 6px; font-family: sans-serif; @@ -1399,10 +1136,15 @@ form.upgrade .hint { border-bottom-right-radius: 3px; } +#screen-meta-links .screen-meta-toggle { + position: relative; + top: -1px; +} + #screen-meta-links a.show-settings { text-decoration: none; z-index: 1; - padding: 0 16px 0 6px; + padding: 1px 16px 0 6px; height: 22px; line-height: 22px; font-size: 12px; @@ -1445,6 +1187,10 @@ form.upgrade .hint { margin: 0 5px 0 2px; } +.metabox-prefs .columns-prefs label input { + margin: 0 2px; +} + .metabox-prefs label a { display: none; } @@ -1664,7 +1410,7 @@ body.no-js #adminmenu .wp-menu-toggle, } .folded #adminmenu div.wp-menu-image { - width: 32px; + width: 30px; } #adminmenu li { @@ -1762,6 +1508,10 @@ body.no-js #adminmenu .wp-menu-toggle, z-index: 1001; } +.ie8 #adminmenu li.menu-top:hover .wp-menu-arrow { + display: none; +} + #adminmenu .wp-menu-arrow div { position: absolute; top: 7px; @@ -1966,9 +1716,127 @@ body.no-js #adminmenu .wp-menu-toggle, border-radius: 10px; } +/* Auto-folding of the admin menu */ +@media only screen and (max-width: 900px) { + #wpcontent, + #footer { + margin-left: 52px; + } -/* List table styles */ -.post-com-count-wrapper { + #adminmenuback, + #adminmenuwrap, + #adminmenu, + #adminmenu li.menu-top { + width: 32px; + } + + #adminmenu .wp-has-current-submenu .wp-submenu { + display: none; + position: absolute; + width: 145px; + z-index: 999; + overflow: hidden; + } + + #adminmenu .wp-has-current-submenu .wp-submenu.sub-open { + display: block; + } + + #adminmenu li .wp-submenu, + #adminmenu .wp-has-current-submenu .wp-submenu { + top: -5px; + left: 26px; + } + + #adminmenu li.focused.wp-has-current-submenu .wp-submenu, + #adminmenu .wp-has-current-submenu .wp-submenu.sub-open { + padding: 0 8px 8px 0; + } + + #adminmenu div.wp-submenu-head { + display: block; + } + + #adminmenu a.menu-top, + #adminmenu div.wp-menu-toggle { + display: none; + } + + #adminmenu div.wp-menu-image { + width: 30px; + } + + #adminmenu .wp-not-current-submenu li a { + padding-left: 12px; + } + + #adminmenu li li { + margin-left: 0; + } + + #adminmenu li li a { + padding-left: 0; + } + + .wp-menu-arrow { + -moz-transform: translate( 33px ); + -webkit-transform: translate( 33px ); + -o-transform: translate( 33px ); + -ms-transform: translate( 33px ); + transform: translate( 33px ); + } + + #adminmenu li.menu-top:hover .wp-menu-arrow { + display: none; + } + + #adminmenu li.current:hover .wp-menu-arrow, + #adminmenu li.menu-top.wp-menu-open:hover .wp-menu-arrow { + display: block; + z-index: 125; + } + + #adminmenu li.menu-top { + border-width: 1px 0; + border-style: solid none; + } + + #adminmenu .wp-submenu .wp-submenu-wrap { + margin-top: 3px; + } + + #adminmenu .wp-has-current-submenu { + margin-bottom: 1px; + } + + #adminmenu .wp-has-current-submenu.menu-top-last { + margin-bottom: 0; + } + + #adminmenu .wp-has-current-submenu .wp-submenu-wrap { + margin-top: 4px; + } + + #adminmenu .wp-submenu ul { + border-width: 0 0 0 1px; + border-style: solid; + } + + #adminmenu .wp-submenu a { + padding-left: 10px; + } + + #adminmenu a.wp-has-submenu { + margin-left: 40px; + } + + #collapse-menu { + display: none; + } +} + +/* List table styles */ +.post-com-count-wrapper { min-width: 22px; font-family: sans-serif; } @@ -2023,9 +1891,11 @@ strong .post-com-count { 8.0 - Layout Blocks ------------------------------------------------------------------------------*/ -body.admin-bar #wpcontent, -body.admin-bar #adminmenu { +html.wp-toolbar { padding-top: 28px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } .narrow { @@ -2054,18 +1924,184 @@ body.admin-bar #adminmenu { margin: 0.6em 0; } +/* Screens with postboxes */ .postbox-container { float: left; } +#dashboard-widgets.columns-1 .postbox-container { + width: 100%; +} + +#dashboard-widgets.columns-2 .postbox-container { + width: 49.5%; +} + +#dashboard-widgets.columns-2 #postbox-container-2, +#dashboard-widgets.columns-2 #postbox-container-3, +#dashboard-widgets.columns-2 #postbox-container-4 { + float: right; + width: 50.5%; +} + +#dashboard-widgets.columns-3 .postbox-container { + width: 33.5%; +} + +#dashboard-widgets.columns-3 #postbox-container-1 { + width: 33%; +} + +#dashboard-widgets.columns-3 #postbox-container-3, +#dashboard-widgets.columns-3 #postbox-container-4 { + float: right; +} + +#dashboard-widgets.columns-4 .postbox-container { + width: 25%; +} + .postbox-container .meta-box-sortables { - min-height: 350px; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; +} + +.postbox-container .meta-box-sortables:empty { + min-height: 0; + height: 0; } -.postbox-container .meta-box-sortables.empty-container, -#side-sortables.empty-container { +.metabox-holder .postbox-container .empty-container, +#post-body.columns-2 #side-sortables:empty { border: 3px dashed #CCCCCC; - height: 350px; + height: 250px; +} + +.metabox-holder.columns-1 .postbox-container .empty-container, +.columns-2 #postbox-container-3 .empty-container, +.columns-2 #postbox-container-4 .empty-container, +.columns-3 #postbox-container-4 .empty-container { + border: 0 none; + height: 0; + min-height: 0; +} + +#poststuff { + padding-top: 10px; +} + +#poststuff #post-body { + padding: 0; +} + +#post-body-content { + width: 100%; + float: left; +} + +#poststuff .postbox-container { + width: 100%; +} + +#poststuff #post-body.columns-2 { + margin-right: 300px; +} + +#post-body.columns-2 #postbox-container-1 { + float: right; + margin-right: -300px; + width: 280px; +} + +#post-body.columns-2 #side-sortables { + min-height: 250px; +} + +/* one column on the dash */ +@media only screen and (max-width: 799px) { + #wpbody-content #dashboard-widgets .postbox-container { + width: 100%; + } + + #wpbody-content .metabox-holder .postbox-container .empty-container { + border: 0 none; + height: 0; + min-height: 0; + } +} + +/* two columns on the dash, but keep the setting if one is selected */ +@media only screen and (min-width: 800px) and (max-width: 1200px) { + #wpbody-content #dashboard-widgets .postbox-container { + width: 49.5%; + } + + #wpbody-content #dashboard-widgets #postbox-container-2, + #wpbody-content #dashboard-widgets #postbox-container-3, + #wpbody-content #dashboard-widgets #postbox-container-4 { + float: right; + width: 50.5%; + } + + #dashboard-widgets.metabox-holder .postbox-container .empty-container, + #dashboard-widgets #postbox-container-3 .empty-container, + #dashboard-widgets #postbox-container-4 .empty-container { + border: 0 none; + height: 0; + min-height: 0; + } + + #wpbody #wpbody-content #dashboard-widgets.columns-1 .postbox-container { + width: 100%; + } + + #wpbody #wpbody-content .metabox-holder.columns-1 .postbox-container .empty-container { + border: 0 none; + height: 0; + min-height: 0; + } + + /* show the radio buttons for column prefs only for one or two columns */ + .index-php .screen-layout, + .index-php .columns-prefs { + display: block; + } + + .columns-prefs .columns-prefs-3, + .columns-prefs .columns-prefs-4 { + display: none; + } +} + +/* one column on the post write/edit screen */ +@media only screen and (max-width: 850px) { + #wpbody-content #poststuff #post-body { + margin: 0; + } + + #wpbody-content #post-body.columns-2 #postbox-container-1 { + margin-right: 0; + width: 100%; + } + + #poststuff #postbox-container-1 .empty-container, + #poststuff #postbox-container-1 #side-sortables:empty { + border: 0 none; + height: 0; + min-height: 0; + } + + #poststuff #post-body.columns-2 #side-sortables { + min-height: 0; + } + + /* hide the radio buttons for column prefs */ + .screen-layout, + .columns-prefs { + display: none; + } } .postbox .hndle { @@ -2121,6 +2157,10 @@ body.admin-bar #adminmenu { user-select: none; } +.stuffbox h3 { + cursor: auto; +} + .postbox .inside, .stuffbox .inside { padding: 0 10px; @@ -2156,6 +2196,10 @@ body.admin-bar #adminmenu { 9.0 - Dashboard ------------------------------------------------------------------------------*/ +#dashboard-widgets-wrap { + margin: 0 -8px; +} + #wpbody-content .metabox-holder { padding-top: 10px; } @@ -2226,16 +2270,16 @@ body.admin-bar #adminmenu { } .welcome-panel .welcome-panel-close:before { - background: url('../images/xit.gif') 0 17% no-repeat; - content: ' '; - height: 100%; - width: 10px; - left: -12px; - position: absolute; + background: url('../images/xit.gif') 0 17% no-repeat; + content: ' '; + height: 100%; + width: 10px; + left: -12px; + position: absolute; } .welcome-panel .welcome-panel-close:hover:before { - background-position: 100% 17%; + background-position: 100% 17%; } .welcome-panel .wp-badge { @@ -2261,7 +2305,7 @@ body.admin-bar #adminmenu { clear: both; overflow: hidden; position: relative; - padding-left: 25px; + padding-left: 26px; } .welcome-panel .welcome-panel-column { @@ -2344,7 +2388,6 @@ table.fixed { width: 80px; } -#commentsdiv .fixed .column-author, #comments-form .fixed .column-author { width: 20%; } @@ -2354,28 +2397,49 @@ table.fixed { padding: 0; } -#commentsdiv.postbox .inside .row-actions { +#commentsdiv .inside .row-actions { line-height:18px; } -#commentsdiv.postbox .inside td { - padding:1em 10px; +#commentsdiv .inside .column-author { + width: 25%; +} + +#commentsdiv .column-comment p { + margin: 0.6em 0; + padding: 0; +} + +#commentsdiv #replyrow td { + padding: 0; +} + +#commentsdiv p { + padding: 8px 10px; + margin: 0; +} + +#commentsdiv #add-new-comment { + border-width: 0 0 1px; + border-style: none none solid; } -#commentsdiv.postbox .inside .column-author { - width:33%; +#commentsdiv .comments-box { + border: 0 none; } -#commentsdiv.postbox .inside p { - margin:6px 10px 8px; +#commentsdiv .comments-box thead th { + background: transparent; + padding: 0 7px 4px; + font-style: italic; } -#commentsdiv.postbox .column-comment p { - margin:0.6em 0; +#commentsdiv .comments-box tr:last-child td { + border-bottom: 0 none; } -#commentsdiv.postbox #replyrow td { - padding:0; +#commentsdiv img.waiting { + padding-left: 5px; } .sorting-indicator { @@ -2516,7 +2580,7 @@ th.asc:hover span.sorting-indicator { margin-top: 13px; } .screen-per-page { - width: 3em; + width: 4em; } #posts-filter fieldset { @@ -2955,82 +3019,25 @@ input#link_url { max-width: 260px; } -#post-body ul.category-tabs, -#post-body ul.add-menu-item-tabs { - float: left; - width: 120px; - text-align: right; - /* Negative margin for the sake of those without JS: all tabs display */ - margin: 0 -120px 0 5px; - padding: 0; -} - -#post-body ul.category-tabs li, -#post-body ul.add-menu-item-tabs li { - padding: 8px; -} - -#post-body ul.category-tabs li.tabs, -#post-body ul.add-menu-item-tabs li.tabs { - -webkit-border-top-left-radius: 3px; - -webkit-border-bottom-left-radius: 3px; - border-top-left-radius: 3px; - border-bottom-left-radius: 3px; -} - -.wp-tab-panel, -.categorydiv div.tabs-panel, -.customlinkdiv div.tabs-panel, -.posttypediv div.tabs-panel, -.taxonomydiv div.tabs-panel, -#linkcategorydiv div.tabs-panel { - height: 200px; - overflow: auto; - padding: 0.5em 0.9em; - border-style: solid; - border-width: 1px; -} - -.nav-menus-php .customlinkdiv div.tabs-panel, -.nav-menus-php .posttypediv div.tabs-panel, -.nav-menus-php .taxonomydiv div.tabs-panel { - height: auto; - max-height: 205px; -} - -div.tabs-panel-active { - display:block; -} - -div.tabs-panel-inactive { - display:none; -} - -#post-body .categorydiv div.tabs-panel, -.taxonomy div.tabs-panel, -#post-body #linkcategorydiv div.tabs-panel { - margin: 0 5px 0 125px; -} - .press-this #side-sortables .category-tabs li, -.has-right-sidebar #side-sortables .category-tabs li, +ul.category-tabs li, #side-sortables .add-menu-item-tabs li, .wp-tab-bar li { display: inline; line-height: 1.35em; } -.no-js #side-sortables .category-tabs li.hide-if-no-js { +.no-js .category-tabs li.hide-if-no-js { display: none; } -#side-sortables .category-tabs a, +.category-tabs a, #side-sortables .add-menu-item-tabs a, .wp-tab-bar a { text-decoration: none; } -#side-sortables .category-tabs { +.category-tabs { margin: 8px 0 3px; } @@ -3043,20 +3050,10 @@ div.tabs-panel-inactive { margin-bottom: 3px; } -.categorydiv ul, -.customlinkdiv ul, -.posttypediv ul, -.taxonomydiv ul, -#linkcategorydiv ul { - list-style: none; - padding: 0; - margin: 0; -} - #normal-sortables .postbox #replyrow .submit { float: none; margin: 0; - padding: 3px 7px; + padding: 0 7px 5px; } #side-sortables .submitbox .submit input, @@ -3070,36 +3067,19 @@ div.tabs-panel-inactive { margin: 11px 0; } -#side-sortables .comments-box, -#normal-sortables .comments-box { - border: 0 none; -} - ul.category-tabs, ul.add-menu-item-tabs, ul.wp-tab-bar { margin-top: 12px; } -#side-sortables .comments-box thead th, -#normal-sortables .comments-box thead th { - background: transparent; - padding: 0 7px 4px; - font-style: italic; -} - -ul.category-tabs li.tabs, +ul.category-tabs li, ul.add-menu-item-tabs li.tabs, .wp-tab-active { border-style: solid solid none; border-width: 1px 1px 0; } -#commentsdiv img.waiting { - padding-left: 5px; -} - -#post-body .category-tabs li.tabs, #post-body .add-menu-item-tabs li.tabs { border-style: solid none solid solid; border-width: 1px 0 1px 1px; @@ -3121,28 +3101,16 @@ form#tags-filter { position: relative; } -.screen-per-page { - width: 3em; +/* Edit posts */ +td.post-title strong, +td.plugin-title strong { + display: block; + margin-bottom: .2em; } -#posts-filter fieldset { - float: left; - margin: 0 1.5ex 1em 0; - padding: 0; -} - -#posts-filter fieldset legend { - padding: 0 0 .2em 1px; -} - -/* Edit posts */ -td.post-title strong, td.plugin-title strong { - display: block; - margin-bottom: .2em; -} - -td.post-title p, td.plugin-title p { - margin: 6px 0; +td.post-title p, +td.plugin-title p { + margin: 6px 0; } /* Global classes */ @@ -3366,7 +3334,6 @@ table.diff .diff-deletedline del, table.diff .diff-addedline ins { margin: 0; } -#post-body ul.category-tabs, #post-body ul.add-menu-item-tabs { float: left; width: 120px; @@ -3376,12 +3343,10 @@ table.diff .diff-deletedline del, table.diff .diff-addedline ins { padding: 0; } -#post-body ul.category-tabs li, #post-body ul.add-menu-item-tabs li { padding: 8px; } -#post-body ul.category-tabs li.tabs, #post-body ul.add-menu-item-tabs li.tabs { -webkit-border-top-left-radius: 3px; -webkit-border-bottom-left-radius: 3px; @@ -3389,11 +3354,11 @@ table.diff .diff-deletedline del, table.diff .diff-addedline ins { border-bottom-left-radius: 3px; } +.wp-tab-panel, .categorydiv div.tabs-panel, .customlinkdiv div.tabs-panel, .posttypediv div.tabs-panel, -.taxonomydiv div.tabs-panel, -#linkcategorydiv div.tabs-panel { +.taxonomydiv div.tabs-panel { height: 200px; overflow: auto; padding: 0.5em 0.9em; @@ -3416,17 +3381,14 @@ div.tabs-panel-inactive { display:none; } -#post-body .categorydiv div.tabs-panel, -.taxonomy div.tabs-panel, -#post-body #linkcategorydiv div.tabs-panel { +.colunms-1 .categorydiv div.tabs-panel, +.taxonomy div.tabs-panel { margin: 0 5px 0 125px; } -.categorydiv ul, .customlinkdiv ul, .posttypediv ul, -.taxonomydiv ul, -#linkcategorydiv ul { +.taxonomydiv ul { list-style: none; padding: 0; margin: 0; @@ -3439,8 +3401,7 @@ ul.export-filters, .categorydiv ul.categorychecklist ul, .customlinkdiv ul.categorychecklist ul, .posttypediv ul.categorychecklist ul, -.taxonomydiv ul.categorychecklist ul, -#linkcategorydiv ul.categorychecklist ul { +.taxonomydiv ul.categorychecklist ul { margin-left: 18px; } @@ -3589,6 +3550,37 @@ p.popular-tags a { text-decoration: underline; } +/* links tables */ +table.links-table { + width: 100%; +} + +.links-table th { + font-weight: normal; + text-align: left; + vertical-align: top; + min-width: 80px; + width: 20%; + word-wrap: break-word; +} + +.links-table th, +.links-table td { + padding: 5px 0; +} + +.links-table td label { + margin-right: 8px; +} + +.links-table td input[type="text"], +.links-table td textarea { + width: 100%; +} + +.links-table #link_rel { + max-width: 280px; +} /*------------------------------------------------------------------------------ 14.0 - Media Screen @@ -3758,9 +3750,9 @@ abbr.required { .media-item .progress { float: right; - height: 22px; - margin: 6px 10px 0 0; - width: 200px; + height: 22px; + margin: 6px 10px 0 0; + width: 200px; line-height: 2em; padding: 0; overflow: hidden; @@ -3824,14 +3816,14 @@ abbr.required { .media-upload-form .media-item.error p, .media-item .error-div { line-height: 16px; - font-size: 12px; - margin: 10px; + margin: 5px 10px; padding: 0; } .media-item .error-div a.dismiss { + display: block; float: right; - padding-left: 15px; + margin: 5px 4px 0 15px; } /*------------------------------------------------------------------------------ @@ -4396,22 +4388,26 @@ span.imgedit-scale-warn { ------------------------------------------------------------------------------*/ .theme-install-php .tablenav { - height:auto; + height: auto; +} + +h3.available-themes { + margin: 0 0 1em; + float: left; } .available-theme { display: inline-block; - margin-bottom: 10px; - margin-right: 25px; + margin-right: 10px; overflow: hidden; - padding: 20px; + padding: 20px 20px 20px 0; vertical-align: top; - width: 240px; + width: 300px; } -.available-theme a.screenshot { - width: 240px; - height: 180px; +.available-theme .screenshot { + width: 300px; + height: 225px; display: block; border-width: 1px; border-style: solid; @@ -4420,50 +4416,168 @@ span.imgedit-scale-warn { } .available-theme img { - width: 240px; + width: 300px; } .available-theme h3 { - margin: 15px 0 5px; + margin: 15px 0 0; +} + +.available-theme .theme-author { + line-height: 18px; +} + +.available-theme .action-links { + margin-top: 10px; + overflow: hidden; +} + +#current-theme .theme-info li, +.theme-options li, +.available-theme .action-links li { + float: left; + padding-right: 10px; + margin-right: 10px; + border-right: 1px solid #dfdfdf; +} + +.available-theme .action-links li { + padding-right: 8px; + margin-right: 8px; +} + +#current-theme .theme-info li:last-child, +.theme-options li:last-child, +.available-theme .action-links li:last-child { + padding-right: 0; + margin-right: 0; + border-right: 0; +} + +.available-theme .action-links .delete-theme { + float: right; + margin-left: 8px; + margin-right: 0; +} + +.available-theme .action-links .delete-theme a { + color: red; + padding: 2px; +} + +.available-theme .action-links .delete-theme a:hover { + background: red; + color: #fff; + text-decoration: none; +} + +.available-theme .action-links p { + float: left; } #current-theme { - margin: 1em 0 1.5em; + margin: 20px 0 10px; + padding: 0 0 20px; + border-bottom: 1px solid #dfdfdf; + overflow: hidden; } -#current-theme a { - border-bottom: none; +#current-theme.has-screenshot { + padding-left: 330px; } #current-theme h3 { - font-size: 17px; - font-weight: normal; margin: 0; + font-size: 12px; + font-weight: normal; + color: #999; +} + +#current-theme h4 { + margin: 3px 0 16px; + font-size: 20px; +} + +#current-theme h4 span { + margin-left: 20px; + font-size: 12px; + font-weight: normal; +} + +#current-theme a { + border-bottom: none; +} + +#current-theme .theme-info { + margin: 1em 0; + overflow: hidden; } #current-theme .theme-description { margin-top: 5px; + max-width: 600px; + line-height: 1.6em; } #current-theme img { float: left; + width: 300px; + margin-left: -330px; + border-width: 1px; border-style: solid; - margin-right: 1em; - margin-bottom: 1.5em; - width: 150px; +} + +.theme-options { + overflow: hidden; + font-size: 14px; + padding-bottom: 10px; +} + +.theme-options .load-customize { + margin-right: 30px; + float: left; } .theme-options span { + float: left; + margin-right: 10px; text-transform: uppercase; - font-size: 13px; + font-size: 11px; + line-height: 18px; + color: #999; } -.theme-options a { - font-size: 15px; +.theme-options ul { + float: left; + margin: 0; +} + +/* Allow for three-up on 1024px wide screens, e.g. tablets */ +@media only screen and (max-width: 1200px) { + .available-theme, + .available-theme .screenshot, + #current-theme img { + width: 240px; + } + + .available-theme .screenshot { + height: 180px; + } + + .available-theme img { + width: 100%; + } + + #current-theme.has-screenshot { + padding-left: 270px; + } + + #current-theme img { + margin-left: -270px; + } } -#post-body ul.category-tabs li.tabs a, #post-body ul.add-menu-item-tabs li.tabs a, #TB_window #TB_title a.tb-theme-preview-link, #TB_window #TB_title a.tb-theme-preview-link:visited { @@ -4494,7 +4608,6 @@ span.imgedit-scale-warn { .appearance_page_custom-header #headimg { border: 1px solid #DFDFDF; - min-height: 100px; width: 100%; } @@ -4646,15 +4759,30 @@ input.button-highlighted, padding: 5px 7px 0; } -#wpbody-content .plugins .plugin-title, #wpbody-content .plugins .theme-title { +.plugins .update th, +.plugins .update td { + border-bottom: 0; +} +.plugin-update-tr td { + border-top: 0; +} + +#wpbody-content .plugins .plugin-title, +#wpbody-content .plugins .theme-title { padding-right: 12px; white-space:nowrap; } -.plugins .second, .plugins .row-actions-visible { +.plugins .second, +.plugins .row-actions-visible { padding: 0 0 5px; } +.plugins .update .second, +.plugins .update .row-actions-visible { + padding-bottom: 0; +} + .plugins-php .widefat tfoot th, .plugins-php .widefat tfoot td { border-top-style: solid; @@ -4710,33 +4838,24 @@ input.button-highlighted, .pressthis a { display: inline-block; - width: 113px; position: relative; cursor: move; color: #333; background: #dfdfdf; - background-image: -webkit-gradient( - linear, - left bottom, - left top, - color-stop(0.07, rgb(230,230,230)), - color-stop(0.77, rgb(216,216,216)) - ); - background-image: -moz-linear-gradient( - center bottom, - rgb(230,230,230) 7%, - rgb(216,216,216) 77% - ); - background-repeat: no-repeat; - background-image-position: 10px 8px; + background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.07, #e6e6e6), color-stop(0.77, #d8d8d8)); + background-image: -webkit-linear-gradient(bottom, #e6e6e6 7%, #d8d8d8 77%); + background-image: -moz-linear-gradient(bottom, #e6e6e6 7%, #d8d8d8 77%); + background-image: -ms-linear-gradient(bottom, #e6e6e6 7%, #d8d8d8 77%); + background-image: -o-linear-gradient(bottom, #e6e6e6 7%, #d8d8d8 77%); + background-image: linear-gradient(bottom, #e6e6e6 7%, #d8d8d8 77%); -webkit-border-radius: 5px; border-radius: 5px; - border: 1px #b4b4b4 solid; + border: 1px solid #b4b4b4; font-style: normal; line-height: 16px; font-size: 14px; text-decoration: none; - text-shadow: #fff 0 1px 0px; + text-shadow: 0 1px 0px #fff; } .pressthis a:hover, @@ -4754,8 +4873,9 @@ input.button-highlighted, } .pressthis a span { - background: url(../images/press-this.png) no-repeat -45px 5px ; - padding: 8px 0 8px 32px; + background: url(../images/press-this.png?v=20120502) no-repeat 0px 5px; + padding: 8px 11px 8px 27px; + margin: 0 5px; display: inline-block; } @@ -4828,14 +4948,14 @@ input.button-highlighted, .about-wrap { position: relative; margin: 25px 40px 0 20px; - min-width: 770px; max-width: 1050px; /* readability */ font-size: 15px; } + .about-wrap div.updated, .about-wrap div.error { - display: none !important; + display: none !important; } /* Typography */ @@ -4843,12 +4963,14 @@ input.button-highlighted, .about-wrap p { line-height: 1.6em; } + .about-wrap h1 { margin: 0.2em 200px 0 0; line-height: 1.2em; font-size: 2.8em; font-weight: 200; } + .about-text, .about-description, .about-wrap li.wp-person a.web { @@ -4857,14 +4979,17 @@ input.button-highlighted, line-height: 1.6em; font-size: 20px; } + .about-description { margin-top: 1.4em; } + .about-text { margin: 1em 200px 1.4em 0; min-height: 60px; font-size: 24px; } + .about-wrap h3 { font-size: 24px; margin-bottom: 1em; @@ -4872,34 +4997,40 @@ input.button-highlighted, } .about-wrap .changelog { - padding-bottom: 10px; overflow: hidden; } + .about-wrap .changelog li { list-style-type: disc; margin-left: 3em; } + +.about-wrap .feature-section { + padding-bottom: 20px; +} + .about-wrap .feature-section h4 { margin-bottom: 0.6em; } + .about-wrap .feature-section p { margin-top: 0.6em; } + .about-wrap code { font-size: 14px; } -html.ie8 .about-wrap img.element-screenshot { - padding: 2px; -} /* Point Releases */ .about-wrap .point-releases { margin-top: 5px; } + .about-wrap .changelog.point-releases h3 { padding-top: 35px; } + .about-wrap .changelog.point-releases h3:first-child { padding-top: 7px; } @@ -4910,15 +5041,13 @@ html.ie8 .about-wrap img.element-screenshot { padding-top: 142px; height: 50px; width: 173px; - font-weight: bold; font-size: 14px; text-align: center; - margin: 0 -5px; - background: url('../images/wp-badge.png?ver=20111120') no-repeat; } + .about-wrap .wp-badge { position: absolute; top: 0; @@ -4930,12 +5059,14 @@ html.ie8 .about-wrap img.element-screenshot { .about-wrap h2.nav-tab-wrapper { padding-left: 6px; } + .about-wrap h2 .nav-tab { padding: 4px 10px 6px; margin: 0 3px -1px 0; font-size: 18px; vertical-align: top; } + .about-wrap h2 .nav-tab-active { font-weight: bold; padding-top: 3px; @@ -4943,128 +5074,86 @@ html.ie8 .about-wrap img.element-screenshot { /* Changelog / Update screen */ -.about-wrap .feature-section .left-feature, -.about-wrap .feature-section img, -.about-wrap .feature-section .right-feature { - float: left; -} - -.about-wrap .feature-section { - min-height: 100px; - overflow: hidden; - clear: both; -} .about-wrap .feature-section img { - margin: 5px auto; - border: none; - + margin: 0 1.94% 10px 0; -webkit-border-radius: 3px; border-radius: 3px; } -html.ie8 .about-wrap .feature-section img, -html.ie8 .about-wrap .feature-section .image-mask { - border-width: 1px; - border-style: solid; -} - -.about-wrap .feature-section.text-features { - width: 31%; - - float: left; - overflow: visible; -} -.about-wrap .feature-section.text-features div { - width: 112%; -} -.about-wrap .feature-section.screenshot-features { - width: 67%; - margin-top: 1.33em; - float: right; - clear: none; - overflow: visible; +.about-wrap .feature-section img.image-50 { + max-width: 50%; } -.about-wrap .feature-section.screenshot-features .angled-right { - margin-top: -1em; - margin-left: 2.5em; -} -.about-wrap .feature-section.screenshot-features .angled-right p { - margin-left: 290px; +.about-wrap .feature-section img.image-30 { + max-width: 31.2381%; } -.about-wrap .feature-section .angled-right h4, -.about-wrap .feature-section .angled-left h4 { - margin-top: 0; -} -.about-wrap .feature-section .angled-right img, -.about-wrap .feature-section .angled-left img { - margin-top: .1em; - margin-right: 30px; +.ie8 .about-wrap .feature-section img { + border-width: 1px; + border-style: solid; } .about-wrap .feature-section.three-col { padding-top: 15px; margin-bottom: 0; } + .about-wrap .feature-section.three-col div { width: 30%; margin-right: 4.999999999%; - float: left; } + .about-wrap .feature-section.three-col h4 { margin: 0 0 0.6em 0; } + .about-wrap .feature-section.three-col img { margin: 0.5em 0 0.5em 5px; max-width: 100%; - float: none; } -html.ie8 .about-wrap .feature-section.three-col img { + +.ie8 .about-wrap .feature-section.three-col img { margin-left: 0; } + .about-wrap .feature-section.three-col .last-feature { margin-right: 0; } -.about-wrap .feature-section .feature-images { - width: 300px; - position: absolute; - margin-top: 1.1em; -} -.about-wrap .feature-section .feature-images img { - width: 250px; - height: 150px; - margin-right: 5px; -} -.about-wrap .feature-section.images-stagger-left, -.about-wrap .feature-section.images-stagger-right { - min-height: 265px; -} -.about-wrap .feature-section.images-stagger-right .angled-right, -.about-wrap .feature-section.images-stagger-left .angled-left { - margin-bottom: -30px; +.about-wrap .three-col-images { + text-align: center; } -.about-wrap .feature-section.images-stagger-left .angled-left { - margin-left: 5px; + +.about-wrap .three-col-images img { + margin: 0 0 10px; } -.about-wrap .feature-section .angled-right { + +.about-wrap .three-col-images .last-feature { float: right; } -.about-wrap .feature-section.images-stagger-right .feature-images { - right: 0; + +.about-wrap .three-col-images .first-feature { + float: left; } -.about-wrap .feature-section.images-stagger-left .feature-images { - left: 0; + +.about-wrap .feature-section.images-stagger-right img { + float: right; + margin: 0 5px 12px 12px; } -.about-wrap .feature-section.images-stagger-right .left-feature { - margin-right: 350px; + +.about-wrap .feature-section.images-stagger-left img { + float: left; + margin: 0 12px 12px 5px; } -.about-wrap .feature-section.images-stagger-left .right-feature { - margin-left: 350px; + +@media only screen and (max-width: 900px) { + .about-wrap .feature-section.images-stagger-left img, + .about-wrap .feature-section.images-stagger-right img { + clear: both; + } } /* Return to Dashboard Home link */ @@ -5074,80 +5163,388 @@ html.ie8 .about-wrap .feature-section.three-col img { font-size: 14px; font-weight: bold; } + .about-wrap .return-to-dashboard a { text-decoration: none; padding: 0 5px; } -/* Credits */ - -.about-wrap h4.wp-people-group { - margin-top: 2.6em; - font-size: 16px; +/* Credits */ + +.about-wrap h4.wp-people-group { + margin-top: 2.6em; + font-size: 16px; +} + +.about-wrap ul.wp-people-group { + overflow: hidden; + padding: 5px; + margin: 0 -15px 0 -5px; +} + +.about-wrap ul.compact { + margin-bottom: 0 +} + +.about-wrap li.wp-person { + float: left; + margin-right: 10px; +} + +.about-wrap li.wp-person img.gravatar { + float: left; + margin: 0 10px 10px 0; + padding: 2px; + width: 60px; + height: 60px; +} + +.about-wrap ul.compact li.wp-person img.gravatar { + width: 30px; + height: 30px; +} + +.about-wrap li.wp-person { + height: 70px; + width: 280px; + padding-bottom: 15px; +} + +.about-wrap ul.compact li.wp-person { + height: auto; + width: 180px; + padding-bottom: 0; + margin-bottom: 0; +} + +.about-wrap #wp-people-group-validators + p.wp-credits-list { + margin-top: 0; +} + +.about-wrap li.wp-person a.web { + display: block; + margin: 6px 0 2px; + font-size: 16px; + text-decoration: none; +} + +.about-wrap p.wp-credits-list a { + white-space: nowrap; +} + +/* Freedoms */ + +.freedoms-php .about-wrap ol { + margin: 40px 60px; +} + +.freedoms-php .about-wrap ol li { + list-style-type: decimal; + font-weight: bold; +} + +.freedoms-php .about-wrap ol p { + font-weight: normal; + margin: 0.6em 0; +} + +/*------------------------------------------------------------------------------ + 23.0 - Full Overlay w/ Sidebar +------------------------------------------------------------------------------*/ + +body.full-overlay-active { + overflow: hidden; +} + +.wp-full-overlay { + background: #fff; + z-index: 500000; + position: fixed; + overflow: visible; + top: 0; + bottom: 0; + left: 0; + right: 0; + height: 100%; + min-width: 0; +} + +.wp-full-overlay-sidebar { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + + position: fixed; + width: 300px; + height: 100%; + top: 0; + bottom: 0; + left: 0; + padding: 0; + margin: 0; + z-index: 10; + overflow: auto; + background: #f5f5f5; + border-right: 1px solid rgba( 0, 0, 0, 0.2 ); +} + +.wp-full-overlay.collapsed .wp-full-overlay-sidebar { + overflow: visible; +} + +.wp-full-overlay.collapsed, +.wp-full-overlay.expanded .wp-full-overlay-sidebar { + margin-left: 0 !important; +} + +.wp-full-overlay.expanded { + margin-left: 300px; +} + +.wp-full-overlay.collapsed .wp-full-overlay-sidebar { + margin-left: -300px; +} + +.wp-full-overlay-sidebar:after { + content: ''; + display: block; + position: absolute; + top: 0; + bottom: 0; + right: 0; + width: 3px; + box-shadow: -5px 0 4px -4px rgba(0, 0, 0, 0.1) inset; + z-index: 1000; +} + +.wp-full-overlay-main { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + height: 100%; +} + +.wp-full-overlay-sidebar .wp-full-overlay-header, +.wp-full-overlay-sidebar .wp-full-overlay-footer { + position: absolute; + left: 0; + right: 0; + height: 45px; + padding: 0 20px; + line-height: 45px; + z-index: 10; + margin: 0; +} + +.wp-full-overlay-sidebar .wp-full-overlay-header { + top: 0; + border-top: 0; + border-bottom: 1px solid #fff; + box-shadow: inset 0 -1px 0 0px #dfdfdf; +} + +.wp-full-overlay-sidebar .wp-full-overlay-footer { + bottom: 0; + border-bottom: 0; + border-top: 1px solid #dfdfdf; + box-shadow: inset 0 1px 0 0px #fff; +} + +.wp-full-overlay-sidebar .wp-full-overlay-sidebar-content { + position: absolute; + top: 45px; + bottom: 45px; + left: 0; + right: 0; + overflow: auto; +} + +/* Close Link */ +.wp-full-overlay .close-full-overlay { + text-decoration: none; +} + +/* Collapse Button */ +.wp-full-overlay .collapse-sidebar { + position: absolute; + bottom: 12px; + left: 0; + z-index: 50; + display: block; + width: 19px; + height: 19px; + margin-left: 15px; + padding: 0; + border-radius: 50%; + text-decoration: none; +} + +.wp-full-overlay.collapsed .collapse-sidebar { + position: absolute; + left: 100%; +} + +.wp-full-overlay .collapse-sidebar-arrow { + position: absolute; + margin-top: 2px; + margin-left: 2px; + display: block; + width: 15px; + height: 15px; + background: transparent url('../images/arrows.png') no-repeat 0 -72px; +} + +.wp-full-overlay.collapsed .collapse-sidebar-arrow { + background-position: 0 -108px; +} + +.wp-full-overlay .collapse-sidebar-label { + position: absolute; + left: 100%; + color: #808080; + line-height: 20px; + margin-left: 10px; +} + +.wp-full-overlay.collapsed .collapse-sidebar-label { + display: none; +} + +.wp-full-overlay .collapse-sidebar:hover .collapse-sidebar-label { + color: #666; +} + +/* Animations */ +.wp-full-overlay, +.wp-full-overlay-sidebar, +.wp-full-overlay .collapse-sidebar, +.wp-full-overlay-main { + -webkit-transition-property: left, right, top, bottom, width, margin; + -moz-transition-property: left, right, top, bottom, width, margin; + -ms-transition-property: left, right, top, bottom, width, margin; + -o-transition-property: left, right, top, bottom, width, margin; + transition-property: left, right, top, bottom, width, margin; + + -webkit-transition-duration: 0.2s; + -moz-transition-duration: 0.2s; + -ms-transition-duration: 0.2s; + -o-transition-duration: 0.2s; + transition-duration: 0.2s; +} + +/*------------------------------------------------------------------------------ + 24.0 - Customize Loader +------------------------------------------------------------------------------*/ + +.no-customize-support .hide-if-no-customize, +.customize-support .hide-if-customize { + display: none; +} + +#customize-container { + display: none; + background: #fff; + z-index: 500000; + position: fixed; + overflow: visible; + top: 0; + bottom: 0; + left: 0; + right: 0; + height: 100%; +} + +.customize-active #customize-container { + display: block; +} + +.customize-loading #customize-container iframe { + opacity: 0; +} + +.customize-loading #customize-container { + background: #fff url("../images/wpspin_light.gif") no-repeat fixed center center; } -.about-wrap ul.wp-people-group { - overflow: hidden; - padding: 5px; - margin: 0 -15px 0 -5px; + +#customize-container iframe, +#theme-installer iframe { + height: 100%; + width: 100%; + z-index: 20; + + -webkit-transition: opacity 0.3s; + -moz-transition: opacity 0.3s; + -ms-transition: opacity 0.3s; + -o-transition: opacity 0.3s; + transition: opacity 0.3s; } -.about-wrap ul.compact { - margin-bottom: 0 + +#customize-container .collapse-sidebar { + bottom: 16px; } -.about-wrap li.wp-person { - float: left; - margin-right: 10px; + +#theme-installer { + display: none; } -.about-wrap li.wp-person img.gravatar { - float: left; - margin: 0 10px 10px 0; - padding: 2px; - width: 60px; - height: 60px; + +#theme-installer.single-theme { + display: block; } -.about-wrap ul.compact li.wp-person img.gravatar { - width: 30px; - height: 30px; + +.install-theme-info { + display: none; + padding: 10px 20px 20px; } -.about-wrap li.wp-person { - height: 70px; - width: 280px; - padding-bottom: 15px; + +.single-theme .install-theme-info { + padding-top: 15px; } -.about-wrap ul.compact li.wp-person { - height: auto; - width: 180px; - padding-bottom: 0; - margin-bottom: 0; + +#theme-installer .install-theme-info { + display: block; } -.about-wrap #wp-people-group-validators + p.wp-credits-list { - margin-top: 0; + +.install-theme-info .theme-install { + float: right; + margin-top: 18px; } -.about-wrap li.wp-person a.web { - display: block; - margin: 6px 0 2px; + +.install-theme-info .theme-name { font-size: 16px; - text-decoration: none; + line-height: 24px; + margin-bottom: 0; } -.about-wrap p.wp-credits-list a { - white-space: nowrap; + +.install-theme-info .theme-screenshot { + margin-top: 15px; + width: 258px; + border: 1px solid #ccc; } -/* Freedoms */ +.install-theme-info .theme-details { + overflow: hidden; +} -.freedoms-php .about-wrap ol { - margin: 40px 60px; +.theme-details .theme-version { + margin: 15px 0; + float: left; } -.freedoms-php .about-wrap ol li { - list-style-type: decimal; - font-weight: bold; + +.theme-details .star-holder { + margin: 14px 0; + float: right; } -.freedoms-php .about-wrap ol p { - font-weight: normal; - margin: 0.6em 0; + +.theme-details .theme-description { + float: left; + color: #777; + line-height: 20px; } /*------------------------------------------------------------------------------ - 23.0 - Misc + 25.0 - Misc ------------------------------------------------------------------------------*/ #excerpt, @@ -5157,10 +5554,6 @@ html.ie8 .about-wrap .feature-section.three-col img { width: 98%; } -.wp-editor-container textarea.wp-editor-area { - width: 99.9%; -} - #template div { margin-right: 190px; } @@ -5191,6 +5584,10 @@ p.pagenav { padding: 2px 0 0; } +.mobile .row-actions { + visibility: visible; +} + tr:hover .row-actions, div.comment-item:hover .row-actions { visibility: visible; @@ -5260,6 +5657,11 @@ table.form-table td .updated { margin: 6px 0 8px; } +#poststuff .inside #parent_id, +.inline-edit-row #post_parent { + max-width: 100%; +} + #post-visibility-select, #post-formats-select { line-height: 1.5em; @@ -5276,17 +5678,6 @@ table.form-table td .updated { margin-bottom: 20px; } -td.post-title strong, -td.plugin-title strong { - display: block; - margin-bottom: .2em; -} - -td.post-title p, -td.plugin-title p { - margin: 6px 0; -} - #templateside ul li a { text-decoration: none; } @@ -5380,10 +5771,6 @@ td.media-icon img { max-height: 60px; } -.screen-per-page { - width: 3em; -} - .list-ajax-loading { float: right; margin-right: 9px; @@ -5470,9 +5857,6 @@ fieldset { } - - - /*----------------------------------------------------------------------------- MERGED -------------------------------------------------------------------------------*/ @@ -5787,6 +6171,7 @@ form .textarea-wrap { #dashboard_recent_drafts p { margin: 0; padding: 0; + word-wrap: break-word; } #dashboard_recent_drafts ul { @@ -5799,6 +6184,7 @@ form .textarea-wrap { #dashboard_recent_drafts h4 { line-height: 1.7em; + word-wrap: break-word; } #dashboard_recent_drafts h4 abbr { @@ -5992,7 +6378,10 @@ a.rsswidget { } .login h1 a { - background: url(../images/logo-login.png) no-repeat top center; + background-image: url('../images/wordpress-logo.png?ver=20120216'); + background-size: 274px 63px; + background-position: top center; + background-repeat: no-repeat; width: 326px; height: 67px; text-indent: -9999px; @@ -6001,6 +6390,18 @@ a.rsswidget { display: block; } +@media only screen and (-webkit-min-device-pixel-ratio: 1.5) { + .login h1 a { + background-image: url('../images/wordpress-logo-2x.png?ver=20120412'); + background-size: 274px 63px; + } + + .wp-badge { + background-image: url('../images/wp-badge-2x.png?ver=20120516'); + background-size: 173px 194px; + } +} + #login { width: 320px; padding: 114px 0 0; @@ -6024,7 +6425,9 @@ a.rsswidget { padding: 12px 16px 0; } -.login form .input { +.login form .input, +.login input[type="text"] { + color: #555; font-weight: 200; font-size: 24px; line-height: 1; @@ -6041,10 +6444,6 @@ a.rsswidget { box-shadow: inset 1px 1px 2px rgba(200, 200, 200, 0.2); } -.login input { - color: #555; -} - .login #pass-strength-result { width: 250px; font-weight: bold; @@ -6055,6 +6454,25 @@ a.rsswidget { text-align: center; } +.mobile #login { + padding: 20px 0; +} + +.mobile #login form, +.mobile #login .message, +.mobile #login_error { + margin-left: 0; +} + +.mobile #login #nav, +.mobile #login #backtoblog { + margin-left: 8px; +} + +.mobile #login h1 a { + width: auto; +} + /* ms */ /* Dashboard: MS Specific Data */ @@ -6096,7 +6514,6 @@ a.rsswidget { background: #fecac2; } - /* nav-menu */ #nav-menus-frame { @@ -6176,6 +6593,7 @@ a.rsswidget { .nav-menus-php #post-body-content { position: relative; + float: none; } #menu-management .menu-add-new abbr { @@ -6733,14 +7151,18 @@ body.menu-max-depth-11 { min-width: 1280px !important; } display: block; } - -/* plugin-install */ -/* NOTE: the following CSS rules(.star*) are taken more or less straight from the bbPress rating plugin. */ +/* Star ratings */ div.star-holder { position: relative; - height: 19px; + height: 17px; width: 100px; - font-size: 19px; + background: url('../images/stars.png?ver=20120307') repeat-x bottom left; +} + +div.star-holder .star-rating { + background: url('../images/stars.png?ver=20120307') repeat-x top left; + height: 17px; + float: left; } div.action-links { @@ -6748,38 +7170,6 @@ div.action-links { margin: 6px 0 0; } -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; -} - /* Header on thickbox */ #plugin-information-header { margin: 0; @@ -6863,8 +7253,16 @@ div.star img { list-style-image: none; } +#plugin-information #section-screenshots ol { + list-style: none; + margin: 0; +} + #plugin-information #section-screenshots li img { vertical-align: text-top; + max-width: 100%; + width: auto; + height: auto; } #plugin-information #section-screenshots li p { @@ -6873,6 +7271,7 @@ div.star img { padding-bottom: 2em; } +#plugin-information #section-screenshots ol, #plugin-information .updated, #plugin-information pre { margin-right: 215px; @@ -6899,7 +7298,8 @@ img { /* Header */ .press-this #wphead { height: 32px; - margin-right: 5px; + margin-left: 0; + margin-right: 0; margin-bottom: 5px; } @@ -6927,6 +7327,10 @@ img { text-decoration: underline; } +.press-this #message { + margin: 10px 0; +} + .press-this-sidebar { float: right; width: 200px; @@ -6934,6 +7338,8 @@ img { } .press-this #title { + margin-left: 0; + margin-right: 0; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; -ms-box-sizing: border-box; @@ -7294,90 +7700,8 @@ h3 span { line-height: 180%; } - -/* theme-install */ -.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, -.theme-listing .theme-item:hover .theme-item-info span.dots { - display: none; -} - -.theme-listing .theme-item:hover .theme-item-info span { - display: inline; -} - -.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; -} - - -#theme-information .available-theme, -.available-theme { - padding: 20px 15px; -} - -#theme-information .available-theme { - overflow: visible; - width: 440px; -} - -#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 0; -} - -#theme-information .action-button #cancel, -#theme-information .action-button #install { - margin: 10px 5px; -} - -#theme-information .action-button #cancel { - float: left; -} - -#theme-information .action-button #install { - float: right; -} - -#theme-information .available-theme h3 { - margin: 1em 0; -} - -body#theme-information { - height: auto; +#filter-box { + clear: both; } .feature-filter { @@ -7394,7 +7718,7 @@ body#theme-information { float: left; list-style-type: none; padding-right: 25px; - min-width: 150px; + width: 150px; } .feature-container { @@ -7403,7 +7727,6 @@ overflow: auto; margin-bottom: 10px; } - /* widgets */ /* 2 column liquid layout */ @@ -7825,3 +8148,81 @@ a.widget-control-edit { width: auto; } } + +/* =Localized CSS +-------------------------------------------------------------- */ + +/* zh_CN: Remove italic properties. */ +.locale-zh-cn .howto, +.locale-zh-cn .tablenav .displaying-num, +.locale-zh-cn .js .input-with-default-title, +.locale-zh-cn .link-to-original, +.locale-zh-cn .inline-edit-row fieldset span.title, +.locale-zh-cn .inline-edit-row fieldset span.checkbox-title, +.locale-zh-cn #utc-time, +.locale-zh-cn #local-time, +.locale-zh-cn p.install-help, +.locale-zh-cn p.help, +.locale-zh-cn p.description, +.locale-zh-cn span.description, +.locale-zh-cn .form-wrap p { + font-style: normal; +} + +/* zh_CN: Enlarge dashboard widget 'Configure' link */ +.locale-zh-cn .hdnle a { font-size: 12px; } + +/* zn_CH: Enlarge font size, set font-size: normal */ +.locale-zh-cn form.upgrade .hint { font-style: normal; font-size: 100%; } + +/* Zn_CH: Distraction free writing. + * More beautiful font for "Just write." + * Larger text for HTML/Visual mode. + */ +.locale-zh-cn #wp-fullscreen-tagline { font-family: KaiTi, "楷体", sans-serif; } +.locale-zh-cn #wp-fullscreen-modes a { font-size: 12px; } + +/* zh_CN: Enlarge font-size. */ +.locale-zh-cn #sort-buttons { font-size: 1em !important; } + +/* ru_RU: Text needs more room to breathe. */ +.locale-ru-ru #dashboard_quick_press .input-text-wrap, +.locale-ru-ru #dashboard_quick_press .textarea-wrap, +.locale-ru-ru #dashboard_quick_press .wp-media-buttons { + margin-left: 5.7em; /* default 5em + 0.7em */ +} +.locale-ru-ru #dashboard_quick_press h4 { + width: 5.7em; /* default 5.5em + 0.2em */ +} +.locale-ru-ru #dashboard-widgets #dashboard_quick_press form p.submit { + margin-left: 5.3em; /* default 4.6em + 0.7em */ +} +.locale-ru-ru .inline-edit-row fieldset label span.title { + width: auto; /* default 5em */ + min-width: 5em; +} +.locale-ru-ru.press-this .posting { + margin-right: 257px; /* default 212px + 45px */ +} +.locale-ru-ru.press-this #photo-add-url-div input[type="text"] { + width: 255px; /* default 300px - 45px */ +} +.locale-ru-ru.press-this #side-sortables { + width: 245px; /* default 200px + 45px */ +} + +/* lt_LT: QuickPress + QuickEdit */ +.locale-lt-lt #dashboard_quick_press .input-text-wrap, +.locale-lt-lt #dashboard_quick_press .textarea-wrap, +.locale-lt-lt #dashboard_quick_press .wp-media-buttons { + margin-left: 7em; +} +.locale-lt-lt #dashboard_quick_press h4 { + width: 7em; +} +.locale-lt-lt .inline-edit-row fieldset label span.title { + width: 8em; +} +.locale-lt-lt .inline-edit-row fieldset label span.input-text-wrap { + margin-left: 8em; +} diff --git a/wp-admin/custom-background.php b/wp-admin/custom-background.php index 168c65e3..8fb1399b 100644 --- a/wp-admin/custom-background.php +++ b/wp-admin/custom-background.php @@ -53,6 +53,9 @@ class Custom_Background { function __construct($admin_header_callback = '', $admin_image_div_callback = '') { $this->admin_header_callback = $admin_header_callback; $this->admin_image_div_callback = $admin_image_div_callback; + + add_action( 'admin_menu', array( $this, 'init' ) ); + add_action( 'wp_ajax_set-background-image', array( $this, 'wp_set_background_image' ) ); } /** @@ -70,6 +73,12 @@ class Custom_Background { add_action("load-$page", array(&$this, 'take_action'), 49); add_action("load-$page", array(&$this, 'handle_upload'), 49); + if ( isset( $_REQUEST['context'] ) && $_REQUEST['context'] == 'custom-background' ) { + add_filter( 'attachment_fields_to_edit', array( $this, 'attachment_fields_to_edit' ), 10, 2 ); + add_filter( 'media_upload_tabs', array( $this, 'filter_upload_tabs' ) ); + add_filter( 'media_upload_mime_type_links', '__return_empty_array' ); + } + if ( $this->admin_header_callback ) add_action("admin_head-$page", $this->admin_header_callback, 51); } @@ -96,6 +105,8 @@ class Custom_Background { '

' . __( 'Support Forums' ) . '

' ); + add_thickbox(); + wp_enqueue_script('media-upload'); wp_enqueue_script('custom-background'); wp_enqueue_style('farbtastic'); } @@ -124,6 +135,7 @@ class Custom_Background { set_theme_mod('background_image', ''); set_theme_mod('background_image_thumb', ''); $this->updated = true; + wp_safe_redirect( $_POST['_wp_http_referer'] ); return; } @@ -199,15 +211,15 @@ if ( $bgcolor = get_background_color() ) if ( get_background_image() ) { // background-image URL must be single quote, see below - $background_styles .= ' background-image: url(\'' . get_theme_mod('background_image_thumb', '') . '\');' + $background_styles .= ' background-image: url(\'' . set_url_scheme( get_theme_mod( 'background_image_thumb', get_background_image() ) ) . '\');' . ' background-repeat: ' . get_theme_mod('background_repeat', 'repeat') . ';' . ' background-position: top ' . get_theme_mod('background_position_x', 'left'); } ?>
-
- +
+
@@ -226,7 +238,8 @@ if ( get_background_image() ) { - + + @@ -240,13 +253,25 @@ if ( get_background_image() ) { - +
-
- - - -
+

+
+ + + + +

+ 'custom-background', 'TB_iframe' => 1 ), $image_library_url ); + ?> +

+
+ +

+ @@ -302,9 +327,10 @@ if ( get_background_image() ) {
- + - class="hide-if-no-js" id="clearcolor"> () + class="hide-if-no-js" id="clearcolor"> () +
@@ -357,14 +383,50 @@ if ( get_background_image() ) { wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) ); update_post_meta( $id, '_wp_attachment_is_custom_background', get_option('stylesheet' ) ); - set_theme_mod('background_image', esc_url($url)); + set_theme_mod('background_image', esc_url_raw($url)); $thumbnail = wp_get_attachment_image_src( $id, 'thumbnail' ); - set_theme_mod('background_image_thumb', esc_url( $thumbnail[0] ) ); + set_theme_mod('background_image_thumb', esc_url_raw( $thumbnail[0] ) ); do_action('wp_create_file_in_uploads', $file, $id); // For replication $this->updated = true; } + /** + * Replace default attachment actions with "Set as background" link. + * + * @since 3.4.0 + */ + function attachment_fields_to_edit( $form_fields, $post ) { + $form_fields = array( 'image-size' => $form_fields['image-size'] ); + $form_fields['buttons'] = array( 'tr' => '' . __( 'Set as background' ) . '' ); + $form_fields['context'] = array( 'input' => 'hidden', 'value' => 'custom-background' ); + + return $form_fields; + } + + /** + * Leave only "Media Library" tab in the uploader window. + * + * @since 3.4.0 + */ + function filter_upload_tabs() { + return array( 'library' => __('Media Library') ); + } + + public function wp_set_background_image() { + if ( ! current_user_can('edit_theme_options') || ! isset( $_POST['attachment_id'] ) ) exit; + $attachment_id = absint($_POST['attachment_id']); + $sizes = array_keys(apply_filters( 'image_size_names_choose', array('thumbnail' => __('Thumbnail'), 'medium' => __('Medium'), 'large' => __('Large'), 'full' => __('Full Size')) )); + $size = 'thumbnail'; + if ( in_array( $_POST['size'], $sizes ) ) + $size = esc_attr( $_POST['size'] ); + + update_post_meta( $attachment_id, '_wp_attachment_is_custom_background', get_option('stylesheet' ) ); + $url = wp_get_attachment_image_src( $attachment_id, $size ); + $thumbnail = wp_get_attachment_image_src( $attachment_id, 'thumbnail' ); + set_theme_mod( 'background_image', esc_url_raw( $url[0] ) ); + set_theme_mod( 'background_image_thumb', esc_url_raw( $thumbnail[0] ) ); + exit; + } } -?> diff --git a/wp-admin/custom-header.php b/wp-admin/custom-header.php index ebeb2a5a..fc9d4f12 100644 --- a/wp-admin/custom-header.php +++ b/wp-admin/custom-header.php @@ -42,7 +42,6 @@ class Custom_Image_Header { */ var $default_headers = array(); - /** * Holds custom headers uploaded by the user * @@ -72,6 +71,8 @@ class Custom_Image_Header { function __construct($admin_header_callback, $admin_image_div_callback = '') { $this->admin_header_callback = $admin_header_callback; $this->admin_image_div_callback = $admin_image_div_callback; + + add_action( 'admin_menu', array( $this, 'init' ) ); } /** @@ -90,7 +91,14 @@ class Custom_Image_Header { add_action("admin_head-$page", array(&$this, 'help') ); add_action("admin_head-$page", array(&$this, 'take_action'), 50); add_action("admin_head-$page", array(&$this, 'js'), 50); - add_action("admin_head-$page", $this->admin_header_callback, 51); + if ( $this->admin_header_callback ) + add_action("admin_head-$page", $this->admin_header_callback, 51); + + if ( isset( $_REQUEST['context'] ) && $_REQUEST['context'] == 'custom-header' ) { + add_filter( 'attachment_fields_to_edit', array( $this, 'attachment_fields_to_edit' ), 10, 2 ); + add_filter( 'media_upload_tabs', array( $this, 'filter_upload_tabs' ) ); + add_filter( 'media_upload_mime_type_links', '__return_empty_array' ); + } } /** @@ -103,9 +111,27 @@ class Custom_Image_Header { 'id' => 'overview', 'title' => __('Overview'), 'content' => - '

' . __( 'You can set a custom image header for your site. Simply upload the image and crop it, and the new header will go live immediately.' ) . '

' . - '

' . __( 'If you want to discard your custom header and go back to the default included in your theme, click on the buttons to remove the custom image and restore the original header image.' ) . '

' . - '

' . __( 'Some themes come with additional header images bundled. If you see multiple images displayed, select the one you’d like and click the Save Changes button.' ) . '

' + '

' . __( 'This screen is used to customize the header section of your theme.') . '

' . + '

' . __( 'You can choose from the theme’s default header images, or use one of your own. You can also customize how your Site Title and Tagline are displayed.') . '

' + ) ); + + get_current_screen()->add_help_tab( array( + 'id' => 'set-header-image', + 'title' => __('Header Image'), + 'content' => + '

' . __( 'You can set a custom image header for your site. Simply upload the image and crop it, and the new header will go live immediately. Alternatively, you can use an image that has already been uploaded to your Media Library by clicking the “Choose Image” button.' ) . '

' . + '

' . __( 'Some themes come with additional header images bundled. If you see multiple images displayed, select the one you’d like and click the “Save Changes” button.' ) . '

' . + '

' . __( 'If your theme has more than one default header image, or you have uploaded more than one custom header image, you have the option of having WordPress display a randomly different image on each page of your site. Click the “Random” radio button next to the Uploaded Images or Default Images section to enable this feature.') . '

' . + '

' . __( 'If you don’t want a header image to be displayed on your site at all, click the “Remove Header Image” button at the bottom of the Header Image section of this page. If you want to re-enable the header image later, you just have to select one of the other image options and click “Save Changes”.') . '

' + ) ); + + get_current_screen()->add_help_tab( array( + 'id' => 'set-header-text', + 'title' => __('Header Text'), + 'content' => + '

' . sprintf( __( 'For most themes, the header text is your Site Title and Tagline, as defined in the General Settings section.' ), admin_url( 'options-general.php' ) ) . '

' . + '

' . __( 'In the Header Text section of this page, you can choose whether to display this text or hide it. You can also choose a color for the text by typing in a legitimate HTML hex value (eg: “#ff0000” for red) or by clicking “Select a Color” and dialing in a color using the color picker.') . '

' . + '

' . __( 'Don’t forget to Save Changes when you’re done!') . '

' ) ); get_current_screen()->set_help_sidebar( @@ -127,8 +153,11 @@ class Custom_Image_Header { return 1; $step = (int) $_GET['step']; - if ( $step < 1 || 3 < $step ) - $step = 1; + if ( $step < 1 || 3 < $step || + ( 2 == $step && ! wp_verify_nonce( $_REQUEST['_wpnonce-custom-header-upload'], 'custom-header-upload' ) ) || + ( 3 == $step && ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'custom-header-crop-image' ) ) + ) + return 1; return $step; } @@ -141,10 +170,15 @@ class Custom_Image_Header { function js_includes() { $step = $this->step(); - if ( ( 1 == $step || 3 == $step ) && $this->header_text() ) - wp_enqueue_script('farbtastic'); - elseif ( 2 == $step ) + if ( ( 1 == $step || 3 == $step ) ) { + add_thickbox(); + wp_enqueue_script( 'media-upload' ); + wp_enqueue_script( 'custom-header' ); + if ( current_theme_supports( 'custom-header', 'header-text' ) ) + wp_enqueue_script('farbtastic'); + } elseif ( 2 == $step ) { wp_enqueue_script('imgareaselect'); + } } /** @@ -155,24 +189,12 @@ class Custom_Image_Header { function css_includes() { $step = $this->step(); - if ( ( 1 == $step || 3 == $step ) && $this->header_text() ) + if ( ( 1 == $step || 3 == $step ) && current_theme_supports( 'custom-header', 'header-text' ) ) wp_enqueue_style('farbtastic'); elseif ( 2 == $step ) wp_enqueue_style('imgareaselect'); } - /** - * Check if header text is allowed - * - * @since 3.0.0 - */ - function header_text() { - if ( defined( 'NO_HEADER_TEXT' ) && NO_HEADER_TEXT ) - return false; - - return true; - } - /** * Execute custom header modification. * @@ -189,7 +211,7 @@ class Custom_Image_Header { if ( isset( $_POST['resetheader'] ) ) { check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' ); - remove_theme_mod( 'header_image' ); + $this->reset_header_image(); return; } @@ -201,36 +223,27 @@ class Custom_Image_Header { if ( isset( $_POST['removeheader'] ) ) { check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' ); - set_theme_mod( 'header_image', 'remove-header' ); + $this->remove_header_image(); return; } - if ( isset( $_POST['text-color'] ) ) { + if ( isset( $_POST['text-color'] ) && ! isset( $_POST['display-header-text'] ) ) { + check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' ); + set_theme_mod( 'header_textcolor', 'blank' ); + } elseif ( isset( $_POST['text-color'] ) ) { check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' ); $_POST['text-color'] = str_replace( '#', '', $_POST['text-color'] ); - if ( 'blank' == $_POST['text-color'] ) { + $color = preg_replace('/[^0-9a-fA-F]/', '', $_POST['text-color']); + if ( strlen($color) == 6 || strlen($color) == 3 ) + set_theme_mod('header_textcolor', $color); + elseif ( ! $color ) set_theme_mod( 'header_textcolor', 'blank' ); - } else { - $color = preg_replace('/[^0-9a-fA-F]/', '', $_POST['text-color']); - if ( strlen($color) == 6 || strlen($color) == 3 ) - set_theme_mod('header_textcolor', $color); - } } if ( isset( $_POST['default-header'] ) ) { check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' ); - if ( 'random-default-image' == $_POST['default-header'] ) { - set_theme_mod( 'header_image', 'random-default-image' ); - } elseif ( 'random-uploaded-image' == $_POST['default-header'] ) { - set_theme_mod( 'header_image', 'random-uploaded-image' ); - } else { - $this->process_default_headers(); - $uploaded = get_uploaded_header_images(); - if ( isset( $uploaded[$_POST['default-header']] ) ) - set_theme_mod( 'header_image', esc_url( $uploaded[$_POST['default-header']]['url'] ) ); - elseif ( isset( $this->default_headers[$_POST['default-header']] ) ) - set_theme_mod( 'header_image', esc_url( $this->default_headers[$_POST['default-header']]['url'] ) ); - } + $this->set_header_image( $_POST['default-header'] ); + return; } } @@ -290,9 +303,9 @@ class Custom_Image_Header { echo '
'; echo ''; + echo '' . esc_attr( $header_desc ) .''; echo '
'; } echo '
'; @@ -305,7 +318,7 @@ class Custom_Image_Header { */ function js() { $step = $this->step(); - if ( ( 1 == $step || 3 == $step ) && $this->header_text() ) + if ( ( 1 == $step || 3 == $step ) && current_theme_supports( 'custom-header', 'header-text' ) ) $this->js_1(); elseif ( 2 == $step ) $this->js_2(); @@ -319,86 +332,75 @@ class Custom_Image_Header { function js_1() { ?> ; - var yinit = ; + var xinit = ; + var yinit = ; var ratio = xinit / yinit; var ximg = jQuery('img#upload').width(); var yimg = jQuery('img#upload').height(); @@ -439,14 +441,28 @@ class Custom_Image_Header { jQuery('img#upload').imgAreaSelect({ handles: true, keys: true, - aspectRatio: xinit + ':' + yinit, show: true, x1: 0, y1: 0, x2: xinit, y2: yinit, - maxHeight: , - maxWidth: , + + aspectRatio: xinit + ':' + yinit, + + maxHeight: , + + maxWidth: , + onInit: function () { jQuery('#width').val(xinit); jQuery('#height').val(yinit); @@ -483,44 +499,70 @@ class Custom_Image_Header {
+

+ - - - + - + @@ -546,7 +588,7 @@ class Custom_Image_Header { + $default_image = get_theme_support( 'custom-header', 'default-image' ); + if ( $default_image && get_header_image() != $default_image ) : ?>
+ admin_image_div_callback ) { call_user_func( $this->admin_image_div_callback ); } else { ?> -
+
header_text() ) - $style = ' style="display:none;"'; + if ( display_header_text() ) + $style = ' style="color:#' . get_header_textcolor() . ';"'; else - $style = ' style="color:#' . get_theme_mod( 'header_textcolor', HEADER_TEXTCOLOR ) . ';"'; + $style = ' style="display:none;"'; ?> -

onclick="return false;" href="">

-
>
+

onclick="return false;" href="">

+
>


- %1$d × %2$d pixels will be used as-is.' ), HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT ); ?>

+ %1$d × %2$d pixels will be used as-is.' ) . '
', get_theme_support( 'custom-header', 'width' ), get_theme_support( 'custom-header', 'height' ) ); + } elseif ( current_theme_supports( 'custom-header', 'flex-height' ) ) { + if ( ! current_theme_supports( 'custom-header', 'flex-width' ) ) + printf( __( 'Images should be at least %1$d pixels wide.' ) . ' ', get_theme_support( 'custom-header', 'width' ) ); + } elseif ( current_theme_supports( 'custom-header', 'flex-width' ) ) { + if ( ! current_theme_supports( 'custom-header', 'flex-height' ) ) + printf( __( 'Images should be at least %1$d pixels tall.' ) . ' ', get_theme_support( 'custom-header', 'height' ) ); + } + if ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) { + if ( current_theme_supports( 'custom-header', 'width' ) ) + printf( __( 'Suggested width is %1$d pixels.' ) . ' ', get_theme_support( 'custom-header', 'width' ) ); + if ( current_theme_supports( 'custom-header', 'height' ) ) + printf( __( 'Suggested height is %1$d pixels.' ) . ' ', get_theme_support( 'custom-header', 'height' ) ); + } + ?>


- +

+ 'custom-header', 'TB_iframe' => 1 ), $image_library_url ); + ?> +

+
+ +

- +

@@ -567,7 +609,8 @@ class Custom_Image_Header {
@@ -579,33 +622,37 @@ class Custom_Image_Header {
- header_text() ) : ?> + + +

+ - - + + - + - +

- - - +

- - #blank as text color.' );?> - + + + + + +

@@ -617,7 +664,7 @@ class Custom_Image_Header {
- */ function step_2() { check_admin_referer('custom-header-upload', '_wpnonce-custom-header-upload'); - if ( ! current_theme_supports( 'custom-header-uploads' ) ) + if ( ! current_theme_supports( 'custom-header', 'uploads' ) ) wp_die( __( 'Cheatin’ uh?' ) ); - $overrides = array('test_form' => false); - $file = wp_handle_upload($_FILES['import'], $overrides); - - if ( isset($file['error']) ) - wp_die( $file['error'], __( 'Image Upload Error' ) ); - - $url = $file['url']; - $type = $file['type']; - $file = $file['file']; - $filename = basename($file); + if ( empty( $_POST ) && isset( $_GET['file'] ) ) { + $attachment_id = absint( $_GET['file'] ); + $file = get_attached_file( $attachment_id, true ); + $url = wp_get_attachment_image_src( $attachment_id, 'full'); + $url = $url[0]; + } elseif ( isset( $_POST ) ) { + extract($this->step_2_manage_upload()); + } - // Construct the object array - $object = array( - 'post_title' => $filename, - 'post_content' => $url, - 'post_mime_type' => $type, - 'guid' => $url, - 'context' => 'custom-header' - ); + if ( file_exists( $file ) ) { + list( $width, $height, $type, $attr ) = getimagesize( $file ); + } else { + $data = wp_get_attachment_metadata( $attachment_id ); + $height = $data[ 'height' ]; + $width = $data[ 'width' ]; + unset( $data ); + } - // Save the data - $id = wp_insert_attachment($object, $file); + $max_width = 0; + // For flex, limit size of image displayed to 1500px unless theme says otherwise + if ( current_theme_supports( 'custom-header', 'flex-width' ) ) + $max_width = 1500; - list($width, $height, $type, $attr) = getimagesize( $file ); + if ( current_theme_supports( 'custom-header', 'max-width' ) ) + $max_width = max( $max_width, get_theme_support( 'custom-header', 'max-width' ) ); + $max_width = max( $max_width, get_theme_support( 'custom-header', 'width' ) ); - if ( $width == HEADER_IMAGE_WIDTH && $height == HEADER_IMAGE_HEIGHT ) { + // If flexible height isn't supported and the image is the exact right size + if ( ! current_theme_supports( 'custom-header', 'flex-height' ) && ! current_theme_supports( 'custom-header', 'flex-width' ) + && $width == get_theme_support( 'custom-header', 'width' ) && $height == get_theme_support( 'custom-header', 'height' ) ) + { // Add the meta-data - wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) ); - update_post_meta( $id, '_wp_attachment_is_custom_header', get_option('stylesheet' ) ); + if ( file_exists( $file ) ) + wp_update_attachment_metadata( $attachment_id, wp_generate_attachment_metadata( $attachment_id, $file ) ); - set_theme_mod('header_image', esc_url($url)); - do_action('wp_create_file_in_uploads', $file, $id); // For replication + $this->set_header_image( compact( 'url', 'attachment_id', 'width', 'height' ) ); + + do_action('wp_create_file_in_uploads', $file, $attachment_id); // For replication return $this->finished(); - } elseif ( $width > HEADER_IMAGE_WIDTH ) { - $oitar = $width / HEADER_IMAGE_WIDTH; - $image = wp_crop_image($file, 0, 0, $width, $height, HEADER_IMAGE_WIDTH, $height / $oitar, false, str_replace(basename($file), 'midsize-'.basename($file), $file)); - if ( is_wp_error( $image ) ) - wp_die( __( 'Image could not be processed. Please go back and try again.' ), __( 'Image Processing Error' ) ); + } elseif ( $width > $max_width ) { + $oitar = $width / $max_width; + $image = wp_crop_image($attachment_id, 0, 0, $width, $height, $max_width, $height / $oitar, false, str_replace(basename($file), 'midsize-'.basename($file), $file)); + if ( ! $image || is_wp_error( $image ) ) + wp_die( __( 'Image could not be processed. Please go back and try again.' ), __( 'Image Processing Error' ) ); - $image = apply_filters('wp_create_file_in_uploads', $image, $id); // For replication + $image = apply_filters('wp_create_file_in_uploads', $image, $attachment_id); // For replication $url = str_replace(basename($url), basename($image), $url); $width = $width / $oitar; @@ -704,25 +757,66 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?> - + + + + - +

+ +

false); + $file = wp_handle_upload($_FILES['import'], $overrides); + + if ( isset($file['error']) ) + wp_die( $file['error'], __( 'Image Upload Error' ) ); + + $url = $file['url']; + $type = $file['type']; + $file = $file['file']; + $filename = basename($file); + + // Construct the object array + $object = array( + 'post_title' => $filename, + 'post_content' => $url, + 'post_mime_type' => $type, + 'guid' => $url, + 'context' => 'custom-header' + ); + + // Save the data + $attachment_id = wp_insert_attachment( $object, $file ); + return compact( 'attachment_id', 'file', 'filename', 'url', 'type' ); + } + /** * Display third step of custom header image page. * * @since 2.1.0 */ function step_3() { - check_admin_referer('custom-header-crop-image'); - if ( ! current_theme_supports( 'custom-header-uploads' ) ) + check_admin_referer( 'custom-header-crop-image' ); + + if ( ! current_theme_supports( 'custom-header', 'uploads' ) ) wp_die( __( 'Cheatin’ uh?' ) ); if ( $_POST['oitar'] > 1 ) { @@ -735,37 +829,75 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?> $attachment_id = absint( $_POST['attachment_id'] ); $original = get_attached_file($attachment_id); - $cropped = wp_crop_image( $attachment_id, (int) $_POST['x1'], (int) $_POST['y1'], (int) $_POST['width'], (int) $_POST['height'], HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT ); - if ( is_wp_error( $cropped ) ) - wp_die( __( 'Image could not be processed. Please go back and try again.' ), __( 'Image Processing Error' ) ); + + $max_width = 0; + // For flex, limit size of image displayed to 1500px unless theme says otherwise + if ( current_theme_supports( 'custom-header', 'flex-width' ) ) + $max_width = 1500; + + if ( current_theme_supports( 'custom-header', 'max-width' ) ) + $max_width = max( $max_width, get_theme_support( 'custom-header', 'max-width' ) ); + $max_width = max( $max_width, get_theme_support( 'custom-header', 'width' ) ); + + if ( ( current_theme_supports( 'custom-header', 'flex-height' ) && ! current_theme_supports( 'custom-header', 'flex-width' ) ) || $_POST['width'] > $max_width ) + $dst_height = absint( $_POST['height'] * ( $max_width / $_POST['width'] ) ); + elseif ( current_theme_supports( 'custom-header', 'flex-height' ) && current_theme_supports( 'custom-header', 'flex-width' ) ) + $dst_height = absint( $_POST['height'] ); + else + $dst_height = get_theme_support( 'custom-header', 'height' ); + + if ( ( current_theme_supports( 'custom-header', 'flex-width' ) && ! current_theme_supports( 'custom-header', 'flex-height' ) ) || $_POST['width'] > $max_width ) + $dst_width = absint( $_POST['width'] * ( $max_width / $_POST['width'] ) ); + elseif ( current_theme_supports( 'custom-header', 'flex-width' ) && current_theme_supports( 'custom-header', 'flex-height' ) ) + $dst_width = absint( $_POST['width'] ); + else + $dst_width = get_theme_support( 'custom-header', 'width' ); + + if ( empty( $_POST['skip-cropping'] ) ) + $cropped = wp_crop_image( $attachment_id, (int) $_POST['x1'], (int) $_POST['y1'], (int) $_POST['width'], (int) $_POST['height'], $dst_width, $dst_height ); + elseif ( ! empty( $_POST['create-new-attachment'] ) ) + $cropped = _copy_image_file( $attachment_id ); + else + $cropped = get_attached_file( $attachment_id ); + + if ( ! $cropped || is_wp_error( $cropped ) ) + wp_die( __( 'Image could not be processed. Please go back and try again.' ), __( 'Image Processing Error' ) ); $cropped = apply_filters('wp_create_file_in_uploads', $cropped, $attachment_id); // For replication $parent = get_post($attachment_id); $parent_url = $parent->guid; - $url = str_replace(basename($parent_url), basename($cropped), $parent_url); + $url = str_replace( basename( $parent_url ), basename( $cropped ), $parent_url ); + + $size = @getimagesize( $cropped ); + $image_type = ( $size ) ? $size['mime'] : 'image/jpeg'; // Construct the object array $object = array( 'ID' => $attachment_id, 'post_title' => basename($cropped), 'post_content' => $url, - 'post_mime_type' => 'image/jpeg', + 'post_mime_type' => $image_type, 'guid' => $url, 'context' => 'custom-header' ); + if ( ! empty( $_POST['create-new-attachment'] ) ) + unset( $object['ID'] ); // Update the attachment - wp_insert_attachment($object, $cropped); + $attachment_id = wp_insert_attachment( $object, $cropped ); wp_update_attachment_metadata( $attachment_id, wp_generate_attachment_metadata( $attachment_id, $cropped ) ); - update_post_meta( $attachment_id, '_wp_attachment_is_custom_header', get_option('stylesheet' ) ); - set_theme_mod('header_image', $url); + $width = $dst_width; + $height = $dst_height; + $this->set_header_image( compact( 'url', 'attachment_id', 'width', 'height' ) ); // cleanup - $medium = str_replace(basename($original), 'midsize-'.basename($original), $original); - @unlink( apply_filters( 'wp_delete_file', $medium ) ); - @unlink( apply_filters( 'wp_delete_file', $original ) ); + $medium = str_replace( basename( $original ), 'midsize-' . basename( $original ), $original ); + if ( file_exists( $medium ) ) + @unlink( apply_filters( 'wp_delete_file', $medium ) ); + if ( empty( $_POST['create-new-attachment'] ) && empty( $_POST['skip-cropping'] ) ) + @unlink( apply_filters( 'wp_delete_file', $original ) ); return $this->finished(); } @@ -789,13 +921,132 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?> if ( ! current_user_can('edit_theme_options') ) wp_die(__('You do not have permission to customize headers.')); $step = $this->step(); - if ( 1 == $step ) - $this->step_1(); - elseif ( 2 == $step ) + if ( 2 == $step ) $this->step_2(); elseif ( 3 == $step ) $this->step_3(); + else + $this->step_1(); + } + + /** + * Replace default attachment actions with "Set as header" link. + * + * @since 3.4.0 + */ + function attachment_fields_to_edit( $form_fields, $post ) { + $form_fields = array(); + $href = esc_url(add_query_arg(array( + 'page' => 'custom-header', + 'step' => 2, + '_wpnonce-custom-header-upload' => wp_create_nonce('custom-header-upload'), + 'file' => $post->ID + ), admin_url('themes.php'))); + + $form_fields['buttons'] = array( 'tr' => '' . __( 'Set as header' ) . '' ); + $form_fields['context'] = array( 'input' => 'hidden', 'value' => 'custom-header' ); + + return $form_fields; + } + + /** + * Leave only "Media Library" tab in the uploader window. + * + * @since 3.4.0 + */ + function filter_upload_tabs() { + return array( 'library' => __('Media Library') ); + } + + /** + * Choose a header image, selected from existing uploaded and default headers, + * or provide an array of uploaded header data (either new, or from media library). + * + * @param mixed $choice Which header image to select. Allows for values of 'random-default-image', + * for randomly cycling among the default images; 'random-uploaded-image', for randomly cycling + * among the uploaded images; the key of a default image registered for that theme; and + * the key of an image uploaded for that theme (the basename of the URL). + * Or an array of arguments: attachment_id, url, width, height. All are required. + * + * @since 3.4.0 + */ + final public function set_header_image( $choice ) { + if ( is_array( $choice ) || is_object( $choice ) ) { + $choice = (array) $choice; + if ( ! isset( $choice['attachment_id'] ) || ! isset( $choice['url'] ) ) + return; + + $choice['url'] = esc_url_raw( $choice['url'] ); + + $header_image_data = (object) array( + 'attachment_id' => $choice['attachment_id'], + 'url' => $choice['url'], + 'thumbnail_url' => $choice['url'], + 'height' => $choice['height'], + 'width' => $choice['width'], + ); + + update_post_meta( $choice['attachment_id'], '_wp_attachment_is_custom_header', get_stylesheet() ); + set_theme_mod( 'header_image', $choice['url'] ); + set_theme_mod( 'header_image_data', $header_image_data ); + return; + } + + if ( in_array( $choice, array( 'remove-header', 'random-default-image', 'random-uploaded-image' ) ) ) { + set_theme_mod( 'header_image', $choice ); + remove_theme_mod( 'header_image_data' ); + return; + } + + $uploaded = get_uploaded_header_images(); + if ( $uploaded && isset( $uploaded[ $choice ] ) ) { + $header_image_data = $uploaded[ $choice ]; + + } else { + $this->process_default_headers(); + if ( isset( $this->default_headers[ $choice ] ) ) + $header_image_data = $this->default_headers[ $choice ]; + else + return; + } + + set_theme_mod( 'header_image', esc_url_raw( $header_image_data['url'] ) ); + set_theme_mod( 'header_image_data', $header_image_data ); + } + + /** + * Remove a header image. + * + * @since 3.4.0 + */ + final public function remove_header_image() { + return $this->set_header_image( 'remove-header' ); } + /** + * Reset a header image to the default image for the theme. + * + * This method does not do anything if the theme does not have a default header image. + * + * @since 3.4.0 + */ + final public function reset_header_image() { + $this->process_default_headers(); + $default = get_theme_support( 'custom-header', 'default-image' ); + + if ( ! $default ) + return $this->remove_header_image(); + + $default = sprintf( $default, get_template_directory_uri(), get_stylesheet_directory_uri() ); + + foreach ( $this->default_headers as $header => $details ) { + if ( $details['url'] == $default ) { + $default_data = $details; + break; + } + } + + set_theme_mod( 'header_image', $default ); + set_theme_mod( 'header_image_data', (object) $default_data ); + } } -?> diff --git a/wp-admin/customize.php b/wp-admin/customize.php new file mode 100644 index 00000000..3e6a6750 --- /dev/null +++ b/wp-admin/customize.php @@ -0,0 +1,198 @@ +registered; +$wp_scripts = new WP_Scripts; +$wp_scripts->registered = $registered; + +add_action( 'customize_controls_print_scripts', 'print_head_scripts', 20 ); +add_action( 'customize_controls_print_footer_scripts', '_wp_footer_scripts' ); +add_action( 'customize_controls_print_styles', 'print_admin_styles', 20 ); + +do_action( 'customize_controls_init' ); + +wp_enqueue_script( 'customize-controls' ); +wp_enqueue_style( 'customize-controls' ); + +do_action( 'customize_controls_enqueue_scripts' ); + +// Let's roll. +@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset')); + +wp_user_settings(); +_wp_admin_html_begin(); + +$body_class = ''; + +if ( wp_is_mobile() ) : + $body_class .= ' mobile'; + + ?>theme()->display('Name') ) ) ); +?><?php echo $admin_title; ?> + + +
+
+ get_stylesheet() ); ?> +
+ is_theme_active() ? __( 'Save & Publish' ) : __( 'Save & Activate' ); + submit_button( $save_text, 'primary', 'save', false ); + ?> + + + + +
+ + theme()->get_screenshot(); + $cannot_expand = ! ( $screenshot || $wp_customize->theme()->get('Description') ); + ?> + +
+
+
+ ' . $wp_customize->theme()->display('Name') . '' ); + ?> +
+ +
+ + + + + theme()->get('Description') ): ?> +
theme()->display('Description'); ?>
+ +
+ +
+ +
    + sections() as $section ) + $section->maybe_render(); + ?> +
+
+ + +
+
+ 1, + 'template' => $wp_customize->get_template(), + 'stylesheet' => $wp_customize->get_stylesheet(), + 'preview_iframe' => true, + 'TB_iframe' => 'true' + ), home_url( '/' ) ); + + $login_url = add_query_arg( array( + 'interim-login' => 1, + 'customize-login' => 1 + ), wp_login_url() ); + + $settings = array( + 'theme' => array( + 'stylesheet' => $wp_customize->get_stylesheet(), + 'active' => $wp_customize->is_theme_active(), + ), + 'url' => array( + 'preview' => esc_url( $url ? $url : home_url( '/' ) ), + 'parent' => esc_url( admin_url() ), + 'activated' => admin_url( 'themes.php?activated=true&previewed' ), + 'ajax' => esc_url( admin_url( 'admin-ajax.php', 'relative' ) ), + 'allowed' => array_map( 'esc_url', $allowed_urls ), + 'isCrossDomain' => $cross_domain, + 'fallback' => $fallback_url, + 'home' => esc_url( home_url( '/' ) ), + 'login' => $login_url, + ), + 'browser' => array( + 'mobile' => wp_is_mobile(), + 'ios' => $is_ios, + ), + 'settings' => array(), + 'controls' => array(), + ); + + foreach ( $wp_customize->settings() as $id => $setting ) { + $settings['settings'][ $id ] = array( + 'value' => $setting->js_value(), + 'transport' => $setting->transport, + ); + } + + foreach ( $wp_customize->controls() as $id => $control ) { + $control->to_json(); + $settings['controls'][ $id ] = $control->json; + } + + ?> + +
+ + diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index 224d3674..100d0230 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -121,13 +121,11 @@ get_current_screen()->add_help_tab( array( 'id' => 'moderating-comments', 'title' => __('Moderating Comments'), 'content' => - '
    ' . - '
  • ' . __( 'A yellow row means the comment is waiting for you to moderate it.' ) . '
  • ' . - '
  • ' . __( 'In the Author column, in addition to the author’s name, email address, and blog URL, the commenter’s IP address is shown. Clicking on this link will show you all the comments made from this IP address.' ) . '
  • ' . - '
  • ' . __( 'In the Comment column, above each comment it says “Submitted on,” followed by the date and time the comment was left on your site. Clicking on the date/time link will take you to that comment on your live site. Hovering over any comment gives you options to approve, reply (and approve), quick edit, edit, spam mark, or trash that comment.' ) . '
  • ' . - '
  • ' . __( 'In the In Response To column, there are three elements. The text is the name of the post that inspired the comment, and links to the post editor for that entry. The View Post link leads to that post on your live site. The small bubble with the number in it shows how many comments that post has received. If the bubble is gray, you have moderated all comments for that post. If it is blue, there are pending comments. Clicking the bubble will filter the comments screen to show only comments on that post.' ) . '
  • ' . - '
  • ' . __( 'Many people take advantage of keyboard shortcuts to moderate their comments more quickly. Use the link to the side to learn more.' ) . '
  • ' . - '
' + '

' . __( 'A yellow row means the comment is waiting for you to moderate it.' ) . '

' . + '

' . __( 'In the Author column, in addition to the author’s name, email address, and blog URL, the commenter’s IP address is shown. Clicking on this link will show you all the comments made from this IP address.' ) . '

' . + '

' . __( 'In the Comment column, above each comment it says “Submitted on,” followed by the date and time the comment was left on your site. Clicking on the date/time link will take you to that comment on your live site. Hovering over any comment gives you options to approve, reply (and approve), quick edit, edit, spam mark, or trash that comment.' ) . '

' . + '

' . __( 'In the In Response To column, there are three elements. The text is the name of the post that inspired the comment, and links to the post editor for that entry. The View Post link leads to that post on your live site. The small bubble with the number in it shows how many comments that post has received. If the bubble is gray, you have moderated all comments for that post. If it is blue, there are pending comments. Clicking the bubble will filter the comments screen to show only comments on that post.' ) . '

' . + '

' . __( 'Many people take advantage of keyboard shortcuts to moderate their comments more quickly. Use the link to the side to learn more.' ) . '

' ) ); get_current_screen()->set_help_sidebar( diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index ec6f4ca3..c22c68aa 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -12,6 +12,9 @@ if ( !defined('ABSPATH') ) wp_enqueue_script('post'); +if ( wp_is_mobile() ) + wp_enqueue_script( 'jquery-touch-punch' ); + if ( post_type_supports($post_type, 'editor') || post_type_supports($post_type, 'thumbnail') ) { add_thickbox(); wp_enqueue_script('media-upload'); @@ -87,7 +90,7 @@ $form_extra .= "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( __( 'There is an autosave of this post that is more recent than the version below. View the autosave' ), 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; } } @@ -240,7 +243,7 @@ if ( 'post' == $post_type ) { require_once('./admin-header.php'); ?> -
+

labels->add_new); ?>

@@ -272,17 +275,9 @@ wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?> -
-
- -
+
-
+
@@ -338,25 +333,41 @@ wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false );
+ +
+
+
+
+ - -
+?>
+ +

diff --git a/wp-admin/edit-form-comment.php b/wp-admin/edit-form-comment.php index 37772e3c..2340baf4 100644 --- a/wp-admin/edit-form-comment.php +++ b/wp-admin/edit-form-comment.php @@ -9,28 +9,67 @@ // don't load directly if ( !defined('ABSPATH') ) die('-1'); - -/** - * @var string - */ -$submitbutton_text = __('Edit Comment'); -$toprow_title = sprintf(__('Editing Comment # %s'), $comment->comment_ID); -$form_action = 'editedcomment'; -$form_extra = "' />\n\ncomment_ID) ?>

-
- - +
+ + + + + +
+
+
+

+
+ + + + + + + + + + + + + + + +
+ comment_author_email ) { + printf( __( 'E-mail (%s):' ), get_comment_author_email_link( __( 'send e-mail' ), '', '' ) ); + } else { + _e( 'E-mail:' ); + } +?>
+ comment_author_url ) && 'http://' != $comment->comment_author_url ) { + $link = '' . __('visit site') . ''; + printf( __( 'URL (%s):' ), apply_filters('get_comment_author_link', $link ) ); + } else { + _e( 'URL:' ); + } ?>
+
+
+
+ +
+ 'strong,em,link,block,del,ins,img,ul,ol,li,code,spell,close' ); + wp_editor( $comment->comment_content, 'content', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings ) ); + wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?> +
+
-
+

@@ -52,7 +91,7 @@ $comment->comment_author_email = esc_attr($comment->comment_author_email);
-
+
comment_date ) );
-
+
-
-
-
-

-
- - - - - - - - - - - - - - - -
- comment_author_email ) { - printf( __( 'E-mail (%s):' ), get_comment_author_email_link( __( 'send e-mail' ), '', '' ) ); - } else { - _e( 'E-mail:' ); - } -?>
- comment_author_url ) && 'http://' != $comment->comment_author_url ) { - $link = '' . __('visit site') . ''; - printf( __( 'URL (%s):' ), apply_filters('get_comment_author_link', $link ) ); - } else { - _e( 'URL:' ); - } ?>
-
-
-
- -
+
'strong,em,link,block,del,ins,img,ul,ol,li,code,spell,close' ); - wp_editor( $comment->comment_content, 'content', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings ) ); - wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?> -
- +
+ -
-
+
diff --git a/wp-admin/edit-link-form.php b/wp-admin/edit-link-form.php index a6051ce1..4ae317b8 100644 --- a/wp-admin/edit-link-form.php +++ b/wp-admin/edit-link-form.php @@ -57,7 +57,7 @@ get_current_screen()->set_help_sidebar( require_once ('admin-header.php'); ?> -
+

@@ -75,17 +75,9 @@ wp_nonce_field( $nonce_action ); wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?> -
-
- -
+
-
+

@@ -110,18 +102,27 @@ if ( 1 != $screen_layout_columns ) {

+
+
+
+
+ +
+ @@ -131,7 +132,6 @@ if ( $link_id ) : ?> -
diff --git a/wp-admin/edit-tag-form.php b/wp-admin/edit-tag-form.php index 92f074a7..24efd82f 100644 --- a/wp-admin/edit-tag-form.php +++ b/wp-admin/edit-tag-form.php @@ -24,7 +24,7 @@ elseif ( 'link_category' == $taxonomy ) else do_action('edit_tag_form_pre', $tag); -do_action($taxonomy . '_pre_edit_form', $tag, $taxonomy); ?> +do_action($taxonomy . '_pre_edit_form', $tag, $taxonomy); ?>
@@ -52,16 +52,16 @@ do_action($taxonomy . '_pre_edit_form', $tag, $taxonomy); ?> - 0, 'hide_if_empty' => false, 'name' => 'parent', 'orderby' => 'name', 'taxonomy' => $taxonomy, 'selected' => $tag->parent, 'exclude_tree' => $tag->term_id, 'hierarchical' => true, 'show_option_none' => __('None'))); ?>
+ 0, 'hide_if_empty' => false, 'name' => 'parent', 'orderby' => 'name', 'taxonomy' => $taxonomy, 'selected' => $tag->parent, 'exclude_tree' => $tag->term_id, 'hierarchical' => true, 'show_option_none' => __('None'))); ?> - +

-
+
cap->delete_terms ) ) wp_die( __( 'Cheatin’ uh?' ) ); @@ -416,5 +416,3 @@ break; } include('./admin-footer.php'); - -?> diff --git a/wp-admin/edit.php b/wp-admin/edit.php index b3b6b2e8..ab16be08 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -133,7 +133,7 @@ if ( $doaction ) { break; } - $sendback = remove_query_arg( array('action', 'action2', 'tags_input', 'post_author', 'comment_status', 'ping_status', '_status', 'post', 'bulk_edit', 'post_view'), $sendback ); + $sendback = remove_query_arg( array('action', 'action2', 'tags_input', 'post_author', 'comment_status', 'ping_status', '_status', 'post', 'bulk_edit', 'post_view'), $sendback ); wp_redirect($sendback); exit(); @@ -222,49 +222,41 @@ require_once('./admin-header.php');

labels->name ); ?> labels->add_new); ?> ' . __('Search results for “%s”') . '', get_search_query() ); ?>

-

-' . __('Undo') . ''; - unset($_REQUEST['trashed']); } -if ( isset($_REQUEST['untrashed']) && (int) $_REQUEST['untrashed'] ) { - $messages[] = sprintf( _n( 'Item restored from the Trash.', '%s items restored from the Trash.', $_REQUEST['untrashed'] ), number_format_i18n( $_REQUEST['untrashed'] ) ); - unset($_REQUEST['undeleted']); +if ( isset( $_REQUEST['untrashed'] ) && $untrashed = absint( $_REQUEST['untrashed'] ) ) { + $messages[] = sprintf( _n( 'Item restored from the Trash.', '%s items restored from the Trash.', $untrashed ), number_format_i18n( $untrashed ) ); } if ( $messages ) echo join( ' ', $messages ); unset( $messages ); -$_SERVER['REQUEST_URI'] = remove_query_arg( array('locked', 'skipped', 'updated', 'deleted', 'trashed', 'untrashed'), $_SERVER['REQUEST_URI'] ); +$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'locked', 'skipped', 'updated', 'deleted', 'trashed', 'untrashed' ), $_SERVER['REQUEST_URI'] ); ?>

diff --git a/wp-admin/export.php b/wp-admin/export.php index 70065524..8257b518 100644 --- a/wp-admin/export.php +++ b/wp-admin/export.php @@ -41,7 +41,7 @@ add_action( 'admin_head', 'add_js' ); get_current_screen()->add_help_tab( array( 'id' => 'overview', 'title' => __('Overview'), - 'content' => '

' . __('You can export a file of your site’s content in order to import it into another installation or platform. The export file will be an XML file format called WXR. Posts, pages, comments, custom fields, categories, and tags can be included. You can choose for the WXR file to include only certain posts or pages by setting the dropdown filters to limit the export by category, author, date range by month, or publishing status.') . '

' . + 'content' => '

' . __('You can export a file of your site’s content in order to import it into another installation or platform. The export file will be an XML file format called WXR. Posts, pages, comments, custom fields, categories, and tags can be included. You can choose for the WXR file to include only certain posts or pages by setting the dropdown filters to limit the export by category, author, date range by month, or publishing status.') . '

' . '

' . __('Once generated, your WXR file can be imported by another WordPress site or by another blogging platform able to access this format.') . '

', ) ); @@ -95,15 +95,15 @@ if ( isset( $_GET['download'] ) ) { require_once ('admin-header.php'); -function export_date_options() { +function export_date_options( $post_type = 'post' ) { global $wpdb, $wp_locale; - $months = $wpdb->get_results( " + $months = $wpdb->get_results( $wpdb->prepare( " SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month FROM $wpdb->posts - WHERE post_type = 'post' AND post_status != 'auto-draft' + WHERE post_type = %s AND post_status != 'auto-draft' ORDER BY post_date DESC - " ); + ", $post_type ) ); $month_count = count( $months ); if ( !$month_count || ( 1 == $month_count && 0 == $months[0]->month ) ) @@ -130,8 +130,8 @@ function export_date_options() {

-

-

+

+

    @@ -182,11 +182,11 @@ function export_date_options() {
  • diff --git a/wp-admin/freedoms.php b/wp-admin/freedoms.php index fa7d4e50..99251dcf 100644 --- a/wp-admin/freedoms.php +++ b/wp-admin/freedoms.php @@ -13,13 +13,13 @@ $title = __( 'Freedoms' ); list( $display_version ) = explode( '-', $wp_version ); -include( './admin-header.php' ); +include( ABSPATH . 'wp-admin/admin-header.php' ); ?>

    -
    +
    @@ -54,4 +54,4 @@ printf( __( 'Every plugin and theme in WordPress.org’s directory is 100%%

    Free Software Foundation.' ); ?>

    - + diff --git a/wp-admin/images/gray-star.png b/wp-admin/images/gray-star.png deleted file mode 100644 index a32b058b..00000000 Binary files a/wp-admin/images/gray-star.png and /dev/null differ diff --git a/wp-admin/images/icons32-2x.png b/wp-admin/images/icons32-2x.png new file mode 100644 index 00000000..3cccb7b4 Binary files /dev/null and b/wp-admin/images/icons32-2x.png differ diff --git a/wp-admin/images/icons32-vs-2x.png b/wp-admin/images/icons32-vs-2x.png new file mode 100644 index 00000000..8975737d Binary files /dev/null and b/wp-admin/images/icons32-vs-2x.png differ diff --git a/wp-admin/images/logo-login.png b/wp-admin/images/logo-login.png deleted file mode 100644 index 497f683c..00000000 Binary files a/wp-admin/images/logo-login.png and /dev/null differ diff --git a/wp-admin/images/menu-2x.png b/wp-admin/images/menu-2x.png new file mode 100644 index 00000000..c8f5da9b Binary files /dev/null and b/wp-admin/images/menu-2x.png differ diff --git a/wp-admin/images/menu.png b/wp-admin/images/menu.png index 8da666e8..bbb1c50e 100644 Binary files a/wp-admin/images/menu.png and b/wp-admin/images/menu.png differ diff --git a/wp-admin/images/press-this.png b/wp-admin/images/press-this.png index 26c96975..12415620 100644 Binary files a/wp-admin/images/press-this.png and b/wp-admin/images/press-this.png differ diff --git a/wp-admin/images/screenshots/admin-flyouts.png b/wp-admin/images/screenshots/admin-flyouts.png deleted file mode 100644 index 92871e18..00000000 Binary files a/wp-admin/images/screenshots/admin-flyouts.png and /dev/null differ diff --git a/wp-admin/images/screenshots/captions-1.png b/wp-admin/images/screenshots/captions-1.png new file mode 100644 index 00000000..73dbb48f Binary files /dev/null and b/wp-admin/images/screenshots/captions-1.png differ diff --git a/wp-admin/images/screenshots/captions-2.png b/wp-admin/images/screenshots/captions-2.png new file mode 100644 index 00000000..653ed540 Binary files /dev/null and b/wp-admin/images/screenshots/captions-2.png differ diff --git a/wp-admin/images/screenshots/coediting.png b/wp-admin/images/screenshots/coediting.png deleted file mode 100644 index 4f30c677..00000000 Binary files a/wp-admin/images/screenshots/coediting.png and /dev/null differ diff --git a/wp-admin/images/screenshots/drag-and-drop.png b/wp-admin/images/screenshots/drag-and-drop.png deleted file mode 100644 index 4f52758a..00000000 Binary files a/wp-admin/images/screenshots/drag-and-drop.png and /dev/null differ diff --git a/wp-admin/images/screenshots/flex-header-1.png b/wp-admin/images/screenshots/flex-header-1.png new file mode 100644 index 00000000..371a2843 Binary files /dev/null and b/wp-admin/images/screenshots/flex-header-1.png differ diff --git a/wp-admin/images/screenshots/flex-header-2.png b/wp-admin/images/screenshots/flex-header-2.png new file mode 100644 index 00000000..5cee0553 Binary files /dev/null and b/wp-admin/images/screenshots/flex-header-2.png differ diff --git a/wp-admin/images/screenshots/flex-header-3.png b/wp-admin/images/screenshots/flex-header-3.png new file mode 100644 index 00000000..a45f1c9b Binary files /dev/null and b/wp-admin/images/screenshots/flex-header-3.png differ diff --git a/wp-admin/images/screenshots/flex-header-media-library.png b/wp-admin/images/screenshots/flex-header-media-library.png new file mode 100644 index 00000000..d63012da Binary files /dev/null and b/wp-admin/images/screenshots/flex-header-media-library.png differ diff --git a/wp-admin/images/screenshots/help-screen.png b/wp-admin/images/screenshots/help-screen.png deleted file mode 100644 index 02f0d9a7..00000000 Binary files a/wp-admin/images/screenshots/help-screen.png and /dev/null differ diff --git a/wp-admin/images/screenshots/media-icon.png b/wp-admin/images/screenshots/media-icon.png deleted file mode 100644 index 9f97564a..00000000 Binary files a/wp-admin/images/screenshots/media-icon.png and /dev/null differ diff --git a/wp-admin/images/screenshots/new-feature-pointer.png b/wp-admin/images/screenshots/new-feature-pointer.png deleted file mode 100644 index fbcd5a68..00000000 Binary files a/wp-admin/images/screenshots/new-feature-pointer.png and /dev/null differ diff --git a/wp-admin/images/screenshots/theme-customizer.png b/wp-admin/images/screenshots/theme-customizer.png new file mode 100644 index 00000000..fa62d889 Binary files /dev/null and b/wp-admin/images/screenshots/theme-customizer.png differ diff --git a/wp-admin/images/screenshots/twitter-embed-1.png b/wp-admin/images/screenshots/twitter-embed-1.png new file mode 100644 index 00000000..d79ee1d7 Binary files /dev/null and b/wp-admin/images/screenshots/twitter-embed-1.png differ diff --git a/wp-admin/images/screenshots/twitter-embed-2.png b/wp-admin/images/screenshots/twitter-embed-2.png new file mode 100644 index 00000000..14da4b82 Binary files /dev/null and b/wp-admin/images/screenshots/twitter-embed-2.png differ diff --git a/wp-admin/images/screenshots/welcome-screen.png b/wp-admin/images/screenshots/welcome-screen.png deleted file mode 100644 index 5f6d15f7..00000000 Binary files a/wp-admin/images/screenshots/welcome-screen.png and /dev/null differ diff --git a/wp-admin/images/star.png b/wp-admin/images/star.png deleted file mode 100644 index 4ca52614..00000000 Binary files a/wp-admin/images/star.png and /dev/null differ diff --git a/wp-admin/images/stars-rtl.png b/wp-admin/images/stars-rtl.png new file mode 100644 index 00000000..c6330b62 Binary files /dev/null and b/wp-admin/images/stars-rtl.png differ diff --git a/wp-admin/images/stars.png b/wp-admin/images/stars.png new file mode 100644 index 00000000..98e32a59 Binary files /dev/null and b/wp-admin/images/stars.png differ diff --git a/wp-admin/images/wordpress-logo-2x.png b/wp-admin/images/wordpress-logo-2x.png new file mode 100644 index 00000000..6679e11d Binary files /dev/null and b/wp-admin/images/wordpress-logo-2x.png differ diff --git a/wp-admin/images/wordpress-logo.png b/wp-admin/images/wordpress-logo.png index 7421f219..849a2d0b 100644 Binary files a/wp-admin/images/wordpress-logo.png and b/wp-admin/images/wordpress-logo.png differ diff --git a/wp-admin/images/wp-badge-2x.png b/wp-admin/images/wp-badge-2x.png new file mode 100644 index 00000000..6dfb577e Binary files /dev/null and b/wp-admin/images/wp-badge-2x.png differ diff --git a/wp-admin/import.php b/wp-admin/import.php index f9d81370..a9de2654 100644 --- a/wp-admin/import.php +++ b/wp-admin/import.php @@ -20,10 +20,9 @@ get_current_screen()->add_help_tab( array( 'id' => 'overview', 'title' => __('Overview'), 'content' => '

    ' . __('This screen lists links to plugins to import data from blogging/content management platforms. Choose the platform you want to import from, and click Install Now when you are prompted in the popup window. If your platform is not listed, click the link to search the plugin directory for other importer plugins to see if there is one for your platform.') . '

    ' . - '

    ' . __('In previous versions of WordPress, all importers were built-in. They have been turned into plugins since most people only use them once or infrequently.') . '

    ', + '

    ' . __('In previous versions of WordPress, all importers were built-in. They have been turned into plugins since most people only use them once or infrequently.') . '

    ', ) ); - get_current_screen()->set_help_sidebar( '

    ' . __('For more information:') . '

    ' . '

    ' . __('Documentation on Import') . '

    ' . @@ -138,4 +137,3 @@ if ( current_user_can('install_plugins') ) diff --git a/wp-admin/includes/admin.php b/wp-admin/includes/admin.php index 5f5190d8..439fcdb8 100644 --- a/wp-admin/includes/admin.php +++ b/wp-admin/includes/admin.php @@ -6,6 +6,13 @@ * @subpackage Administration */ +if ( ! defined('WP_ADMIN') ) { + // This file is being included from a file other than wp-admin/admin.php, so + // some setup was skipped. Make sure the admin message catalog is loaded since + // load_default_textdomain() will not have done so in this context. + load_textdomain( 'default', WP_LANG_DIR . '/admin-' . get_locale() . '.mo' ); +} + /** WordPress Bookmark Administration API */ require_once(ABSPATH . 'wp-admin/includes/bookmark.php'); @@ -63,5 +70,3 @@ if ( is_multisite() ) { require_once(ABSPATH . 'wp-admin/includes/ms.php'); require_once(ABSPATH . 'wp-admin/includes/ms-deprecated.php'); } - -?> diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php new file mode 100644 index 00000000..5ced9016 --- /dev/null +++ b/wp-admin/includes/ajax-actions.php @@ -0,0 +1,1787 @@ +ALERT: You are logged out! Could not save draft. Please log in again.'), wp_login_url() ); + $x = new WP_Ajax_Response( array( + 'what' => 'autosave', + 'id' => $id, + 'data' => $message + ) ); + $x->send(); +} + +/* + * GET-based Ajax handlers. + */ +function wp_ajax_fetch_list() { + global $current_screen, $wp_list_table; + + $list_class = $_GET['list_args']['class']; + check_ajax_referer( "fetch-list-$list_class", '_ajax_fetch_list_nonce' ); + + $current_screen = convert_to_screen( $_GET['list_args']['screen']['id'] ); + + define( 'WP_NETWORK_ADMIN', $current_screen->is_network ); + define( 'WP_USER_ADMIN', $current_screen->is_user ); + + $wp_list_table = _get_list_table( $list_class ); + if ( ! $wp_list_table ) + wp_die( 0 ); + + if ( ! $wp_list_table->ajax_user_can() ) + wp_die( -1 ); + + $wp_list_table->ajax_response(); + + wp_die( 0 ); +} +function wp_ajax_ajax_tag_search() { + global $wpdb; + + if ( isset( $_GET['tax'] ) ) { + $taxonomy = sanitize_key( $_GET['tax'] ); + $tax = get_taxonomy( $taxonomy ); + if ( ! $tax ) + wp_die( 0 ); + if ( ! current_user_can( $tax->cap->assign_terms ) ) + wp_die( -1 ); + } else { + wp_die( 0 ); + } + + $s = stripslashes( $_GET['q'] ); + + $comma = _x( ',', 'tag delimiter' ); + if ( ',' !== $comma ) + $s = str_replace( $comma, ',', $s ); + if ( false !== strpos( $s, ',' ) ) { + $s = explode( ',', $s ); + $s = $s[count( $s ) - 1]; + } + $s = trim( $s ); + if ( strlen( $s ) < 2 ) + wp_die(); // require 2 chars for matching + + $results = $wpdb->get_col( $wpdb->prepare( "SELECT t.name FROM $wpdb->term_taxonomy AS tt INNER JOIN $wpdb->terms AS t ON tt.term_id = t.term_id WHERE tt.taxonomy = %s AND t.name LIKE (%s)", $taxonomy, '%' . like_escape( $s ) . '%' ) ); + + echo join( $results, "\n" ); + wp_die(); +} + +function wp_ajax_wp_compression_test() { + if ( !current_user_can( 'manage_options' ) ) + wp_die( -1 ); + + if ( ini_get('zlib.output_compression') || 'ob_gzhandler' == ini_get('output_handler') ) { + update_site_option('can_compress_scripts', 0); + wp_die( 0 ); + } + + if ( isset($_GET['test']) ) { + header( 'Expires: Wed, 11 Jan 1984 05:00:00 GMT' ); + header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); + header( 'Cache-Control: no-cache, must-revalidate, max-age=0' ); + header( 'Pragma: no-cache' ); + header('Content-Type: application/x-javascript; charset=UTF-8'); + $force_gzip = ( defined('ENFORCE_GZIP') && ENFORCE_GZIP ); + $test_str = '"wpCompressionTest Lorem ipsum dolor sit amet consectetuer mollis sapien urna ut a. Eu nonummy condimentum fringilla tempor pretium platea vel nibh netus Maecenas. Hac molestie amet justo quis pellentesque est ultrices interdum nibh Morbi. Cras mattis pretium Phasellus ante ipsum ipsum ut sociis Suspendisse Lorem. Ante et non molestie. Porta urna Vestibulum egestas id congue nibh eu risus gravida sit. Ac augue auctor Ut et non a elit massa id sodales. Elit eu Nulla at nibh adipiscing mattis lacus mauris at tempus. Netus nibh quis suscipit nec feugiat eget sed lorem et urna. Pellentesque lacus at ut massa consectetuer ligula ut auctor semper Pellentesque. Ut metus massa nibh quam Curabitur molestie nec mauris congue. Volutpat molestie elit justo facilisis neque ac risus Ut nascetur tristique. Vitae sit lorem tellus et quis Phasellus lacus tincidunt nunc Fusce. Pharetra wisi Suspendisse mus sagittis libero lacinia Integer consequat ac Phasellus. Et urna ac cursus tortor aliquam Aliquam amet tellus volutpat Vestibulum. Justo interdum condimentum In augue congue tellus sollicitudin Quisque quis nibh."'; + + if ( 1 == $_GET['test'] ) { + echo $test_str; + wp_die(); + } elseif ( 2 == $_GET['test'] ) { + if ( !isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) + wp_die( -1 ); + if ( false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) { + header('Content-Encoding: deflate'); + $out = gzdeflate( $test_str, 1 ); + } elseif ( false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) { + header('Content-Encoding: gzip'); + $out = gzencode( $test_str, 1 ); + } else { + wp_die( -1 ); + } + echo $out; + wp_die(); + } elseif ( 'no' == $_GET['test'] ) { + update_site_option('can_compress_scripts', 0); + } elseif ( 'yes' == $_GET['test'] ) { + update_site_option('can_compress_scripts', 1); + } + } + + wp_die( 0 ); +} + +function wp_ajax_imgedit_preview() { + $post_id = intval($_GET['postid']); + if ( empty($post_id) || !current_user_can('edit_post', $post_id) ) + wp_die( -1 ); + + check_ajax_referer( "image_editor-$post_id" ); + + include_once( ABSPATH . 'wp-admin/includes/image-edit.php' ); + if ( ! stream_preview_image($post_id) ) + wp_die( -1 ); + + wp_die(); +} + +function wp_ajax_oembed_cache() { + global $wp_embed; + + $return = ( $wp_embed->cache_oembed( $_GET['post'] ) ) ? '1' : '0'; + wp_die( $return ); +} + +function wp_ajax_autocomplete_user() { + if ( ! is_multisite() || ! current_user_can( 'promote_users' ) || wp_is_large_network( 'users' ) ) + wp_die( -1 ); + + if ( ! is_super_admin() && ! apply_filters( 'autocomplete_users_for_site_admins', false ) ) + wp_die( -1 ); + + $return = array(); + + // Check the type of request + if ( isset( $_REQUEST['autocomplete_type'] ) ) + $type = $_REQUEST['autocomplete_type']; + else + $type = 'add'; + + // Exclude current users of this blog + if ( isset( $_REQUEST['site_id'] ) ) + $id = absint( $_REQUEST['site_id'] ); + else + $id = get_current_blog_id(); + + $include_blog_users = ( $type == 'search' ? get_users( array( 'blog_id' => $id, 'fields' => 'ID' ) ) : array() ); + $exclude_blog_users = ( $type == 'add' ? get_users( array( 'blog_id' => $id, 'fields' => 'ID' ) ) : array() ); + + $users = get_users( array( + 'blog_id' => false, + 'search' => '*' . $_REQUEST['term'] . '*', + 'include' => $include_blog_users, + 'exclude' => $exclude_blog_users, + 'search_columns' => array( 'user_login', 'user_nicename', 'user_email' ), + ) ); + + foreach ( $users as $user ) { + $return[] = array( + /* translators: 1: user_login, 2: user_email */ + 'label' => sprintf( __( '%1$s (%2$s)' ), $user->user_login, $user->user_email ), + 'value' => $user->user_login, + ); + } + + wp_die( json_encode( $return ) ); +} + +function wp_ajax_dashboard_widgets() { + require ABSPATH . 'wp-admin/includes/dashboard.php'; + + switch ( $_GET['widget'] ) { + case 'dashboard_incoming_links' : + wp_dashboard_incoming_links(); + break; + case 'dashboard_primary' : + wp_dashboard_primary(); + break; + case 'dashboard_secondary' : + wp_dashboard_secondary(); + break; + case 'dashboard_plugins' : + wp_dashboard_plugins(); + break; + } + wp_die(); +} + +function wp_ajax_logged_in() { + wp_die( 1 ); +} + +/* + * Ajax helper. + */ + +/** + * Sends back current comment total and new page links if they need to be updated. + * + * Contrary to normal success AJAX response ("1"), die with time() on success. + * + * @since 2.7 + * + * @param int $comment_id + * @return die + */ +function _wp_ajax_delete_comment_response( $comment_id, $delta = -1 ) { + $total = (int) @$_POST['_total']; + $per_page = (int) @$_POST['_per_page']; + $page = (int) @$_POST['_page']; + $url = esc_url_raw( @$_POST['_url'] ); + // JS didn't send us everything we need to know. Just die with success message + if ( !$total || !$per_page || !$page || !$url ) + wp_die( time() ); + + $total += $delta; + if ( $total < 0 ) + $total = 0; + + // Only do the expensive stuff on a page-break, and about 1 other time per page + if ( 0 == $total % $per_page || 1 == mt_rand( 1, $per_page ) ) { + $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($post_id); + + if ( isset( $comment_count->$status ) ) // We're looking for a known type of comment count + $total = $comment_count->$status; + // else use the decremented value from above + } + + $time = time(); // The time since the last comment count + + $x = new WP_Ajax_Response( array( + 'what' => 'comment', + 'id' => $comment_id, // here for completeness - not used + 'supplemental' => array( + 'total_items_i18n' => sprintf( _n( '1 item', '%s items', $total ), number_format_i18n( $total ) ), + 'total_pages' => ceil( $total / $per_page ), + 'total_pages_i18n' => number_format_i18n( ceil( $total / $per_page ) ), + 'total' => $total, + 'time' => $time + ) + ) ); + $x->send(); +} + +/* + * POST-based Ajax handlers. + */ + +function _wp_ajax_add_hierarchical_term() { + $action = $_POST['action']; + $taxonomy = get_taxonomy(substr($action, 4)); + check_ajax_referer( $action, '_ajax_nonce-add-' . $taxonomy->name ); + if ( !current_user_can( $taxonomy->cap->edit_terms ) ) + wp_die( -1 ); + $names = explode(',', $_POST['new'.$taxonomy->name]); + $parent = isset($_POST['new'.$taxonomy->name.'_parent']) ? (int) $_POST['new'.$taxonomy->name.'_parent'] : 0; + if ( 0 > $parent ) + $parent = 0; + if ( $taxonomy->name == 'category' ) + $post_category = isset($_POST['post_category']) ? (array) $_POST['post_category'] : array(); + else + $post_category = ( isset($_POST['tax_input']) && isset($_POST['tax_input'][$taxonomy->name]) ) ? (array) $_POST['tax_input'][$taxonomy->name] : array(); + $checked_categories = array_map( 'absint', (array) $post_category ); + $popular_ids = wp_popular_terms_checklist($taxonomy->name, 0, 10, false); + + foreach ( $names as $cat_name ) { + $cat_name = trim($cat_name); + $category_nicename = sanitize_title($cat_name); + if ( '' === $category_nicename ) + continue; + if ( !$cat_id = term_exists( $cat_name, $taxonomy->name, $parent ) ) + $cat_id = wp_insert_term( $cat_name, $taxonomy->name, array( 'parent' => $parent ) ); + if ( is_wp_error( $cat_id ) ) + continue; + else if ( is_array( $cat_id ) ) + $cat_id = $cat_id['term_id']; + $checked_categories[] = $cat_id; + if ( $parent ) // Do these all at once in a second + continue; + ob_start(); + wp_terms_checklist( 0, array( 'taxonomy' => $taxonomy->name, 'descendants_and_self' => $cat_id, 'selected_cats' => $checked_categories, 'popular_cats' => $popular_ids )); + $data = ob_get_contents(); + ob_end_clean(); + $add = array( + 'what' => $taxonomy->name, + 'id' => $cat_id, + 'data' => str_replace( array("\n", "\t"), '', $data), + 'position' => -1 + ); + } + + if ( $parent ) { // Foncy - replace the parent and all its children + $parent = get_term( $parent, $taxonomy->name ); + $term_id = $parent->term_id; + + while ( $parent->parent ) { // get the top parent + $parent = &get_term( $parent->parent, $taxonomy->name ); + if ( is_wp_error( $parent ) ) + break; + $term_id = $parent->term_id; + } + + ob_start(); + wp_terms_checklist( 0, array('taxonomy' => $taxonomy->name, 'descendants_and_self' => $term_id, 'selected_cats' => $checked_categories, 'popular_cats' => $popular_ids)); + $data = ob_get_contents(); + ob_end_clean(); + $add = array( + 'what' => $taxonomy->name, + 'id' => $term_id, + 'data' => str_replace( array("\n", "\t"), '', $data), + 'position' => -1 + ); + } + + ob_start(); + wp_dropdown_categories( array( + 'taxonomy' => $taxonomy->name, 'hide_empty' => 0, 'name' => 'new'.$taxonomy->name.'_parent', 'orderby' => 'name', + 'hierarchical' => 1, 'show_option_none' => '— '.$taxonomy->labels->parent_item.' —' + ) ); + $sup = ob_get_contents(); + ob_end_clean(); + $add['supplemental'] = array( 'newcat_parent' => $sup ); + + $x = new WP_Ajax_Response( $add ); + $x->send(); +} + +function wp_ajax_delete_comment() { + $id = isset( $_POST['id'] ) ? (int) $_POST['id'] : 0; + + if ( !$comment = get_comment( $id ) ) + wp_die( time() ); + if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) ) + wp_die( -1 ); + + check_ajax_referer( "delete-comment_$id" ); + $status = wp_get_comment_status( $comment->comment_ID ); + + $delta = -1; + if ( isset($_POST['trash']) && 1 == $_POST['trash'] ) { + if ( 'trash' == $status ) + wp_die( time() ); + $r = wp_trash_comment( $comment->comment_ID ); + } elseif ( isset($_POST['untrash']) && 1 == $_POST['untrash'] ) { + if ( 'trash' != $status ) + wp_die( time() ); + $r = wp_untrash_comment( $comment->comment_ID ); + if ( ! isset( $_POST['comment_status'] ) || $_POST['comment_status'] != 'trash' ) // undo trash, not in trash + $delta = 1; + } elseif ( isset($_POST['spam']) && 1 == $_POST['spam'] ) { + if ( 'spam' == $status ) + wp_die( time() ); + $r = wp_spam_comment( $comment->comment_ID ); + } elseif ( isset($_POST['unspam']) && 1 == $_POST['unspam'] ) { + if ( 'spam' != $status ) + wp_die( time() ); + $r = wp_unspam_comment( $comment->comment_ID ); + if ( ! isset( $_POST['comment_status'] ) || $_POST['comment_status'] != 'spam' ) // undo spam, not in spam + $delta = 1; + } elseif ( isset($_POST['delete']) && 1 == $_POST['delete'] ) { + $r = wp_delete_comment( $comment->comment_ID ); + } else { + wp_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, $delta ); + wp_die( 0 ); +} + +function wp_ajax_delete_tag() { + $tag_id = (int) $_POST['tag_ID']; + check_ajax_referer( "delete-tag_$tag_id" ); + + $taxonomy = !empty($_POST['taxonomy']) ? $_POST['taxonomy'] : 'post_tag'; + $tax = get_taxonomy($taxonomy); + + if ( !current_user_can( $tax->cap->delete_terms ) ) + wp_die( -1 ); + + $tag = get_term( $tag_id, $taxonomy ); + if ( !$tag || is_wp_error( $tag ) ) + wp_die( 1 ); + + if ( wp_delete_term($tag_id, $taxonomy)) + wp_die( 1 ); + else + wp_die( 0 ); +} + +function wp_ajax_delete_link() { + $id = isset( $_POST['id'] ) ? (int) $_POST['id'] : 0; + + check_ajax_referer( "delete-bookmark_$id" ); + if ( !current_user_can( 'manage_links' ) ) + wp_die( -1 ); + + $link = get_bookmark( $id ); + if ( !$link || is_wp_error( $link ) ) + wp_die( 1 ); + + if ( wp_delete_link( $id ) ) + wp_die( 1 ); + else + wp_die( 0 ); +} + +function wp_ajax_delete_meta() { + $id = isset( $_POST['id'] ) ? (int) $_POST['id'] : 0; + + check_ajax_referer( "delete-meta_$id" ); + if ( !$meta = get_metadata_by_mid( 'post', $id ) ) + wp_die( 1 ); + + if ( is_protected_meta( $meta->meta_key, 'post' ) || ! current_user_can( 'delete_post_meta', $meta->post_id, $meta->meta_key ) ) + wp_die( -1 ); + if ( delete_meta( $meta->meta_id ) ) + wp_die( 1 ); + wp_die( 0 ); +} + +function wp_ajax_delete_post( $action ) { + if ( empty( $action ) ) + $action = 'delete-post'; + $id = isset( $_POST['id'] ) ? (int) $_POST['id'] : 0; + + check_ajax_referer( "{$action}_$id" ); + if ( !current_user_can( 'delete_post', $id ) ) + wp_die( -1 ); + + if ( !get_post( $id ) ) + wp_die( 1 ); + + if ( wp_delete_post( $id ) ) + wp_die( 1 ); + else + wp_die( 0 ); +} + +function wp_ajax_trash_post( $action ) { + if ( empty( $action ) ) + $action = 'trash-post'; + $id = isset( $_POST['id'] ) ? (int) $_POST['id'] : 0; + + check_ajax_referer( "{$action}_$id" ); + if ( !current_user_can( 'delete_post', $id ) ) + wp_die( -1 ); + + if ( !get_post( $id ) ) + wp_die( 1 ); + + if ( 'trash-post' == $action ) + $done = wp_trash_post( $id ); + else + $done = wp_untrash_post( $id ); + + if ( $done ) + wp_die( 1 ); + + wp_die( 0 ); +} + +function wp_ajax_untrash_post( $action ) { + if ( empty( $action ) ) + $action = 'untrash-post'; + wp_ajax_trash_post( $action ); +} + +function wp_ajax_delete_page( $action ) { + if ( empty( $action ) ) + $action = 'delete-page'; + $id = isset( $_POST['id'] ) ? (int) $_POST['id'] : 0; + + check_ajax_referer( "{$action}_$id" ); + if ( !current_user_can( 'delete_page', $id ) ) + wp_die( -1 ); + + if ( !get_page( $id ) ) + wp_die( 1 ); + + if ( wp_delete_post( $id ) ) + wp_die( 1 ); + else + wp_die( 0 ); +} + +function wp_ajax_dim_comment() { + $id = isset( $_POST['id'] ) ? (int) $_POST['id'] : 0; + + if ( !$comment = get_comment( $id ) ) { + $x = new WP_Ajax_Response( array( + 'what' => 'comment', + 'id' => new WP_Error('invalid_comment', sprintf(__('Comment %d does not exist'), $id)) + ) ); + $x->send(); + } + + if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) && ! current_user_can( 'moderate_comments' ) ) + wp_die( -1 ); + + $current = wp_get_comment_status( $comment->comment_ID ); + if ( $_POST['new'] == $current ) + wp_die( time() ); + + check_ajax_referer( "approve-comment_$id" ); + if ( in_array( $current, array( 'unapproved', 'spam' ) ) ) + $result = wp_set_comment_status( $comment->comment_ID, 'approve', true ); + else + $result = wp_set_comment_status( $comment->comment_ID, 'hold', true ); + + if ( is_wp_error($result) ) { + $x = new WP_Ajax_Response( array( + 'what' => 'comment', + 'id' => $result + ) ); + $x->send(); + } + + // 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 ); + wp_die( 0 ); +} + +function wp_ajax_add_link_category( $action ) { + if ( empty( $action ) ) + $action = 'add-link-category'; + check_ajax_referer( $action ); + if ( !current_user_can( 'manage_categories' ) ) + wp_die( -1 ); + $names = explode(',', $_POST['newcat']); + $x = new WP_Ajax_Response(); + foreach ( $names as $cat_name ) { + $cat_name = trim($cat_name); + $slug = sanitize_title($cat_name); + if ( '' === $slug ) + continue; + if ( !$cat_id = term_exists( $cat_name, 'link_category' ) ) + $cat_id = wp_insert_term( $cat_name, 'link_category' ); + if ( is_wp_error( $cat_id ) ) + continue; + else if ( is_array( $cat_id ) ) + $cat_id = $cat_id['term_id']; + $cat_name = esc_html(stripslashes($cat_name)); + $x->add( array( + 'what' => 'link-category', + 'id' => $cat_id, + 'data' => "
  • ", + 'position' => -1 + ) ); + } + $x->send(); +} + +function wp_ajax_add_tag() { + global $wp_list_table; + + check_ajax_referer( 'add-tag', '_wpnonce_add-tag' ); + $post_type = !empty($_POST['post_type']) ? $_POST['post_type'] : 'post'; + $taxonomy = !empty($_POST['taxonomy']) ? $_POST['taxonomy'] : 'post_tag'; + $tax = get_taxonomy($taxonomy); + + if ( !current_user_can( $tax->cap->edit_terms ) ) + wp_die( -1 ); + + $x = new WP_Ajax_Response(); + + $tag = wp_insert_term($_POST['tag-name'], $taxonomy, $_POST ); + + if ( !$tag || is_wp_error($tag) || (!$tag = get_term( $tag['term_id'], $taxonomy )) ) { + $message = __('An error has occurred. Please reload the page and try again.'); + if ( is_wp_error($tag) && $tag->get_error_message() ) + $message = $tag->get_error_message(); + + $x->add( array( + 'what' => 'taxonomy', + 'data' => new WP_Error('error', $message ) + ) ); + $x->send(); + } + + set_current_screen( $_POST['screen'] ); + + $wp_list_table = _get_list_table('WP_Terms_List_Table'); + + $level = 0; + if ( is_taxonomy_hierarchical($taxonomy) ) { + $level = count( get_ancestors( $tag->term_id, $taxonomy ) ); + ob_start(); + $wp_list_table->single_row( $tag, $level ); + $noparents = ob_get_clean(); + } + + ob_start(); + $wp_list_table->single_row( $tag ); + $parents = ob_get_clean(); + + $x->add( array( + 'what' => 'taxonomy', + 'supplemental' => compact('parents', 'noparents') + ) ); + $x->add( array( + 'what' => 'term', + 'position' => $level, + 'supplemental' => (array) $tag + ) ); + $x->send(); +} + +function wp_ajax_get_tagcloud() { + if ( isset( $_POST['tax'] ) ) { + $taxonomy = sanitize_key( $_POST['tax'] ); + $tax = get_taxonomy( $taxonomy ); + if ( ! $tax ) + wp_die( 0 ); + if ( ! current_user_can( $tax->cap->assign_terms ) ) + wp_die( -1 ); + } else { + wp_die( 0 ); + } + + $tags = get_terms( $taxonomy, array( 'number' => 45, 'orderby' => 'count', 'order' => 'DESC' ) ); + + if ( empty( $tags ) ) + wp_die( isset( $tax->no_tagcloud ) ? $tax->no_tagcloud : __('No tags found!') ); + + if ( is_wp_error( $tags ) ) + wp_die( $tags->get_error_message() ); + + foreach ( $tags as $key => $tag ) { + $tags[ $key ]->link = '#'; + $tags[ $key ]->id = $tag->term_id; + } + + // We need raw tag names here, so don't filter the output + $return = wp_generate_tag_cloud( $tags, array('filter' => 0) ); + + if ( empty($return) ) + wp_die( 0 ); + + echo $return; + + wp_die(); +} + +function wp_ajax_get_comments( $action ) { + global $wp_list_table, $post_id; + if ( empty( $action ) ) + $action = 'get-comments'; + + check_ajax_referer( $action ); + + set_current_screen( 'edit-comments' ); + + $wp_list_table = _get_list_table('WP_Post_Comments_List_Table'); + + if ( !current_user_can( 'edit_post', $post_id ) ) + wp_die( -1 ); + + $wp_list_table->prepare_items(); + + if ( !$wp_list_table->has_items() ) + wp_die( 1 ); + + $x = new WP_Ajax_Response(); + ob_start(); + foreach ( $wp_list_table->items as $comment ) { + if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) ) + continue; + get_comment( $comment ); + $wp_list_table->single_row( $comment ); + } + $comment_list_item = ob_get_contents(); + ob_end_clean(); + + $x->add( array( + 'what' => 'comments', + 'data' => $comment_list_item + ) ); + $x->send(); +} + +function wp_ajax_replyto_comment( $action ) { + global $wp_list_table, $wpdb; + if ( empty( $action ) ) + $action = 'replyto-comment'; + + check_ajax_referer( $action, '_ajax_nonce-replyto-comment' ); + + set_current_screen( 'edit-comments' ); + + $comment_post_ID = (int) $_POST['comment_post_ID']; + if ( !current_user_can( 'edit_post', $comment_post_ID ) ) + wp_die( -1 ); + + $status = $wpdb->get_var( $wpdb->prepare("SELECT post_status FROM $wpdb->posts WHERE ID = %d", $comment_post_ID) ); + + if ( empty($status) ) + wp_die( 1 ); + elseif ( in_array($status, array('draft', 'pending', 'trash') ) ) + wp_die( __('ERROR: you are replying to a comment on a draft post.') ); + + $user = wp_get_current_user(); + if ( $user->exists() ) { + $user_ID = $user->ID; + $comment_author = $wpdb->escape($user->display_name); + $comment_author_email = $wpdb->escape($user->user_email); + $comment_author_url = $wpdb->escape($user->user_url); + $comment_content = trim($_POST['content']); + if ( current_user_can( 'unfiltered_html' ) ) { + if ( wp_create_nonce( 'unfiltered-html-comment' ) != $_POST['_wp_unfiltered_html_comment'] ) { + kses_remove_filters(); // start with a clean slate + kses_init_filters(); // set up the filters + } + } + } else { + wp_die( __( 'Sorry, you must be logged in to reply to a comment.' ) ); + } + + if ( '' == $comment_content ) + wp_die( __( 'ERROR: please type a comment.' ) ); + + $comment_parent = absint($_POST['comment_ID']); + $comment_auto_approved = false; + $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'comment_parent', 'user_ID'); + + $comment_id = wp_new_comment( $commentdata ); + $comment = get_comment($comment_id); + if ( ! $comment ) wp_die( 1 ); + + $position = ( isset($_POST['position']) && (int) $_POST['position'] ) ? (int) $_POST['position'] : '-1'; + + // automatically approve parent comment + if ( !empty($_POST['approve_parent']) ) { + $parent = get_comment( $comment_parent ); + + if ( $parent && $parent->comment_approved === '0' && $parent->comment_post_ID == $comment_post_ID ) { + if ( wp_set_comment_status( $parent->comment_ID, 'approve' ) ) + $comment_auto_approved = true; + } + } + + ob_start(); + if ( 'dashboard' == $_REQUEST['mode'] ) { + require_once( ABSPATH . 'wp-admin/includes/dashboard.php' ); + _wp_dashboard_recent_comments_row( $comment ); + } else { + if ( 'single' == $_REQUEST['mode'] ) { + $wp_list_table = _get_list_table('WP_Post_Comments_List_Table'); + } else { + $wp_list_table = _get_list_table('WP_Comments_List_Table'); + } + $wp_list_table->single_row( $comment ); + } + $comment_list_item = ob_get_contents(); + ob_end_clean(); + + $response = array( + 'what' => 'comment', + 'id' => $comment->comment_ID, + 'data' => $comment_list_item, + 'position' => $position + ); + + if ( $comment_auto_approved ) + $response['supplemental'] = array( 'parent_approved' => $parent->comment_ID ); + + $x = new WP_Ajax_Response(); + $x->add( $response ); + $x->send(); +} + +function wp_ajax_edit_comment() { + global $wp_list_table; + + check_ajax_referer( 'replyto-comment', '_ajax_nonce-replyto-comment' ); + + set_current_screen( 'edit-comments' ); + + $comment_id = (int) $_POST['comment_ID']; + if ( ! current_user_can( 'edit_comment', $comment_id ) ) + wp_die( -1 ); + + if ( '' == $_POST['content'] ) + wp_die( __( 'ERROR: please type a comment.' ) ); + + $_POST['comment_status'] = $_POST['status']; + edit_comment(); + + $position = ( isset($_POST['position']) && (int) $_POST['position']) ? (int) $_POST['position'] : '-1'; + $comments_status = isset($_POST['comments_listing']) ? $_POST['comments_listing'] : ''; + + $checkbox = ( isset($_POST['checkbox']) && true == $_POST['checkbox'] ) ? 1 : 0; + $wp_list_table = _get_list_table( $checkbox ? 'WP_Comments_List_Table' : 'WP_Post_Comments_List_Table' ); + + $comment = get_comment( $comment_id ); + + ob_start(); + $wp_list_table->single_row( $comment ); + $comment_list_item = ob_get_contents(); + ob_end_clean(); + + $x = new WP_Ajax_Response(); + + $x->add( array( + 'what' => 'edit_comment', + 'id' => $comment->comment_ID, + 'data' => $comment_list_item, + 'position' => $position + )); + + $x->send(); +} + +function wp_ajax_add_menu_item() { + check_ajax_referer( 'add-menu_item', 'menu-settings-column-nonce' ); + + if ( ! current_user_can( 'edit_theme_options' ) ) + wp_die( -1 ); + + require_once ABSPATH . 'wp-admin/includes/nav-menu.php'; + + // For performance reasons, we omit some object properties from the checklist. + // The following is a hacky way to restore them when adding non-custom items. + + $menu_items_data = array(); + foreach ( (array) $_POST['menu-item'] as $menu_item_data ) { + if ( + ! empty( $menu_item_data['menu-item-type'] ) && + 'custom' != $menu_item_data['menu-item-type'] && + ! empty( $menu_item_data['menu-item-object-id'] ) + ) { + switch( $menu_item_data['menu-item-type'] ) { + case 'post_type' : + $_object = get_post( $menu_item_data['menu-item-object-id'] ); + break; + + case 'taxonomy' : + $_object = get_term( $menu_item_data['menu-item-object-id'], $menu_item_data['menu-item-object'] ); + break; + } + + $_menu_items = array_map( 'wp_setup_nav_menu_item', array( $_object ) ); + $_menu_item = array_shift( $_menu_items ); + + // Restore the missing menu item properties + $menu_item_data['menu-item-description'] = $_menu_item->description; + } + + $menu_items_data[] = $menu_item_data; + } + + $item_ids = wp_save_nav_menu_items( 0, $menu_items_data ); + if ( is_wp_error( $item_ids ) ) + wp_die( 0 ); + + $menu_items = array(); + + foreach ( (array) $item_ids as $menu_item_id ) { + $menu_obj = get_post( $menu_item_id ); + if ( ! empty( $menu_obj->ID ) ) { + $menu_obj = wp_setup_nav_menu_item( $menu_obj ); + $menu_obj->label = $menu_obj->title; // don't show "(pending)" in ajax-added items + $menu_items[] = $menu_obj; + } + } + + $walker_class_name = apply_filters( 'wp_edit_nav_menu_walker', 'Walker_Nav_Menu_Edit', $_POST['menu'] ); + + if ( ! class_exists( $walker_class_name ) ) + wp_die( 0 ); + + if ( ! empty( $menu_items ) ) { + $args = array( + 'after' => '', + 'before' => '', + 'link_after' => '', + 'link_before' => '', + 'walker' => new $walker_class_name, + ); + echo walk_nav_menu_tree( $menu_items, 0, (object) $args ); + } +} + +function wp_ajax_add_meta() { + check_ajax_referer( 'add-meta', '_ajax_nonce-add-meta' ); + $c = 0; + $pid = (int) $_POST['post_id']; + $post = get_post( $pid ); + + if ( isset($_POST['metakeyselect']) || isset($_POST['metakeyinput']) ) { + if ( !current_user_can( 'edit_post', $pid ) ) + wp_die( -1 ); + if ( isset($_POST['metakeyselect']) && '#NONE#' == $_POST['metakeyselect'] && empty($_POST['metakeyinput']) ) + wp_die( 1 ); + if ( $post->post_status == 'auto-draft' ) { + $save_POST = $_POST; // Backup $_POST + $_POST = array(); // Make it empty for edit_post() + $_POST['action'] = 'draft'; // Warning fix + $_POST['post_ID'] = $pid; + $_POST['post_type'] = $post->post_type; + $_POST['post_status'] = 'draft'; + $now = current_time('timestamp', 1); + $_POST['post_title'] = sprintf('Draft created on %s at %s', date(get_option('date_format'), $now), date(get_option('time_format'), $now)); + + if ( $pid = edit_post() ) { + if ( is_wp_error( $pid ) ) { + $x = new WP_Ajax_Response( array( + 'what' => 'meta', + 'data' => $pid + ) ); + $x->send(); + } + $_POST = $save_POST; // Now we can restore original $_POST again + if ( !$mid = add_meta( $pid ) ) + wp_die( __( 'Please provide a custom field value.' ) ); + } else { + wp_die( 0 ); + } + } else if ( !$mid = add_meta( $pid ) ) { + wp_die( __( 'Please provide a custom field value.' ) ); + } + + $meta = get_metadata_by_mid( 'post', $mid ); + $pid = (int) $meta->post_id; + $meta = get_object_vars( $meta ); + $x = new WP_Ajax_Response( array( + 'what' => 'meta', + 'id' => $mid, + 'data' => _list_meta_row( $meta, $c ), + 'position' => 1, + 'supplemental' => array('postid' => $pid) + ) ); + } else { // Update? + $mid = (int) key( $_POST['meta'] ); + $key = stripslashes( $_POST['meta'][$mid]['key'] ); + $value = stripslashes( $_POST['meta'][$mid]['value'] ); + if ( '' == trim($key) ) + wp_die( __( 'Please provide a custom field name.' ) ); + if ( '' == trim($value) ) + wp_die( __( 'Please provide a custom field value.' ) ); + if ( ! $meta = get_metadata_by_mid( 'post', $mid ) ) + wp_die( 0 ); // if meta doesn't exist + if ( is_protected_meta( $meta->meta_key, 'post' ) || is_protected_meta( $key, 'post' ) || + ! current_user_can( 'edit_post_meta', $meta->post_id, $meta->meta_key ) || + ! current_user_can( 'edit_post_meta', $meta->post_id, $key ) ) + wp_die( -1 ); + if ( $meta->meta_value != $value || $meta->meta_key != $key ) { + if ( !$u = update_metadata_by_mid( 'post', $mid, $value, $key ) ) + wp_die( 0 ); // We know meta exists; we also know it's unchanged (or DB error, in which case there are bigger problems). + } + + $x = new WP_Ajax_Response( array( + 'what' => 'meta', + 'id' => $mid, 'old_id' => $mid, + 'data' => _list_meta_row( array( + 'meta_key' => $key, + 'meta_value' => $value, + 'meta_id' => $mid + ), $c ), + 'position' => 0, + 'supplemental' => array('postid' => $meta->post_id) + ) ); + } + $x->send(); +} + +function wp_ajax_add_user( $action ) { + global $wp_list_table; + if ( empty( $action ) ) + $action = 'add-user'; + + check_ajax_referer( $action ); + if ( ! current_user_can('create_users') ) + wp_die( -1 ); + if ( ! $user_id = edit_user() ) { + wp_die( 0 ); + } elseif ( is_wp_error( $user_id ) ) { + $x = new WP_Ajax_Response( array( + 'what' => 'user', + 'id' => $user_id + ) ); + $x->send(); + } + $user_object = new WP_User( $user_id ); + + $wp_list_table = _get_list_table('WP_Users_List_Table'); + + $x = new WP_Ajax_Response( array( + 'what' => 'user', + 'id' => $user_id, + 'data' => $wp_list_table->single_row( $user_object, '', $user_object->roles[0] ), + 'supplemental' => array( + 'show-link' => sprintf(__( 'User %s added' ), "user-$user_id", $user_object->user_login), + 'role' => $user_object->roles[0] + ) + ) ); + $x->send(); +} + +function wp_ajax_autosave() { + global $login_grace_period; + + define( 'DOING_AUTOSAVE', true ); + + $nonce_age = check_ajax_referer( 'autosave', 'autosavenonce' ); + + $_POST['post_category'] = explode(",", $_POST['catslist']); + if ( $_POST['post_type'] == 'page' || empty($_POST['post_category']) ) + unset($_POST['post_category']); + + $do_autosave = (bool) $_POST['autosave']; + $do_lock = true; + + $data = $alert = ''; + /* translators: draft saved date format, see http://php.net/date */ + $draft_saved_date_format = __('g:i:s a'); + /* translators: %s: date and time */ + $message = sprintf( __('Draft saved at %s.'), date_i18n( $draft_saved_date_format ) ); + + $supplemental = array(); + if ( isset($login_grace_period) ) + $alert .= sprintf( __('Your login has expired. Please open a new browser window and log in again. '), add_query_arg( 'interim-login', 1, wp_login_url() ) ); + + $id = $revision_id = 0; + + $post_ID = (int) $_POST['post_ID']; + $_POST['ID'] = $post_ID; + $post = get_post($post_ID); + if ( 'auto-draft' == $post->post_status ) + $_POST['post_status'] = 'draft'; + + if ( $last = wp_check_post_lock( $post->ID ) ) { + $do_autosave = $do_lock = false; + + $last_user = get_userdata( $last ); + $last_user_name = $last_user ? $last_user->display_name : __( 'Someone' ); + $data = __( 'Autosave disabled.' ); + + $supplemental['disable_autosave'] = 'disable'; + $alert .= sprintf( __( '%s is currently editing this article. If you update it, you will overwrite the changes.' ), esc_html( $last_user_name ) ); + } + + if ( 'page' == $post->post_type ) { + if ( !current_user_can('edit_page', $post_ID) ) + wp_die( __( 'You are not allowed to edit this page.' ) ); + } else { + if ( !current_user_can('edit_post', $post_ID) ) + wp_die( __( 'You are not allowed to edit this post.' ) ); + } + + if ( $do_autosave ) { + // Drafts and auto-drafts are just overwritten by autosave + if ( 'auto-draft' == $post->post_status || 'draft' == $post->post_status ) { + $id = edit_post(); + } else { // Non drafts are not overwritten. The autosave is stored in a special post revision. + $revision_id = wp_create_post_autosave( $post->ID ); + if ( is_wp_error($revision_id) ) + $id = $revision_id; + else + $id = $post->ID; + } + $data = $message; + } else { + if ( ! empty( $_POST['auto_draft'] ) ) + $id = 0; // This tells us it didn't actually save + else + $id = $post->ID; + } + + if ( $do_lock && empty( $_POST['auto_draft'] ) && $id && is_numeric( $id ) ) { + $lock_result = wp_set_post_lock( $id ); + $supplemental['active-post-lock'] = implode( ':', $lock_result ); + } + + if ( $nonce_age == 2 ) { + $supplemental['replace-autosavenonce'] = wp_create_nonce('autosave'); + $supplemental['replace-getpermalinknonce'] = wp_create_nonce('getpermalink'); + $supplemental['replace-samplepermalinknonce'] = wp_create_nonce('samplepermalink'); + $supplemental['replace-closedpostboxesnonce'] = wp_create_nonce('closedpostboxes'); + $supplemental['replace-_ajax_linking_nonce'] = wp_create_nonce( 'internal-linking' ); + if ( $id ) { + if ( $_POST['post_type'] == 'post' ) + $supplemental['replace-_wpnonce'] = wp_create_nonce('update-post_' . $id); + elseif ( $_POST['post_type'] == 'page' ) + $supplemental['replace-_wpnonce'] = wp_create_nonce('update-page_' . $id); + } + } + + if ( ! empty($alert) ) + $supplemental['alert'] = $alert; + + $x = new WP_Ajax_Response( array( + 'what' => 'autosave', + 'id' => $id, + 'data' => $id ? $data : '', + 'supplemental' => $supplemental + ) ); + $x->send(); +} + +function wp_ajax_closed_postboxes() { + check_ajax_referer( 'closedpostboxes', 'closedpostboxesnonce' ); + $closed = isset( $_POST['closed'] ) ? explode( ',', $_POST['closed']) : array(); + $closed = array_filter($closed); + + $hidden = isset( $_POST['hidden'] ) ? explode( ',', $_POST['hidden']) : array(); + $hidden = array_filter($hidden); + + $page = isset( $_POST['page'] ) ? $_POST['page'] : ''; + + if ( $page != sanitize_key( $page ) ) + wp_die( 0 ); + + if ( ! $user = wp_get_current_user() ) + wp_die( -1 ); + + if ( is_array($closed) ) + update_user_option($user->ID, "closedpostboxes_$page", $closed, true); + + if ( is_array($hidden) ) { + $hidden = array_diff( $hidden, array('submitdiv', 'linksubmitdiv', 'manage-menu', 'create-menu') ); // postboxes that are always shown + update_user_option($user->ID, "metaboxhidden_$page", $hidden, true); + } + + wp_die( 1 ); +} + +function wp_ajax_hidden_columns() { + check_ajax_referer( 'screen-options-nonce', 'screenoptionnonce' ); + $hidden = isset( $_POST['hidden'] ) ? $_POST['hidden'] : ''; + $hidden = explode( ',', $_POST['hidden'] ); + $page = isset( $_POST['page'] ) ? $_POST['page'] : ''; + + if ( $page != sanitize_key( $page ) ) + wp_die( 0 ); + + if ( ! $user = wp_get_current_user() ) + wp_die( -1 ); + + if ( is_array($hidden) ) + update_user_option($user->ID, "manage{$page}columnshidden", $hidden, true); + + wp_die( 1 ); +} + +function wp_ajax_update_welcome_panel() { + check_ajax_referer( 'welcome-panel-nonce', 'welcomepanelnonce' ); + + if ( ! current_user_can( 'edit_theme_options' ) ) + wp_die( -1 ); + + update_user_meta( get_current_user_id(), 'show_welcome_panel', empty( $_POST['visible'] ) ? 0 : 1 ); + + wp_die( 1 ); +} + +function wp_ajax_menu_get_metabox() { + if ( ! current_user_can( 'edit_theme_options' ) ) + wp_die( -1 ); + + require_once ABSPATH . 'wp-admin/includes/nav-menu.php'; + + if ( isset( $_POST['item-type'] ) && 'post_type' == $_POST['item-type'] ) { + $type = 'posttype'; + $callback = 'wp_nav_menu_item_post_type_meta_box'; + $items = (array) get_post_types( array( 'show_in_nav_menus' => true ), 'object' ); + } elseif ( isset( $_POST['item-type'] ) && 'taxonomy' == $_POST['item-type'] ) { + $type = 'taxonomy'; + $callback = 'wp_nav_menu_item_taxonomy_meta_box'; + $items = (array) get_taxonomies( array( 'show_ui' => true ), 'object' ); + } + + if ( ! empty( $_POST['item-object'] ) && isset( $items[$_POST['item-object']] ) ) { + $item = apply_filters( 'nav_menu_meta_box_object', $items[ $_POST['item-object'] ] ); + ob_start(); + call_user_func_array($callback, array( + null, + array( + 'id' => 'add-' . $item->name, + 'title' => $item->labels->name, + 'callback' => $callback, + 'args' => $item, + ) + )); + + $markup = ob_get_clean(); + + echo json_encode(array( + 'replace-id' => $type . '-' . $item->name, + 'markup' => $markup, + )); + } + + wp_die(); +} + +function wp_ajax_wp_link_ajax() { + check_ajax_referer( 'internal-linking', '_ajax_linking_nonce' ); + + $args = array(); + + if ( isset( $_POST['search'] ) ) + $args['s'] = stripslashes( $_POST['search'] ); + $args['pagenum'] = ! empty( $_POST['page'] ) ? absint( $_POST['page'] ) : 1; + + require(ABSPATH . WPINC . '/class-wp-editor.php'); + $results = _WP_Editors::wp_link_query( $args ); + + if ( ! isset( $results ) ) + wp_die( 0 ); + + echo json_encode( $results ); + echo "\n"; + + wp_die(); +} + +function wp_ajax_menu_locations_save() { + if ( ! current_user_can( 'edit_theme_options' ) ) + wp_die( -1 ); + check_ajax_referer( 'add-menu_item', 'menu-settings-column-nonce' ); + if ( ! isset( $_POST['menu-locations'] ) ) + wp_die( 0 ); + set_theme_mod( 'nav_menu_locations', array_map( 'absint', $_POST['menu-locations'] ) ); + wp_die( 1 ); +} + +function wp_ajax_meta_box_order() { + check_ajax_referer( 'meta-box-order' ); + $order = isset( $_POST['order'] ) ? (array) $_POST['order'] : false; + $page_columns = isset( $_POST['page_columns'] ) ? $_POST['page_columns'] : 'auto'; + + if ( $page_columns != 'auto' ) + $page_columns = (int) $page_columns; + + $page = isset( $_POST['page'] ) ? $_POST['page'] : ''; + + if ( $page != sanitize_key( $page ) ) + wp_die( 0 ); + + if ( ! $user = wp_get_current_user() ) + wp_die( -1 ); + + if ( $order ) + update_user_option($user->ID, "meta-box-order_$page", $order, true); + + if ( $page_columns ) + update_user_option($user->ID, "screen_layout_$page", $page_columns, true); + + wp_die( 1 ); +} + +function wp_ajax_menu_quick_search() { + if ( ! current_user_can( 'edit_theme_options' ) ) + wp_die( -1 ); + + require_once ABSPATH . 'wp-admin/includes/nav-menu.php'; + + _wp_ajax_menu_quick_search( $_POST ); + + wp_die(); +} + +function wp_ajax_get_permalink() { + check_ajax_referer( 'getpermalink', 'getpermalinknonce' ); + $post_id = isset($_POST['post_id'])? intval($_POST['post_id']) : 0; + wp_die( add_query_arg( array( 'preview' => 'true' ), get_permalink( $post_id ) ) ); +} + +function wp_ajax_sample_permalink() { + check_ajax_referer( 'samplepermalink', 'samplepermalinknonce' ); + $post_id = isset($_POST['post_id'])? intval($_POST['post_id']) : 0; + $title = isset($_POST['new_title'])? $_POST['new_title'] : ''; + $slug = isset($_POST['new_slug'])? $_POST['new_slug'] : null; + wp_die( get_sample_permalink_html( $post_id, $title, $slug ) ); +} + +function wp_ajax_inline_save() { + global $wp_list_table; + + check_ajax_referer( 'inlineeditnonce', '_inline_edit' ); + + if ( ! isset($_POST['post_ID']) || ! ( $post_ID = (int) $_POST['post_ID'] ) ) + wp_die(); + + if ( 'page' == $_POST['post_type'] ) { + if ( ! current_user_can( 'edit_page', $post_ID ) ) + wp_die( __( 'You are not allowed to edit this page.' ) ); + } else { + if ( ! current_user_can( 'edit_post', $post_ID ) ) + wp_die( __( 'You are not allowed to edit this post.' ) ); + } + + set_current_screen( $_POST['screen'] ); + + if ( $last = wp_check_post_lock( $post_ID ) ) { + $last_user = get_userdata( $last ); + $last_user_name = $last_user ? $last_user->display_name : __( 'Someone' ); + printf( $_POST['post_type'] == 'page' ? __( 'Saving is disabled: %s is currently editing this page.' ) : __( 'Saving is disabled: %s is currently editing this post.' ), esc_html( $last_user_name ) ); + wp_die(); + } + + $data = &$_POST; + + $post = get_post( $post_ID, ARRAY_A ); + $post = add_magic_quotes($post); //since it is from db + + $data['content'] = $post['post_content']; + $data['excerpt'] = $post['post_excerpt']; + + // rename + $data['user_ID'] = $GLOBALS['user_ID']; + + if ( isset($data['post_parent']) ) + $data['parent_id'] = $data['post_parent']; + + // status + if ( isset($data['keep_private']) && 'private' == $data['keep_private'] ) + $data['post_status'] = 'private'; + else + $data['post_status'] = $data['_status']; + + if ( empty($data['comment_status']) ) + $data['comment_status'] = 'closed'; + if ( empty($data['ping_status']) ) + $data['ping_status'] = 'closed'; + + // update the post + edit_post(); + + $wp_list_table = _get_list_table('WP_Posts_List_Table'); + + $mode = $_POST['post_view']; + $wp_list_table->display_rows( array( get_post( $_POST['post_ID'] ) ) ); + + wp_die(); +} + +function wp_ajax_inline_save_tax() { + global $wp_list_table; + + check_ajax_referer( 'taxinlineeditnonce', '_inline_edit' ); + + $taxonomy = sanitize_key( $_POST['taxonomy'] ); + $tax = get_taxonomy( $taxonomy ); + if ( ! $tax ) + wp_die( 0 ); + + if ( ! current_user_can( $tax->cap->edit_terms ) ) + wp_die( -1 ); + + set_current_screen( 'edit-' . $taxonomy ); + + $wp_list_table = _get_list_table('WP_Terms_List_Table'); + + if ( ! isset($_POST['tax_ID']) || ! ( $id = (int) $_POST['tax_ID'] ) ) + wp_die( -1 ); + + $tag = get_term( $id, $taxonomy ); + $_POST['description'] = $tag->description; + + $updated = wp_update_term($id, $taxonomy, $_POST); + if ( $updated && !is_wp_error($updated) ) { + $tag = get_term( $updated['term_id'], $taxonomy ); + if ( !$tag || is_wp_error( $tag ) ) { + if ( is_wp_error($tag) && $tag->get_error_message() ) + wp_die( $tag->get_error_message() ); + wp_die( __( 'Item not updated.' ) ); + } + + echo $wp_list_table->single_row( $tag ); + } else { + if ( is_wp_error($updated) && $updated->get_error_message() ) + wp_die( $updated->get_error_message() ); + wp_die( __( 'Item not updated.' ) ); + } + + wp_die(); +} + +function wp_ajax_find_posts() { + global $wpdb; + + check_ajax_referer( 'find-posts' ); + + if ( empty($_POST['ps']) ) + wp_die(); + + if ( !empty($_POST['post_type']) && in_array( $_POST['post_type'], get_post_types() ) ) + $what = $_POST['post_type']; + else + $what = 'post'; + + $s = stripslashes($_POST['ps']); + preg_match_all('/".*?("|$)|((?<=[\\s",+])|^)[^\\s",+]+/', $s, $matches); + $search_terms = array_map('_search_terms_tidy', $matches[0]); + + $searchand = $search = ''; + foreach ( (array) $search_terms as $term ) { + $term = esc_sql( like_escape( $term ) ); + $search .= "{$searchand}(($wpdb->posts.post_title LIKE '%{$term}%') OR ($wpdb->posts.post_content LIKE '%{$term}%'))"; + $searchand = ' AND '; + } + $term = esc_sql( like_escape( $s ) ); + 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 post_status IN ('draft', 'publish') AND ($search) ORDER BY post_date_gmt DESC LIMIT 50" ); + + if ( ! $posts ) { + $posttype = get_post_type_object($what); + wp_die( $posttype->labels->not_found ); + } + + $html = ''; + foreach ( $posts as $post ) { + + switch ( $post->post_status ) { + case 'publish' : + case 'private' : + $stat = __('Published'); + break; + case 'future' : + $stat = __('Scheduled'); + break; + case 'pending' : + $stat = __('Pending Review'); + break; + case 'draft' : + $stat = __('Draft'); + break; + } + + if ( '0000-00-00 00:00:00' == $post->post_date ) { + $time = ''; + } else { + /* translators: date format in table columns, see http://php.net/date */ + $time = mysql2date(__('Y/m/d'), $post->post_date); + } + + $html .= ''; + $html .= ''."\n\n"; + } + $html .= '

    '.__('Title').''.__('Date').''.__('Status').'
    '.esc_html( $time ).''.esc_html( $stat ).'
    '; + + $x = new WP_Ajax_Response(); + $x->add( array( + 'what' => $what, + 'data' => $html + )); + $x->send(); + +} + +function wp_ajax_widgets_order() { + check_ajax_referer( 'save-sidebar-widgets', 'savewidgets' ); + + if ( !current_user_can('edit_theme_options') ) + wp_die( -1 ); + + unset( $_POST['savewidgets'], $_POST['action'] ); + + // save widgets order for all sidebars + if ( is_array($_POST['sidebars']) ) { + $sidebars = array(); + foreach ( $_POST['sidebars'] as $key => $val ) { + $sb = array(); + if ( !empty($val) ) { + $val = explode(',', $val); + foreach ( $val as $k => $v ) { + if ( strpos($v, 'widget-') === false ) + continue; + + $sb[$k] = substr($v, strpos($v, '_') + 1); + } + } + $sidebars[$key] = $sb; + } + wp_set_sidebars_widgets($sidebars); + wp_die( 1 ); + } + + wp_die( -1 ); +} + +function wp_ajax_save_widget() { + global $wp_registered_widgets, $wp_registered_widget_controls, $wp_registered_widget_updates; + + check_ajax_referer( 'save-sidebar-widgets', 'savewidgets' ); + + if ( !current_user_can('edit_theme_options') || !isset($_POST['id_base']) ) + wp_die( -1 ); + + unset( $_POST['savewidgets'], $_POST['action'] ); + + do_action('load-widgets.php'); + do_action('widgets.php'); + do_action('sidebar_admin_setup'); + + $id_base = $_POST['id_base']; + $widget_id = $_POST['widget-id']; + $sidebar_id = $_POST['sidebar']; + $multi_number = !empty($_POST['multi_number']) ? (int) $_POST['multi_number'] : 0; + $settings = isset($_POST['widget-' . $id_base]) && is_array($_POST['widget-' . $id_base]) ? $_POST['widget-' . $id_base] : false; + $error = '

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

    '; + + $sidebars = wp_get_sidebars_widgets(); + $sidebar = isset($sidebars[$sidebar_id]) ? $sidebars[$sidebar_id] : array(); + + // delete + if ( isset($_POST['delete_widget']) && $_POST['delete_widget'] ) { + + if ( !isset($wp_registered_widgets[$widget_id]) ) + wp_die( $error ); + + $sidebar = array_diff( $sidebar, array($widget_id) ); + $_POST = array('sidebar' => $sidebar_id, 'widget-' . $id_base => array(), 'the-widget-id' => $widget_id, 'delete_widget' => '1'); + } elseif ( $settings && preg_match( '/__i__|%i%/', key($settings) ) ) { + if ( !$multi_number ) + wp_die( $error ); + + $_POST['widget-' . $id_base] = array( $multi_number => array_shift($settings) ); + $widget_id = $id_base . '-' . $multi_number; + $sidebar[] = $widget_id; + } + $_POST['widget-id'] = $sidebar; + + foreach ( (array) $wp_registered_widget_updates as $name => $control ) { + + if ( $name == $id_base ) { + if ( !is_callable( $control['callback'] ) ) + continue; + + ob_start(); + call_user_func_array( $control['callback'], $control['params'] ); + ob_end_clean(); + break; + } + } + + if ( isset($_POST['delete_widget']) && $_POST['delete_widget'] ) { + $sidebars[$sidebar_id] = $sidebar; + wp_set_sidebars_widgets($sidebars); + echo "deleted:$widget_id"; + wp_die(); + } + + if ( !empty($_POST['add_new']) ) + wp_die(); + + if ( $form = $wp_registered_widget_controls[$widget_id] ) + call_user_func_array( $form['callback'], $form['params'] ); + + wp_die(); +} + +function wp_ajax_upload_attachment() { + check_ajax_referer( 'media-form' ); + + if ( ! current_user_can( 'upload_files' ) ) + wp_die( -1 ); + + if ( isset( $_REQUEST['post_id'] ) ) { + $post_id = $_REQUEST['post_id']; + if ( ! current_user_can( 'edit_post', $post_id ) ) + wp_die( -1 ); + } else { + $post_id = null; + } + + $post_data = isset( $_REQUEST['post_data'] ) ? $_REQUEST['post_data'] : array(); + + $attachment_id = media_handle_upload( 'async-upload', $post_id, $post_data ); + + if ( is_wp_error( $attachment_id ) ) { + echo json_encode( array( + 'type' => 'error', + 'data' => array( + 'message' => $attachment_id->get_error_message(), + 'filename' => $_FILES['async-upload']['name'], + ), + ) ); + wp_die(); + } + + if ( isset( $post_data['context'] ) && isset( $post_data['theme'] ) ) { + if ( 'custom-background' === $post_data['context'] ) + update_post_meta( $attachment_id, '_wp_attachment_is_custom_background', $post_data['theme'] ); + + if ( 'custom-header' === $post_data['context'] ) + update_post_meta( $attachment_id, '_wp_attachment_is_custom_header', $post_data['theme'] ); + } + + $post = get_post( $attachment_id ); + + echo json_encode( array( + 'type' => 'success', + 'data' => array( + 'id' => $attachment_id, + 'title' => esc_attr( $post->post_title ), + 'filename' => esc_html( basename( $post->guid ) ), + 'url' => wp_get_attachment_url( $attachment_id ), + 'meta' => wp_get_attachment_metadata( $attachment_id ), + ), + ) ); + wp_die(); +} + +function wp_ajax_image_editor() { + $attachment_id = intval($_POST['postid']); + if ( empty($attachment_id) || !current_user_can('edit_post', $attachment_id) ) + wp_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); + wp_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); + wp_die(); +} + +function wp_ajax_set_post_thumbnail() { + $post_ID = intval( $_POST['post_id'] ); + if ( !current_user_can( 'edit_post', $post_ID ) ) + wp_die( -1 ); + $thumbnail_id = intval( $_POST['thumbnail_id'] ); + + check_ajax_referer( "set_post_thumbnail-$post_ID" ); + + if ( $thumbnail_id == '-1' ) { + if ( delete_post_thumbnail( $post_ID ) ) + wp_die( _wp_post_thumbnail_html( null, $post_ID ) ); + else + wp_die( 0 ); + } + + if ( set_post_thumbnail( $post_ID, $thumbnail_id ) ) + wp_die( _wp_post_thumbnail_html( $thumbnail_id, $post_ID ) ); + wp_die( 0 ); +} + +function wp_ajax_date_format() { + wp_die( date_i18n( sanitize_option( 'date_format', $_POST['date'] ) ) ); +} + +function wp_ajax_time_format() { + wp_die( date_i18n( sanitize_option( 'time_format', $_POST['date'] ) ) ); +} + +function wp_ajax_wp_fullscreen_save_post() { + $post_id = isset( $_POST['post_ID'] ) ? (int) $_POST['post_ID'] : 0; + + $post = $post_type = null; + + if ( $post_id ) + $post = get_post( $post_id ); + + if ( $post ) + $post_type = $post->post_type; + elseif ( isset( $_POST['post_type'] ) && post_type_exists( $_POST['post_type'] ) ) + $post_type = $_POST['post_type']; + + check_ajax_referer('update-' . $post_type . '_' . $post_id, '_wpnonce'); + + $post_id = edit_post(); + + if ( is_wp_error($post_id) ) { + if ( $post_id->get_error_message() ) + $message = $post_id->get_error_message(); + else + $message = __('Save failed'); + + echo json_encode( array( 'message' => $message, 'last_edited' => '' ) ); + wp_die(); + } else { + $message = __('Saved.'); + } + + if ( $post ) { + $last_date = mysql2date( get_option('date_format'), $post->post_modified ); + $last_time = mysql2date( get_option('time_format'), $post->post_modified ); + } else { + $last_date = date_i18n( get_option('date_format') ); + $last_time = date_i18n( get_option('time_format') ); + } + + if ( $last_id = get_post_meta($post_id, '_edit_last', true) ) { + $last_user = get_userdata($last_id); + $last_edited = sprintf( __('Last edited by %1$s on %2$s at %3$s'), esc_html( $last_user->display_name ), $last_date, $last_time ); + } else { + $last_edited = sprintf( __('Last edited on %1$s at %2$s'), $last_date, $last_time ); + } + + echo json_encode( array( 'message' => $message, 'last_edited' => $last_edited ) ); + wp_die(); +} + +function wp_ajax_wp_remove_post_lock() { + if ( empty( $_POST['post_ID'] ) || empty( $_POST['active_post_lock'] ) ) + wp_die( 0 ); + $post_id = (int) $_POST['post_ID']; + if ( ! $post = get_post( $post_id ) ) + wp_die( 0 ); + + check_ajax_referer( 'update-' . $post->post_type . '_' . $post_id ); + + if ( ! current_user_can( 'edit_post', $post_id ) ) + wp_die( -1 ); + + $active_lock = array_map( 'absint', explode( ':', $_POST['active_post_lock'] ) ); + if ( $active_lock[1] != get_current_user_id() ) + wp_die( 0 ); + + $new_lock = ( time() - apply_filters( 'wp_check_post_lock_window', AUTOSAVE_INTERVAL * 2 ) + 5 ) . ':' . $active_lock[1]; + update_post_meta( $post_id, '_edit_lock', $new_lock, implode( ':', $active_lock ) ); + wp_die( 1 ); +} + +function wp_ajax_dismiss_wp_pointer() { + $pointer = $_POST['pointer']; + if ( $pointer != sanitize_key( $pointer ) ) + wp_die( 0 ); + +// check_ajax_referer( 'dismiss-pointer_' . $pointer ); + + $dismissed = array_filter( explode( ',', (string) get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) ) ); + + if ( in_array( $pointer, $dismissed ) ) + wp_die( 0 ); + + $dismissed[] = $pointer; + $dismissed = implode( ',', $dismissed ); + + update_user_meta( get_current_user_id(), 'dismissed_wp_pointers', $dismissed ); + wp_die( 1 ); +} diff --git a/wp-admin/includes/bookmark.php b/wp-admin/includes/bookmark.php index 0ed560c1..17a8229a 100644 --- a/wp-admin/includes/bookmark.php +++ b/wp-admin/includes/bookmark.php @@ -53,6 +53,7 @@ function edit_link( $link_id = 0 ) { * @return object Default link */ function get_default_link_to_edit() { + $link = new stdClass; if ( isset( $_GET['linkurl'] ) ) $link->link_url = esc_url( $_GET['linkurl'] ); else @@ -83,7 +84,7 @@ function wp_delete_link( $link_id ) { wp_delete_object_term_relationships( $link_id, 'link_category' ); - $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->links WHERE link_id = %d", $link_id ) ); + $wpdb->delete( $wpdb->links, array( 'link_id' => $link_id ) ); do_action( 'deleted_link', $link_id ); @@ -265,5 +266,3 @@ function wp_update_link( $linkdata ) { return wp_insert_link( $linkdata ); } - -?> diff --git a/wp-admin/includes/class-ftp.php b/wp-admin/includes/class-ftp.php index 1e35e745..1ae3e870 100644 --- a/wp-admin/includes/class-ftp.php +++ b/wp-admin/includes/class-ftp.php @@ -896,11 +896,12 @@ class ftp_base { } } -$mod_sockets=TRUE; -if (!extension_loaded('sockets')) { - $prefix = (PHP_SHLIB_SUFFIX == 'dll') ? 'php_' : ''; - if(!@dl($prefix . 'sockets.' . PHP_SHLIB_SUFFIX)) $mod_sockets=FALSE; +$mod_sockets = extension_loaded( 'sockets' ); +if ( ! $mod_sockets && function_exists( 'dl' ) && is_callable( 'dl' ) ) { + $prefix = ( PHP_SHLIB_SUFFIX == 'dll' ) ? 'php_' : ''; + @dl( $prefix . 'sockets.' . PHP_SHLIB_SUFFIX ); + $mod_sockets = extension_loaded( 'sockets' ); } -require_once "class-ftp-".($mod_sockets?"sockets":"pure").".php"; +require_once "class-ftp-" . ( $mod_sockets ? "sockets" : "pure" ) . ".php"; ?> diff --git a/wp-admin/includes/class-wp-comments-list-table.php b/wp-admin/includes/class-wp-comments-list-table.php index e3dc4c48..bb5a95e6 100644 --- a/wp-admin/includes/class-wp-comments-list-table.php +++ b/wp-admin/includes/class-wp-comments-list-table.php @@ -130,13 +130,13 @@ class WP_Comments_List_Table extends WP_List_Table { global $comment_status; if ( 'moderated' == $comment_status ) - _e( 'No comments awaiting moderation… yet.' ); + _e( 'No comments awaiting moderation.' ); else _e( 'No comments found.' ); } function get_views() { - global $post_id, $comment_status; + global $post_id, $comment_status, $comment_type; $status_links = array(); $num_comments = ( $post_id ) ? wp_count_comments( $post_id ) : wp_count_comments(); @@ -186,7 +186,7 @@ class WP_Comments_List_Table extends WP_List_Table { $actions = array(); if ( in_array( $comment_status, array( 'all', 'approved' ) ) ) $actions['unapprove'] = __( 'Unapprove' ); - if ( in_array( $comment_status, array( 'all', 'moderated', 'spam' ) ) ) + if ( in_array( $comment_status, array( 'all', 'moderated' ) ) ) $actions['approve'] = __( 'Approve' ); if ( in_array( $comment_status, array( 'all', 'moderated', 'approved' ) ) ) $actions['spam'] = _x( 'Mark as Spam', 'comment' ); @@ -556,5 +556,3 @@ class WP_Post_Comments_List_Table extends WP_Comments_List_Table { return 10; } } - -?> diff --git a/wp-admin/includes/class-wp-filesystem-base.php b/wp-admin/includes/class-wp-filesystem-base.php index 3d3016ac..1f22f241 100644 --- a/wp-admin/includes/class-wp-filesystem-base.php +++ b/wp-admin/includes/class-wp-filesystem-base.php @@ -328,5 +328,3 @@ class WP_Filesystem_Base { return (bool) preg_match('|[^\x20-\x7E]|', $text); //chr(32)..chr(127) } } - -?> diff --git a/wp-admin/includes/class-wp-filesystem-direct.php b/wp-admin/includes/class-wp-filesystem-direct.php index ebd64b3e..457f199c 100644 --- a/wp-admin/includes/class-wp-filesystem-direct.php +++ b/wp-admin/includes/class-wp-filesystem-direct.php @@ -207,7 +207,7 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base { if ( ! $overwrite && $this->exists($destination) ) return false; - // try using rename first. if that fails (for example, source is read only) try copy + // try using rename first. if that fails (for example, source is read only) try copy if ( @rename($source, $destination) ) return true; @@ -361,4 +361,3 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base { return $ret; } } -?> diff --git a/wp-admin/includes/class-wp-filesystem-ftpext.php b/wp-admin/includes/class-wp-filesystem-ftpext.php index 79bacfba..12280304 100644 --- a/wp-admin/includes/class-wp-filesystem-ftpext.php +++ b/wp-admin/includes/class-wp-filesystem-ftpext.php @@ -387,5 +387,3 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { 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 7dae3b77..2e9fbd69 100644 --- a/wp-admin/includes/class-wp-filesystem-ftpsockets.php +++ b/wp-admin/includes/class-wp-filesystem-ftpsockets.php @@ -327,5 +327,3 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { $this->ftp->quit(); } } - -?> diff --git a/wp-admin/includes/class-wp-links-list-table.php b/wp-admin/includes/class-wp-links-list-table.php index cbe3ed54..4776a52f 100644 --- a/wp-admin/includes/class-wp-links-list-table.php +++ b/wp-admin/includes/class-wp-links-list-table.php @@ -182,5 +182,3 @@ class WP_Links_List_Table extends WP_List_Table { } } } - -?> diff --git a/wp-admin/includes/class-wp-list-table.php b/wp-admin/includes/class-wp-list-table.php index 446174d4..6de7abf5 100644 --- a/wp-admin/includes/class-wp-list-table.php +++ b/wp-admin/includes/class-wp-list-table.php @@ -212,7 +212,7 @@ class WP_List_Table { ?> %s\n", selected( $m, $year . $month, false ), esc_attr( $arc_row->year . $month ), - $wp_locale->get_month( $month ) . " $year" + /* translators: 1: month name, 2: 4-digit year */ + sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $month ), $year ) ); } ?> @@ -483,7 +484,7 @@ class WP_List_Table { if ( empty( $this->_pagination_args ) ) return; - extract( $this->_pagination_args ); + extract( $this->_pagination_args, EXTR_SKIP ); $output = '' . sprintf( _n( '1 item', '%s items', $total_items ), number_format_i18n( $total_items ) ) . ''; @@ -518,9 +519,8 @@ class WP_List_Table { if ( 'bottom' == $which ) $html_current_page = $current; else - $html_current_page = sprintf( "", + $html_current_page = sprintf( "", esc_attr__( 'Current page' ), - esc_attr( 'paged' ), $current, strlen( $total_pages ) ); @@ -542,7 +542,10 @@ class WP_List_Table { '»' ); - $output .= "\n" . join( "\n", $page_links ) . ''; + $pagination_links_class = 'pagination-links'; + if ( ! empty( $infinite_scroll ) ) + $pagination_links_class = ' hide-if-js'; + $output .= "\n" . join( "\n", $page_links ) . ''; if ( $total_pages ) $page_class = $total_pages < 2 ? ' one-page' : ''; @@ -871,7 +874,7 @@ class WP_List_Table { $this->prepare_items(); extract( $this->_args ); - extract( $this->_pagination_args ); + extract( $this->_pagination_args, EXTR_SKIP ); ob_start(); if ( ! empty( $_REQUEST['no_placeholder'] ) ) @@ -913,4 +916,3 @@ class WP_List_Table { printf( "\n", json_encode( $args ) ); } } -?> diff --git a/wp-admin/includes/class-wp-media-list-table.php b/wp-admin/includes/class-wp-media-list-table.php index 9c63ca32..5f9c165e 100644 --- a/wp-admin/includes/class-wp-media-list-table.php +++ b/wp-admin/includes/class-wp-media-list-table.php @@ -302,8 +302,8 @@ foreach ( $columns as $column_name => $column_display_name ) { > post_parent ) ) { ?> - - , @@ -392,5 +392,3 @@ foreach ( $columns as $column_name => $column_display_name ) { return $actions; } } - -?> diff --git a/wp-admin/includes/class-wp-ms-sites-list-table.php b/wp-admin/includes/class-wp-ms-sites-list-table.php index 73ce8898..3d72381c 100644 --- a/wp-admin/includes/class-wp-ms-sites-list-table.php +++ b/wp-admin/includes/class-wp-ms-sites-list-table.php @@ -251,7 +251,7 @@ class WP_MS_Sites_List_Table extends WP_List_Table { $actions['deactivate'] = '' . __( 'Deactivate' ) . ''; if ( get_blog_status( $blog['blog_id'], 'archived' ) == '1' ) - $actions['unarchive'] = '' . __( 'Unarchive' ) . ''; + $actions['unarchive'] = '' . __( 'Unarchive' ) . ''; else $actions['archive'] = '' . _x( 'Archive', 'verb; site' ) . ''; @@ -337,5 +337,3 @@ class WP_MS_Sites_List_Table extends WP_List_Table { } } } - -?> diff --git a/wp-admin/includes/class-wp-ms-themes-list-table.php b/wp-admin/includes/class-wp-ms-themes-list-table.php index cd9841da..9fc3251d 100644 --- a/wp-admin/includes/class-wp-ms-themes-list-table.php +++ b/wp-admin/includes/class-wp-ms-themes-list-table.php @@ -15,14 +15,9 @@ class WP_MS_Themes_List_Table extends WP_List_Table { function __construct() { global $status, $page; - $default_status = get_user_option( 'themes_last_view' ); - if ( empty( $default_status ) ) - $default_status = 'all'; - $status = isset( $_REQUEST['theme_status'] ) ? $_REQUEST['theme_status'] : $default_status; - if ( !in_array( $status, array( 'all', 'enabled', 'disabled', 'upgrade', 'search' ) ) ) + $status = isset( $_REQUEST['theme_status'] ) ? $_REQUEST['theme_status'] : 'all'; + if ( !in_array( $status, array( 'all', 'enabled', 'disabled', 'upgrade', 'search', 'broken' ) ) ) $status = 'all'; - if ( $status != $default_status && 'search' != $status ) - update_user_meta( get_current_user_id(), 'themes_last_view', $status ); $page = $this->get_pagenum(); @@ -55,56 +50,47 @@ class WP_MS_Themes_List_Table extends WP_List_Table { } function prepare_items() { - global $status, $themes, $totals, $page, $orderby, $order, $s; + global $status, $totals, $page, $orderby, $order, $s; wp_reset_vars( array( 'orderby', 'order', 's' ) ); $themes = array( - 'all' => apply_filters( 'all_themes', get_themes() ), + 'all' => apply_filters( 'all_themes', wp_get_themes() ), 'search' => array(), 'enabled' => array(), 'disabled' => array(), - 'upgrade' => array() + 'upgrade' => array(), + 'broken' => $this->is_site_themes ? array() : wp_get_themes( array( 'errors' => true ) ), ); - $site_allowed_themes = get_site_allowed_themes(); - if ( !$this->is_site_themes ) { - $allowed_themes = $site_allowed_themes; - $themes_per_page = $this->get_items_per_page( 'themes_network_per_page' ); - } else { - $allowed_themes = wpmu_get_blog_allowedthemes( $this->site_id ); + if ( $this->is_site_themes ) { $themes_per_page = $this->get_items_per_page( 'site_themes_network_per_page' ); + $allowed_where = 'site'; + } else { + $themes_per_page = $this->get_items_per_page( 'themes_network_per_page' ); + $allowed_where = 'network'; } - $current = get_site_transient( 'update_themes' ); + $maybe_update = current_user_can( 'update_themes' ) && ! $this->is_site_themes && $current = get_site_transient( 'update_themes' ); foreach ( (array) $themes['all'] as $key => $theme ) { - $theme_key = $theme['Stylesheet']; - - if ( isset( $allowed_themes [ $theme_key ] ) ) { - $themes['all'][$key]['enabled'] = true; - $themes['enabled'][$key] = $themes['all'][$key]; - } - else { - $themes['all'][$key]['enabled'] = false; - $themes['disabled'][$key] = $themes['all'][$key]; + if ( $this->is_site_themes && $theme->is_allowed( 'network' ) ) { + unset( $themes['all'][ $key ] ); + continue; } - if ( isset( $current->response[ $theme['Template'] ] ) ) - $themes['upgrade'][$key] = $themes['all'][$key]; - if ( $this->is_site_themes && isset( $site_allowed_themes[$theme_key] ) ) { - unset( $themes['all'][$key] ); - unset( $themes['enabled'][$key] ); - unset( $themes['disabled'][$key] ); + if ( $maybe_update && isset( $current->response[ $key ] ) ) { + $themes['all'][ $key ]->update = true; + $themes['upgrade'][ $key ] = $themes['all'][ $key ]; } - } - if ( !current_user_can( 'update_themes' ) || $this->is_site_themes ) - $themes['upgrade'] = array(); + $filter = $theme->is_allowed( $allowed_where, $this->site_id ) ? 'enabled' : 'disabled'; + $themes[ $filter ][ $key ] = $themes['all'][ $key ]; + } if ( $s ) { $status = 'search'; - $themes['search'] = array_filter( $themes['all'], array( &$this, '_search_callback' ) ); + $themes['search'] = array_filter( array_merge( $themes['all'], $themes['broken'] ), array( &$this, '_search_callback' ) ); } $totals = array(); @@ -115,19 +101,27 @@ class WP_MS_Themes_List_Table extends WP_List_Table { $status = 'all'; $this->items = $themes[ $status ]; + WP_Theme::sort_by_name( $this->items ); + + $this->has_items = ! empty( $themes['all'] ); $total_this_page = $totals[ $status ]; if ( $orderby ) { $orderby = ucfirst( $orderby ); $order = strtoupper( $order ); - uasort( $this->items, array( &$this, '_order_callback' ) ); + if ( $orderby == 'Name' ) { + if ( 'ASC' == $order ) + $this->items = array_reverse( $this->items ); + } else { + uasort( $this->items, array( &$this, '_order_callback' ) ); + } } $start = ( $page - 1 ) * $themes_per_page; if ( $total_this_page > $themes_per_page ) - $this->items = array_slice( $this->items, $start, $themes_per_page ); + $this->items = array_slice( $this->items, $start, $themes_per_page, true ); $this->set_pagination_args( array( 'total_items' => $total_this_page, @@ -140,19 +134,27 @@ class WP_MS_Themes_List_Table extends WP_List_Table { if ( is_null( $term ) ) $term = stripslashes( $_REQUEST['s'] ); - $search_fields = array( 'Name', 'Title', 'Description', 'Author', 'Author Name', 'Author URI', 'Template', 'Stylesheet' ); - foreach ( $search_fields as $field ) - if ( stripos( $theme[ $field ], $term ) !== false ) + foreach ( array( 'Name', 'Description', 'Author', 'Author', 'AuthorURI' ) as $field ) { + // Don't mark up; Do translate. + if ( false !== stripos( $theme->display( $field, false, true ), $term ) ) return true; + } + + if ( false !== stripos( $theme->get_stylesheet(), $term ) ) + return true; + + if ( false !== stripos( $theme->get_template(), $term ) ) + return true; return false; } + // Not used by any core columns. function _order_callback( $theme_a, $theme_b ) { global $orderby, $order; - $a = $theme_a[$orderby]; - $b = $theme_b[$orderby]; + $a = $theme_a[ $orderby ]; + $b = $theme_b[ $orderby ]; if ( $a == $b ) return 0; @@ -164,9 +166,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table { } function no_items() { - global $themes; - - if ( !empty( $themes['all'] ) ) + if ( ! $this->has_items ) _e( 'No themes found.' ); else _e( 'You do not appear to have any themes available at this time.' ); @@ -209,6 +209,9 @@ class WP_MS_Themes_List_Table extends WP_List_Table { case 'upgrade': $text = _n( 'Update Available (%s)', 'Update Available (%s)', $count ); break; + case 'broken' : + $text = _n( 'Broken (%s)', 'Broken (%s)', $count ); + break; } if ( $this->is_site_themes ) @@ -260,14 +263,17 @@ class WP_MS_Themes_List_Table extends WP_List_Table { } function single_row( $key, $theme ) { - global $status, $page, $s; + global $status, $page, $s, $totals; $context = $status; - if ( $this->is_site_themes ) + if ( $this->is_site_themes ) { $url = "site-themes.php?id={$this->site_id}&"; - else + $allowed = $theme->is_allowed( 'site', $this->site_id ); + } else { $url = 'themes.php?'; + $allowed = $theme->is_allowed( 'network' ); + } // preorder $actions = array( @@ -277,30 +283,32 @@ class WP_MS_Themes_List_Table extends WP_List_Table { 'delete' => '' ); - $theme_key = $theme['Stylesheet']; + $theme_key = $theme->get_stylesheet(); - if ( empty( $theme['enabled'] ) ) - $actions['enable'] = '' . ( $this->is_site_themes ? __( 'Enable' ) : __( 'Network Enable' ) ) . ''; - else + if ( ! $allowed ) { + if ( ! $theme->errors() ) + $actions['enable'] = '' . ( $this->is_site_themes ? __( 'Enable' ) : __( 'Network Enable' ) ) . ''; + } else { $actions['disable'] = '' . ( $this->is_site_themes ? __( 'Disable' ) : __( 'Network Disable' ) ) . ''; + } if ( current_user_can('edit_themes') ) - $actions['edit'] = '' . __('Edit') . ''; + $actions['edit'] = '' . __('Edit') . ''; - if ( empty( $theme['enabled'] ) && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $theme_key != get_option( 'stylesheet' ) && $theme_key != get_option( 'template' ) ) + if ( ! $allowed && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $theme_key != get_option( 'stylesheet' ) && $theme_key != get_option( 'template' ) ) $actions['delete'] = '' . __( 'Delete' ) . ''; $actions = apply_filters( 'theme_action_links', array_filter( $actions ), $theme_key, $theme, $context ); $actions = apply_filters( "theme_action_links_$theme_key", $actions, $theme_key, $theme, $context ); - $class = empty( $theme['enabled'] ) ? 'inactive' : 'active'; - $checkbox_id = "checkbox_" . md5($theme['Name']); - $checkbox = ""; + $class = ! $allowed ? 'inactive' : 'active'; + $checkbox_id = "checkbox_" . md5( $theme->get('Name') ); + $checkbox = ""; - $description = '

    ' . $theme['Description'] . '

    '; - $theme_name = $theme['Name']; + $id = sanitize_html_class( $theme->get_stylesheet() ); - $id = sanitize_title( $theme_name ); + if ( ! empty( $totals['upgrade'] ) && ! empty( $theme->update ) ) + $class .= ' update'; echo ""; @@ -316,25 +324,28 @@ class WP_MS_Themes_List_Table extends WP_List_Table { echo "$checkbox"; break; case 'name': - echo "$theme_name"; + echo "" . $theme->display('Name') . ""; echo $this->row_actions( $actions, true ); echo ""; break; case 'description': - echo " -
    $description
    + echo ""; + if ( $theme->errors() ) { + $pre = $status == 'broken' ? '' : __( 'Broken Theme:' ) . ' '; + echo '

    ' . $pre . $theme->errors()->get_error_message() . '

    '; + } + echo "

    " . $theme->display( 'Description' ) . "

    "; $theme_meta = array(); - if ( !empty( $theme['Version'] ) ) - $theme_meta[] = sprintf( __( 'Version %s' ), $theme['Version'] ); + if ( $theme->get('Version') ) + $theme_meta[] = sprintf( __( 'Version %s' ), $theme->display('Version') ); - if ( !empty( $theme['Author'] ) ) - $theme_meta[] = sprintf( __( 'By %s' ), $theme['Author'] ); + $theme_meta[] = sprintf( __( 'By %s' ), $theme->display('Author') ); - if ( !empty( $theme['Theme URI'] ) ) - $theme_meta[] = '' . __( 'Visit Theme Site' ) . ''; + if ( $theme->get('ThemeURI') ) + $theme_meta[] = '' . __( 'Visit Theme Site' ) . ''; $theme_meta = apply_filters( 'theme_row_meta', $theme_meta, $theme_key, $theme, $status ); echo implode( ' | ', $theme_meta ); @@ -357,5 +368,3 @@ class WP_MS_Themes_List_Table extends WP_List_Table { do_action( "after_theme_row_$theme_key", $theme_key, $theme, $status ); } } - -?> diff --git a/wp-admin/includes/class-wp-ms-users-list-table.php b/wp-admin/includes/class-wp-ms-users-list-table.php index 4ebec5e7..67564fd6 100644 --- a/wp-admin/includes/class-wp-ms-users-list-table.php +++ b/wp-admin/includes/class-wp-ms-users-list-table.php @@ -162,7 +162,6 @@ class WP_MS_Users_List_Table extends WP_List_Table { $attributes = "$class$style"; - switch ( $column_name ) { case 'cb': ?> @@ -242,7 +241,7 @@ class WP_MS_Users_List_Table extends WP_List_Table { if ( get_blog_status( $val->userblog_id, 'archived' ) == 1 ) $class .= 'site-archived '; - $actions['view'] = '' . __( 'View' ) . ''; + $actions['view'] = '' . __( 'View' ) . ''; $actions = apply_filters('ms_user_list_site_actions', $actions, $val->userblog_id); @@ -274,5 +273,3 @@ class WP_MS_Users_List_Table extends WP_List_Table { } } } - -?> diff --git a/wp-admin/includes/class-wp-plugin-install-list-table.php b/wp-admin/includes/class-wp-plugin-install-list-table.php index 71337eb9..3de77c1d 100644 --- a/wp-admin/includes/class-wp-plugin-install-list-table.php +++ b/wp-admin/includes/class-wp-plugin-install-list-table.php @@ -33,7 +33,6 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { $tabs['featured'] = _x( 'Featured','Plugin Installer' ); $tabs['popular'] = _x( 'Popular','Plugin Installer' ); $tabs['new'] = _x( 'Newest','Plugin Installer' ); - $tabs['updated'] = _x( 'Recently Updated','Plugin Installer' ); $nonmenu_tabs = array( 'plugin-information' ); //Valid actions to perform which do not have a Menu item. @@ -48,7 +47,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { switch ( $tab ) { case 'search': - $type = isset( $_REQUEST['type'] ) ? stripslashes( $_REQUEST['type'] ) : ''; + $type = isset( $_REQUEST['type'] ) ? stripslashes( $_REQUEST['type'] ) : 'term'; $term = isset( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : ''; switch ( $type ) { @@ -63,13 +62,12 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { break; } - add_action( 'install_plugins_table_header', 'install_search_form' ); + add_action( 'install_plugins_table_header', 'install_search_form', 10, 0 ); break; case 'featured': case 'popular': case 'new': - case 'updated': $args['browse'] = $tab; break; @@ -205,7 +203,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { break; case 'latest_installed': case 'newer_installed': - $action_links[] = '' . __( 'Installed' ) . ''; + $action_links[] = '' . _x( 'Installed', 'plugin' ) . ''; break; } } @@ -219,19 +217,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { > >
    -
    - -
    <?php esc_attr_e( '5 stars' ) ?>
    -
    <?php esc_attr_e( '4 stars' ) ?>
    -
    <?php esc_attr_e( '3 stars' ) ?>
    -
    <?php esc_attr_e( '2 stars' ) ?>
    -
    <?php esc_attr_e( '1 star' ) ?>
    +
    > @@ -240,5 +226,3 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { } } } - -?> diff --git a/wp-admin/includes/class-wp-plugins-list-table.php b/wp-admin/includes/class-wp-plugins-list-table.php index 577750c9..a1ce53ab 100644 --- a/wp-admin/includes/class-wp-plugins-list-table.php +++ b/wp-admin/includes/class-wp-plugins-list-table.php @@ -13,7 +13,7 @@ class WP_Plugins_List_Table extends WP_List_Table { global $status, $page; $status = 'all'; - if ( isset( $_REQUEST['plugin_status'] ) && in_array( $_REQUEST['plugin_status'], array( 'active', 'inactive', 'recently_activated', 'upgrade', 'network', 'mustuse', 'dropins', 'search' ) ) ) + if ( isset( $_REQUEST['plugin_status'] ) && in_array( $_REQUEST['plugin_status'], array( 'active', 'inactive', 'recently_activated', 'upgrade', 'mustuse', 'dropins', 'search' ) ) ) $status = $_REQUEST['plugin_status']; if ( isset($_REQUEST['s']) ) @@ -65,32 +65,34 @@ class WP_Plugins_List_Table extends WP_List_Table { if ( apply_filters( 'show_advanced_plugins', true, 'dropins' ) ) $plugins['dropins'] = get_dropins(); - $current = get_site_transient( 'update_plugins' ); - foreach ( (array) $plugins['all'] as $plugin_file => $plugin_data ) { - if ( isset( $current->response[ $plugin_file ] ) ) - $plugins['upgrade'][ $plugin_file ] = $plugin_data; + if ( current_user_can( 'update_plugins' ) ) { + $current = get_site_transient( 'update_plugins' ); + foreach ( (array) $plugins['all'] as $plugin_file => $plugin_data ) { + if ( isset( $current->response[ $plugin_file ] ) ) { + $plugins['all'][ $plugin_file ]['update'] = true; + $plugins['upgrade'][ $plugin_file ] = $plugins['all'][ $plugin_file ]; + } + } } } set_transient( 'plugin_slugs', array_keys( $plugins['all'] ), 86400 ); - $recently_activated = get_option( 'recently_activated', array() ); + if ( ! $screen->is_network ) { + $recently_activated = get_option( 'recently_activated', array() ); - $one_week = 7*24*60*60; - foreach ( $recently_activated as $key => $time ) - if ( $time + $one_week < time() ) - unset( $recently_activated[$key] ); - update_option( 'recently_activated', $recently_activated ); + $one_week = 7*24*60*60; + foreach ( $recently_activated as $key => $time ) + if ( $time + $one_week < time() ) + unset( $recently_activated[$key] ); + update_option( 'recently_activated', $recently_activated ); + } foreach ( (array) $plugins['all'] as $plugin_file => $plugin_data ) { // Filter into individual sections - if ( is_multisite() && is_network_only_plugin( $plugin_file ) && !$screen->is_network ) { - unset( $plugins['all'][ $plugin_file] ); - } elseif ( is_plugin_active_for_network($plugin_file) && !$screen->is_network ) { + if ( ! $screen->is_network && is_plugin_active_for_network( $plugin_file ) ) { unset( $plugins['all'][ $plugin_file ] ); - } elseif ( is_multisite() && is_network_only_plugin( $plugin_file ) && !current_user_can( 'manage_network_plugins' ) ) { - $plugins['network'][ $plugin_file ] = $plugin_data; - } elseif ( ( !$screen->is_network && is_plugin_active( $plugin_file ) ) + } elseif ( ( ! $screen->is_network && is_plugin_active( $plugin_file ) ) || ( $screen->is_network && is_plugin_active_for_network( $plugin_file ) ) ) { $plugins['active'][ $plugin_file ] = $plugin_data; } else { @@ -100,9 +102,6 @@ class WP_Plugins_List_Table extends WP_List_Table { } } - if ( !current_user_can( 'update_plugins' ) ) - $plugins['upgrade'] = array(); - if ( $s ) { $status = 'search'; $plugins['search'] = array_filter( $plugins['all'], array( &$this, '_search_callback' ) ); @@ -214,9 +213,6 @@ class WP_Plugins_List_Table extends WP_List_Table { case 'inactive': $text = _n( 'Inactive (%s)', 'Inactive (%s)', $count ); break; - case 'network': - $text = _n( 'Network (%s)', 'Network (%s)', $count ); - break; case 'mustuse': $text = _n( 'Must-Use (%s)', 'Must-Use (%s)', $count ); break; @@ -247,13 +243,11 @@ class WP_Plugins_List_Table extends WP_List_Table { $screen = get_current_screen(); - if ( 'active' != $status ) { - $action = $screen->is_network ? 'network-activate-selected' : 'activate-selected'; - $actions[ $action ] = __( 'Activate' ); - } + if ( 'active' != $status ) + $actions['activate-selected'] = $screen->is_network ? __( 'Network Activate' ) : __( 'Activate' ); if ( 'inactive' != $status && 'recent' != $status ) - $actions['deactivate-selected'] = __( 'Deactivate' ); + $actions['deactivate-selected'] = $screen->is_network ? __( 'Network Deactivate' ) : __( 'Deactivate' ); if ( !is_multisite() || $screen->is_network ) { if ( current_user_can( 'update_plugins' ) ) @@ -282,7 +276,9 @@ class WP_Plugins_List_Table extends WP_List_Table { echo '
    '; - if ( 'recently_activated' == $status ) + $screen = get_current_screen(); + + if ( ! $screen->is_network && 'recently_activated' == $status ) submit_button( __( 'Clear List' ), 'secondary', 'clear-recent-list', false ); elseif ( 'top' == $which && 'mustuse' == $status ) echo '

    ' . sprintf( __( 'Files in the %s directory are executed automatically.' ), str_replace( ABSPATH, '/', WPMU_PLUGIN_DIR ) ) . '

    '; @@ -312,7 +308,7 @@ class WP_Plugins_List_Table extends WP_List_Table { } function single_row( $plugin_file, $plugin_data ) { - global $status, $page, $s; + global $status, $page, $s, $totals; $context = $status; @@ -320,9 +316,8 @@ class WP_Plugins_List_Table extends WP_List_Table { // preorder $actions = array( - 'network_deactivate' => '', 'deactivate' => '', - 'network_only' => '', 'activate' => '', - 'network_activate' => '', + 'deactivate' => '', + 'activate' => '', 'edit' => '', 'delete' => '', ); @@ -347,22 +342,18 @@ class WP_Plugins_List_Table extends WP_List_Table { if ( $plugin_data['Description'] ) $description .= '

    ' . $plugin_data['Description'] . '

    '; } else { - $is_active_for_network = is_plugin_active_for_network($plugin_file); if ( $screen->is_network ) - $is_active = $is_active_for_network; + $is_active = is_plugin_active_for_network( $plugin_file ); else $is_active = is_plugin_active( $plugin_file ); - if ( $is_active_for_network && !is_super_admin() && !$screen->is_network ) - return; - if ( $screen->is_network ) { - if ( $is_active_for_network ) { + if ( $is_active ) { if ( current_user_can( 'manage_network_plugins' ) ) - $actions['network_deactivate'] = '' . __('Network Deactivate') . ''; + $actions['deactivate'] = '' . __('Network Deactivate') . ''; } else { if ( current_user_can( 'manage_network_plugins' ) ) - $actions['network_activate'] = '' . __('Network Activate') . ''; + $actions['activate'] = '' . __('Network Activate') . ''; if ( current_user_can( 'delete_plugins' ) && ! is_plugin_active( $plugin_file ) ) $actions['delete'] = '' . __('Delete') . ''; } @@ -394,6 +385,8 @@ class WP_Plugins_List_Table extends WP_List_Table { } $id = sanitize_title( $plugin_name ); + if ( ! empty( $totals['upgrade'] ) && ! empty( $plugin_data['update'] ) ) + $class .= ' update'; echo ""; @@ -448,5 +441,3 @@ class WP_Plugins_List_Table extends WP_List_Table { do_action( "after_plugin_row_$plugin_file", $plugin_file, $plugin_data, $status ); } } - -?> diff --git a/wp-admin/includes/class-wp-posts-list-table.php b/wp-admin/includes/class-wp-posts-list-table.php index 290939c2..613cff82 100644 --- a/wp-admin/includes/class-wp-posts-list-table.php +++ b/wp-admin/includes/class-wp-posts-list-table.php @@ -360,7 +360,7 @@ class WP_Posts_List_Table extends WP_List_Table { if ( $page->post_parent == $page->ID ) { $page->post_parent = 0; $wpdb->update( $wpdb->posts, array( 'post_parent' => 0 ), array( 'ID' => $page->ID ) ); - clean_page_cache( $page->ID ); + clean_post_cache( $page ); } if ( 0 == $page->post_parent ) @@ -527,9 +527,8 @@ class WP_Posts_List_Table extends WP_List_Table { ?> >post_status != 'trash' ) { ?> ID ) ) the_excerpt(); - } } $actions = array(); @@ -609,7 +608,8 @@ class WP_Posts_List_Table extends WP_List_Table { esc_html( sanitize_term_field( 'name', $c->name, $c->term_id, 'category', 'display' ) ) ); } - echo join( ', ', $out ); + /* translators: used between list items, there is a space after the comma */ + echo join( __( ', ' ), $out ); } else { _e( 'Uncategorized' ); } @@ -629,7 +629,8 @@ class WP_Posts_List_Table extends WP_List_Table { esc_html( sanitize_term_field( 'name', $c->name, $c->term_id, 'tag', 'display' ) ) ); } - echo join( ', ', $out ); + /* translators: used between list items, there is a space after the comma */ + echo join( __( ', ' ), $out ); } else { _e( 'No Tags' ); } @@ -995,20 +996,23 @@ class WP_Posts_List_Table extends WP_List_Table { post_type, 'post-formats' ) && current_theme_supports( 'post-formats' ) ) : $post_formats = get_theme_support( 'post-formats' ); if ( isset( $post_formats[0] ) && is_array( $post_formats[0] ) ) : - $all_post_formats = get_post_format_strings(); ?> + $all_post_formats = get_post_format_strings(); + unset( $all_post_formats['standard'] ); ?>
    @@ -1050,5 +1054,3 @@ class WP_Posts_List_Table extends WP_List_Table { diff --git a/wp-admin/includes/class-wp-terms-list-table.php b/wp-admin/includes/class-wp-terms-list-table.php index d7cb5261..b398a55c 100644 --- a/wp-admin/includes/class-wp-terms-list-table.php +++ b/wp-admin/includes/class-wp-terms-list-table.php @@ -42,7 +42,7 @@ class WP_Terms_List_Table extends WP_List_Table { function prepare_items() { global $taxonomy; - $tags_per_page = $this->get_items_per_page( 'edit_' . $taxonomy . '_per_page' ); + $tags_per_page = $this->get_items_per_page( 'edit_' . $taxonomy . '_per_page' ); if ( 'post_tag' == $taxonomy ) { $tags_per_page = apply_filters( 'edit_tags_per_page', $tags_per_page ); @@ -378,5 +378,3 @@ class WP_Terms_List_Table extends WP_List_Table { diff --git a/wp-admin/includes/class-wp-theme-install-list-table.php b/wp-admin/includes/class-wp-theme-install-list-table.php index 66f7797c..47175243 100644 --- a/wp-admin/includes/class-wp-theme-install-list-table.php +++ b/wp-admin/includes/class-wp-theme-install-list-table.php @@ -7,19 +7,30 @@ * @since 3.1.0 * @access private */ -class WP_Theme_Install_List_Table extends WP_List_Table { +class WP_Theme_Install_List_Table extends WP_Themes_List_Table { + + var $features = array(); function ajax_user_can() { - return current_user_can('install_themes'); + return current_user_can( 'install_themes' ); } function prepare_items() { include( ABSPATH . 'wp-admin/includes/theme-install.php' ); - global $tabs, $tab, $paged, $type, $term, $theme_field_defaults; - + global $tabs, $tab, $paged, $type, $theme_field_defaults; wp_reset_vars( array( 'tab' ) ); + $search_terms = array(); + $search_string = ''; + if ( ! empty( $_REQUEST['s'] ) ){ + $search_string = strtolower( stripslashes( $_REQUEST['s'] ) ); + $search_terms = array_unique( array_filter( array_map( 'trim', explode( ',', $search_string ) ) ) ); + } + + if ( ! empty( $_REQUEST['features'] ) ) + $this->features = $_REQUEST['features']; + $paged = $this->get_pagenum(); $per_page = 36; @@ -48,34 +59,26 @@ class WP_Theme_Install_List_Table extends WP_List_Table { switch ( $tab ) { case 'search': - $type = isset( $_REQUEST['type'] ) ? stripslashes( $_REQUEST['type'] ) : ''; - $term = isset( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : ''; - + $type = isset( $_REQUEST['type'] ) ? stripslashes( $_REQUEST['type'] ) : 'term'; switch ( $type ) { case 'tag': - $terms = explode( ',', $term ); - $terms = array_map( 'trim', $terms ); - $terms = array_map( 'sanitize_title_with_dashes', $terms ); - $args['tag'] = $terms; + $args['tag'] = array_map( 'sanitize_key', $search_terms ); break; case 'term': - $args['search'] = $term; + $args['search'] = $search_string; break; case 'author': - $args['author'] = $term; + $args['author'] = $search_string; break; } - if ( !empty( $_POST['features'] ) ) { - $terms = $_POST['features']; - $terms = array_map( 'trim', $terms ); - $terms = array_map( 'sanitize_title_with_dashes', $terms ); - $args['tag'] = $terms; - $_REQUEST['s'] = implode( ',', $terms ); + if ( ! empty( $this->features ) ) { + $args['tag'] = $this->features; + $_REQUEST['s'] = implode( ',', $this->features ); $_REQUEST['type'] = 'tag'; } - add_action( 'install_themes_table_header', 'install_theme_search_form' ); + add_action( 'install_themes_table_header', 'install_theme_search_form', 10, 0 ); break; case 'featured': @@ -89,7 +92,7 @@ class WP_Theme_Install_List_Table extends WP_List_Table { $args = false; } - if ( !$args ) + if ( ! $args ) return; $api = themes_api( 'query_themes', $args ); @@ -102,6 +105,7 @@ class WP_Theme_Install_List_Table extends WP_List_Table { $this->set_pagination_args( array( 'total_items' => $api->info['results'], 'per_page' => $per_page, + 'infinite_scroll' => true, ) ); } @@ -122,13 +126,8 @@ class WP_Theme_Install_List_Table extends WP_List_Table { return $display_tabs; } - function get_columns() { - return array(); - } - function display() { - - // wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' ); + wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' ); ?>
    @@ -143,27 +142,254 @@ class WP_Theme_Install_List_Table extends WP_List_Table { display_rows_or_placeholder(); ?>
    -
    - pagination( 'bottom' ); ?> - -
    -
    -items; - $theme_names = array_keys( $themes ); - - foreach ( $theme_names as $theme_name ) { - $class = array( 'available-theme' ); + foreach ( $themes as $theme ) { ?> -
    single_row( $theme ); ?>
    theme_installer(); } -} -?> + /* + * Prints a theme from the WordPress.org API. + * + * @param object $theme An object that contains theme data returned by the WordPress.org API. + * + * Example theme data: + * object(stdClass)[59] + * public 'name' => string 'Magazine Basic' (length=14) + * public 'slug' => string 'magazine-basic' (length=14) + * public 'version' => string '1.1' (length=3) + * public 'author' => string 'tinkerpriest' (length=12) + * public 'preview_url' => string 'http://wp-themes.com/?magazine-basic' (length=36) + * public 'screenshot_url' => string 'http://wp-themes.com/wp-content/themes/magazine-basic/screenshot.png' (length=68) + * public 'rating' => float 80 + * public 'num_ratings' => int 1 + * public 'homepage' => string 'http://wordpress.org/extend/themes/magazine-basic' (length=49) + * public 'description' => string 'A basic magazine style layout with a fully customizable layout through a backend interface. Designed by c.bavota of Tinker Priest Media.' (length=214) + * public 'download_link' => string 'http://wordpress.org/extend/themes/download/magazine-basic.1.1.zip' (length=66) + */ + function single_row( $theme ) { + global $themes_allowedtags; + + if ( empty( $theme ) ) + return; + + $name = wp_kses( $theme->name, $themes_allowedtags ); + $author = wp_kses( $theme->author, $themes_allowedtags ); + + $preview_title = sprintf( __('Preview “%s”'), $name ); + $preview_url = add_query_arg( array( + 'tab' => 'theme-information', + 'theme' => $theme->slug, + ) ); + + $actions = array(); + + $install_url = add_query_arg( array( + 'action' => 'install-theme', + 'theme' => $theme->slug, + ), self_admin_url( 'update.php' ) ); + + $update_url = add_query_arg( array( + 'action' => 'upgrade-theme', + 'theme' => $theme->slug, + ), self_admin_url( 'update.php' ) ); + + $status = $this->_get_theme_status( $theme ); + + switch ( $status ) { + default: + case 'install': + $actions[] = '' . __( 'Install Now' ) . ''; + break; + case 'update_available': + $actions[] = '' . __( 'Update' ) . ''; + break; + case 'newer_installed': + case 'latest_installed': + $actions[] = '' . _x( 'Installed', 'theme' ) . ''; + break; + } + + $actions[] = '' . __( 'Preview' ) . ''; + + $actions = apply_filters( 'theme_install_actions', $actions, $theme ); + + ?> + + + + +

    +
    + + + + install_theme_info( $theme ); + } + + /* + * Prints the wrapper for the theme installer. + */ + function theme_installer() { + ?> +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    + +
    +
    + install_theme_info( $theme ); ?> +
    +
    + +
    +
    + name, $themes_allowedtags ); + $author = wp_kses( $theme->author, $themes_allowedtags ); + + $num_ratings = sprintf( _n( '(based on %s rating)', '(based on %s ratings)', $theme->num_ratings ), number_format_i18n( $theme->num_ratings ) ); + + $install_url = add_query_arg( array( + 'action' => 'install-theme', + 'theme' => $theme->slug, + ), self_admin_url( 'update.php' ) ); + + $update_url = add_query_arg( array( + 'action' => 'upgrade-theme', + 'theme' => $theme->slug, + ), self_admin_url( 'update.php' ) ); + + $status = $this->_get_theme_status( $theme ); + + ?> +
    slug ) ) . '">' . __( 'Install' ) . ''; + break; + case 'update_available': + echo '' . __( 'Update' ) . ''; + break; + case 'newer_installed': + case 'latest_installed': + echo '' . _x( 'Installed', 'theme' ) . ''; + break; + } ?> +

    + + screenshot_url ) ): ?> + + +
    +
    +
    +
    +
    + + version, $themes_allowedtags ); ?> +
    +
    + description, $themes_allowedtags ); ?> +
    +
    + +
    + Install screen + * @uses $type Global; type of search. + */ + function _js_vars() { + global $tab, $type; + parent::_js_vars( compact( 'tab', 'type' ) ); + } + + /** + * Check to see if the theme is already installed. + * + * @since 3.4 + * @access private + * + * @param object $theme - A WordPress.org Theme API object. + * @return string Theme status. + */ + private function _get_theme_status( $theme ) { + $status = 'install'; + + $installed_theme = wp_get_theme( $theme->slug ); + if ( $installed_theme->exists() ) { + if ( version_compare( $installed_theme->get('Version'), $theme->version, '=' ) ) + $status = 'latest_installed'; + elseif ( version_compare( $installed_theme->get('Version'), $theme->version, '>' ) ) + $status = 'newer_installed'; + else + $status = 'update_available'; + } + + return $status; + } +} diff --git a/wp-admin/includes/class-wp-themes-list-table.php b/wp-admin/includes/class-wp-themes-list-table.php index 4839b504..003d1ab0 100644 --- a/wp-admin/includes/class-wp-themes-list-table.php +++ b/wp-admin/includes/class-wp-themes-list-table.php @@ -9,59 +9,55 @@ */ class WP_Themes_List_Table extends WP_List_Table { - var $search = array(); + protected $search_terms = array(); var $features = array(); + function __construct() { + parent::__construct( array( + 'ajax' => true, + ) ); + } + function ajax_user_can() { // Do not check edit_theme_options here. AJAX calls for available themes require switch_themes. - return current_user_can('switch_themes'); + return current_user_can( 'switch_themes' ); } function prepare_items() { - global $ct; - - $ct = current_theme_info(); - - $themes = get_allowed_themes(); + $themes = wp_get_themes( array( 'allowed' => true ) ); - if ( ! empty( $_REQUEST['s'] ) ) { - $search = strtolower( stripslashes( $_REQUEST['s'] ) ); - $this->search = array_merge( $this->search, array_filter( array_map( 'trim', explode( ',', $search ) ) ) ); - $this->search = array_unique( $this->search ); - } + if ( ! empty( $_REQUEST['s'] ) ) + $this->search_terms = array_unique( array_filter( array_map( 'trim', explode( ',', strtolower( stripslashes( $_REQUEST['s'] ) ) ) ) ) ); - if ( !empty( $_REQUEST['features'] ) ) { + if ( ! empty( $_REQUEST['features'] ) ) $this->features = $_REQUEST['features']; - $this->features = array_map( 'trim', $this->features ); - $this->features = array_map( 'sanitize_title_with_dashes', $this->features ); - $this->features = array_unique( $this->features ); - } - if ( $this->search || $this->features ) { + if ( $this->search_terms || $this->features ) { foreach ( $themes as $key => $theme ) { - if ( !$this->search_theme( $theme ) ) + if ( ! $this->search_theme( $theme ) ) unset( $themes[ $key ] ); } } - unset( $themes[$ct->name] ); - uksort( $themes, "strnatcasecmp" ); + unset( $themes[ get_option( 'stylesheet' ) ] ); + WP_Theme::sort_by_name( $themes ); - $per_page = 24; + $per_page = 999; $page = $this->get_pagenum(); $start = ( $page - 1 ) * $per_page; - $this->items = array_slice( $themes, $start, $per_page ); + $this->items = array_slice( $themes, $start, $per_page, true ); $this->set_pagination_args( array( 'total_items' => count( $themes ), 'per_page' => $per_page, + 'infinite_scroll' => true, ) ); } function no_items() { - if ( $this->search || $this->features ) { + if ( $this->search_terms || $this->features ) { _e( 'No items found.' ); return; } @@ -101,7 +97,7 @@ class WP_Themes_List_Table extends WP_List_Table { } function display() { - // wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' ); + wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' ); ?> tablenav( 'top' ); ?> @@ -119,104 +115,142 @@ class WP_Themes_List_Table extends WP_List_Table { function display_rows() { $themes = $this->items; - $theme_names = array_keys( $themes ); - natcasesort( $theme_names ); - - foreach ( $theme_names as $theme_name ) { - $class = array( 'available-theme' ); - ?> -
    - 1, 'template' => $template, 'stylesheet' => $stylesheet, 'preview_iframe' => true, 'TB_iframe' => 'true' ), $preview_link ) ); - $preview_text = esc_attr( sprintf( __( 'Preview of “%s”' ), $title ) ); - $tags = $themes[$theme_name]['Tags']; - $thickbox_class = 'thickbox thickbox-preview'; - $activate_link = wp_nonce_url( "themes.php?action=activate&template=".urlencode( $template )."&stylesheet=".urlencode( $stylesheet ), 'switch-theme_' . $template ); - $activate_text = esc_attr( sprintf( __( 'Activate “%s”' ), $title ) ); - $actions = array(); - $actions[] = '' . __( 'Activate' ) . ''; - $actions[] = '' . __( 'Preview' ) . ''; - if ( ! is_multisite() && current_user_can( 'delete_themes' ) ) - $actions[] = '' . __( 'Delete' ) . ''; - $actions = apply_filters( 'theme_action_links', $actions, $themes[$theme_name] ); - - $actions = implode ( ' | ', $actions ); -?> - - - - - -

    -

    - - -

    %2$s. The stylesheet files are located in %3$s. %4$s uses templates from %5$s. Changes made to the templates will affect both themes.' ), $title, str_replace( WP_CONTENT_DIR, '', $template_dir ), str_replace( WP_CONTENT_DIR, '', $stylesheet_dir ), $title, $parent_theme ); ?>

    - -

    %2$s.' ), $title, str_replace( WP_CONTENT_DIR, '', $template_dir ), str_replace( WP_CONTENT_DIR, '', $stylesheet_dir ) ); ?>

    - - -

    - - - -
    -
    get_template(); + $stylesheet = $theme->get_stylesheet(); + $title = $theme->display('Name'); + $version = $theme->display('Version'); + $author = $theme->display('Author'); + + $activate_link = wp_nonce_url( "themes.php?action=activate&template=" . urlencode( $template ) . "&stylesheet=" . urlencode( $stylesheet ), 'switch-theme_' . $stylesheet ); + + $preview_link = esc_url( add_query_arg( + array( 'preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'preview_iframe' => true, 'TB_iframe' => 'true' ), + home_url( '/' ) ) ); + + $actions = array(); + $actions['activate'] = '' . __( 'Activate' ) . ''; + + $actions['preview'] = '' . __( 'Preview' ) . ''; + + if ( current_user_can( 'edit_theme_options' ) ) + $actions['preview'] .= '' + . __( 'Live Preview' ) . ''; + + if ( ! is_multisite() && current_user_can( 'delete_themes' ) ) + $actions['delete'] = '' . __( 'Delete' ) . ''; + + $actions = apply_filters( 'theme_action_links', $actions, $theme ); + $delete_action = isset( $actions['delete'] ) ? '
    ' . $actions['delete'] . '
    ' : ''; + unset( $actions['delete'] ); + + ?> + + + get_screenshot() ) : ?> + + + + + get_screenshot() ) : ?> + + + + +

    +
    + + +
    +

    +

    display('Description'); ?>

    + parent() ) : + /* translators: 1: theme title, 2: template dir, 3: stylesheet_dir, 4: theme title, 5: parent_theme */ ?> +

    %2$s. The stylesheet files are located in %3$s. %4$s uses templates from %5$s. Changes made to the templates will affect both themes.' ), + $title, str_replace( WP_CONTENT_DIR, '', $theme->get_template_directory() ), str_replace( WP_CONTENT_DIR, '', $theme->get_stylesheet_directory() ), $title, $theme->parent()->display('Name') ); ?>

    + +

    %2$s.' ), + $title, str_replace( WP_CONTENT_DIR, '', $theme->get_template_directory() ), str_replace( WP_CONTENT_DIR, '', $theme->get_stylesheet_directory() ) ); ?>

    + +
    + +
    + features as $word ) { + if ( ! in_array( $word, $theme->get('Tags') ) ) + return false; + } // Match all phrases - if ( count( $this->search ) > 0 ) { - foreach ( $this->search as $word ) { - $matched = 0; - - // In a tag? - if ( in_array( $word, array_map( 'sanitize_title_with_dashes', $theme['Tags'] ) ) ) - $matched = 1; - - // In one of the fields? - foreach ( array( 'Name', 'Title', 'Description', 'Author', 'Template', 'Stylesheet' ) AS $field ) { - if ( stripos( $theme[$field], $word ) !== false ) - $matched++; - } - - if ( $matched == 0 ) - return false; + foreach ( $this->search_terms as $word ) { + if ( in_array( $word, $theme->get('Tags') ) ) + continue; + + foreach ( array( 'Name', 'Description', 'Author', 'AuthorURI' ) as $header ) { + // Don't mark up; Do translate. + if ( false !== stripos( $theme->display( $header, false, true ), $word ) ) + continue 2; } - } - // Now search the features - if ( count( $this->features ) > 0 ) { - foreach ( $this->features as $word ) { - // In a tag? - if ( !in_array( $word, array_map( 'sanitize_title_with_dashes', $theme['Tags'] ) ) ) - return false; - } + if ( false !== stripos( $theme->get_stylesheet(), $word ) ) + continue; + + if ( false !== stripos( $theme->get_template(), $word ) ) + continue; + + return false; } - // Only get here if each word exists in the tags or one of the fields return true; } -} -?> + /** + * Send required variables to JavaScript land + * + * @since 3.4 + * @access private + * + * @uses $this->features Array of all feature search terms. + * @uses get_pagenum() + * @uses _pagination_args['total_pages'] + */ + function _js_vars( $extra_args = array() ) { + $search_string = isset( $_REQUEST['s'] ) ? esc_attr( stripslashes( $_REQUEST['s'] ) ) : ''; + + $args = array( + 'search' => $search_string, + 'features' => $this->features, + 'paged' => $this->get_pagenum(), + 'total_pages' => ! empty( $this->_pagination_args['total_pages'] ) ? $this->_pagination_args['total_pages'] : 1, + ); + + if ( is_array( $extra_args ) ) + $args = array_merge( $args, $extra_args ); + + printf( "\n", json_encode( $args ) ); + parent::_js_vars(); + } +} diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php index e61e0ef5..c70ef66b 100644 --- a/wp-admin/includes/class-wp-upgrader.php +++ b/wp-admin/includes/class-wp-upgrader.php @@ -374,7 +374,6 @@ class Plugin_Upgrader extends WP_Upgrader { $this->strings['no_package'] = __('Update package not available.'); $this->strings['downloading_package'] = __('Downloading update from %s…'); $this->strings['unpack_package'] = __('Unpacking the update…'); - $this->strings['deactivate_plugin'] = __('Deactivating the plugin…'); $this->strings['remove_old'] = __('Removing the old version of the plugin…'); $this->strings['remove_old_failed'] = __('Could not remove the old plugin.'); $this->strings['process_failed'] = __('Plugin update failed.'); @@ -412,6 +411,7 @@ class Plugin_Upgrader extends WP_Upgrader { // Force refresh of plugin update information delete_site_transient('update_plugins'); + wp_cache_delete( 'plugins', 'plugins' ); return true; } @@ -456,6 +456,7 @@ class Plugin_Upgrader extends WP_Upgrader { // Force refresh of plugin update information delete_site_transient('update_plugins'); + wp_cache_delete( 'plugins', 'plugins' ); } function bulk_upgrade($plugins) { @@ -537,6 +538,7 @@ class Plugin_Upgrader extends WP_Upgrader { // Force refresh of plugin update information delete_site_transient('update_plugins'); + wp_cache_delete( 'plugins', 'plugins' ); return $results; } @@ -594,7 +596,6 @@ class Plugin_Upgrader extends WP_Upgrader { return new WP_Error('bad_request', $this->strings['bad_request']); if ( is_plugin_active($plugin) ) { - $this->skin->feedback('deactivate_plugin'); //Deactivate the plugin silently, Prevent deactivation hooks from running. deactivate_plugins($plugin, true); } @@ -662,6 +663,80 @@ class Theme_Upgrader extends WP_Upgrader { $this->strings['installing_package'] = __('Installing the theme…'); $this->strings['process_failed'] = __('Theme install failed.'); $this->strings['process_success'] = __('Theme installed successfully.'); + /* translators: 1: theme name, 2: version */ + $this->strings['process_success_specific'] = __('Successfully installed the theme %1$s %2$s.'); + $this->strings['parent_theme_search'] = __('This theme requires a parent theme. Checking if it is installed…'); + /* translators: 1: theme name, 2: version */ + $this->strings['parent_theme_prepare_install'] = __('Preparing to install %1$s %2$s…'); + /* translators: 1: theme name, 2: version */ + $this->strings['parent_theme_currently_installed'] = __('The parent theme, %1$s %2$s, is currently installed.'); + /* translators: 1: theme name, 2: version */ + $this->strings['parent_theme_install_success'] = __('Successfully installed the parent theme, %1$s %2$s.'); + $this->strings['parent_theme_not_found'] = __('The parent theme could not be found. You will need to install the parent theme, %s, before you can use this child theme.'); + } + + function check_parent_theme_filter($install_result, $hook_extra, $child_result) { + // Check to see if we need to install a parent theme + $theme_info = $this->theme_info(); + + if ( ! $theme_info->parent() ) + return $install_result; + + $this->skin->feedback( 'parent_theme_search' ); + + if ( ! $theme_info->parent()->errors() ) { + $this->skin->feedback( 'parent_theme_currently_installed', $theme_info->parent()->display('Name'), $theme_info->parent()->display('Version') ); + // We already have the theme, fall through. + return $install_result; + } + + // We don't have the parent theme, lets install it + $api = themes_api('theme_information', array('slug' => $theme_info->get('Template'), 'fields' => array('sections' => false, 'tags' => false) ) ); //Save on a bit of bandwidth. + + if ( ! $api || is_wp_error($api) ) { + $this->skin->feedback( 'parent_theme_not_found', $theme_info->get('Template') ); + // Don't show activate or preview actions after install + add_filter('install_theme_complete_actions', array(&$this, 'hide_activate_preview_actions') ); + return $install_result; + } + + // Backup required data we're going to override: + $child_api = $this->skin->api; + $child_success_message = $this->strings['process_success']; + + // Override them + $this->skin->api = $api; + $this->strings['process_success_specific'] = $this->strings['parent_theme_install_success'];//, $api->name, $api->version); + + $this->skin->feedback('parent_theme_prepare_install', $api->name, $api->version); + + add_filter('install_theme_complete_actions', '__return_false', 999); // Don't show any actions after installing the theme. + + // Install the parent theme + $parent_result = $this->run( array( + 'package' => $api->download_link, + 'destination' => WP_CONTENT_DIR . '/themes', + 'clear_destination' => false, //Do not overwrite files. + 'clear_working' => true + ) ); + + if ( is_wp_error($parent_result) ) + add_filter('install_theme_complete_actions', array(&$this, 'hide_activate_preview_actions') ); + + // Start cleaning up after the parents installation + remove_filter('install_theme_complete_actions', '__return_false', 999); + + // Reset child's result and data + $this->result = $child_result; + $this->skin->api = $child_api; + $this->strings['process_success'] = $child_success_message; + + return $install_result; + } + + function hide_activate_preview_actions($actions) { + unset($actions['activate'], $actions['preview']); + return $actions; } function install($package) { @@ -670,6 +745,7 @@ class Theme_Upgrader extends WP_Upgrader { $this->install_strings(); add_filter('upgrader_source_selection', array(&$this, 'check_package') ); + add_filter('upgrader_post_install', array(&$this, 'check_parent_theme_filter'), 10, 3); $options = array( 'package' => $package, @@ -681,12 +757,16 @@ class Theme_Upgrader extends WP_Upgrader { $this->run($options); remove_filter('upgrader_source_selection', array(&$this, 'check_package') ); + remove_filter('upgrader_post_install', array(&$this, 'check_parent_theme_filter'), 10, 3); if ( ! $this->result || is_wp_error($this->result) ) return $this->result; // Force refresh of theme update information delete_site_transient('update_themes'); + search_theme_directories( true ); + foreach ( wp_get_themes() as $theme ) + $theme->cache_delete(); return true; } @@ -733,6 +813,9 @@ class Theme_Upgrader extends WP_Upgrader { // Force refresh of theme update information delete_site_transient('update_themes'); + search_theme_directories( true ); + foreach ( wp_get_themes() as $theme ) + $theme->cache_delete(); return true; } @@ -820,6 +903,9 @@ class Theme_Upgrader extends WP_Upgrader { // Force refresh of theme update information delete_site_transient('update_themes'); + search_theme_directories( true ); + foreach ( wp_get_themes() as $theme ) + $theme->cache_delete(); return $results; } @@ -835,14 +921,17 @@ class Theme_Upgrader extends WP_Upgrader { if ( ! is_dir($working_directory) ) // Sanity check, if the above fails, lets not prevent installation. return $source; - if ( ! file_exists( $working_directory . 'style.css' ) ) // A proper archive should have a style.css file in the single subdirectory + // A proper archive should have a style.css file in the single subdirectory + if ( ! file_exists( $working_directory . 'style.css' ) ) return new WP_Error( 'incompatible_archive', $this->strings['incompatible_archive'], __('The theme is missing the style.css stylesheet.') ); - $info = get_theme_data( $working_directory . 'style.css' ); - if ( empty($info['Name']) ) + $info = get_file_data( $working_directory . 'style.css', array( 'Name' => 'Theme Name', 'Template' => 'Template' ) ); + + if ( empty( $info['Name'] ) ) return new WP_Error( 'incompatible_archive', $this->strings['incompatible_archive'], __("The style.css stylesheet doesn't contain a valid theme header.") ); - if ( empty($info['Template']) && ! file_exists( $working_directory . 'index.php' ) ) // If no template is set, it must have at least an index.php to be legit. + // If it's not a child theme, it must have at least an index.php to be legit. + if ( empty( $info['Template'] ) && ! file_exists( $working_directory . 'index.php' ) ) return new WP_Error( 'incompatible_archive', $this->strings['incompatible_archive'], __('The theme is missing the index.php file.') ); return $source; @@ -870,15 +959,15 @@ class Theme_Upgrader extends WP_Upgrader { $theme = isset($theme['theme']) ? $theme['theme'] : ''; - if ( $theme != get_stylesheet() ) //If not current + if ( $theme != get_stylesheet() ) // If not current return $return; - //Ensure stylesheet name hasnt changed after the upgrade: + // Ensure stylesheet name hasnt changed after the upgrade: // @TODO: Note, This doesn't handle the Template changing, or the Template name changing. if ( $theme == get_stylesheet() && $theme != $this->result['destination_name'] ) { $theme_info = $this->theme_info(); $stylesheet = $this->result['destination_name']; - $template = !empty($theme_info['Template']) ? $theme_info['Template'] : $stylesheet; + $template = $theme_info->get_template(); switch_theme($template, $stylesheet, true); } @@ -911,7 +1000,7 @@ class Theme_Upgrader extends WP_Upgrader { else return false; } - return get_theme_data(WP_CONTENT_DIR . '/themes/' . $theme . '/style.css'); + return wp_get_theme( $theme, WP_CONTENT_DIR . '/themes/' ); } } @@ -933,6 +1022,7 @@ class Core_Upgrader extends WP_Upgrader { $this->strings['downloading_package'] = __('Downloading update from %s…'); $this->strings['unpack_package'] = __('Unpacking the update…'); $this->strings['copy_failed'] = __('Could not copy files.'); + $this->strings['copy_failed_space'] = __('Could not copy files. You may have run out of disk space.' ); } function upgrade($current) { @@ -985,6 +1075,9 @@ class Core_Upgrader extends WP_Upgrader { require(ABSPATH . 'wp-admin/includes/update-core.php'); + if ( ! function_exists( 'update_core' ) ) + return new WP_Error( 'copy_failed_space', $this->strings['copy_failed_space'] ); + return update_core($working_dir, $wp_dir); } @@ -1106,7 +1199,6 @@ class Plugin_Upgrader_Skin extends WP_Upgrader_Skin { function after() { $this->plugin = $this->upgrader->plugin_info(); if ( !empty($this->plugin) && !is_wp_error($this->result) && $this->plugin_active ){ - show_message(__('Reactivating the plugin…')); echo ''; } @@ -1290,12 +1382,13 @@ class Bulk_Theme_Upgrader_Skin extends Bulk_Upgrader_Skin { } function before() { - parent::before($this->theme_info['Name']); + parent::before( $this->theme_info->display('Name') ); } function after() { - parent::after($this->theme_info['Name']); + parent::after( $this->theme_info->display('Name') ); } + function bulk_footer() { parent::bulk_footer(); $update_actions = array( @@ -1303,7 +1396,7 @@ class Bulk_Theme_Upgrader_Skin extends Bulk_Upgrader_Skin { 'updates_page' => '' . __('Return to WordPress Updates') . '' ); - $update_actions = apply_filters('update_bulk_theme_complete_actions', $update_actions, $this->theme_info); + $update_actions = apply_filters('update_bulk_theme_complete_actions', $update_actions, $this->theme_info ); if ( ! empty($update_actions) ) $this->feedback(implode(' | ', (array)$update_actions)); } @@ -1362,7 +1455,6 @@ class Plugin_Installer_Skin extends WP_Upgrader_Skin { else $install_actions['plugins_page'] = '' . __('Return to Plugins page') . ''; - if ( ! $this->result || is_wp_error($this->result) ) { unset( $install_actions['activate_plugin'] ); unset( $install_actions['network_activate'] ); @@ -1397,10 +1489,8 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin { } function before() { - if ( !empty($this->api) ) { - /* translators: 1: theme name, 2: version */ - $this->upgrader->strings['process_success'] = sprintf( __('Successfully installed the theme %1$s %2$s.'), $this->api->name, $this->api->version); - } + if ( !empty($this->api) ) + $this->upgrader->strings['process_success'] = sprintf( $this->upgrader->strings['process_success_specific'], $this->api->name, $this->api->version); } function after() { @@ -1408,22 +1498,33 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin { return; $theme_info = $this->upgrader->theme_info(); - if ( empty($theme_info) ) + if ( empty( $theme_info ) ) return; - $name = $theme_info['Name']; + + $name = $theme_info->display('Name'); $stylesheet = $this->upgrader->result['destination_name']; - $template = !empty($theme_info['Template']) ? $theme_info['Template'] : $stylesheet; + $template = $theme_info->get_template(); - $preview_link = htmlspecialchars( add_query_arg( array('preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'preview_iframe' => 1, '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); + $preview_link = add_query_arg( array( + 'preview' => 1, + 'template' => $template, + 'stylesheet' => $stylesheet, + ), trailingslashit( get_home_url() ) ); - $install_actions = array( - 'preview' => '' . __('Preview') . '', - 'activate' => '' . __('Activate') . '' - ); + $activate_link = add_query_arg( array( + 'action' => 'activate', + 'template' => $template, + 'stylesheet' => $stylesheet, + ), admin_url('themes.php') ); + $activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet ); + + $install_actions = array(); + $install_actions['preview'] = '' . __('Preview') . ''; + $install_actions['preview'] .= '' . __('Live Preview') . ''; + $install_actions['activate'] = '' . __('Activate') . ''; if ( is_network_admin() && current_user_can( 'manage_network_themes' ) ) - $install_actions['network_enable'] = '' . __( 'Network Enable' ) . ''; + $install_actions['network_enable'] = '' . __( 'Network Enable' ) . ''; if ( $this->type == 'web' ) $install_actions['themes_page'] = '' . __('Return to Theme Installer') . ''; @@ -1463,22 +1564,34 @@ class Theme_Upgrader_Skin extends WP_Upgrader_Skin { function after() { $update_actions = array(); - if ( !empty($this->upgrader->result['destination_name']) && - ($theme_info = $this->upgrader->theme_info()) && - !empty($theme_info) ) { - - $name = $theme_info['Name']; + if ( ! empty( $this->upgrader->result['destination_name'] ) && $theme_info = $this->upgrader->theme_info() ) { + $name = $theme_info->display('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['preview'] = '' . __('Preview') . ''; - $update_actions['activate'] = '' . __('Activate') . ''; + $template = $theme_info->get_template(); + + $preview_link = add_query_arg( array( + 'preview' => 1, + 'template' => $template, + 'stylesheet' => $stylesheet, + ), trailingslashit( get_home_url() ) ); + + $activate_link = add_query_arg( array( + 'action' => 'activate', + 'template' => $template, + 'stylesheet' => $stylesheet, + ), admin_url('themes.php') ); + $activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet ); + + if ( get_stylesheet() == $stylesheet ) { + $update_actions['preview'] = '' . __('Customize') . ''; + } else { + $update_actions['preview'] = '' . __('Preview') . ''; + $update_actions['preview'] .= '' . __('Live Preview') . ''; + $update_actions['activate'] = '' . __('Activate') . ''; + } - if ( ( ! $this->result || is_wp_error($this->result) ) || $stylesheet == get_stylesheet() ) - unset($update_actions['preview'], $update_actions['activate']); + if ( ! $this->result || is_wp_error( $this->result ) || is_network_admin() ) + unset( $update_actions['preview'], $update_actions['activate'] ); } $update_actions['themes_page'] = '' . __('Return to Themes page') . ''; @@ -1563,4 +1676,4 @@ class File_Upload_Upgrader { return true; } -} +} \ No newline at end of file diff --git a/wp-admin/includes/class-wp-users-list-table.php b/wp-admin/includes/class-wp-users-list-table.php index 09cb2156..adb83214 100644 --- a/wp-admin/includes/class-wp-users-list-table.php +++ b/wp-admin/includes/class-wp-users-list-table.php @@ -209,9 +209,9 @@ class WP_Users_List_Table extends WP_List_Table { * @since 2.1.0 * * @param object $user_object - * @param string $style Optional. Attributes added to the TR element. Must be sanitized. + * @param string $style Optional. Attributes added to the TR element. Must be sanitized. * @param string $role Key for the $wp_roles array. - * @param int $numposts Optional. Post count to display for this user. Defaults to zero, as in, a new user has made zero posts. + * @param int $numposts Optional. Post count to display for this user. Defaults to zero, as in, a new user has made zero posts. * @return string */ function single_row( $user_object, $style = '', $role = '', $numposts = 0 ) { @@ -316,5 +316,3 @@ class WP_Users_List_Table extends WP_List_Table { return $r; } } - -?> diff --git a/wp-admin/includes/comment.php b/wp-admin/includes/comment.php index d731130a..84589115 100644 --- a/wp-admin/includes/comment.php +++ b/wp-admin/includes/comment.php @@ -156,4 +156,3 @@ function enqueue_comment_hotkeys_js() { if ( 'true' == get_user_option( 'comment_shortcuts' ) ) wp_enqueue_script( 'jquery-table-hotkeys' ); } -?> diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index 008a4fdd..6e7d5f0d 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -86,8 +86,8 @@ function wp_dashboard_setup() { if ( !isset( $widget_options['dashboard_primary'] ) ) { $update = true; $widget_options['dashboard_primary'] = array( - 'link' => apply_filters( 'dashboard_primary_link', __( 'http://wordpress.org/news/' ) ), - 'url' => apply_filters( 'dashboard_primary_feed', __( 'http://wordpress.org/news/feed/' ) ), + 'link' => apply_filters( 'dashboard_primary_link', __( 'http://wordpress.org/news/' ) ), + 'url' => apply_filters( 'dashboard_primary_feed', __( 'http://wordpress.org/news/feed/' ) ), 'title' => apply_filters( 'dashboard_primary_title', __( 'WordPress Blog' ) ), 'items' => 2, 'show_summary' => 1, @@ -101,8 +101,8 @@ function wp_dashboard_setup() { if ( !isset( $widget_options['dashboard_secondary'] ) ) { $update = true; $widget_options['dashboard_secondary'] = array( - 'link' => apply_filters( 'dashboard_secondary_link', __( 'http://planet.wordpress.org/' ) ), - 'url' => apply_filters( 'dashboard_secondary_feed', __( 'http://planet.wordpress.org/feed/' ) ), + 'link' => apply_filters( 'dashboard_secondary_link', __( 'http://planet.wordpress.org/' ) ), + 'url' => apply_filters( 'dashboard_secondary_feed', __( 'http://planet.wordpress.org/feed/' ) ), 'title' => apply_filters( 'dashboard_secondary_title', __( 'Other WordPress News' ) ), 'items' => 5, 'show_summary' => 0, @@ -193,54 +193,29 @@ function _wp_dashboard_control_callback( $dashboard, $meta_box ) { * @since 2.5.0 */ function wp_dashboard() { - global $screen_layout_columns; - $screen = get_current_screen(); + $class = 'columns-' . get_current_screen()->get_columns(); - $hide2 = $hide3 = $hide4 = ''; - switch ( $screen_layout_columns ) { - case 4: - $width = 'width:25%;'; - break; - case 3: - $width = 'width:33.333333%;'; - $hide4 = 'display:none;'; - break; - case 2: - $width = 'width:50%;'; - $hide3 = $hide4 = 'display:none;'; - break; - default: - $width = 'width:100%;'; - $hide2 = $hide3 = $hide4 = 'display:none;'; - } -?> -
    -\n"; - do_meta_boxes( $screen->id, 'normal', '' ); - - echo "\t
    \n"; - do_meta_boxes( $screen->id, 'side', '' ); - - echo "\t
    \n"; - do_meta_boxes( $screen->id, 'column3', '' ); - - echo "\t
    \n"; - do_meta_boxes( $screen->id, 'column4', '' ); ?> -
    +
    +
    + id, 'normal', '' ); ?> +
    +
    + id, 'side', '' ); ?> +
    +
    + id, 'column3', '' ); ?> +
    +
    + id, 'column4', '' ); ?> +
    +
    - -

    -

    - -'; /* TODO: Show status breakdown on hover - if ( $can_edit_pages && !empty($num_pages->publish) ) { // how many pages is not exposed in feeds. Don't show if !current_user_can + if ( $can_edit_pages && !empty($num_pages->publish) ) { // how many pages is not exposed in feeds. Don't show if !current_user_can $post_type_texts[] = ''.sprintf( _n( '%s page', '%s pages', $num_pages->publish ), number_format_i18n( $num_pages->publish ) ).''; } if ( $can_edit_posts && !empty($num_posts->draft) ) { @@ -327,7 +302,6 @@ function wp_dashboard_right_now() { do_action('right_now_content_table_end'); echo "\n\t\n\t
    "; - echo "\n\t".'
    '; echo "\n\t".'

    ' . __('Discussion') . '

    '."\n\t".''; echo "\n\t".''; @@ -384,11 +358,11 @@ function wp_dashboard_right_now() { echo "\n\t
    \n\t
    "; echo "\n\t".'
    '; - $ct = current_theme_info(); + $theme = wp_get_theme(); echo "\n\t

    "; - if ( empty( $ct->stylesheet_dir ) ) { + if ( $theme->errors() ) { if ( ! is_multisite() || is_super_admin() ) echo '' . __('ERROR: The themes directory is either empty or doesn’t exist. Please check your installation.') . ''; } elseif ( ! empty($wp_registered_sidebars) ) { @@ -402,7 +376,7 @@ function wp_dashboard_right_now() { } $num = number_format_i18n( $num_widgets ); - $switch_themes = $ct->title; + $switch_themes = $theme->display('Name'); if ( current_user_can( 'switch_themes') ) $switch_themes = '' . $switch_themes . ''; if ( current_user_can( 'edit_theme_options' ) ) { @@ -412,9 +386,9 @@ function wp_dashboard_right_now() { } } else { if ( current_user_can( 'switch_themes' ) ) - printf( __('Theme %1$s'), $ct->title ); + printf( __('Theme %1$s'), $theme->display('Name') ); else - printf( __('Theme %1$s'), $ct->title ); + printf( __('Theme %1$s'), $theme->display('Name') ); } echo '

    '; @@ -462,16 +436,16 @@ function wp_network_dashboard_right_now() {

    -
    +

    - + 'submit_users' ) ); ?>

    -
    +

    - + 'submit_sites' ) ); ?>

    @@ -615,11 +589,6 @@ function wp_dashboard_recent_drafts( $drafts = false ) { function wp_dashboard_recent_comments() { global $wpdb; - if ( current_user_can('edit_posts') ) - $allowed_states = array('0', '1'); - else - $allowed_states = array('1'); - // Select all comment types and filter out spam later for better query performance. $comments = array(); $start = 0; @@ -628,44 +597,36 @@ function wp_dashboard_recent_comments() { $total_items = isset( $widgets['dashboard_recent_comments'] ) && isset( $widgets['dashboard_recent_comments']['items'] ) ? absint( $widgets['dashboard_recent_comments']['items'] ) : 5; - while ( count( $comments ) < $total_items && $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" ) ) { + $comments_query = array( 'number' => $total_items * 5, 'offset' => 0 ); + if ( ! current_user_can( 'edit_posts' ) ) + $comments_query['status'] = 'approve'; + while ( count( $comments ) < $total_items && $possible = get_comments( $comments_query ) ) { foreach ( $possible as $comment ) { - if ( count( $comments ) >= $total_items ) - break; - if ( in_array( $comment->comment_approved, $allowed_states ) && current_user_can( 'read_post', $comment->comment_post_ID ) ) - $comments[] = $comment; + if ( ! current_user_can( 'read_post', $comment->comment_post_ID ) ) + continue; + $comments[] = $comment; + if ( count( $comments ) == $total_items ) + break 2; } - - $start = $start + 50; + $comments_query['offset'] += $comments_query['number']; + $comments_query['number'] = $total_items * 10; } - if ( $comments ) : -?> - -
    -'; foreach ( $comments as $comment ) _wp_dashboard_recent_comments_row( $comment ); -?> + echo '
    '; -
    - - - views(); ?> -views(); wp_comment_reply( -1, false, 'dashboard', false ); wp_comment_trashnotice(); - - else : -?> - -

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

    '; + } } function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) { @@ -700,7 +661,7 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) { $actions['unapprove'] = "" . __( 'Unapprove' ) . ''; $actions['edit'] = "". __('Edit') . ''; $actions['reply'] = '' . __('Reply') . ''; - $actions['spam'] = "" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . ''; + $actions['spam'] = "" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . ''; if ( !EMPTY_TRASH_DAYS ) $actions['delete'] = "" . __('Delete Permanently') . ''; else @@ -937,8 +898,7 @@ function wp_dashboard_secondary_output() { function wp_dashboard_plugins() { wp_dashboard_cached_rss_widget( 'dashboard_plugins', 'wp_dashboard_plugins_output', array( 'http://wordpress.org/extend/plugins/rss/browse/popular/', - 'http://wordpress.org/extend/plugins/rss/browse/new/', - 'http://wordpress.org/extend/plugins/rss/browse/updated/' + 'http://wordpress.org/extend/plugins/rss/browse/new/' ) ); } @@ -950,14 +910,13 @@ function wp_dashboard_plugins() { function wp_dashboard_plugins_output() { $popular = fetch_feed( 'http://wordpress.org/extend/plugins/rss/browse/popular/' ); $new = fetch_feed( 'http://wordpress.org/extend/plugins/rss/browse/new/' ); - $updated = fetch_feed( 'http://wordpress.org/extend/plugins/rss/browse/updated/' ); if ( false === $plugin_slugs = get_transient( 'plugin_slugs' ) ) { $plugin_slugs = array_keys( get_plugins() ); set_transient( 'plugin_slugs', $plugin_slugs, 86400 ); } - foreach ( array( 'popular' => __('Most Popular'), 'new' => __('Newest Plugins'), 'updated' => __('Recently Updated') ) as $feed => $label ) { + foreach ( array( 'popular' => __('Most Popular'), 'new' => __('Newest Plugins') ) as $feed => $label ) { if ( is_wp_error($$feed) || !$$feed->get_item_quantity() ) continue; @@ -1115,7 +1074,7 @@ function wp_dashboard_rss_control( $widget_id, $form_inputs = array() ) { if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset($_POST['widget-rss'][$number]) ) { $_POST['widget-rss'][$number] = stripslashes_deep( $_POST['widget-rss'][$number] ); $widget_options[$widget_id] = wp_widget_rss_process( $_POST['widget-rss'][$number] ); - // title is optional. If black, fill it if possible + // 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) ) { @@ -1193,7 +1152,13 @@ function wp_dashboard_browser_nag() { $browser_nag_class = ' has-browser-icon'; } $notice .= "

    {$msg}

    "; - $notice .= '

    ' . sprintf( __( 'Update %2$s or learn how to browse happy' ), esc_attr( $response['update_url'] ), esc_html( $response['name'] ), 'http://browsehappy.com/' ) . '

    '; + + $browsehappy = 'http://browsehappy.com/'; + $locale = get_locale(); + if ( 'en_US' !== $locale ) + $browsehappy = add_query_arg( 'locale', $locale, $browsehappy ); + + $notice .= '

    ' . sprintf( __( 'Update %2$s or learn how to browse happy' ), esc_attr( $response['update_url'] ), esc_html( $response['name'] ), esc_url( $browsehappy ) ) . '

    '; $notice .= '

    ' . __( 'Dismiss' ) . '

    '; $notice .= '
    '; } @@ -1228,7 +1193,7 @@ function wp_check_browser_version() { $options = array( 'body' => array( 'useragent' => $_SERVER['HTTP_USER_AGENT'] ), - 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ) + 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url() ); $response = wp_remote_post( 'http://api.wordpress.org/core/browse-happy/1.0/', $options ); @@ -1247,9 +1212,9 @@ function wp_check_browser_version() { * 'img_src' - string - An image representing the browser * 'img_src_ssl' - string - An image (over SSL) representing the browser */ - $response = unserialize( wp_remote_retrieve_body( $response ) ); + $response = maybe_unserialize( wp_remote_retrieve_body( $response ) ); - if ( ! $response ) + if ( ! is_array( $response ) ) return false; set_site_transient( 'browser_' . $key, $response, 604800 ); // cache for 1 week @@ -1266,7 +1231,7 @@ function wp_dashboard_empty() {} /** * Displays a welcome panel to introduce users to WordPress. * - * @since 3.3 + * @since 3.3.0 */ function wp_welcome_panel() { global $wp_version; @@ -1290,7 +1255,7 @@ function wp_welcome_panel() {
    -

    +

    First Steps with WordPress. If you’d rather dive right in, here are a few things most people do first when they set up a new WordPress site. If you need help, use the Help tabs in the upper right corner to get information on how to use your current screen and where to go for more assistance.' ); ?>

    @@ -1316,14 +1281,14 @@ function wp_welcome_panel() {

    stylesheet_dir ) ) : + $theme = wp_get_theme(); + if ( $theme->errors() ) : echo '

    '; printf( __( 'Install a theme to get started customizing your site.' ), esc_url( admin_url( 'themes.php' ) ) ); echo '

    '; else: $customize_links = array(); - if ( 'twentyeleven' == $ct->stylesheet ) + if ( 'twentyeleven' == $theme->get_stylesheet() ) $customize_links[] = sprintf( __( 'Choose light or dark' ), esc_url( admin_url( 'themes.php?page=theme_options' ) ) ); if ( current_theme_supports( 'custom-background' ) ) @@ -1337,7 +1302,7 @@ function wp_welcome_panel() { if ( ! empty( $customize_links ) ) { echo '

    '; - printf( __( 'Use the current theme — %1$s — or choose a new one. If you stick with %3$s, here are a few ways to make your site look unique.' ), $ct->title, esc_url( admin_url( 'themes.php' ) ), $ct->title ); + printf( __( 'Use the current theme — %1$s — or choose a new one. If you stick with %1$s, here are a few ways to make your site look unique.' ), $theme->display('Name'), esc_url( admin_url( 'themes.php' ) ) ); echo '

    '; ?>
      @@ -1348,7 +1313,7 @@ function wp_welcome_panel() { '; - printf( __( 'Use the current theme — %1$s — or choose a new one.' ), $ct->title, esc_url( admin_url( 'themes.php' ) ) ); + printf( __( 'Use the current theme — %1$s — or choose a new one.' ), $theme->display('Name'), esc_url( admin_url( 'themes.php' ) ) ); echo '

      '; } endif; ?> @@ -1359,5 +1324,3 @@ function wp_welcome_panel() {
    diff --git a/wp-admin/includes/deprecated.php b/wp-admin/includes/deprecated.php index f38bafc7..747b228d 100644 --- a/wp-admin/includes/deprecated.php +++ b/wp-admin/includes/deprecated.php @@ -133,7 +133,7 @@ function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $le * @deprecated Use register_setting() * @see register_setting() * - * @param string $option_group A settings group name. Should correspond to a whitelisted option key name. + * @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. @@ -197,7 +197,6 @@ function use_codepress() { return; } - /** * @deprecated 3.1.0 * @@ -870,7 +869,7 @@ function type_url_form_file() { * @deprecated Use get_current_screen()->add_help_tab() * @see WP_Screen * - * @param string $screen The handle for the screen to add help to. This is usually the hook name returned by the add_*_page() functions. + * @param string $screen The handle for the screen to add help to. This is usually the hook name returned by the add_*_page() functions. * @param string $help The content of an 'Overview' help tab. */ function add_contextual_help( $screen, $help ) { @@ -880,4 +879,63 @@ function add_contextual_help( $screen, $help ) { $screen = convert_to_screen( $screen ); WP_Screen::add_old_compat_help( $screen, $help ); +} + +/** + * Get the allowed themes for the current blog. + * + * @since 3.0.0 + * @deprecated 3.4.0 + * @deprecated Use wp_get_themes() + * @see wp_get_themes() + * + * @return array $themes Array of allowed themes. + */ +function get_allowed_themes() { + _deprecated_function( __FUNCTION__, '3.4', "wp_get_themes( array( 'allowed' => true ) )" ); + + $themes = wp_get_themes( array( 'allowed' => true ) ); + + $wp_themes = array(); + foreach ( $themes as $theme ) { + $wp_themes[ $theme->get('Name') ] = $theme; + } + + return $wp_themes; +} + +/** + * {@internal Missing Short Description}} + * + * @since 1.5.0 + * + * @return unknown + */ +function get_broken_themes() { + _deprecated_function( __FUNCTION__, '3.4', "wp_get_themes( array( 'errors' => true )" ); + + $themes = wp_get_themes( array( 'errors' => true ) ); + $broken = array(); + foreach ( $themes as $theme ) { + $name = $theme->get('Name'); + $broken[ $name ] = array( + 'Name' => $name, + 'Title' => $name, + 'Description' => $theme->errors()->get_error_message(), + ); + } + return $broken; +} + +/** + * {@internal Missing Short Description}} + * + * @since 2.0.0 + * + * @return unknown + */ +function current_theme_info() { + _deprecated_function( __FUNCTION__, '3.4', 'wp_get_theme()' ); + + return wp_get_theme(); } \ No newline at end of file diff --git a/wp-admin/includes/export.php b/wp-admin/includes/export.php index 6aa85a85..e9c909d6 100644 --- a/wp-admin/includes/export.php +++ b/wp-admin/includes/export.php @@ -13,7 +13,7 @@ * * @since 2.5.0 */ -define( 'WXR_VERSION', '1.1' ); +define( 'WXR_VERSION', '1.2' ); /** * Generates the WXR export file for download @@ -117,13 +117,14 @@ function export_wp( $args = array() ) { * @since 2.1.0 * * @param string $str String to wrap in XML CDATA tag. + * @return string */ function wxr_cdata( $str ) { if ( seems_utf8( $str ) == false ) $str = utf8_encode( $str ); // $str = ent2ncr(esc_html($str)); - $str = "'; + $str = '', ']]]]>', $str ) . ']]>'; return $str; } @@ -331,7 +332,7 @@ function export_wp( $args = array() ) { - + diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index bf4ac85d..9ff24384 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -65,7 +65,7 @@ function get_file_description( $file ) { return sprintf( __( '%s Page Template' ), _cleanup_header_comment($name[1]) ); } - return basename( $file ); + return trim( basename( $file ) ); } /** @@ -81,7 +81,7 @@ function get_home_path() { $siteurl = get_option( 'siteurl' ); if ( $home != '' && $home != $siteurl ) { $wp_path_rel_to_home = str_replace($home, '', $siteurl); /* $siteurl - $home */ - $pos = strpos($_SERVER["SCRIPT_FILENAME"], $wp_path_rel_to_home); + $pos = strrpos($_SERVER["SCRIPT_FILENAME"], $wp_path_rel_to_home); $home_path = substr($_SERVER["SCRIPT_FILENAME"], 0, $pos); $home_path = trailingslashit( $home_path ); } else { @@ -157,7 +157,7 @@ function list_files( $folder = '', $levels = 100 ) { * Please note that the calling function must unlink() this itself. * * 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. + * while the directory can either be passed as well, or by leaving it blank, default to a writable temporary directory. * * @since 2.6.0 * @@ -240,7 +240,7 @@ function wp_handle_upload( &$file, $overrides = false, $time = null ) { // 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. + // You may have had one or more 'wp_handle_upload_prefilter' functions error out the file. Handle that gracefully. if ( isset( $file['error'] ) && !is_numeric( $file['error'] ) && $file['error'] ) return $upload_error_handler( $file, $file['error'] ); @@ -323,30 +323,10 @@ function wp_handle_upload( &$file, $overrides = false, $time = null ) { $filename = wp_unique_filename( $uploads['path'], $file['name'], $unique_filename_callback ); - $tmp_file = wp_tempnam($filename); - // Move the file to the uploads dir - if ( false === @ move_uploaded_file( $file['tmp_name'], $tmp_file ) ) - return $upload_error_handler( $file, sprintf( __('The uploaded file could not be moved to %s.' ), $uploads['path'] ) ); - - // If a resize was requested, perform the resize. - $image_resize = isset( $_POST['image_resize'] ) && 'true' == $_POST['image_resize']; - $do_resize = apply_filters( 'wp_upload_resize', $image_resize ); - $size = @getimagesize( $tmp_file ); - if ( $do_resize && $size ) { - $old_temp = $tmp_file; - $tmp_file = image_resize( $tmp_file, (int) get_option('large_size_w'), (int) get_option('large_size_h'), 0, 'resized'); - if ( ! is_wp_error($tmp_file) ) { - unlink($old_temp); - } else { - $tmp_file = $old_temp; - } - } - - // Copy the temporary file into its destination $new_file = $uploads['path'] . "/$filename"; - copy( $tmp_file, $new_file ); - unlink($tmp_file); + if ( false === @ move_uploaded_file( $file['tmp_name'], $new_file ) ) + return $upload_error_handler( $file, sprintf( __('The uploaded file could not be moved to %s.' ), $uploads['path'] ) ); // Set correct file permissions $stat = stat( dirname( $new_file )); @@ -364,7 +344,7 @@ function wp_handle_upload( &$file, $overrides = false, $time = null ) { /** * Handle sideloads, which is the process of retrieving a media item from another server instead of - * a traditional media upload. This process involves sanitizing the filename, checking extensions + * a traditional media upload. This process involves sanitizing the filename, checking extensions * for mime type, and moving the file to the appropriate directory within the uploads directory. * * @since 2.6.0 @@ -486,7 +466,7 @@ function wp_handle_sideload( &$file, $overrides = false ) { /** * Downloads a url to a local temporary file using the WordPress HTTP Class. - * Please note, That the calling function must unlink() the file. + * Please note, That the calling function must unlink() the file. * * @since 2.5.0 * @@ -648,7 +628,7 @@ function _unzip_file_ziparchive($file, $to, $needed_dirs = array() ) { return new WP_Error('extract_failed', __('Could not extract file from archive.'), $info['name']); if ( ! $wp_filesystem->put_contents( $to . $info['name'], $contents, FS_CHMOD_FILE) ) - return new WP_Error('copy_failed', __('Could not copy file.'), $to . $info['filename']); + return new WP_Error('copy_failed', __('Could not copy file.'), $to . $info['name']); } $z->close(); @@ -884,7 +864,7 @@ function get_filesystem_method($args = array(), $context = false) { } /** - * Displays a form to the user to request for their FTP/SSH details in order to connect to the filesystem. + * 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. * * Hostnames may be in the form of hostname:portnumber (eg: wordpress.org:2467) to specify an alternate FTP/SSH port. @@ -896,7 +876,7 @@ function get_filesystem_method($args = array(), $context = false) { * @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() + * @param string $context The directory which is needed access to, The write-test will be performed on this directory by get_filesystem_method() * @param string $extra_fields Extra POST fields which should be checked for to be included in the post. * @return boolean False on failure. True on success. */ @@ -1075,5 +1055,3 @@ submit_button( __( 'Proceed' ), 'button', 'upgrade' ); diff --git a/wp-admin/includes/image-edit.php b/wp-admin/includes/image-edit.php index 0e2027a1..d2d6dc2c 100644 --- a/wp-admin/includes/image-edit.php +++ b/wp-admin/includes/image-edit.php @@ -67,7 +67,7 @@ function wp_image_editor($post_id, $msg = false) {
    - +
    @@ -192,50 +192,11 @@ function wp_image_editor($post_id, $msg = false) {
    - +
    msg = esc_js( __('Image saved') ); return $return; } - diff --git a/wp-admin/includes/image.php b/wp-admin/includes/image.php index 98dd0ef5..80483876 100644 --- a/wp-admin/includes/image.php +++ b/wp-admin/includes/image.php @@ -32,7 +32,7 @@ function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) { * * @since 2.1.0 * - * @param string|int $src_file The source file or Attachment ID. + * @param string|int $src The source file or Attachment ID. * @param int $src_x The start x position to crop from. * @param int $src_y The start y position to crop from. * @param int $src_w The width to crop. @@ -43,13 +43,27 @@ function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) { * @param string $dst_file Optional. The destination file to write to. * @return string|WP_Error|false New filepath on success, WP_Error or false on failure. */ -function wp_crop_image( $src_file, $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_h, $src_abs = false, $dst_file = false ) { - if ( is_numeric( $src_file ) ) // Handle int as attachment ID - $src_file = get_attached_file( $src_file ); - - $src = wp_load_image( $src_file ); +function wp_crop_image( $src, $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_h, $src_abs = false, $dst_file = false ) { + if ( is_numeric( $src ) ) { // Handle int as attachment ID + $src_file = get_attached_file( $src ); + if ( ! file_exists( $src_file ) ) { + // If the file doesn't exist, attempt a url fopen on the src link. + // This can occur with certain file replication plugins. + $post = get_post( $src ); + $image_type = $post->post_mime_type; + $src = load_image_to_edit( $src, $post->post_mime_type, 'full' ); + } else { + $size = @getimagesize( $src_file ); + $image_type = ( $size ) ? $size['mime'] : ''; + $src = wp_load_image( $src_file ); + } + } else { + $size = @getimagesize( $src ); + $image_type = ( $size ) ? $size['mime'] : ''; + $src = wp_load_image( $src ); + } - if ( !is_resource( $src ) ) + if ( ! is_resource( $src ) ) return new WP_Error( 'error_loading_image', $src, $src_file ); $dst = wp_imagecreatetruecolor( $dst_w, $dst_h ); @@ -59,7 +73,7 @@ function wp_crop_image( $src_file, $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_ $src_h -= $src_y; } - if (function_exists('imageantialias')) + if ( function_exists( 'imageantialias' ) ) imageantialias( $dst, true ); imagecopyresampled( $dst, $src, 0, 0, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h ); @@ -69,9 +83,18 @@ function wp_crop_image( $src_file, $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_ if ( ! $dst_file ) $dst_file = str_replace( basename( $src_file ), 'cropped-' . basename( $src_file ), $src_file ); - $dst_file = preg_replace( '/\\.[^\\.]+$/', '.jpg', $dst_file ); + if ( 'image/png' != $image_type ) + $dst_file = preg_replace( '/\\.[^\\.]+$/', '.jpg', $dst_file ); + + // The directory containing the original file may no longer exist when + // using a replication plugin. + wp_mkdir_p( dirname( $dst_file ) ); + + $dst_file = dirname( $dst_file ) . '/' . wp_unique_filename( dirname( $dst_file ), basename( $dst_file ) ); - if ( imagejpeg( $dst, $dst_file, apply_filters( 'jpeg_quality', 90, 'wp_crop_image' ) ) ) + if ( 'image/png' == $image_type && imagepng( $dst, $dst_file ) ) + return $dst_file; + elseif ( imagejpeg( $dst, $dst_file, apply_filters( 'jpeg_quality', 90, 'wp_crop_image' ) ) ) return $dst_file; else return false; @@ -104,7 +127,7 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) { global $_wp_additional_image_sizes; foreach ( get_intermediate_image_sizes() as $s ) { - $sizes[$s] = array( 'width' => '', 'height' => '', 'crop' => FALSE ); + $sizes[$s] = array( 'width' => '', 'height' => '', 'crop' => false ); if ( isset( $_wp_additional_image_sizes[$s]['width'] ) ) $sizes[$s]['width'] = intval( $_wp_additional_image_sizes[$s]['width'] ); // For theme-added sizes else @@ -205,7 +228,7 @@ function wp_read_image_metadata( $file ) { // exif contains a bunch of data we'll probably never need formatted in ways // that are difficult to use. We'll normalize it and just extract the fields - // that are likely to be useful. Fractions and numbers are converted to + // that are likely to be useful. Fractions and numbers are converted to // floats, dates to unix timestamps, and everything else to strings. $meta = array( 'aperture' => 0, @@ -296,8 +319,10 @@ function wp_read_image_metadata( $file ) { $meta['created_timestamp'] = wp_exif_date2ts($exif['DateTimeDigitized'] ); if ( ! empty($exif['FocalLength'] ) ) $meta['focal_length'] = wp_exif_frac2dec( $exif['FocalLength'] ); - if ( ! empty($exif['ISOSpeedRatings'] ) ) - $meta['iso'] = utf8_encode( trim( $exif['ISOSpeedRatings'] ) ); + if ( ! empty($exif['ISOSpeedRatings'] ) ) { + $meta['iso'] = is_array( $exif['ISOSpeedRatings'] ) ? reset( $exif['ISOSpeedRatings'] ) : $exif['ISOSpeedRatings']; + $meta['iso'] = utf8_encode( trim( $meta['iso'] ) ); + } if ( ! empty($exif['ExposureTime'] ) ) $meta['shutter_speed'] = wp_exif_frac2dec( $exif['ExposureTime'] ); } @@ -339,3 +364,100 @@ function file_is_displayable_image($path) { return apply_filters('file_is_displayable_image', $result, $path); } + +/** + * Load an image resource for editing. + * + * @since 2.9.0 + * + * @param string $attachment_id Attachment ID. + * @param string $mime_type Image mime type. + * @param string $size Optional. Image size, defaults to 'full'. + * @return resource|false The resulting image resource on success, false on failure. + */ +function load_image_to_edit( $attachment_id, $mime_type, $size = 'full' ) { + $filepath = _load_image_to_edit_path( $attachment_id, $size ); + if ( empty( $filepath ) ) + return false; + + switch ( $mime_type ) { + case 'image/jpeg': + $image = imagecreatefromjpeg($filepath); + break; + case 'image/png': + $image = imagecreatefrompng($filepath); + break; + case 'image/gif': + $image = imagecreatefromgif($filepath); + break; + default: + $image = false; + break; + } + if ( is_resource($image) ) { + $image = apply_filters('load_image_to_edit', $image, $attachment_id, $size); + if ( function_exists('imagealphablending') && function_exists('imagesavealpha') ) { + imagealphablending($image, false); + imagesavealpha($image, true); + } + } + return $image; +} + +/** + * Retrieve the path or url of an attachment's attached file. + * + * If the attached file is not present on the local filesystem (usually due to replication plugins), + * then the url of the file is returned if url fopen is supported. + * + * @since 3.4.0 + * @access private + * + * @param string $attachment_id Attachment ID. + * @param string $size Optional. Image size, defaults to 'full'. + * @return string|false File path or url on success, false on failure. + */ +function _load_image_to_edit_path( $attachment_id, $size = 'full' ) { + $filepath = get_attached_file( $attachment_id ); + + if ( $filepath && file_exists( $filepath ) ) { + if ( 'full' != $size && ( $data = image_get_intermediate_size( $attachment_id, $size ) ) ) { + $filepath = apply_filters( 'load_image_to_edit_filesystempath', path_join( dirname( $filepath ), $data['file'] ), $attachment_id, $size ); + } + } elseif ( function_exists( 'fopen' ) && function_exists( 'ini_get' ) && true == ini_get( 'allow_url_fopen' ) ) { + $filepath = apply_filters( 'load_image_to_edit_attachmenturl', wp_get_attachment_url( $attachment_id ), $attachment_id, $size ); + } + + return apply_filters( 'load_image_to_edit_path', $filepath, $attachment_id, $size ); +} + +/** + * Copy an existing image file. + * + * @since 3.4.0 + * @access private + * + * @param string $attachment_id Attachment ID. + * @return string|false New file path on success, false on failure. + */ +function _copy_image_file( $attachment_id ) { + $dst_file = $src_file = get_attached_file( $attachment_id ); + if ( ! file_exists( $src_file ) ) + $src_file = _load_image_to_edit_path( $attachment_id ); + + if ( $src_file ) { + $dst_file = str_replace( basename( $dst_file ), 'copy-' . basename( $dst_file ), $dst_file ); + $dst_file = dirname( $dst_file ) . '/' . wp_unique_filename( dirname( $dst_file ), basename( $dst_file ) ); + + // The directory containing the original file may no longer exist when + // using a replication plugin. + wp_mkdir_p( dirname( $dst_file ) ); + + if ( ! @copy( $src_file, $dst_file ) ) + $dst_file = false; + } else { + $dst_file = false; + } + + return $dst_file; +} diff --git a/wp-admin/includes/import.php b/wp-admin/includes/import.php index f57be766..3713f18b 100644 --- a/wp-admin/includes/import.php +++ b/wp-admin/includes/import.php @@ -93,5 +93,3 @@ function wp_import_handle_upload() { return array( 'file' => $file, 'id' => $id ); } - -?> diff --git a/wp-admin/includes/list-table.php b/wp-admin/includes/list-table.php index 716e80ac..2dff578e 100644 --- a/wp-admin/includes/list-table.php +++ b/wp-admin/includes/list-table.php @@ -28,7 +28,7 @@ function _get_list_table( $class ) { 'WP_Links_List_Table' => 'links', 'WP_Plugin_Install_List_Table' => 'plugin-install', 'WP_Themes_List_Table' => 'themes', - 'WP_Theme_Install_List_Table' => 'theme-install', + 'WP_Theme_Install_List_Table' => array( 'themes', 'theme-install' ), 'WP_Plugins_List_Table' => 'plugins', // Network Admin 'WP_MS_Sites_List_Table' => 'ms-sites', @@ -37,7 +37,8 @@ function _get_list_table( $class ) { ); if ( isset( $core_classes[ $class ] ) ) { - require_once( ABSPATH . 'wp-admin/includes/class-wp-' . $core_classes[ $class ] . '-list-table.php' ); + foreach ( (array) $core_classes[ $class ] as $required ) + require_once( ABSPATH . 'wp-admin/includes/class-wp-' . $required . '-list-table.php' ); return new $class; } @@ -101,4 +102,3 @@ class _WP_List_Table_Compat extends WP_List_Table { return $this->_columns; } } -?> \ No newline at end of file diff --git a/wp-admin/includes/manifest.php b/wp-admin/includes/manifest.php index 6f050c60..99b47748 100644 --- a/wp-admin/includes/manifest.php +++ b/wp-admin/includes/manifest.php @@ -43,7 +43,6 @@ function &get_manifest() { array('images/wpspin_dark.gif'), array('images/logo.gif'), array('images/logo-ghost.png'), - array('images/logo-login.gif'), array('images/media-button-image.gif'), array('images/media-button-music.gif'), array('images/media-button-other.gif'), diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index ff77e6c0..179bfb8f 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -62,15 +62,9 @@ add_filter('media_upload_tabs', 'update_gallery_tab'); * @since 2.5.0 */ function the_media_upload_tabs() { - global $redir_tab, $is_iphone; + global $redir_tab; $tabs = media_upload_tabs(); - - if ( $is_iphone ) { - unset($tabs['type']); - $default = 'type_url'; - } else { - $default = 'type'; - } + $default = 'type'; if ( !empty($tabs) ) { echo "
      \n"; @@ -144,27 +138,37 @@ function image_add_caption( $html, $id, $caption, $title, $align, $url, $size, $ $id = ( 0 < (int) $id ) ? 'attachment_' . $id : ''; - if ( ! preg_match( '/width="([0-9]+)/', $html, $matches ) ) + if ( ! preg_match( '/width=["\']([0-9]+)/', $html, $matches ) ) return $html; $width = $matches[1]; - $caption = str_replace( array( '>', '<', '"', "'" ), - array( '>', '<', '"', ''' ), - $caption - ); + $caption = str_replace( array("\r\n", "\r"), "\n", $caption); + $caption = preg_replace_callback( '/<[a-zA-Z0-9]+(?: [^<>]+>)*/', '_cleanup_image_add_caption', $caption ); + // convert any remaining line breaks to
      + $caption = preg_replace( '/[ \n\t]*\n[ \t]*/', '
      ', $caption ); $html = preg_replace( '/(class=["\'][^\'"]*)align(none|left|right|center)\s?/', '$1', $html ); if ( empty($align) ) $align = 'none'; - $shcode = '[caption id="' . $id . '" align="align' . $align - . '" width="' . $width . '" caption="' . addslashes($caption) . '"]' . $html . '[/caption]'; + $shcode = '[caption id="' . $id . '" align="align' . $align . '" width="' . $width . '"]' . $html . ' ' . $caption . '[/caption]'; return apply_filters( 'image_add_caption_shortcode', $shcode, $html ); } add_filter( 'image_send_to_editor', 'image_add_caption', 20, 8 ); +/** + * Private preg_replace callback used in image_add_caption() + * + * @access private + * @since 3.4.0 + */ +function _cleanup_image_add_caption( $matches ) { + // remove any line breaks from inside the tags + return preg_replace( '/[\r\n\t]+/', ' ', $matches[0] ); +} + /** * {@internal Missing Short Description}} * @@ -334,7 +338,7 @@ wp_enqueue_style( 'ie' ); //','uid':'ID; ?>','time':''}; -var ajaxurl = '', pagenow = 'media-upload-popup', adminpage = 'media-upload-popup', +var ajaxurl = '', pagenow = 'media-upload-popup', adminpage = 'media-upload-popup', isRtl = ; //]]> @@ -386,15 +390,20 @@ function _media_button($title, $icon, $type, $id) { return "$title"; } -function get_upload_iframe_src( $type = null ) { +function get_upload_iframe_src( $type = null, $post_id = null, $tab = null ) { global $post_ID; - $uploading_iframe_ID = (int) $post_ID; - $upload_iframe_src = add_query_arg( 'post_id', $uploading_iframe_ID, admin_url('media-upload.php') ); + if ( empty( $post_id ) ) + $post_id = $post_ID; + + $upload_iframe_src = add_query_arg( 'post_id', (int) $post_id, admin_url('media-upload.php') ); if ( $type && 'media' != $type ) $upload_iframe_src = add_query_arg('type', $type, $upload_iframe_src); + if ( ! empty( $tab ) ) + $upload_iframe_src = add_query_arg('tab', $tab, $upload_iframe_src); + $upload_iframe_src = apply_filters($type . '_upload_iframe_src', $upload_iframe_src); return add_query_arg('TB_iframe', true, $upload_iframe_src); @@ -477,7 +486,7 @@ function media_upload_form_handler() { if ( isset($send_id) ) { $attachment = stripslashes_deep( $_POST['attachments'][$send_id] ); - $html = $attachment['post_title']; + $html = isset( $attachment['post_title'] ) ? $attachment['post_title'] : ''; if ( !empty($attachment['url']) ) { $rel = ''; if ( strpos($attachment['url'], 'attachment_id') || get_attachment_link($send_id) == $attachment['url'] ) @@ -500,8 +509,6 @@ function media_upload_form_handler() { * @return unknown */ function wp_media_upload_handler() { - global $is_iphone; - $errors = array(); $id = 0; @@ -572,10 +579,7 @@ function wp_media_upload_handler() { return wp_iframe( 'media_upload_type_url_form', $type, $errors, $id ); } - if ( $is_iphone ) - return wp_iframe( 'media_upload_type_url_form', 'image', $errors, $id ); - else - return wp_iframe( 'media_upload_type_form', 'image', $errors, $id ); + return wp_iframe( 'media_upload_type_form', 'image', $errors, $id ); } /** @@ -776,12 +780,19 @@ function image_link_input_fields($post, $url_type = '') { return "
      - - - + + + "; } +function wp_caption_input_textarea($edit_post) { + // post data is already escaped + $name = "attachments[{$edit_post->ID}][post_excerpt]"; + + return ''; +} + /** * {@internal Missing Short Description}} * @@ -917,8 +928,6 @@ function get_attachment_fields_to_edit($post, $errors = null) { $edit_post = sanitize_post($post, 'edit'); - - $form_fields = array( 'post_title' => array( 'label' => __('Title'), @@ -927,7 +936,8 @@ function get_attachment_fields_to_edit($post, $errors = null) { 'image_alt' => array(), 'post_excerpt' => array( 'label' => __('Caption'), - 'value' => $edit_post->post_excerpt + 'input' => 'html', + 'html' => wp_caption_input_textarea($edit_post) ), 'post_content' => array( 'label' => __('Description'), @@ -1129,8 +1139,6 @@ function get_media_item( $attachment_id, $args = null ) { $item .= "\n"; - - $item .= " @@ -1151,7 +1159,7 @@ function get_media_item( $attachment_id, $args = null ) { $delete = "" . __( 'Delete Permanently' ) . ''; } elseif ( !MEDIA_TRASH ) { $delete = "" . __( 'Delete' ) . " - ")},destroy:function(){return this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable"),this._mouseDestroy(),this},_mouseStart:function(b){var c=this;this.opos=[b.pageX,b.pageY];if(this.options.disabled)return;var d=this.options;this.selectees=a(d.filter,this.element[0]),this._trigger("start",b),a(d.appendTo).append(this.helper),this.helper.css({left:b.clientX,top:b.clientY,width:0,height:0}),d.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var d=a.data(this,"selectable-item");d.startselected=!0,!b.metaKey&&!b.ctrlKey&&(d.$element.removeClass("ui-selected"),d.selected=!1,d.$element.addClass("ui-unselecting"),d.unselecting=!0,c._trigger("unselecting",b,{unselecting:d.element}))}),a(b.target).parents().andSelf().each(function(){var d=a.data(this,"selectable-item");if(d){var e=!b.metaKey&&!b.ctrlKey||!d.$element.hasClass("ui-selected");return d.$element.removeClass(e?"ui-unselecting":"ui-selected").addClass(e?"ui-selecting":"ui-unselecting"),d.unselecting=!e,d.selecting=e,d.selected=e,e?c._trigger("selecting",b,{selecting:d.element}):c._trigger("unselecting",b,{unselecting:d.element}),!1}})},_mouseDrag:function(b){var c=this;this.dragged=!0;if(this.options.disabled)return;var d=this.options,e=this.opos[0],f=this.opos[1],g=b.pageX,h=b.pageY;if(e>g){var i=g;g=e,e=i}if(f>h){var i=h;h=f,f=i}return this.helper.css({left:e,top:f,width:g-e,height:h-f}),this.selectees.each(function(){var i=a.data(this,"selectable-item");if(!i||i.element==c.element[0])return;var j=!1;d.tolerance=="touch"?j=!(i.left>g||i.righth||i.bottome&&i.rightf&&i.bottom
    ").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(b.range==="min"||b.range==="max"?" ui-slider-range-"+b.range:""))}for(var j=c.length;j"); -this.handles=c.add(d(e.join("")).appendTo(a.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(g){g.preventDefault()}).hover(function(){b.disabled||d(this).addClass("ui-state-hover")},function(){d(this).removeClass("ui-state-hover")}).focus(function(){if(b.disabled)d(this).blur();else{d(".ui-slider .ui-state-focus").removeClass("ui-state-focus");d(this).addClass("ui-state-focus")}}).blur(function(){d(this).removeClass("ui-state-focus")});this.handles.each(function(g){d(this).data("index.ui-slider-handle", -g)});this.handles.keydown(function(g){var k=true,l=d(this).data("index.ui-slider-handle"),i,h,m;if(!a.options.disabled){switch(g.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:k=false;if(!a._keySliding){a._keySliding=true;d(this).addClass("ui-state-active");i=a._start(g,l);if(i===false)return}break}m=a.options.step;i=a.options.values&&a.options.values.length? -(h=a.values(l)):(h=a.value());switch(g.keyCode){case d.ui.keyCode.HOME:h=a._valueMin();break;case d.ui.keyCode.END:h=a._valueMax();break;case d.ui.keyCode.PAGE_UP:h=a._trimAlignValue(i+(a._valueMax()-a._valueMin())/5);break;case d.ui.keyCode.PAGE_DOWN:h=a._trimAlignValue(i-(a._valueMax()-a._valueMin())/5);break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:if(i===a._valueMax())return;h=a._trimAlignValue(i+m);break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(i===a._valueMin())return;h=a._trimAlignValue(i- -m);break}a._slide(g,l,h);return k}}).keyup(function(g){var k=d(this).data("index.ui-slider-handle");if(a._keySliding){a._keySliding=false;a._stop(g,k);a._change(g,k);d(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy(); -return this},_mouseCapture:function(a){var b=this.options,c,f,e,j,g;if(b.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();c=this._normValueFromMouse({x:a.pageX,y:a.pageY});f=this._valueMax()-this._valueMin()+1;j=this;this.handles.each(function(k){var l=Math.abs(c-j.values(k));if(f>l){f=l;e=d(this);g=k}});if(b.range===true&&this.values(1)===b.min){g+=1;e=d(this.handles[g])}if(this._start(a,g)===false)return false; -this._mouseSliding=true;j._handleIndex=g;e.addClass("ui-state-active").focus();b=e.offset();this._clickOffset=!d(a.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:a.pageX-b.left-e.width()/2,top:a.pageY-b.top-e.height()/2-(parseInt(e.css("borderTopWidth"),10)||0)-(parseInt(e.css("borderBottomWidth"),10)||0)+(parseInt(e.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(a,g,c);return this._animateOff=true},_mouseStart:function(){return true},_mouseDrag:function(a){var b= -this._normValueFromMouse({x:a.pageX,y:a.pageY});this._slide(a,this._handleIndex,b);return false},_mouseStop:function(a){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(a,this._handleIndex);this._change(a,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b;if(this.orientation==="horizontal"){b= -this.elementSize.width;a=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{b=this.elementSize.height;a=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}b=a/b;if(b>1)b=1;if(b<0)b=0;if(this.orientation==="vertical")b=1-b;a=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+b*a)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(b); -c.values=this.values()}return this._trigger("start",a,c)},_slide:function(a,b,c){var f;if(this.options.values&&this.options.values.length){f=this.values(b?0:1);if(this.options.values.length===2&&this.options.range===true&&(b===0&&c>f||b===1&&c1){this.options.values[a]=this._trimAlignValue(b);this._refreshValue();this._change(null,a)}else if(arguments.length)if(d.isArray(arguments[0])){c=this.options.values;f=arguments[0];for(e=0;e=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b;a=a-c;if(Math.abs(c)*2>=b)a+=c>0?b:-b;return parseFloat(a.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var a= -this.options.range,b=this.options,c=this,f=!this._animateOff?b.animate:false,e,j={},g,k,l,i;if(this.options.values&&this.options.values.length)this.handles.each(function(h){e=(c.values(h)-c._valueMin())/(c._valueMax()-c._valueMin())*100;j[c.orientation==="horizontal"?"left":"bottom"]=e+"%";d(this).stop(1,1)[f?"animate":"css"](j,b.animate);if(c.options.range===true)if(c.orientation==="horizontal"){if(h===0)c.range.stop(1,1)[f?"animate":"css"]({left:e+"%"},b.animate);if(h===1)c.range[f?"animate":"css"]({width:e- -g+"%"},{queue:false,duration:b.animate})}else{if(h===0)c.range.stop(1,1)[f?"animate":"css"]({bottom:e+"%"},b.animate);if(h===1)c.range[f?"animate":"css"]({height:e-g+"%"},{queue:false,duration:b.animate})}g=e});else{k=this.value();l=this._valueMin();i=this._valueMax();e=i!==l?(k-l)/(i-l)*100:0;j[c.orientation==="horizontal"?"left":"bottom"]=e+"%";this.handle.stop(1,1)[f?"animate":"css"](j,b.animate);if(a==="min"&&this.orientation==="horizontal")this.range.stop(1,1)[f?"animate":"css"]({width:e+"%"}, -b.animate);if(a==="max"&&this.orientation==="horizontal")this.range[f?"animate":"css"]({width:100-e+"%"},{queue:false,duration:b.animate});if(a==="min"&&this.orientation==="vertical")this.range.stop(1,1)[f?"animate":"css"]({height:e+"%"},b.animate);if(a==="max"&&this.orientation==="vertical")this.range[f?"animate":"css"]({height:100-e+"%"},{queue:false,duration:b.animate})}}});d.extend(d.ui.slider,{version:"1.8.16"})})(jQuery); +/*! jQuery UI - v1.8.20 - 2012-04-30 +* https://github.com/jquery/jquery-ui +* Includes: jquery.ui.slider.js +* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ +(function(a,b){var c=5;a.widget("ui.slider",a.ui.mouse,{widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var b=this,d=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f="",g=d.values&&d.values.length||1,h=[];this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"+(d.disabled?" ui-slider-disabled ui-disabled":"")),this.range=a([]),d.range&&(d.range===!0&&(d.values||(d.values=[this._valueMin(),this._valueMin()]),d.values.length&&d.values.length!==2&&(d.values=[d.values[0],d.values[0]])),this.range=a("
    ").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(d.range==="min"||d.range==="max"?" ui-slider-range-"+d.range:"")));for(var i=e.length;ic&&(f=c,g=a(this),i=b)}),c.range===!0&&this.values(1)===c.min&&(i+=1,g=a(this.handles[i])),j=this._start(b,i),j===!1?!1:(this._mouseSliding=!0,h._handleIndex=i,g.addClass("ui-state-active").focus(),k=g.offset(),l=!a(b.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:b.pageX-k.left-g.width()/2,top:b.pageY-k.top-g.height()/2-(parseInt(g.css("borderTopWidth"),10)||0)-(parseInt(g.css("borderBottomWidth"),10)||0)+(parseInt(g.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(b,i,e),this._animateOff=!0,!0))},_mouseStart:function(a){return!0},_mouseDrag:function(a){var b={x:a.pageX,y:a.pageY},c=this._normValueFromMouse(b);return this._slide(a,this._handleIndex,c),!1},_mouseStop:function(a){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(a,this._handleIndex),this._change(a,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b,c,d,e,f;return this.orientation==="horizontal"?(b=this.elementSize.width,c=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(b=this.elementSize.height,c=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),d=c/b,d>1&&(d=1),d<0&&(d=0),this.orientation==="vertical"&&(d=1-d),e=this._valueMax()-this._valueMin(),f=this._valueMin()+d*e,this._trimAlignValue(f)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};return this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("start",a,c)},_slide:function(a,b,c){var d,e,f;this.options.values&&this.options.values.length?(d=this.values(b?0:1),this.options.values.length===2&&this.options.range===!0&&(b===0&&c>d||b===1&&c1){this.options.values[b]=this._trimAlignValue(c),this._refreshValue(),this._change(null,b);return}if(!arguments.length)return this._values();if(!a.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(b):this.value();d=this.options.values,e=arguments[0];for(f=0;f=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b,d=a-c;return Math.abs(c)*2>=b&&(d+=c>0?b:-b),parseFloat(d.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var b=this.options.range,c=this.options,d=this,e=this._animateOff?!1:c.animate,f,g={},h,i,j,k;this.options.values&&this.options.values.length?this.handles.each(function(b,i){f=(d.values(b)-d._valueMin())/(d._valueMax()-d._valueMin())*100,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",a(this).stop(1,1)[e?"animate":"css"](g,c.animate),d.options.range===!0&&(d.orientation==="horizontal"?(b===0&&d.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},c.animate),b===1&&d.range[e?"animate":"css"]({width:f-h+"%"},{queue:!1,duration:c.animate})):(b===0&&d.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},c.animate),b===1&&d.range[e?"animate":"css"]({height:f-h+"%"},{queue:!1,duration:c.animate}))),h=f}):(i=this.value(),j=this._valueMin(),k=this._valueMax(),f=k!==j?(i-j)/(k-j)*100:0,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",this.handle.stop(1,1)[e?"animate":"css"](g,c.animate),b==="min"&&this.orientation==="horizontal"&&this.range.stop(1,1)[e?"animate":"css"]({width:f+"%"},c.animate),b==="max"&&this.orientation==="horizontal"&&this.range[e?"animate":"css"]({width:100-f+"%"},{queue:!1,duration:c.animate}),b==="min"&&this.orientation==="vertical"&&this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},c.animate),b==="max"&&this.orientation==="vertical"&&this.range[e?"animate":"css"]({height:100-f+"%"},{queue:!1,duration:c.animate}))}}),a.extend(a.ui.slider,{version:"1.8.20"})})(jQuery); \ No newline at end of file diff --git a/wp-includes/js/jquery/ui/jquery.ui.sortable.min.js b/wp-includes/js/jquery/ui/jquery.ui.sortable.min.js index d0ad528d..593dfb96 100644 --- a/wp-includes/js/jquery/ui/jquery.ui.sortable.min.js +++ b/wp-includes/js/jquery/ui/jquery.ui.sortable.min.js @@ -1,60 +1,5 @@ -/* - * jQuery UI Sortable 1.8.16 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Sortables - * - * Depends: - * jquery.ui.core.js - * jquery.ui.mouse.js - * jquery.ui.widget.js - */ -(function(d){d.widget("ui.sortable",d.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){var a=this.options;this.containerCache={};this.element.addClass("ui-sortable"); -this.refresh();this.floating=this.items.length?a.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData("sortable-item");return this},_setOption:function(a,b){if(a=== -"disabled"){this.options[a]=b;this.widget()[b?"addClass":"removeClass"]("ui-sortable-disabled")}else d.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(a,b){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(a);var c=null,e=this;d(a.target).parents().each(function(){if(d.data(this,"sortable-item")==e){c=d(this);return false}});if(d.data(a.target,"sortable-item")==e)c=d(a.target);if(!c)return false;if(this.options.handle&& -!b){var f=false;d(this.options.handle,c).find("*").andSelf().each(function(){if(this==a.target)f=true});if(!f)return false}this.currentItem=c;this._removeCurrentsFromItems();return true},_mouseStart:function(a,b,c){b=this.options;var e=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(a);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top, -left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]}; -this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();b.containment&&this._setContainment();if(b.cursor){if(d("body").css("cursor"))this._storedCursor=d("body").css("cursor");d("body").css("cursor",b.cursor)}if(b.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",b.opacity)}if(b.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",b.zIndex)}if(this.scrollParent[0]!= -document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start",a,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!c)for(c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("activate",a,e._uiHash(this));if(d.ui.ddmanager)d.ui.ddmanager.current=this;d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(a); -return true},_mouseDrag:function(a){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var b=this.options,c=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-a.pageY=0;b--){c=this.items[b];var e=c.item[0],f=this._intersectsWithPointer(c);if(f)if(e!=this.currentItem[0]&&this.placeholder[f==1?"next":"prev"]()[0]!=e&&!d.ui.contains(this.placeholder[0],e)&&(this.options.type=="semi-dynamic"?!d.ui.contains(this.element[0], -e):true)){this.direction=f==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(c))this._rearrange(a,c);else break;this._trigger("change",a,this._uiHash());break}}this._contactContainers(a);d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);this._trigger("sort",a,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(a,b){if(a){d.ui.ddmanager&&!this.options.dropBehaviour&&d.ui.ddmanager.drop(this,a);if(this.options.revert){var c=this;b=c.placeholder.offset(); -c.reverting=true;d(this.helper).animate({left:b.left-this.offset.parent.left-c.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:b.top-this.offset.parent.top-c.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){c._clear(a)})}else this._clear(a,b);return false}},cancel:function(){var a=this;if(this.dragging){this._mouseUp({target:null});this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"): -this.currentItem.show();for(var b=this.containers.length-1;b>=0;b--){this.containers[b]._trigger("deactivate",null,a._uiHash(this));if(this.containers[b].containerCache.over){this.containers[b]._trigger("out",null,a._uiHash(this));this.containers[b].containerCache.over=0}}}if(this.placeholder){this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();d.extend(this,{helper:null, -dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?d(this.domPosition.prev).after(this.currentItem):d(this.domPosition.parent).prepend(this.currentItem)}return this},serialize:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};d(b).each(function(){var e=(d(a.item||this).attr(a.attribute||"id")||"").match(a.expression||/(.+)[-=_](.+)/);if(e)c.push((a.key||e[1]+"[]")+"="+(a.key&&a.expression?e[1]:e[2]))});!c.length&&a.key&&c.push(a.key+"=");return c.join("&")}, -toArray:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};b.each(function(){c.push(d(a.item||this).attr(a.attribute||"id")||"")});return c},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,e=this.positionAbs.top,f=e+this.helperProportions.height,g=a.left,h=g+a.width,i=a.top,k=i+a.height,j=this.offset.click.top,l=this.offset.click.left;j=e+j>i&&e+jg&&b+la[this.floating?"width":"height"]?j:g0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){this._refreshItems(a);this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(a){var b=[],c=[],e=this._connectWith(); -if(e&&a)for(a=e.length-1;a>=0;a--)for(var f=d(e[a]),g=f.length-1;g>=0;g--){var h=d.data(f[g],"sortable");if(h&&h!=this&&!h.options.disabled)c.push([d.isFunction(h.options.items)?h.options.items.call(h.element):d(h.options.items,h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),h])}c.push([d.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):d(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), -this]);for(a=c.length-1;a>=0;a--)c[a][0].each(function(){b.push(this)});return d(b)},_removeCurrentsFromItems:function(){for(var a=this.currentItem.find(":data(sortable-item)"),b=0;b=0;f--)for(var g=d(e[f]),h=g.length-1;h>=0;h--){var i=d.data(g[h],"sortable");if(i&&i!=this&&!i.options.disabled){c.push([d.isFunction(i.options.items)?i.options.items.call(i.element[0],a,{item:this.currentItem}):d(i.options.items,i.element),i]);this.containers.push(i)}}for(f=c.length-1;f>=0;f--){a=c[f][1];e=c[f][0];h=0;for(g=e.length;h=0;b--){var c=this.items[b];if(!(c.instance!=this.currentContainer&&this.currentContainer&&c.item[0]!=this.currentItem[0])){var e=this.options.toleranceElement?d(this.options.toleranceElement,c.item):c.item;if(!a){c.width=e.outerWidth();c.height=e.outerHeight()}e=e.offset();c.left=e.left;c.top=e.top}}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(b= -this.containers.length-1;b>=0;b--){e=this.containers[b].element.offset();this.containers[b].containerCache.left=e.left;this.containers[b].containerCache.top=e.top;this.containers[b].containerCache.width=this.containers[b].element.outerWidth();this.containers[b].containerCache.height=this.containers[b].element.outerHeight()}return this},_createPlaceholder:function(a){var b=a||this,c=b.options;if(!c.placeholder||c.placeholder.constructor==String){var e=c.placeholder;c.placeholder={element:function(){var f= -d(document.createElement(b.currentItem[0].nodeName)).addClass(e||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!e)f.style.visibility="hidden";return f},update:function(f,g){if(!(e&&!c.forcePlaceholderSize)){g.height()||g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10));g.width()||g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")|| -0,10))}}}}b.placeholder=d(c.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);c.placeholder.update(b,b.placeholder)},_contactContainers:function(a){for(var b=null,c=null,e=this.containers.length-1;e>=0;e--)if(!d.ui.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(!(b&&d.ui.contains(this.containers[e].element[0],b.element[0]))){b=this.containers[e];c=e}}else if(this.containers[e].containerCache.over){this.containers[e]._trigger("out", -a,this._uiHash(this));this.containers[e].containerCache.over=0}if(b)if(this.containers.length===1){this.containers[c]._trigger("over",a,this._uiHash(this));this.containers[c].containerCache.over=1}else if(this.currentContainer!=this.containers[c]){b=1E4;e=null;for(var f=this.positionAbs[this.containers[c].floating?"left":"top"],g=this.items.length-1;g>=0;g--)if(d.ui.contains(this.containers[c].element[0],this.items[g].item[0])){var h=this.items[g][this.containers[c].floating?"left":"top"];if(Math.abs(h- -f)this.containment[2])f=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g- -this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.topthis.containment[3])?g:!(g-this.offset.click.topthis.containment[2])?f:!(f-this.offset.click.left=0;e--)if(d.ui.contains(this.containers[e].element[0],this.currentItem[0])&&!b){c.push(function(f){return function(g){f._trigger("receive",g,this._uiHash(this))}}.call(this,this.containers[e]));c.push(function(f){return function(g){f._trigger("update",g,this._uiHash(this))}}.call(this,this.containers[e]))}}for(e=this.containers.length-1;e>=0;e--){b||c.push(function(f){return function(g){f._trigger("deactivate",g,this._uiHash(this))}}.call(this, -this.containers[e]));if(this.containers[e].containerCache.over){c.push(function(f){return function(g){f._trigger("out",g,this._uiHash(this))}}.call(this,this.containers[e]));this.containers[e].containerCache.over=0}}this._storedCursor&&d("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!b){this._trigger("beforeStop", -a,this._uiHash());for(e=0;e *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3},_create:function(){var a=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?a.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},destroy:function(){a.Widget.prototype.destroy.call(this),this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var b=this.items.length-1;b>=0;b--)this.items[b].item.removeData(this.widgetName+"-item");return this},_setOption:function(b,c){b==="disabled"?(this.options[b]=c,this.widget()[c?"addClass":"removeClass"]("ui-sortable-disabled")):a.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(b,c){var d=this;if(this.reverting)return!1;if(this.options.disabled||this.options.type=="static")return!1;this._refreshItems(b);var e=null,f=this,g=a(b.target).parents().each(function(){if(a.data(this,d.widgetName+"-item")==f)return e=a(this),!1});a.data(b.target,d.widgetName+"-item")==f&&(e=a(b.target));if(!e)return!1;if(this.options.handle&&!c){var h=!1;a(this.options.handle,e).find("*").andSelf().each(function(){this==b.target&&(h=!0)});if(!h)return!1}return this.currentItem=e,this._removeCurrentsFromItems(),!0},_mouseStart:function(b,c,d){var e=this.options,f=this;this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(b),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),e.containment&&this._setContainment(),e.cursor&&(a("body").css("cursor")&&(this._storedCursor=a("body").css("cursor")),a("body").css("cursor",e.cursor)),e.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",e.opacity)),e.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",e.zIndex)),this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",b,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions();if(!d)for(var g=this.containers.length-1;g>=0;g--)this.containers[g]._trigger("activate",b,f._uiHash(this));return a.ui.ddmanager&&(a.ui.ddmanager.current=this),a.ui.ddmanager&&!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(b),!0},_mouseDrag:function(b){this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);if(this.options.scroll){var c=this.options,d=!1;this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-b.pageY=0;e--){var f=this.items[e],g=f.item[0],h=this._intersectsWithPointer(f);if(!h)continue;if(g!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=g&&!a.ui.contains(this.placeholder[0],g)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],g):!0)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(f))this._rearrange(b,f);else break;this._trigger("change",b,this._uiHash());break}}return this._contactContainers(b),a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),this._trigger("sort",b,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(b,c){if(!b)return;a.ui.ddmanager&&!this.options.dropBehaviour&&a.ui.ddmanager.drop(this,b);if(this.options.revert){var d=this,e=d.placeholder.offset();d.reverting=!0,a(this.helper).animate({left:e.left-this.offset.parent.left-d.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-d.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){d._clear(b)})}else this._clear(b,c);return!1},cancel:function(){var b=this;if(this.dragging){this._mouseUp({target:null}),this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("deactivate",null,b._uiHash(this)),this.containers[c].containerCache.over&&(this.containers[c]._trigger("out",null,b._uiHash(this)),this.containers[c].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),a.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):a(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];return b=b||{},a(c).each(function(){var c=(a(b.item||this).attr(b.attribute||"id")||"").match(b.expression||/(.+)[-=_](.+)/);c&&d.push((b.key||c[1]+"[]")+"="+(b.key&&b.expression?c[1]:c[2]))}),!d.length&&b.key&&d.push(b.key+"="),d.join("&")},toArray:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];return b=b||{},c.each(function(){d.push(a(b.item||this).attr(b.attribute||"id")||"")}),d},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,d=this.positionAbs.top,e=d+this.helperProportions.height,f=a.left,g=f+a.width,h=a.top,i=h+a.height,j=this.offset.click.top,k=this.offset.click.left,l=d+j>h&&d+jf&&b+ka[this.floating?"width":"height"]?l:f0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){return this._refreshItems(a),this.refreshPositions(),this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(b){var c=this,d=[],e=[],f=this._connectWith();if(f&&b)for(var g=f.length-1;g>=0;g--){var h=a(f[g]);for(var i=h.length-1;i>=0;i--){var j=a.data(h[i],this.widgetName);j&&j!=this&&!j.options.disabled&&e.push([a.isFunction(j.options.items)?j.options.items.call(j.element):a(j.options.items,j.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),j])}}e.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var g=e.length-1;g>=0;g--)e[g][0].each(function(){d.push(this)});return a(d)},_removeCurrentsFromItems:function(){var a=this.currentItem.find(":data("+this.widgetName+"-item)");for(var b=0;b=0;g--){var h=a(f[g]);for(var i=h.length-1;i>=0;i--){var j=a.data(h[i],this.widgetName);j&&j!=this&&!j.options.disabled&&(e.push([a.isFunction(j.options.items)?j.options.items.call(j.element[0],b,{item:this.currentItem}):a(j.options.items,j.element),j]),this.containers.push(j))}}for(var g=e.length-1;g>=0;g--){var k=e[g][1],l=e[g][0];for(var i=0,m=l.length;i=0;c--){var d=this.items[c];if(d.instance!=this.currentContainer&&this.currentContainer&&d.item[0]!=this.currentItem[0])continue;var e=this.options.toleranceElement?a(this.options.toleranceElement,d.item):d.item;b||(d.width=e.outerWidth(),d.height=e.outerHeight());var f=e.offset();d.left=f.left,d.top=f.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(var c=this.containers.length-1;c>=0;c--){var f=this.containers[c].element.offset();this.containers[c].containerCache.left=f.left,this.containers[c].containerCache.top=f.top,this.containers[c].containerCache.width=this.containers[c].element.outerWidth(),this.containers[c].containerCache.height=this.containers[c].element.outerHeight()}return this},_createPlaceholder:function(b){var c=b||this,d=c.options;if(!d.placeholder||d.placeholder.constructor==String){var e=d.placeholder;d.placeholder={element:function(){var b=a(document.createElement(c.currentItem[0].nodeName)).addClass(e||c.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];return e||(b.style.visibility="hidden"),b},update:function(a,b){if(e&&!d.forcePlaceholderSize)return;b.height()||b.height(c.currentItem.innerHeight()-parseInt(c.currentItem.css("paddingTop")||0,10)-parseInt(c.currentItem.css("paddingBottom")||0,10)),b.width()||b.width(c.currentItem.innerWidth()-parseInt(c.currentItem.css("paddingLeft")||0,10)-parseInt(c.currentItem.css("paddingRight")||0,10))}}}c.placeholder=a(d.placeholder.element.call(c.element,c.currentItem)),c.currentItem.after(c.placeholder),d.placeholder.update(c,c.placeholder)},_contactContainers:function(b){var c=null,d=null;for(var e=this.containers.length-1;e>=0;e--){if(a.ui.contains(this.currentItem[0],this.containers[e].element[0]))continue;if(this._intersectsWith(this.containers[e].containerCache)){if(c&&a.ui.contains(this.containers[e].element[0],c.element[0]))continue;c=this.containers[e],d=e}else this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",b,this._uiHash(this)),this.containers[e].containerCache.over=0)}if(!c)return;if(this.containers.length===1)this.containers[d]._trigger("over",b,this._uiHash(this)),this.containers[d].containerCache.over=1;else if(this.currentContainer!=this.containers[d]){var f=1e4,g=null,h=this.positionAbs[this.containers[d].floating?"left":"top"];for(var i=this.items.length-1;i>=0;i--){if(!a.ui.contains(this.containers[d].element[0],this.items[i].item[0]))continue;var j=this.items[i][this.containers[d].floating?"left":"top"];Math.abs(j-h)this.containment[2]&&(f=this.containment[2]+this.offset.click.left),b.pageY-this.offset.click.top>this.containment[3]&&(g=this.containment[3]+this.offset.click.top));if(c.grid){var h=this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1];g=this.containment?h-this.offset.click.topthis.containment[3]?h-this.offset.click.topthis.containment[2]?i-this.offset.click.left=0;f--)a.ui.contains(this.containers[f].element[0],this.currentItem[0])&&!c&&(d.push(function(a){return function(b){a._trigger("receive",b,this._uiHash(this))}}.call(this,this.containers[f])),d.push(function(a){return function(b){a._trigger("update",b,this._uiHash(this))}}.call(this,this.containers[f])))}for(var f=this.containers.length-1;f>=0;f--)c||d.push(function(a){return function(b){a._trigger("deactivate",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over&&(d.push(function(a){return function(b){a._trigger("out",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over=0);this._storedCursor&&a("body").css("cursor",this._storedCursor),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex),this.dragging=!1;if(this.cancelHelperRemoval){if(!c){this._trigger("beforeStop",b,this._uiHash());for(var f=0;f
    ",remove:null,select:null,show:null,spinner:"Loading…",tabTemplate:"
  • #{label}
  • "},_create:function(){this._tabify(true)},_setOption:function(b,e){if(b=="selected")this.options.collapsible&& -e==this.options.selected||this.select(e);else{this.options[b]=e;this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+u()},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+w());return d.cookie.apply(null,[b].concat(d.makeArray(arguments)))},_ui:function(b,e){return{tab:b,panel:e,index:this.anchors.index(b)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b= -d(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(b){function e(g,f){g.css("display","");!d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")}var a=this,c=this.options,h=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(g,f){var i=d(f).attr("href"),l=i.split("#")[0],q;if(l&&(l===location.toString().split("#")[0]|| -(q=d("base")[0])&&l===q.href)){i=f.hash;f.href=i}if(h.test(i))a.panels=a.panels.add(a.element.find(a._sanitizeSelector(i)));else if(i&&i!=="#"){d.data(f,"href.tabs",i);d.data(f,"load.tabs",i.replace(/#.*$/,""));i=a._tabId(f);f.href="#"+i;f=a.element.find("#"+i);if(!f.length){f=d(c.panelTemplate).attr("id",i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g-1]||a.list);f.data("destroy.tabs",true)}a.panels=a.panels.add(f)}else c.disabled.push(g)});if(b){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"); -this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(c.selected===p){location.hash&&this.anchors.each(function(g,f){if(f.hash==location.hash){c.selected=g;return false}});if(typeof c.selected!=="number"&&c.cookie)c.selected=parseInt(a._cookie(),10);if(typeof c.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)c.selected= -this.lis.index(this.lis.filter(".ui-tabs-selected"));c.selected=c.selected||(this.lis.length?0:-1)}else if(c.selected===null)c.selected=-1;c.selected=c.selected>=0&&this.anchors[c.selected]||c.selected<0?c.selected:0;c.disabled=d.unique(c.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){return a.lis.index(g)}))).sort();d.inArray(c.selected,c.disabled)!=-1&&c.disabled.splice(d.inArray(c.selected,c.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active"); -if(c.selected>=0&&this.anchors.length){a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active");a.element.queue("tabs",function(){a._trigger("show",null,a._ui(a.anchors[c.selected],a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash))[0]))});this.load(c.selected)}d(window).bind("unload",function(){a.lis.add(a.anchors).unbind(".tabs");a.lis=a.anchors=a.panels=null})}else c.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")); -this.element[c.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");c.cookie&&this._cookie(c.selected,c.cookie);b=0;for(var j;j=this.lis[b];b++)d(j)[d.inArray(b,c.disabled)!=-1&&!d(j).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");c.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(c.event!=="mouseover"){var k=function(g,f){f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)},n=function(g,f){f.removeClass("ui-state-"+ -g)};this.lis.bind("mouseover.tabs",function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){n("hover",d(this))});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){n("focus",d(this).closest("li"))})}var m,o;if(c.fx)if(d.isArray(c.fx)){m=c.fx[0];o=c.fx[1]}else m=o=c.fx;var r=o?function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal", -function(){e(f,o);a._trigger("show",null,a._ui(g,f[0]))})}:function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");a._trigger("show",null,a._ui(g,f[0]))},s=m?function(g,f){f.animate(m,m.duration||"normal",function(){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");e(f,m);a.element.dequeue("tabs")})}:function(g,f){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");a.element.dequeue("tabs")}; -this.anchors.bind(c.event+".tabs",function(){var g=this,f=d(g).closest("li"),i=a.panels.filter(":not(.ui-tabs-hide)"),l=a.element.find(a._sanitizeSelector(g.hash));if(f.hasClass("ui-tabs-selected")&&!c.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||a.panels.filter(":animated").length||a._trigger("select",null,a._ui(this,l[0]))===false){this.blur();return false}c.selected=a.anchors.index(this);a.abort();if(c.collapsible)if(f.hasClass("ui-tabs-selected")){c.selected= --1;c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){s(g,i)}).dequeue("tabs");this.blur();return false}else if(!i.length){c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this));this.blur();return false}c.cookie&&a._cookie(c.selected,c.cookie);if(l.length){i.length&&a.element.queue("tabs",function(){s(g,i)});a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier."; -d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(b){if(typeof b=="string")b=this.anchors.index(this.anchors.filter("[href$="+b+"]"));return b},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e= -d.data(this,"href.tabs");if(e)this.href=e;var a=d(this).unbind(".tabs");d.each(["href","load","cache"],function(c,h){a.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this,"destroy.tabs")?d(this).remove():d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});b.cookie&&this._cookie(null,b.cookie);return this},add:function(b, -e,a){if(a===p)a=this.anchors.length;var c=this,h=this.options;e=d(h.tabTemplate.replace(/#\{href\}/g,b).replace(/#\{label\}/g,e));b=!b.indexOf("#")?b.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var j=c.element.find("#"+b);j.length||(j=d(h.panelTemplate).attr("id",b).data("destroy.tabs",true));j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(a>=this.lis.length){e.appendTo(this.list);j.appendTo(this.list[0].parentNode)}else{e.insertBefore(this.lis[a]); -j.insertBefore(this.panels[a])}h.disabled=d.map(h.disabled,function(k){return k>=a?++k:k});this._tabify();if(this.anchors.length==1){h.selected=0;e.addClass("ui-tabs-selected ui-state-active");j.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){c._trigger("show",null,c._ui(c.anchors[0],c.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[a],this.panels[a]));return this},remove:function(b){b=this._getIndex(b);var e=this.options,a=this.lis.eq(b).remove(),c=this.panels.eq(b).remove(); -if(a.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(b+(b+1=b?--h:h});this._tabify();this._trigger("remove",null,this._ui(a.find("a")[0],c[0]));return this},enable:function(b){b=this._getIndex(b);var e=this.options;if(d.inArray(b,e.disabled)!=-1){this.lis.eq(b).removeClass("ui-state-disabled");e.disabled=d.grep(e.disabled,function(a){return a!=b});this._trigger("enable",null, -this._ui(this.anchors[b],this.panels[b]));return this}},disable:function(b){b=this._getIndex(b);var e=this.options;if(b!=e.selected){this.lis.eq(b).addClass("ui-state-disabled");e.disabled.push(b);e.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[b],this.panels[b]))}return this},select:function(b){b=this._getIndex(b);if(b==-1)if(this.options.collapsible&&this.options.selected!=-1)b=this.options.selected;else return this;this.anchors.eq(b).trigger(this.options.event+".tabs");return this}, -load:function(b){b=this._getIndex(b);var e=this,a=this.options,c=this.anchors.eq(b)[0],h=d.data(c,"load.tabs");this.abort();if(!h||this.element.queue("tabs").length!==0&&d.data(c,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(b).addClass("ui-state-processing");if(a.spinner){var j=d("span",c);j.data("label.tabs",j.html()).html(a.spinner)}this.xhr=d.ajax(d.extend({},a.ajaxOptions,{url:h,success:function(k,n){e.element.find(e._sanitizeSelector(c.hash)).html(k);e._cleanup();a.cache&&d.data(c, -"cache.tabs",true);e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.error(k,n,b,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this}, -url:function(b,e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.16"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k
    ",remove:null,select:null,show:null,spinner:"Loading…",tabTemplate:"
  • #{label}
  • "},_create:function(){this._tabify(!0)},_setOption:function(a,b){if(a=="selected"){if(this.options.collapsible&&b==this.options.selected)return;this.select(b)}else this.options[a]=b,this._tabify()},_tabId:function(a){return a.title&&a.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+e()},_sanitizeSelector:function(a){return a.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+f());return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(a,b){return{tab:a,panel:b,index:this.anchors.index(a)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(c){function m(b,c){b.css("display",""),!a.support.opacity&&c.opacity&&b[0].style.removeAttribute("filter")}var d=this,e=this.options,f=/^#.+/;this.list=this.element.find("ol,ul").eq(0),this.lis=a(" > li:has(a[href])",this.list),this.anchors=this.lis.map(function(){return a("a",this)[0]}),this.panels=a([]),this.anchors.each(function(b,c){var g=a(c).attr("href"),h=g.split("#")[0],i;h&&(h===location.toString().split("#")[0]||(i=a("base")[0])&&h===i.href)&&(g=c.hash,c.href=g);if(f.test(g))d.panels=d.panels.add(d.element.find(d._sanitizeSelector(g)));else if(g&&g!=="#"){a.data(c,"href.tabs",g),a.data(c,"load.tabs",g.replace(/#.*$/,""));var j=d._tabId(c);c.href="#"+j;var k=d.element.find("#"+j);k.length||(k=a(e.panelTemplate).attr("id",j).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(d.panels[b-1]||d.list),k.data("destroy.tabs",!0)),d.panels=d.panels.add(k)}else e.disabled.push(b)}),c?(this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"),this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.lis.addClass("ui-state-default ui-corner-top"),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom"),e.selected===b?(location.hash&&this.anchors.each(function(a,b){if(b.hash==location.hash)return e.selected=a,!1}),typeof e.selected!="number"&&e.cookie&&(e.selected=parseInt(d._cookie(),10)),typeof e.selected!="number"&&this.lis.filter(".ui-tabs-selected").length&&(e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))),e.selected=e.selected||(this.lis.length?0:-1)):e.selected===null&&(e.selected=-1),e.selected=e.selected>=0&&this.anchors[e.selected]||e.selected<0?e.selected:0,e.disabled=a.unique(e.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(a,b){return d.lis.index(a)}))).sort(),a.inArray(e.selected,e.disabled)!=-1&&e.disabled.splice(a.inArray(e.selected,e.disabled),1),this.panels.addClass("ui-tabs-hide"),this.lis.removeClass("ui-tabs-selected ui-state-active"),e.selected>=0&&this.anchors.length&&(d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash)).removeClass("ui-tabs-hide"),this.lis.eq(e.selected).addClass("ui-tabs-selected ui-state-active"),d.element.queue("tabs",function(){d._trigger("show",null,d._ui(d.anchors[e.selected],d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash))[0]))}),this.load(e.selected)),a(window).bind("unload",function(){d.lis.add(d.anchors).unbind(".tabs"),d.lis=d.anchors=d.panels=null})):e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")),this.element[e.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible"),e.cookie&&this._cookie(e.selected,e.cookie);for(var g=0,h;h=this.lis[g];g++)a(h)[a.inArray(g,e.disabled)!=-1&&!a(h).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");e.cache===!1&&this.anchors.removeData("cache.tabs"),this.lis.add(this.anchors).unbind(".tabs");if(e.event!=="mouseover"){var i=function(a,b){b.is(":not(.ui-state-disabled)")&&b.addClass("ui-state-"+a)},j=function(a,b){b.removeClass("ui-state-"+a)};this.lis.bind("mouseover.tabs",function(){i("hover",a(this))}),this.lis.bind("mouseout.tabs",function(){j("hover",a(this))}),this.anchors.bind("focus.tabs",function(){i("focus",a(this).closest("li"))}),this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var k,l;e.fx&&(a.isArray(e.fx)?(k=e.fx[0],l=e.fx[1]):k=l=e.fx);var n=l?function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active"),c.hide().removeClass("ui-tabs-hide").animate(l,l.duration||"normal",function(){m(c,l),d._trigger("show",null,d._ui(b,c[0]))})}:function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active"),c.removeClass("ui-tabs-hide"),d._trigger("show",null,d._ui(b,c[0]))},o=k?function(a,b){b.animate(k,k.duration||"normal",function(){d.lis.removeClass("ui-tabs-selected ui-state-active"),b.addClass("ui-tabs-hide"),m(b,k),d.element.dequeue("tabs")})}:function(a,b,c){d.lis.removeClass("ui-tabs-selected ui-state-active"),b.addClass("ui-tabs-hide"),d.element.dequeue("tabs")};this.anchors.bind(e.event+".tabs",function(){var b=this,c=a(b).closest("li"),f=d.panels.filter(":not(.ui-tabs-hide)"),g=d.element.find(d._sanitizeSelector(b.hash));if(c.hasClass("ui-tabs-selected")&&!e.collapsible||c.hasClass("ui-state-disabled")||c.hasClass("ui-state-processing")||d.panels.filter(":animated").length||d._trigger("select",null,d._ui(this,g[0]))===!1)return this.blur(),!1;e.selected=d.anchors.index(this),d.abort();if(e.collapsible){if(c.hasClass("ui-tabs-selected"))return e.selected=-1,e.cookie&&d._cookie(e.selected,e.cookie),d.element.queue("tabs",function(){o(b,f)}).dequeue("tabs"),this.blur(),!1;if(!f.length)return e.cookie&&d._cookie(e.selected,e.cookie),d.element.queue("tabs",function(){n(b,g)}),d.load(d.anchors.index(this)),this.blur(),!1}e.cookie&&d._cookie(e.selected,e.cookie);if(g.length)f.length&&d.element.queue("tabs",function(){o(b,f)}),d.element.queue("tabs",function(){n(b,g)}),d.load(d.anchors.index(this));else throw"jQuery UI Tabs: Mismatching fragment identifier.";a.browser.msie&&this.blur()}),this.anchors.bind("click.tabs",function(){return!1})},_getIndex:function(a){return typeof a=="string"&&(a=this.anchors.index(this.anchors.filter("[href$='"+a+"']"))),a},destroy:function(){var b=this.options;return this.abort(),this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs"),this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.anchors.each(function(){var b=a.data(this,"href.tabs");b&&(this.href=b);var c=a(this).unbind(".tabs");a.each(["href","load","cache"],function(a,b){c.removeData(b+".tabs")})}),this.lis.unbind(".tabs").add(this.panels).each(function(){a.data(this,"destroy.tabs")?a(this).remove():a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}),b.cookie&&this._cookie(null,b.cookie),this},add:function(c,d,e){e===b&&(e=this.anchors.length);var f=this,g=this.options,h=a(g.tabTemplate.replace(/#\{href\}/g,c).replace(/#\{label\}/g,d)),i=c.indexOf("#")?this._tabId(a("a",h)[0]):c.replace("#","");h.addClass("ui-state-default ui-corner-top").data("destroy.tabs",!0);var j=f.element.find("#"+i);return j.length||(j=a(g.panelTemplate).attr("id",i).data("destroy.tabs",!0)),j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide"),e>=this.lis.length?(h.appendTo(this.list),j.appendTo(this.list[0].parentNode)):(h.insertBefore(this.lis[e]),j.insertBefore(this.panels[e])),g.disabled=a.map(g.disabled,function(a,b){return a>=e?++a:a}),this._tabify(),this.anchors.length==1&&(g.selected=0,h.addClass("ui-tabs-selected ui-state-active"),j.removeClass("ui-tabs-hide"),this.element.queue("tabs",function(){f._trigger("show",null,f._ui(f.anchors[0],f.panels[0]))}),this.load(0)),this._trigger("add",null,this._ui(this.anchors[e],this.panels[e])),this},remove:function(b){b=this._getIndex(b);var c=this.options,d=this.lis.eq(b).remove(),e=this.panels.eq(b).remove();return d.hasClass("ui-tabs-selected")&&this.anchors.length>1&&this.select(b+(b+1=b?--a:a}),this._tabify(),this._trigger("remove",null,this._ui(d.find("a")[0],e[0])),this},enable:function(b){b=this._getIndex(b);var c=this.options;if(a.inArray(b,c.disabled)==-1)return;return this.lis.eq(b).removeClass("ui-state-disabled"),c.disabled=a.grep(c.disabled,function(a,c){return a!=b}),this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b])),this},disable:function(a){a=this._getIndex(a);var b=this,c=this.options;return a!=c.selected&&(this.lis.eq(a).addClass("ui-state-disabled"),c.disabled.push(a),c.disabled.sort(),this._trigger("disable",null,this._ui(this.anchors[a],this.panels[a]))),this},select:function(a){a=this._getIndex(a);if(a==-1)if(this.options.collapsible&&this.options.selected!=-1)a=this.options.selected;else return this;return this.anchors.eq(a).trigger(this.options.event+".tabs"),this},load:function(b){b=this._getIndex(b);var c=this,d=this.options,e=this.anchors.eq(b)[0],f=a.data(e,"load.tabs");this.abort();if(!f||this.element.queue("tabs").length!==0&&a.data(e,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(b).addClass("ui-state-processing");if(d.spinner){var g=a("span",e);g.data("label.tabs",g.html()).html(d.spinner)}return this.xhr=a.ajax(a.extend({},d.ajaxOptions,{url:f,success:function(f,g){c.element.find(c._sanitizeSelector(e.hash)).html(f),c._cleanup(),d.cache&&a.data(e,"cache.tabs",!0),c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.success(f,g)}catch(h){}},error:function(a,f,g){c._cleanup(),c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.error(a,f,b,e)}catch(g){}}})),c.element.dequeue("tabs"),this},abort:function(){return this.element.queue([]),this.panels.stop(!1,!0),this.element.queue("tabs",this.element.queue("tabs").splice(-2,2)),this.xhr&&(this.xhr.abort(),delete this.xhr),this._cleanup(),this},url:function(a,b){return this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",b),this},length:function(){return this.anchors.length}}),a.extend(a.ui.tabs,{version:"1.8.20"}),a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(a,b){var c=this,d=this.options,e=c._rotate||(c._rotate=function(b){clearTimeout(c.rotation),c.rotation=setTimeout(function(){var a=d.selected;c.select(++a(\d+)<\/pre>$/, '$1'); // if async-upload returned an error message, place it in the media item div and return - if ( serverData.match('media-upload-error') ) { + if ( serverData.match(/media-upload-error|error-div/) ) { item.html(serverData); return; } else { @@ -138,7 +138,7 @@ function prepareMediaItemInit(fileObj) { jQuery('a.delete', item).click(function(){ // Tell the server to delete it. TODO: handle exceptions jQuery.ajax({ - url: 'admin-ajax.php', + url: ajaxurl, type: 'post', success: deleteSuccess, error: deleteError, @@ -156,7 +156,7 @@ function prepareMediaItemInit(fileObj) { jQuery('a.undo', item).click(function(){ // Tell the server to untrash it. TODO: handle exceptions jQuery.ajax({ - url: 'admin-ajax.php', + url: ajaxurl, type: 'post', id: fileObj.id, data: { @@ -346,9 +346,9 @@ jQuery(document).ready(function($){ if ( target.is('input[type="radio"]') ) { // remember the last used image size and alignment tr = target.closest('tr'); - if ( $(tr).hasClass('align') ) + if ( tr.hasClass('align') ) setUserSetting('align', target.val()); - else if ( $(tr).hasClass('image-size') ) + else if ( tr.hasClass('image-size') ) setUserSetting('imgsize', target.val()); } else if ( target.is('button.button') ) { // remember the last used image link url @@ -357,7 +357,7 @@ jQuery(document).ready(function($){ if ( c && c[1] ) { setUserSetting('urlbutton', c[1]); - target.siblings('.urlfield').val( target.attr('title') ); + target.siblings('.urlfield').val( target.data('link-url') ); } } else if ( target.is('a.dismiss') ) { target.parents('.media-item').fadeOut(200, function(){ @@ -366,11 +366,11 @@ jQuery(document).ready(function($){ } else if ( target.is('.upload-flash-bypass a') || target.is('a.uploader-html') ) { // switch uploader to html4 $('#media-items, p.submit, span.big-file-warning').css('display', 'none'); switchUploader(0); - return false; + e.preventDefault(); } else if ( target.is('.upload-html-bypass a') ) { // switch uploader to multi-file $('#media-items, p.submit, span.big-file-warning').css('display', ''); switchUploader(1); - return false; + e.preventDefault(); } else if ( target.is('a.describe-toggle-on') ) { // Show target.parent().addClass('open'); target.siblings('.slidetoggle').fadeIn(250, function(){ @@ -388,12 +388,12 @@ jQuery(document).ready(function($){ } } }); - return false; + e.preventDefault(); } else if ( target.is('a.describe-toggle-off') ) { // Hide target.siblings('.slidetoggle').fadeOut(250, function(){ target.parent().removeClass('open'); }); - return false; + e.preventDefault(); } }); @@ -417,7 +417,7 @@ jQuery(document).ready(function($){ setResize( getUserSetting('upload_resize', false) ); - if ( up.features.dragdrop ) { + if ( up.features.dragdrop && ! $(document.body).hasClass('mobile') ) { uploaddiv.addClass('drag-drop'); $('#drag-drop-area').bind('dragover.wp-uploader', function(){ // dragenter doesn't fire right :( uploaddiv.addClass('drag-over'); diff --git a/wp-includes/js/plupload/handlers.js b/wp-includes/js/plupload/handlers.js index 96076a24..eb1787db 100644 --- a/wp-includes/js/plupload/handlers.js +++ b/wp-includes/js/plupload/handlers.js @@ -1 +1 @@ -var topWin=window.dialogArguments||opener||parent||top,uploader,uploader_init;function fileDialogStart(){jQuery("#media-upload-error").empty()}function fileQueued(b){jQuery(".media-blank").remove();var a=jQuery("#media-items").children(),c=post_id||0;if(a.length==1){a.removeClass("open").find(".slidetoggle").slideUp(200)}jQuery("#media-items").append('
    0%
    '+b.name+"
    ");jQuery("#insert-gallery").prop("disabled",true)}function uploadStart(){try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").unbind("click",topWin.tb_remove)}}catch(a){}return true}function uploadProgress(a,b){var c=jQuery("#media-item-"+b.id);jQuery(".bar",c).width((200*b.loaded)/b.size);jQuery(".percent",c).html(b.percent+"%")}function fileUploading(c,d){var b=100*1024*1024,a=parseInt(c.settings.max_file_size,10);if(a>b&&d.size>b){setTimeout(function(){if(d.status==2&&d.loaded==0){wpFileError(d,pluploadL10n.big_upload_failed.replace("%1$s",'').replace("%2$s",""));if(c.current&&c.current.file.id==d.id&&c.current.xhr.abort){c.current.xhr.abort()}}},10000)}}function updateMediaForm(){var a=jQuery("#media-items").children();if(a.length==1){a.addClass("open").find(".slidetoggle").show();jQuery(".insert-gallery").hide()}else{if(a.length>1){a.removeClass("open");jQuery(".insert-gallery").show()}}if(a.not(".media-blank").length>0){jQuery(".savebutton").show()}else{jQuery(".savebutton").hide()}}function uploadSuccess(c,a){var b=jQuery("#media-item-"+c.id);a=a.replace(/^
    (\d+)<\/pre>$/,"$1");if(a.match("media-upload-error")){b.html(a);return}else{jQuery(".percent",b).html(pluploadL10n.crunching)}prepareMediaItem(c,a);updateMediaForm();if(post_id&&b.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(1*jQuery("#attachments-count").text()+1)}}function setResize(a){if(a){if(uploader.features.jpgresize){uploader.settings.resize={width:resize_width,height:resize_height,quality:100}}else{uploader.settings.multipart_params.image_resize=true}}else{delete (uploader.settings.resize);delete (uploader.settings.multipart_params.image_resize)}}function prepareMediaItem(c,a){var d=(typeof shortform=="undefined")?1:2,b=jQuery("#media-item-"+c.id);try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").click(topWin.tb_remove)}}catch(g){}if(isNaN(a)||!a){b.append(a);prepareMediaItemInit(c)}else{b.load("async-upload.php",{attachment_id:a,fetch:d},function(){prepareMediaItemInit(c);updateMediaForm()})}}function prepareMediaItemInit(b){var a=jQuery("#media-item-"+b.id);jQuery(".thumbnail",a).clone().attr("class","pinkynail toggle").prependTo(a);jQuery(".filename.original",a).replaceWith(jQuery(".filename.new",a));jQuery("a.delete",a).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",success:deleteSuccess,error:deleteError,id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"trash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")}});return false});jQuery("a.undo",a).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"untrash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")},success:function(d,e){var c=jQuery("#media-item-"+b.id);if(type=jQuery("#type-of-"+b.id).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-0+1)}if(post_id&&c.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-0+1)}jQuery(".filename .trashnotice",c).remove();jQuery(".filename .title",c).css("font-weight","normal");jQuery("a.undo",c).addClass("hidden");jQuery(".menu_order_input",c).show();c.css({backgroundColor:"#ceb"}).animate({backgroundColor:"#fff"},{queue:false,duration:500,complete:function(){jQuery(this).css({backgroundColor:""})}}).removeClass("undo")}});return false});jQuery("#media-item-"+b.id+".startopen").removeClass("startopen").addClass("open").find("slidetoggle").fadeIn()}function wpQueueError(a){jQuery("#media-upload-error").show().html('

    '+a+"

    ")}function wpFileError(b,a){itemAjaxError(b.id,a)}function itemAjaxError(e,c){var b=jQuery("#media-item-"+e),a=b.find(".filename").text(),d=b.data("last-err");if(d==e){return}b.html('
    '+pluploadL10n.dismiss+""+pluploadL10n.error_uploading.replace("%s",jQuery.trim(a))+" "+c+"
    ").data("last-err",e)}function deleteSuccess(b,d){if(b=="-1"){return itemAjaxError(this.id,"You do not have permission. Has your session expired?")}if(b=="0"){return itemAjaxError(this.id,"Could not be deleted. Has it been deleted already?")}var c=this.id,a=jQuery("#media-item-"+c);if(type=jQuery("#type-of-"+c).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-1)}if(post_id&&a.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-1)}if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".toggle").toggle();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery(".toggle",a).toggle();jQuery(".slidetoggle",a).slideUp(200).siblings().removeClass("hidden");a.css({backgroundColor:"#faa"}).animate({backgroundColor:"#f4f4f4"},{queue:false,duration:500}).addClass("undo");jQuery(".filename:empty",a).remove();jQuery(".filename .title",a).css("font-weight","bold");jQuery(".filename",a).append(' '+pluploadL10n.deleted+" ").siblings("a.toggle").hide();jQuery(".filename",a).append(jQuery("a.undo",a).removeClass("hidden"));jQuery(".menu_order_input",a).hide();return}function deleteError(c,b,a){}function uploadComplete(){jQuery("#insert-gallery").prop("disabled",false)}function switchUploader(a){if(a){deleteUserSetting("uploader");jQuery(".media-upload-form").removeClass("html-uploader");if(typeof(uploader)=="object"){uploader.refresh()}}else{setUserSetting("uploader","1");jQuery(".media-upload-form").addClass("html-uploader")}}function dndHelper(a){var b=document.getElementById("dnd-helper");if(a){b.style.display="block"}else{b.style.display="none"}}function uploadError(d,f,c,e){var b=100*1024*1024,a;switch(f){case plupload.FAILED:wpFileError(d,pluploadL10n.upload_failed);break;case plupload.FILE_EXTENSION_ERROR:wpFileError(d,pluploadL10n.invalid_filetype);break;case plupload.FILE_SIZE_ERROR:uploadSizeError(e,d);break;case plupload.IMAGE_FORMAT_ERROR:wpFileError(d,pluploadL10n.not_an_image);break;case plupload.IMAGE_MEMORY_ERROR:wpFileError(d,pluploadL10n.image_memory_exceeded);break;case plupload.IMAGE_DIMENSIONS_ERROR:wpFileError(d,pluploadL10n.image_dimensions_exceeded);break;case plupload.GENERIC_ERROR:wpQueueError(pluploadL10n.upload_failed);break;case plupload.IO_ERROR:a=parseInt(e.settings.max_file_size,10);if(a>b&&d.size>b){wpFileError(d,pluploadL10n.big_upload_failed.replace("%1$s",'').replace("%2$s",""))}else{wpQueueError(pluploadL10n.io_error)}break;case plupload.HTTP_ERROR:wpQueueError(pluploadL10n.http_error);break;case plupload.INIT_ERROR:jQuery(".media-upload-form").addClass("html-uploader");break;case plupload.SECURITY_ERROR:wpQueueError(pluploadL10n.security_error);break;default:wpFileError(d,pluploadL10n.default_error)}}function uploadSizeError(a,b,d){var c;if(d){c=pluploadL10n.big_upload_queued.replace("%s",b.name)+" "+pluploadL10n.big_upload_failed.replace("%1$s",'').replace("%2$s","")}else{c=pluploadL10n.file_exceeds_size_limit.replace("%s",b.name)}jQuery("#media-items").append('

    '+c+"

    ");a.removeFile(b)}jQuery(document).ready(function(a){a(".media-upload-form").bind("click.uploader",function(f){var d=a(f.target),b,g;if(d.is('input[type="radio"]')){b=d.closest("tr");if(a(b).hasClass("align")){setUserSetting("align",d.val())}else{if(a(b).hasClass("image-size")){setUserSetting("imgsize",d.val())}}}else{if(d.is("button.button")){g=f.target.className||"";g=g.match(/url([^ '"]+)/);if(g&&g[1]){setUserSetting("urlbutton",g[1]);d.siblings(".urlfield").val(d.attr("title"))}}else{if(d.is("a.dismiss")){d.parents(".media-item").fadeOut(200,function(){a(this).remove()})}else{if(d.is(".upload-flash-bypass a")||d.is("a.uploader-html")){a("#media-items, p.submit, span.big-file-warning").css("display","none");switchUploader(0);return false}else{if(d.is(".upload-html-bypass a")){a("#media-items, p.submit, span.big-file-warning").css("display","");switchUploader(1);return false}else{if(d.is("a.describe-toggle-on")){d.parent().addClass("open");d.siblings(".slidetoggle").fadeIn(250,function(){var i=a(window).scrollTop(),e=a(window).height(),k=a(this).offset().top,j=a(this).height(),c,l;if(e&&k&&j){c=k+j;l=i+e;if(c>l){if(c-lc&&f.size>c&&d.runtime!="html5"){uploadSizeError(d,f,true)}else{fileQueued(f)}});d.refresh();d.start()});uploader.bind("BeforeUpload",function(b,c){});uploader.bind("UploadFile",function(b,c){fileUploading(b,c)});uploader.bind("UploadProgress",function(b,c){uploadProgress(b,c)});uploader.bind("Error",function(b,c){uploadError(c.file,c.code,c.message,b);b.refresh()});uploader.bind("FileUploaded",function(b,d,c){uploadSuccess(d,c.response)});uploader.bind("UploadComplete",function(b,c){uploadComplete()})};if(typeof(wpUploaderInit)=="object"){uploader_init()}}); \ No newline at end of file +var topWin=window.dialogArguments||opener||parent||top,uploader,uploader_init;function fileDialogStart(){jQuery("#media-upload-error").empty()}function fileQueued(b){jQuery(".media-blank").remove();var a=jQuery("#media-items").children(),c=post_id||0;if(a.length==1){a.removeClass("open").find(".slidetoggle").slideUp(200)}jQuery("#media-items").append('
    0%
    '+b.name+"
    ");jQuery("#insert-gallery").prop("disabled",true)}function uploadStart(){try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").unbind("click",topWin.tb_remove)}}catch(a){}return true}function uploadProgress(a,b){var c=jQuery("#media-item-"+b.id);jQuery(".bar",c).width((200*b.loaded)/b.size);jQuery(".percent",c).html(b.percent+"%")}function fileUploading(c,d){var b=100*1024*1024,a=parseInt(c.settings.max_file_size,10);if(a>b&&d.size>b){setTimeout(function(){var e;if(d.status<3&&d.loaded==0){wpFileError(d,pluploadL10n.big_upload_failed.replace("%1$s",'').replace("%2$s",""));c.stop();c.removeFile(d);c.start()}},10000)}}function updateMediaForm(){var a=jQuery("#media-items").children();if(a.length==1){a.addClass("open").find(".slidetoggle").show();jQuery(".insert-gallery").hide()}else{if(a.length>1){a.removeClass("open");jQuery(".insert-gallery").show()}}if(a.not(".media-blank").length>0){jQuery(".savebutton").show()}else{jQuery(".savebutton").hide()}}function uploadSuccess(c,a){var b=jQuery("#media-item-"+c.id);a=a.replace(/^
    (\d+)<\/pre>$/,"$1");if(a.match(/media-upload-error|error-div/)){b.html(a);return}else{jQuery(".percent",b).html(pluploadL10n.crunching)}prepareMediaItem(c,a);updateMediaForm();if(post_id&&b.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(1*jQuery("#attachments-count").text()+1)}}function setResize(a){if(a){if(uploader.features.jpgresize){uploader.settings.resize={width:resize_width,height:resize_height,quality:100}}else{uploader.settings.multipart_params.image_resize=true}}else{delete (uploader.settings.resize);delete (uploader.settings.multipart_params.image_resize)}}function prepareMediaItem(c,a){var d=(typeof shortform=="undefined")?1:2,b=jQuery("#media-item-"+c.id);try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").click(topWin.tb_remove)}}catch(g){}if(isNaN(a)||!a){b.append(a);prepareMediaItemInit(c)}else{b.load("async-upload.php",{attachment_id:a,fetch:d},function(){prepareMediaItemInit(c);updateMediaForm()})}}function prepareMediaItemInit(b){var a=jQuery("#media-item-"+b.id);jQuery(".thumbnail",a).clone().attr("class","pinkynail toggle").prependTo(a);jQuery(".filename.original",a).replaceWith(jQuery(".filename.new",a));jQuery("a.delete",a).click(function(){jQuery.ajax({url:ajaxurl,type:"post",success:deleteSuccess,error:deleteError,id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"trash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")}});return false});jQuery("a.undo",a).click(function(){jQuery.ajax({url:ajaxurl,type:"post",id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"untrash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")},success:function(d,e){var c=jQuery("#media-item-"+b.id);if(type=jQuery("#type-of-"+b.id).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-0+1)}if(post_id&&c.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-0+1)}jQuery(".filename .trashnotice",c).remove();jQuery(".filename .title",c).css("font-weight","normal");jQuery("a.undo",c).addClass("hidden");jQuery(".menu_order_input",c).show();c.css({backgroundColor:"#ceb"}).animate({backgroundColor:"#fff"},{queue:false,duration:500,complete:function(){jQuery(this).css({backgroundColor:""})}}).removeClass("undo")}});return false});jQuery("#media-item-"+b.id+".startopen").removeClass("startopen").addClass("open").find("slidetoggle").fadeIn()}function wpQueueError(a){jQuery("#media-upload-error").show().html('

    '+a+"

    ")}function wpFileError(b,a){itemAjaxError(b.id,a)}function itemAjaxError(e,c){var b=jQuery("#media-item-"+e),a=b.find(".filename").text(),d=b.data("last-err");if(d==e){return}b.html('
    '+pluploadL10n.dismiss+""+pluploadL10n.error_uploading.replace("%s",jQuery.trim(a))+" "+c+"
    ").data("last-err",e)}function deleteSuccess(b,d){if(b=="-1"){return itemAjaxError(this.id,"You do not have permission. Has your session expired?")}if(b=="0"){return itemAjaxError(this.id,"Could not be deleted. Has it been deleted already?")}var c=this.id,a=jQuery("#media-item-"+c);if(type=jQuery("#type-of-"+c).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-1)}if(post_id&&a.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-1)}if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".toggle").toggle();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery(".toggle",a).toggle();jQuery(".slidetoggle",a).slideUp(200).siblings().removeClass("hidden");a.css({backgroundColor:"#faa"}).animate({backgroundColor:"#f4f4f4"},{queue:false,duration:500}).addClass("undo");jQuery(".filename:empty",a).remove();jQuery(".filename .title",a).css("font-weight","bold");jQuery(".filename",a).append(' '+pluploadL10n.deleted+" ").siblings("a.toggle").hide();jQuery(".filename",a).append(jQuery("a.undo",a).removeClass("hidden"));jQuery(".menu_order_input",a).hide();return}function deleteError(c,b,a){}function uploadComplete(){jQuery("#insert-gallery").prop("disabled",false)}function switchUploader(a){if(a){deleteUserSetting("uploader");jQuery(".media-upload-form").removeClass("html-uploader");if(typeof(uploader)=="object"){uploader.refresh()}}else{setUserSetting("uploader","1");jQuery(".media-upload-form").addClass("html-uploader")}}function dndHelper(a){var b=document.getElementById("dnd-helper");if(a){b.style.display="block"}else{b.style.display="none"}}function uploadError(d,f,c,e){var b=100*1024*1024,a;switch(f){case plupload.FAILED:wpFileError(d,pluploadL10n.upload_failed);break;case plupload.FILE_EXTENSION_ERROR:wpFileError(d,pluploadL10n.invalid_filetype);break;case plupload.FILE_SIZE_ERROR:uploadSizeError(e,d);break;case plupload.IMAGE_FORMAT_ERROR:wpFileError(d,pluploadL10n.not_an_image);break;case plupload.IMAGE_MEMORY_ERROR:wpFileError(d,pluploadL10n.image_memory_exceeded);break;case plupload.IMAGE_DIMENSIONS_ERROR:wpFileError(d,pluploadL10n.image_dimensions_exceeded);break;case plupload.GENERIC_ERROR:wpQueueError(pluploadL10n.upload_failed);break;case plupload.IO_ERROR:a=parseInt(e.settings.max_file_size,10);if(a>b&&d.size>b){wpFileError(d,pluploadL10n.big_upload_failed.replace("%1$s",'').replace("%2$s",""))}else{wpQueueError(pluploadL10n.io_error)}break;case plupload.HTTP_ERROR:wpQueueError(pluploadL10n.http_error);break;case plupload.INIT_ERROR:jQuery(".media-upload-form").addClass("html-uploader");break;case plupload.SECURITY_ERROR:wpQueueError(pluploadL10n.security_error);break;default:wpFileError(d,pluploadL10n.default_error)}}function uploadSizeError(a,b,d){var c;if(d){c=pluploadL10n.big_upload_queued.replace("%s",b.name)+" "+pluploadL10n.big_upload_failed.replace("%1$s",'').replace("%2$s","")}else{c=pluploadL10n.file_exceeds_size_limit.replace("%s",b.name)}jQuery("#media-items").append('

    '+c+"

    ");a.removeFile(b)}jQuery(document).ready(function(a){a(".media-upload-form").bind("click.uploader",function(f){var d=a(f.target),b,g;if(d.is('input[type="radio"]')){b=d.closest("tr");if(b.hasClass("align")){setUserSetting("align",d.val())}else{if(b.hasClass("image-size")){setUserSetting("imgsize",d.val())}}}else{if(d.is("button.button")){g=f.target.className||"";g=g.match(/url([^ '"]+)/);if(g&&g[1]){setUserSetting("urlbutton",g[1]);d.siblings(".urlfield").val(d.data("link-url"))}}else{if(d.is("a.dismiss")){d.parents(".media-item").fadeOut(200,function(){a(this).remove()})}else{if(d.is(".upload-flash-bypass a")||d.is("a.uploader-html")){a("#media-items, p.submit, span.big-file-warning").css("display","none");switchUploader(0);f.preventDefault()}else{if(d.is(".upload-html-bypass a")){a("#media-items, p.submit, span.big-file-warning").css("display","");switchUploader(1);f.preventDefault()}else{if(d.is("a.describe-toggle-on")){d.parent().addClass("open");d.siblings(".slidetoggle").fadeIn(250,function(){var i=a(window).scrollTop(),e=a(window).height(),k=a(this).offset().top,j=a(this).height(),c,l;if(e&&k&&j){c=k+j;l=i+e;if(c>l){if(c-lc&&f.size>c&&d.runtime!="html5"){uploadSizeError(d,f,true)}else{fileQueued(f)}});d.refresh();d.start()});uploader.bind("BeforeUpload",function(b,c){});uploader.bind("UploadFile",function(b,c){fileUploading(b,c)});uploader.bind("UploadProgress",function(b,c){uploadProgress(b,c)});uploader.bind("Error",function(b,c){uploadError(c.file,c.code,c.message,b);b.refresh()});uploader.bind("FileUploaded",function(b,d,c){uploadSuccess(d,c.response)});uploader.bind("UploadComplete",function(b,c){uploadComplete()})};if(typeof(wpUploaderInit)=="object"){uploader_init()}}); \ No newline at end of file diff --git a/wp-includes/js/plupload/wp-plupload.dev.js b/wp-includes/js/plupload/wp-plupload.dev.js new file mode 100644 index 00000000..94a5b253 --- /dev/null +++ b/wp-includes/js/plupload/wp-plupload.dev.js @@ -0,0 +1,220 @@ +if ( typeof wp === 'undefined' ) + var wp = {}; + +(function( exports, $ ) { + var Uploader; + + if ( typeof _wpPluploadSettings === 'undefined' ) + return; + + /* + * An object that helps create a WordPress uploader using plupload. + * + * @param options - object - The options passed to the new plupload instance. + * Requires the following parameters: + * - container - The id of uploader container. + * - browser - The id of button to trigger the file select. + * - dropzone - The id of file drop target. + * - plupload - An object of parameters to pass to the plupload instance. + * - params - An object of parameters to pass to $_POST when uploading the file. + * Extends this.plupload.multipart_params under the hood. + * + * @param attributes - object - Attributes and methods for this specific instance. + */ + Uploader = function( options ) { + var self = this, + elements = { + container: 'container', + browser: 'browse_button', + dropzone: 'drop_element' + }, + key; + + this.supports = { + upload: Uploader.browser.supported + }; + + this.supported = this.supports.upload; + + if ( ! this.supported ) + return; + + // Use deep extend to ensure that multipart_params and other objects are cloned. + this.plupload = $.extend( true, { multipart_params: {} }, Uploader.defaults ); + this.container = document.body; // Set default container. + + // Extend the instance with options + // + // Use deep extend to allow options.plupload to override individual + // default plupload keys. + $.extend( true, this, options ); + + // Proxy all methods so this always refers to the current instance. + for ( key in this ) { + if ( $.isFunction( this[ key ] ) ) + this[ key ] = $.proxy( this[ key ], this ); + } + + // Ensure all elements are jQuery elements and have id attributes + // Then set the proper plupload arguments to the ids. + for ( key in elements ) { + if ( ! this[ key ] ) + continue; + + this[ key ] = $( this[ key ] ).first(); + + if ( ! this[ key ].length ) { + delete this[ key ]; + continue; + } + + if ( ! this[ key ].prop('id') ) + this[ key ].prop( 'id', '__wp-uploader-id-' + Uploader.uuid++ ); + this.plupload[ elements[ key ] ] = this[ key ].prop('id'); + } + + this.uploader = new plupload.Uploader( this.plupload ); + delete this.plupload; + + // Set default params and remove this.params alias. + this.param( this.params || {} ); + delete this.params; + + this.uploader.init(); + + this.supports.dragdrop = this.uploader.features.dragdrop && ! Uploader.browser.mobile; + + // Generate drag/drop helper classes. + (function( dropzone, supported ) { + var sensitivity = 50, + active; + + if ( ! dropzone ) + return; + + dropzone.toggleClass( 'supports-drag-drop', !! supported ); + + if ( ! supported ) + return dropzone.unbind('.wp-uploader'); + + // 'dragenter' doesn't fire correctly, + // simulate it with a limited 'dragover' + dropzone.bind( 'dragover.wp-uploader', function(){ + if ( active ) + return; + + dropzone.addClass('drag-over'); + active = true; + }); + + dropzone.bind('dragleave.wp-uploader, drop.wp-uploader', function(){ + active = false; + dropzone.removeClass('drag-over'); + }); + }( this.dropzone, this.supports.dragdrop )); + + this.browser.on( 'mouseenter', this.refresh ); + + this.uploader.bind( 'UploadProgress', this.progress ); + + this.uploader.bind( 'FileUploaded', function( up, file, response ) { + try { + response = JSON.parse( response.response ); + } catch ( e ) { + return self.error( pluploadL10n.default_error, e ); + } + + if ( ! response || ! response.type || ! response.data ) + return self.error( pluploadL10n.default_error ); + + if ( 'error' === response.type ) + return self.error( response.data.message, response.data ); + + if ( 'success' === response.type ) + return self.success( response.data ); + + }); + + this.uploader.bind( 'Error', function( up, error ) { + var message = pluploadL10n.default_error, + key; + + // Check for plupload errors. + for ( key in Uploader.errorMap ) { + if ( error.code === plupload[ key ] ) { + message = Uploader.errorMap[ key ]; + break; + } + } + + self.error( message, error ); + up.refresh(); + }); + + this.uploader.bind( 'FilesAdded', function( up, files ) { + $.each( files, function() { + self.added( this ); + }); + + up.refresh(); + up.start(); + }); + + this.init(); + }; + + // Adds the 'defaults' and 'browser' properties. + $.extend( Uploader, _wpPluploadSettings ); + + Uploader.uuid = 0; + + Uploader.errorMap = { + 'FAILED': pluploadL10n.upload_failed, + 'FILE_EXTENSION_ERROR': pluploadL10n.invalid_filetype, + // 'FILE_SIZE_ERROR': '', + 'IMAGE_FORMAT_ERROR': pluploadL10n.not_an_image, + 'IMAGE_MEMORY_ERROR': pluploadL10n.image_memory_exceeded, + 'IMAGE_DIMENSIONS_ERROR': pluploadL10n.image_dimensions_exceeded, + 'GENERIC_ERROR': pluploadL10n.upload_failed, + 'IO_ERROR': pluploadL10n.io_error, + 'HTTP_ERROR': pluploadL10n.http_error, + 'SECURITY_ERROR': pluploadL10n.security_error + }; + + $.extend( Uploader.prototype, { + /** + * Acts as a shortcut to extending the uploader's multipart_params object. + * + * param( key ) + * Returns the value of the key. + * + * param( key, value ) + * Sets the value of a key. + * + * param( map ) + * Sets values for a map of data. + */ + param: function( key, value ) { + if ( arguments.length === 1 && typeof key === 'string' ) + return this.uploader.settings.multipart_params[ key ]; + + if ( arguments.length > 1 ) { + this.uploader.settings.multipart_params[ key ] = value; + } else { + $.extend( this.uploader.settings.multipart_params, key ); + } + }, + + init: function() {}, + error: function() {}, + success: function() {}, + added: function() {}, + progress: function() {}, + complete: function() {}, + refresh: function() { + this.uploader.refresh(); + } + }); + + exports.Uploader = Uploader; +})( wp, jQuery ); diff --git a/wp-includes/js/plupload/wp-plupload.js b/wp-includes/js/plupload/wp-plupload.js new file mode 100644 index 00000000..9aa355a1 --- /dev/null +++ b/wp-includes/js/plupload/wp-plupload.js @@ -0,0 +1 @@ +if(typeof wp==="undefined"){var wp={}}(function(a,b){var c;if(typeof _wpPluploadSettings==="undefined"){return}c=function(e){var d=this,g={container:"container",browser:"browse_button",dropzone:"drop_element"},f;this.supports={upload:c.browser.supported};this.supported=this.supports.upload;if(!this.supported){return}this.plupload=b.extend(true,{multipart_params:{}},c.defaults);this.container=document.body;b.extend(true,this,e);for(f in this){if(b.isFunction(this[f])){this[f]=b.proxy(this[f],this)}}for(f in g){if(!this[f]){continue}this[f]=b(this[f]).first();if(!this[f].length){delete this[f];continue}if(!this[f].prop("id")){this[f].prop("id","__wp-uploader-id-"+c.uuid++)}this.plupload[g[f]]=this[f].prop("id")}this.uploader=new plupload.Uploader(this.plupload);delete this.plupload;this.param(this.params||{});delete this.params;this.uploader.init();this.supports.dragdrop=this.uploader.features.dragdrop&&!c.browser.mobile;(function(j,h){var i=50,k;if(!j){return}j.toggleClass("supports-drag-drop",!!h);if(!h){return j.unbind(".wp-uploader")}j.bind("dragover.wp-uploader",function(){if(k){return}j.addClass("drag-over");k=true});j.bind("dragleave.wp-uploader, drop.wp-uploader",function(){k=false;j.removeClass("drag-over")})}(this.dropzone,this.supports.dragdrop));this.browser.on("mouseenter",this.refresh);this.uploader.bind("UploadProgress",this.progress);this.uploader.bind("FileUploaded",function(h,j,i){try{i=JSON.parse(i.response)}catch(k){return d.error(pluploadL10n.default_error,k)}if(!i||!i.type||!i.data){return d.error(pluploadL10n.default_error)}if("error"===i.type){return d.error(i.data.message,i.data)}if("success"===i.type){return d.success(i.data)}});this.uploader.bind("Error",function(h,i){var k=pluploadL10n.default_error,j;for(j in c.errorMap){if(i.code===plupload[j]){k=c.errorMap[j];break}}d.error(k,i);h.refresh()});this.uploader.bind("FilesAdded",function(h,i){b.each(i,function(){d.added(this)});h.refresh();h.start()});this.init()};b.extend(c,_wpPluploadSettings);c.uuid=0;c.errorMap={FAILED:pluploadL10n.upload_failed,FILE_EXTENSION_ERROR:pluploadL10n.invalid_filetype,IMAGE_FORMAT_ERROR:pluploadL10n.not_an_image,IMAGE_MEMORY_ERROR:pluploadL10n.image_memory_exceeded,IMAGE_DIMENSIONS_ERROR:pluploadL10n.image_dimensions_exceeded,GENERIC_ERROR:pluploadL10n.upload_failed,IO_ERROR:pluploadL10n.io_error,HTTP_ERROR:pluploadL10n.http_error,SECURITY_ERROR:pluploadL10n.security_error};b.extend(c.prototype,{param:function(d,e){if(arguments.length===1&&typeof d==="string"){return this.uploader.settings.multipart_params[d]}if(arguments.length>1){this.uploader.settings.multipart_params[d]=e}else{b.extend(this.uploader.settings.multipart_params,d)}},init:function(){},error:function(){},success:function(){},added:function(){},progress:function(){},complete:function(){},refresh:function(){this.uploader.refresh()}});a.Uploader=c})(wp,jQuery); \ No newline at end of file diff --git a/wp-includes/js/quicktags.dev.js b/wp-includes/js/quicktags.dev.js index 903f3209..3759c90c 100644 --- a/wp-includes/js/quicktags.dev.js +++ b/wp-includes/js/quicktags.dev.js @@ -1,6 +1,6 @@ /* * Quicktags - * + * * This is the HTML editor in WordPress. It can be attached to any textarea and will * append a toolbar above it. This script is self-contained (does not require external libraries). * @@ -51,7 +51,7 @@ function quicktags(settings) { /** * Inserts content at the caret in the active editor (textarea) - * + * * Added for back compatibility * @see QTags.insertContent() */ @@ -61,12 +61,12 @@ function edInsertContent(bah, txt) { /** * Adds a button to all instances of the editor - * + * * Added for back compatibility, use QTags.addButton() as it gives more flexibility like type of button, button placement, etc. * @see QTags.addButton() */ function edButton(id, display, tagStart, tagEnd, access, open) { - return QTags.addButton( id, display, tagStart, tagEnd, access, '', -1 ); + return QTags.addButton( id, display, tagStart, tagEnd, access, '', -1 ); } (function(){ @@ -264,6 +264,12 @@ function edButton(id, display, tagStart, tagEnd, access, open) { html += theButtons['fullscreen'].html(name + '_'); } + + if ( 'rtl' == document.getElementsByTagName('html')[0].dir ) { + theButtons['textdirection'] = new qt.TextDirectionButton(); + html += theButtons['textdirection'].html(name + '_'); + } + ed.toolbar.innerHTML = html; ed.theButtons = theButtons; } @@ -272,7 +278,7 @@ function edButton(id, display, tagStart, tagEnd, access, open) { /** * Main API function for adding a button to Quicktags - * + * * Adds qt.Button or qt.TagButton depending on the args. The first three args are always required. * To be able to add button(s) to Quicktags, your script should be enqueued as dependent * on "quicktags" and outputted in the footer. If you are echoing JS directly from PHP, @@ -291,14 +297,14 @@ function edButton(id, display, tagStart, tagEnd, access, open) { * @param arg1 string || function required Either a starting tag to be inserted like "" or a callback that is executed when the button is clicked. * @param arg2 string optional Ending tag like "" * @param access_key string optional Access key for the button. - * @param title string optional Button's title="..." + * @param title string optional Button's title="..." * @param priority int optional Number representing the desired position of the button in the toolbar. 1 - 9 = first, 11 - 19 = second, 21 - 29 = third, etc. * @param instance string optional Limit the button to a specifric instance of Quicktags, add to all instances if not present. * @return mixed null or the button object that is needed for back-compat. - */ + */ qt.addButton = function( id, display, arg1, arg2, access_key, title, priority, instance ) { var btn; - + if ( !id || !display ) return; @@ -599,12 +605,27 @@ function edButton(id, display, tagStart, tagEnd, access, open) { }; qt.FullscreenButton.prototype = new qt.Button(); qt.FullscreenButton.prototype.callback = function(e, c) { - if ( c.id != 'content' || typeof(fullscreen) == 'undefined' ) + if ( !c.id || typeof(fullscreen) == 'undefined' ) return; fullscreen.on(); }; + qt.TextDirectionButton = function() { + qt.Button.call(this, 'textdirection', quicktagsL10n.textdirection, '', quicktagsL10n.toggleTextdirection) + }; + qt.TextDirectionButton.prototype = new qt.Button(); + qt.TextDirectionButton.prototype.callback = function(e, c) { + var isRTL = ( 'rtl' == document.getElementsByTagName('html')[0].dir ), + currentDirection = c.style.direction; + + if ( ! currentDirection ) + currentDirection = ( isRTL ) ? 'rtl' : 'ltr'; + + c.style.direction = ( 'rtl' == currentDirection ) ? 'ltr' : 'rtl'; + c.focus(); + } + // ensure backward compatibility edButtons[10] = new qt.TagButton('strong','b','','','b'); edButtons[20] = new qt.TagButton('em','i','','','i'), diff --git a/wp-includes/js/quicktags.js b/wp-includes/js/quicktags.js index fb2ed4fe..d66d123d 100644 --- a/wp-includes/js/quicktags.js +++ b/wp-includes/js/quicktags.js @@ -1 +1 @@ -var QTags,edButtons=[],edCanvas,edAddTag=function(){},edCheckOpenTags=function(){},edCloseAllTags=function(){},edInsertImage=function(){},edInsertLink=function(){},edInsertTag=function(){},edLink=function(){},edQuickLink=function(){},edRemoveTag=function(){},edShowButton=function(){},edShowLinks=function(){},edSpell=function(){},edToolbar=function(){};function quicktags(a){return new QTags(a)}function edInsertContent(b,a){return QTags.insertContent(a)}function edButton(f,e,c,b,a,d){return QTags.addButton(f,e,c,b,a,"",-1)}(function(){var b=function(g){var f,e,d;if(typeof jQuery!="undefined"){jQuery(document).ready(g)}else{f=b;f.funcs=[];f.ready=function(){if(!f.isReady){f.isReady=true;for(e=0;e0){while(typeof(edButtons[k])!="undefined"){k++}edButtons[k]=f}else{edButtons[edButtons.length]=f}if(this.buttonsInitDone){this._buttonsInit()}};c.insertContent=function(g){var h,f,e,i,j,d=document.getElementById(wpActiveEditor);if(!d){return false}if(document.selection){d.focus();h=document.selection.createRange();h.text=g;d.focus()}else{if(d.selectionStart||d.selectionStart=="0"){j=d.value;f=d.selectionStart;e=d.selectionEnd;i=d.scrollTop;d.value=j.substring(0,f)+g+j.substring(e,j.length);d.focus();d.selectionStart=f+g.length;d.selectionEnd=f+g.length;d.scrollTop=i}else{d.value+=g;d.focus()}}return true};c.Button=function(i,g,e,h,d){var f=this;f.id=i;f.display=g;f.access=e;f.title=h||"";f.instance=d||""};c.Button.prototype.html=function(e){var d=this.access?' accesskey="'+this.access+'"':"";return''};c.Button.prototype.callback=function(){};c.TagButton=function(k,i,g,f,e,j,d){var h=this;c.Button.call(h,k,i,e,j,d);h.tagStart=g;h.tagEnd=f};c.TagButton.prototype=new c.Button();c.TagButton.prototype.openTag=function(g,d){var f=this;if(!d.openTags){d.openTags=[]}if(f.tagEnd){d.openTags.push(f.id);g.value="/"+g.value}};c.TagButton.prototype.closeTag=function(h,d){var g=this,f=g.isOpen(d);if(f!==false){d.openTags.splice(f,1)}h.value=g.display};c.TagButton.prototype.isOpen=function(d){var g=this,f=0,e=false;if(d.openTags){while(e===false&&f0){if(!u.tagEnd){f.text=f.text+u.tagStart}else{f.text=u.tagStart+f.text+k}}else{if(!u.tagEnd){f.text=u.tagStart}else{if(u.isOpen(p)===false){f.text=u.tagStart;u.openTag(o,p)}else{f.text=k;u.closeTag(o,p)}}}h.focus()}else{if(h.selectionStart||h.selectionStart=="0"){q=h.selectionStart;e=h.selectionEnd;m=e;g=h.scrollTop;j=s.substring(0,q);d=s.substring(e,s.length);n=s.substring(q,e);if(q!=e){if(!u.tagEnd){h.value=j+n+u.tagStart+d;m+=u.tagStart.length}else{h.value=j+u.tagStart+n+k+d;m+=u.tagStart.length+k.length}}else{if(!u.tagEnd){h.value=j+u.tagStart+d;m=q+u.tagStart.length}else{if(u.isOpen(p)===false){h.value=j+u.tagStart+d;u.openTag(o,p);m=q+u.tagStart.length}else{h.value=j+k+d;m=q+k.length;u.closeTag(o,p)}}}h.focus();h.selectionStart=m;h.selectionEnd=m;h.scrollTop=g}else{if(!k){h.value+=u.tagStart}else{if(u.isOpen(p)!==false){h.value+=u.tagStart;u.openTag(o,p)}else{h.value+=k;u.closeTag(o,p)}}h.focus()}}};c.SpellButton=function(){c.Button.call(this,"spell",quicktagsL10n.lookup,"",quicktagsL10n.dictionaryLookup)};c.SpellButton.prototype=new c.Button();c.SpellButton.prototype.callback=function(h,g,d){var j="",i,f,e;if(document.selection){g.focus();i=document.selection.createRange();if(i.text.length>0){j=i.text}}else{if(g.selectionStart||g.selectionStart=="0"){f=g.selectionStart;e=g.selectionEnd;if(f!=e){j=g.value.substring(f,e)}}}if(j===""){j=prompt(quicktagsL10n.wordLookup,"")}if(j!==null&&/^\w[\w ]*$/.test(j)){window.open("http://www.answers.com/"+encodeURIComponent(j))}};c.CloseButton=function(){c.Button.call(this,"close",quicktagsL10n.closeTags,"",quicktagsL10n.closeAllOpenTags)};c.CloseButton.prototype=new c.Button();c._close=function(i,j,d){var g,f,h=d.openTags;if(h){while(h.length>0){g=d.getButton(h[h.length-1]);f=document.getElementById(d.name+"_"+g.id);if(i){g.callback.call(g,f,j,d)}else{g.closeTag(f,d)}}}};c.CloseButton.prototype.callback=c._close;c.closeAllTags=function(e){var d=this.getInstance(e);c._close("",d.canvas,d)};c.LinkButton=function(){c.TagButton.call(this,"link","link","","","a")};c.LinkButton.prototype=new c.TagButton();c.LinkButton.prototype.callback=function(i,j,g,f){var d,h=this;if(typeof(wpLink)!="undefined"){wpLink.open();return}if(!f){f="http://"}if(h.isOpen(g)===false){d=prompt(quicktagsL10n.enterURL,f);if(d){h.tagStart='';c.TagButton.prototype.callback.call(h,i,j,g)}}else{c.TagButton.prototype.callback.call(h,i,j,g)}};c.ImgButton=function(){c.TagButton.call(this,"img","img","","","m")};c.ImgButton.prototype=new c.TagButton();c.ImgButton.prototype.callback=function(h,j,f,d){if(!d){d="http://"}var i=prompt(quicktagsL10n.enterImageURL,d),g;if(i){g=prompt(quicktagsL10n.enterImageDescription,"");this.tagStart=''+g+'';c.TagButton.prototype.callback.call(this,h,j,f)}};c.FullscreenButton=function(){c.Button.call(this,"fullscreen",quicktagsL10n.fullscreen,"f",quicktagsL10n.toggleFullscreen)};c.FullscreenButton.prototype=new c.Button();c.FullscreenButton.prototype.callback=function(d,f){if(f.id!="content"||typeof(fullscreen)=="undefined"){return}fullscreen.on()};edButtons[10]=new c.TagButton("strong","b","","","b");edButtons[20]=new c.TagButton("em","i","","","i"),edButtons[30]=new c.LinkButton(),edButtons[40]=new c.TagButton("block","b-quote","\n\n
    ","
    \n\n","q"),edButtons[50]=new c.TagButton("del","del",'',"","d"),edButtons[60]=new c.TagButton("ins","ins",'',"","s"),edButtons[70]=new c.ImgButton(),edButtons[80]=new c.TagButton("ul","ul","
      \n","
    \n\n","u"),edButtons[90]=new c.TagButton("ol","ol","
      \n","
    \n\n","o"),edButtons[100]=new c.TagButton("li","li","\t
  • ","
  • \n","l"),edButtons[110]=new c.TagButton("code","code","","","c"),edButtons[120]=new c.TagButton("more","more","","","t"),edButtons[130]=new c.SpellButton(),edButtons[140]=new c.CloseButton()})(); \ No newline at end of file +var QTags,edButtons=[],edCanvas,edAddTag=function(){},edCheckOpenTags=function(){},edCloseAllTags=function(){},edInsertImage=function(){},edInsertLink=function(){},edInsertTag=function(){},edLink=function(){},edQuickLink=function(){},edRemoveTag=function(){},edShowButton=function(){},edShowLinks=function(){},edSpell=function(){},edToolbar=function(){};function quicktags(a){return new QTags(a)}function edInsertContent(b,a){return QTags.insertContent(a)}function edButton(f,e,c,b,a,d){return QTags.addButton(f,e,c,b,a,"",-1)}(function(){var b=function(g){var f,e,d;if(typeof jQuery!="undefined"){jQuery(document).ready(g)}else{f=b;f.funcs=[];f.ready=function(){if(!f.isReady){f.isReady=true;for(e=0;e0){while(typeof(edButtons[k])!="undefined"){k++}edButtons[k]=f}else{edButtons[edButtons.length]=f}if(this.buttonsInitDone){this._buttonsInit()}};c.insertContent=function(g){var h,f,e,i,j,d=document.getElementById(wpActiveEditor);if(!d){return false}if(document.selection){d.focus();h=document.selection.createRange();h.text=g;d.focus()}else{if(d.selectionStart||d.selectionStart=="0"){j=d.value;f=d.selectionStart;e=d.selectionEnd;i=d.scrollTop;d.value=j.substring(0,f)+g+j.substring(e,j.length);d.focus();d.selectionStart=f+g.length;d.selectionEnd=f+g.length;d.scrollTop=i}else{d.value+=g;d.focus()}}return true};c.Button=function(i,g,e,h,d){var f=this;f.id=i;f.display=g;f.access=e;f.title=h||"";f.instance=d||""};c.Button.prototype.html=function(e){var d=this.access?' accesskey="'+this.access+'"':"";return''};c.Button.prototype.callback=function(){};c.TagButton=function(k,i,g,f,e,j,d){var h=this;c.Button.call(h,k,i,e,j,d);h.tagStart=g;h.tagEnd=f};c.TagButton.prototype=new c.Button();c.TagButton.prototype.openTag=function(g,d){var f=this;if(!d.openTags){d.openTags=[]}if(f.tagEnd){d.openTags.push(f.id);g.value="/"+g.value}};c.TagButton.prototype.closeTag=function(h,d){var g=this,f=g.isOpen(d);if(f!==false){d.openTags.splice(f,1)}h.value=g.display};c.TagButton.prototype.isOpen=function(d){var g=this,f=0,e=false;if(d.openTags){while(e===false&&f0){if(!u.tagEnd){f.text=f.text+u.tagStart}else{f.text=u.tagStart+f.text+k}}else{if(!u.tagEnd){f.text=u.tagStart}else{if(u.isOpen(p)===false){f.text=u.tagStart;u.openTag(o,p)}else{f.text=k;u.closeTag(o,p)}}}h.focus()}else{if(h.selectionStart||h.selectionStart=="0"){q=h.selectionStart;e=h.selectionEnd;m=e;g=h.scrollTop;j=s.substring(0,q);d=s.substring(e,s.length);n=s.substring(q,e);if(q!=e){if(!u.tagEnd){h.value=j+n+u.tagStart+d;m+=u.tagStart.length}else{h.value=j+u.tagStart+n+k+d;m+=u.tagStart.length+k.length}}else{if(!u.tagEnd){h.value=j+u.tagStart+d;m=q+u.tagStart.length}else{if(u.isOpen(p)===false){h.value=j+u.tagStart+d;u.openTag(o,p);m=q+u.tagStart.length}else{h.value=j+k+d;m=q+k.length;u.closeTag(o,p)}}}h.focus();h.selectionStart=m;h.selectionEnd=m;h.scrollTop=g}else{if(!k){h.value+=u.tagStart}else{if(u.isOpen(p)!==false){h.value+=u.tagStart;u.openTag(o,p)}else{h.value+=k;u.closeTag(o,p)}}h.focus()}}};c.SpellButton=function(){c.Button.call(this,"spell",quicktagsL10n.lookup,"",quicktagsL10n.dictionaryLookup)};c.SpellButton.prototype=new c.Button();c.SpellButton.prototype.callback=function(h,g,d){var j="",i,f,e;if(document.selection){g.focus();i=document.selection.createRange();if(i.text.length>0){j=i.text}}else{if(g.selectionStart||g.selectionStart=="0"){f=g.selectionStart;e=g.selectionEnd;if(f!=e){j=g.value.substring(f,e)}}}if(j===""){j=prompt(quicktagsL10n.wordLookup,"")}if(j!==null&&/^\w[\w ]*$/.test(j)){window.open("http://www.answers.com/"+encodeURIComponent(j))}};c.CloseButton=function(){c.Button.call(this,"close",quicktagsL10n.closeTags,"",quicktagsL10n.closeAllOpenTags)};c.CloseButton.prototype=new c.Button();c._close=function(i,j,d){var g,f,h=d.openTags;if(h){while(h.length>0){g=d.getButton(h[h.length-1]);f=document.getElementById(d.name+"_"+g.id);if(i){g.callback.call(g,f,j,d)}else{g.closeTag(f,d)}}}};c.CloseButton.prototype.callback=c._close;c.closeAllTags=function(e){var d=this.getInstance(e);c._close("",d.canvas,d)};c.LinkButton=function(){c.TagButton.call(this,"link","link","","
    ","a")};c.LinkButton.prototype=new c.TagButton();c.LinkButton.prototype.callback=function(i,j,g,f){var d,h=this;if(typeof(wpLink)!="undefined"){wpLink.open();return}if(!f){f="http://"}if(h.isOpen(g)===false){d=prompt(quicktagsL10n.enterURL,f);if(d){h.tagStart='';c.TagButton.prototype.callback.call(h,i,j,g)}}else{c.TagButton.prototype.callback.call(h,i,j,g)}};c.ImgButton=function(){c.TagButton.call(this,"img","img","","","m")};c.ImgButton.prototype=new c.TagButton();c.ImgButton.prototype.callback=function(h,j,f,d){if(!d){d="http://"}var i=prompt(quicktagsL10n.enterImageURL,d),g;if(i){g=prompt(quicktagsL10n.enterImageDescription,"");this.tagStart=''+g+'';c.TagButton.prototype.callback.call(this,h,j,f)}};c.FullscreenButton=function(){c.Button.call(this,"fullscreen",quicktagsL10n.fullscreen,"f",quicktagsL10n.toggleFullscreen)};c.FullscreenButton.prototype=new c.Button();c.FullscreenButton.prototype.callback=function(d,f){if(!f.id||typeof(fullscreen)=="undefined"){return}fullscreen.on()};c.TextDirectionButton=function(){c.Button.call(this,"textdirection",quicktagsL10n.textdirection,"",quicktagsL10n.toggleTextdirection)};c.TextDirectionButton.prototype=new c.Button();c.TextDirectionButton.prototype.callback=function(f,h){var d=("rtl"==document.getElementsByTagName("html")[0].dir),g=h.style.direction;if(!g){g=(d)?"rtl":"ltr"}h.style.direction=("rtl"==g)?"ltr":"rtl";h.focus()};edButtons[10]=new c.TagButton("strong","b","","","b");edButtons[20]=new c.TagButton("em","i","","","i"),edButtons[30]=new c.LinkButton(),edButtons[40]=new c.TagButton("block","b-quote","\n\n
    ","
    \n\n","q"),edButtons[50]=new c.TagButton("del","del",'',"","d"),edButtons[60]=new c.TagButton("ins","ins",'',"","s"),edButtons[70]=new c.ImgButton(),edButtons[80]=new c.TagButton("ul","ul","
      \n","
    \n\n","u"),edButtons[90]=new c.TagButton("ol","ol","
      \n","
    \n\n","o"),edButtons[100]=new c.TagButton("li","li","\t
  • ","
  • \n","l"),edButtons[110]=new c.TagButton("code","code","","","c"),edButtons[120]=new c.TagButton("more","more","","","t"),edButtons[130]=new c.SpellButton(),edButtons[140]=new c.CloseButton()})(); \ No newline at end of file diff --git a/wp-includes/js/swfupload/handlers.dev.js b/wp-includes/js/swfupload/handlers.dev.js index e72ed69b..7296cb67 100644 --- a/wp-includes/js/swfupload/handlers.dev.js +++ b/wp-includes/js/swfupload/handlers.dev.js @@ -96,7 +96,7 @@ function prepareMediaItemInit(fileObj) { jQuery('a.delete', item).click(function(){ // Tell the server to delete it. TODO: handle exceptions jQuery.ajax({ - url: 'admin-ajax.php', + url: ajaxurl, type: 'post', success: deleteSuccess, error: deleteError, @@ -114,7 +114,7 @@ function prepareMediaItemInit(fileObj) { jQuery('a.undo', item).click(function(){ // Tell the server to untrash it. TODO: handle exceptions jQuery.ajax({ - url: 'admin-ajax.php', + url: ajaxurl, type: 'post', id: fileObj.id, data: { diff --git a/wp-includes/js/swfupload/handlers.js b/wp-includes/js/swfupload/handlers.js index ce5ff0e6..43e82f8a 100644 --- a/wp-includes/js/swfupload/handlers.js +++ b/wp-includes/js/swfupload/handlers.js @@ -1 +1 @@ -var topWin=window.dialogArguments||opener||parent||top;function fileDialogStart(){jQuery("#media-upload-error").empty()}function fileQueued(a){jQuery(".media-blank").remove();if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".describe-toggle-on").show();jQuery(".describe-toggle-off").hide();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery("#media-items").append('
    '+a.name+"
    ");jQuery(".progress","#media-item-"+a.id).show();jQuery("#insert-gallery").prop("disabled",true);jQuery("#cancel-upload").prop("disabled",false)}function uploadStart(a){try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").unbind("click",topWin.tb_remove)}}catch(b){}return true}function uploadProgress(e,b,d){var a=jQuery("#media-items").width()-2,c=jQuery("#media-item-"+e.id);jQuery(".bar",c).width(a*b/d);jQuery(".percent",c).html(Math.ceil(b/d*100)+"%");if(b==d){jQuery(".bar",c).html(''+swfuploadL10n.crunching+"")}}function prepareMediaItem(c,a){var d=(typeof shortform=="undefined")?1:2,b=jQuery("#media-item-"+c.id);jQuery(".bar",b).remove();jQuery(".progress",b).hide();try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").click(topWin.tb_remove)}}catch(g){}if(isNaN(a)||!a){b.append(a);prepareMediaItemInit(c)}else{b.load("async-upload.php",{attachment_id:a,fetch:d},function(){prepareMediaItemInit(c);updateMediaForm()})}}function prepareMediaItemInit(b){var a=jQuery("#media-item-"+b.id);jQuery(".thumbnail",a).clone().attr("class","pinkynail toggle").prependTo(a);jQuery(".filename.original",a).replaceWith(jQuery(".filename.new",a));jQuery("a.toggle",a).click(function(){jQuery(this).siblings(".slidetoggle").slideToggle(350,function(){var d=jQuery(window).height(),e=jQuery(this).offset().top,f=jQuery(this).height(),c;if(d&&e&&f){c=e+f;if(c>d&&(f+48)d){window.scrollTo(0,e-36)}}}});jQuery(this).siblings(".toggle").andSelf().toggle();jQuery(this).siblings("a.toggle").focus();return false});jQuery("a.delete",a).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",success:deleteSuccess,error:deleteError,id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"trash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")}});return false});jQuery("a.undo",a).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"untrash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")},success:function(d,e){var c=jQuery("#media-item-"+b.id);if(type=jQuery("#type-of-"+b.id).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-0+1)}if(c.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-0+1)}jQuery(".filename .trashnotice",c).remove();jQuery(".filename .title",c).css("font-weight","normal");jQuery("a.undo",c).addClass("hidden");jQuery("a.describe-toggle-on, .menu_order_input",c).show();c.css({backgroundColor:"#ceb"}).animate({backgroundColor:"#fff"},{queue:false,duration:500,complete:function(){jQuery(this).css({backgroundColor:""})}}).removeClass("undo")}});return false});jQuery("#media-item-"+b.id+".startopen").removeClass("startopen").slideToggle(500).siblings(".toggle").toggle()}function itemAjaxError(d,b){var c=jQuery("#media-item-"+d);var a=jQuery(".filename",c).text();c.html('
    '+swfuploadL10n.dismiss+""+swfuploadL10n.error_uploading.replace("%s",a)+"
    "+b+"
    ");c.find("a.dismiss").click(function(){jQuery(this).parents(".media-item").slideUp(200,function(){jQuery(this).remove()})})}function deleteSuccess(b,d){if(b=="-1"){return itemAjaxError(this.id,"You do not have permission. Has your session expired?")}if(b=="0"){return itemAjaxError(this.id,"Could not be deleted. Has it been deleted already?")}var c=this.id,a=jQuery("#media-item-"+c);if(type=jQuery("#type-of-"+c).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-1)}if(a.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-1)}if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".toggle").toggle();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery(".toggle",a).toggle();jQuery(".slidetoggle",a).slideUp(200).siblings().removeClass("hidden");a.css({backgroundColor:"#faa"}).animate({backgroundColor:"#f4f4f4"},{queue:false,duration:500}).addClass("undo");jQuery(".filename:empty",a).remove();jQuery(".filename .title",a).css("font-weight","bold");jQuery(".filename",a).append(' '+swfuploadL10n.deleted+" ").siblings("a.toggle").hide();jQuery(".filename",a).append(jQuery("a.undo",a).removeClass("hidden"));jQuery(".menu_order_input",a).hide();return}function deleteError(c,b,a){}function updateMediaForm(){var b=jQuery("form.type-form #media-items").children(),a=jQuery("#media-items").children();if(b.length==1){jQuery(".slidetoggle",b).slideDown(500).siblings().addClass("hidden").filter(".toggle").toggle()}if(a.not(".media-blank").length>0){jQuery(".savebutton").show()}else{jQuery(".savebutton").hide()}if(a.length>1){jQuery(".insert-gallery").show()}else{jQuery(".insert-gallery").hide()}}function uploadSuccess(b,a){if(a.match("media-upload-error")){jQuery("#media-item-"+b.id).html(a);return}prepareMediaItem(b,a);updateMediaForm();if(jQuery("#media-item-"+b.id).hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(1*jQuery("#attachments-count").text()+1)}}function uploadComplete(a){if(swfu.getStats().files_queued==0){jQuery("#cancel-upload").prop("disabled",true);jQuery("#insert-gallery").prop("disabled",false)}}function wpQueueError(a){jQuery("#media-upload-error").show().text(a)}function wpFileError(d,c){var b=jQuery("#media-item-"+d.id);var a=jQuery(".filename",b).text();b.html('
    '+swfuploadL10n.dismiss+""+swfuploadL10n.error_uploading.replace("%s",a)+"
    "+c+"
    ");b.find("a.dismiss").click(function(){jQuery(this).parents(".media-item").slideUp(200,function(){jQuery(this).remove()})})}function fileQueueError(c,a,b){if(a==SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED){wpQueueError(swfuploadL10n.queue_limit_exceeded)}else{if(a==SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT){fileQueued(c);wpFileError(c,swfuploadL10n.file_exceeds_size_limit)}else{if(a==SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE){fileQueued(c);wpFileError(c,swfuploadL10n.zero_byte_file)}else{if(a==SWFUpload.QUEUE_ERROR.INVALID_FILETYPE){fileQueued(c);wpFileError(c,swfuploadL10n.invalid_filetype)}else{wpQueueError(swfuploadL10n.default_error)}}}}}function fileDialogComplete(b){try{if(b>0){this.startUpload()}}catch(a){this.debug(a)}}function switchUploader(b){var c=document.getElementById(swfu.customSettings.swfupload_element_id),a=document.getElementById(swfu.customSettings.degraded_element_id);if(b){c.style.display="block";a.style.display="none"}else{c.style.display="none";a.style.display="block"}}function swfuploadPreLoad(){if(!uploaderMode){switchUploader(1)}else{switchUploader(0)}}function swfuploadLoadFailed(){switchUploader(0);jQuery(".upload-html-bypass").hide()}function uploadError(b,c,a){switch(c){case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:wpFileError(b,swfuploadL10n.missing_upload_url);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:wpFileError(b,swfuploadL10n.upload_limit_exceeded);break;case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:wpQueueError(swfuploadL10n.http_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:wpQueueError(swfuploadL10n.upload_failed);break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:wpQueueError(swfuploadL10n.io_error);break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:wpQueueError(swfuploadL10n.security_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:jQuery("#media-item-"+b.id).remove();break;default:wpFileError(b,swfuploadL10n.default_error)}}function cancelUpload(){swfu.cancelQueue()}jQuery(document).ready(function(a){a('input[type="radio"]',"#media-items").live("click",function(){var b=a(this).closest("tr");if(a(b).hasClass("align")){setUserSetting("align",a(this).val())}else{if(a(b).hasClass("image-size")){setUserSetting("imgsize",a(this).val())}}});a("button.button","#media-items").live("click",function(){var b=this.className||"";b=b.match(/url([^ '"]+)/);if(b&&b[1]){setUserSetting("urlbutton",b[1]);a(this).siblings(".urlfield").val(a(this).attr("title"))}})}); \ No newline at end of file +var topWin=window.dialogArguments||opener||parent||top;function fileDialogStart(){jQuery("#media-upload-error").empty()}function fileQueued(a){jQuery(".media-blank").remove();if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".describe-toggle-on").show();jQuery(".describe-toggle-off").hide();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery("#media-items").append('
    '+a.name+"
    ");jQuery(".progress","#media-item-"+a.id).show();jQuery("#insert-gallery").prop("disabled",true);jQuery("#cancel-upload").prop("disabled",false)}function uploadStart(a){try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").unbind("click",topWin.tb_remove)}}catch(b){}return true}function uploadProgress(e,b,d){var a=jQuery("#media-items").width()-2,c=jQuery("#media-item-"+e.id);jQuery(".bar",c).width(a*b/d);jQuery(".percent",c).html(Math.ceil(b/d*100)+"%");if(b==d){jQuery(".bar",c).html(''+swfuploadL10n.crunching+"")}}function prepareMediaItem(c,a){var d=(typeof shortform=="undefined")?1:2,b=jQuery("#media-item-"+c.id);jQuery(".bar",b).remove();jQuery(".progress",b).hide();try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").click(topWin.tb_remove)}}catch(g){}if(isNaN(a)||!a){b.append(a);prepareMediaItemInit(c)}else{b.load("async-upload.php",{attachment_id:a,fetch:d},function(){prepareMediaItemInit(c);updateMediaForm()})}}function prepareMediaItemInit(b){var a=jQuery("#media-item-"+b.id);jQuery(".thumbnail",a).clone().attr("class","pinkynail toggle").prependTo(a);jQuery(".filename.original",a).replaceWith(jQuery(".filename.new",a));jQuery("a.toggle",a).click(function(){jQuery(this).siblings(".slidetoggle").slideToggle(350,function(){var d=jQuery(window).height(),e=jQuery(this).offset().top,f=jQuery(this).height(),c;if(d&&e&&f){c=e+f;if(c>d&&(f+48)d){window.scrollTo(0,e-36)}}}});jQuery(this).siblings(".toggle").andSelf().toggle();jQuery(this).siblings("a.toggle").focus();return false});jQuery("a.delete",a).click(function(){jQuery.ajax({url:ajaxurl,type:"post",success:deleteSuccess,error:deleteError,id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"trash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")}});return false});jQuery("a.undo",a).click(function(){jQuery.ajax({url:ajaxurl,type:"post",id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"untrash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")},success:function(d,e){var c=jQuery("#media-item-"+b.id);if(type=jQuery("#type-of-"+b.id).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-0+1)}if(c.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-0+1)}jQuery(".filename .trashnotice",c).remove();jQuery(".filename .title",c).css("font-weight","normal");jQuery("a.undo",c).addClass("hidden");jQuery("a.describe-toggle-on, .menu_order_input",c).show();c.css({backgroundColor:"#ceb"}).animate({backgroundColor:"#fff"},{queue:false,duration:500,complete:function(){jQuery(this).css({backgroundColor:""})}}).removeClass("undo")}});return false});jQuery("#media-item-"+b.id+".startopen").removeClass("startopen").slideToggle(500).siblings(".toggle").toggle()}function itemAjaxError(d,b){var c=jQuery("#media-item-"+d);var a=jQuery(".filename",c).text();c.html('
    '+swfuploadL10n.dismiss+""+swfuploadL10n.error_uploading.replace("%s",a)+"
    "+b+"
    ");c.find("a.dismiss").click(function(){jQuery(this).parents(".media-item").slideUp(200,function(){jQuery(this).remove()})})}function deleteSuccess(b,d){if(b=="-1"){return itemAjaxError(this.id,"You do not have permission. Has your session expired?")}if(b=="0"){return itemAjaxError(this.id,"Could not be deleted. Has it been deleted already?")}var c=this.id,a=jQuery("#media-item-"+c);if(type=jQuery("#type-of-"+c).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-1)}if(a.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-1)}if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".toggle").toggle();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery(".toggle",a).toggle();jQuery(".slidetoggle",a).slideUp(200).siblings().removeClass("hidden");a.css({backgroundColor:"#faa"}).animate({backgroundColor:"#f4f4f4"},{queue:false,duration:500}).addClass("undo");jQuery(".filename:empty",a).remove();jQuery(".filename .title",a).css("font-weight","bold");jQuery(".filename",a).append(' '+swfuploadL10n.deleted+" ").siblings("a.toggle").hide();jQuery(".filename",a).append(jQuery("a.undo",a).removeClass("hidden"));jQuery(".menu_order_input",a).hide();return}function deleteError(c,b,a){}function updateMediaForm(){var b=jQuery("form.type-form #media-items").children(),a=jQuery("#media-items").children();if(b.length==1){jQuery(".slidetoggle",b).slideDown(500).siblings().addClass("hidden").filter(".toggle").toggle()}if(a.not(".media-blank").length>0){jQuery(".savebutton").show()}else{jQuery(".savebutton").hide()}if(a.length>1){jQuery(".insert-gallery").show()}else{jQuery(".insert-gallery").hide()}}function uploadSuccess(b,a){if(a.match("media-upload-error")){jQuery("#media-item-"+b.id).html(a);return}prepareMediaItem(b,a);updateMediaForm();if(jQuery("#media-item-"+b.id).hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(1*jQuery("#attachments-count").text()+1)}}function uploadComplete(a){if(swfu.getStats().files_queued==0){jQuery("#cancel-upload").prop("disabled",true);jQuery("#insert-gallery").prop("disabled",false)}}function wpQueueError(a){jQuery("#media-upload-error").show().text(a)}function wpFileError(d,c){var b=jQuery("#media-item-"+d.id);var a=jQuery(".filename",b).text();b.html('
    '+swfuploadL10n.dismiss+""+swfuploadL10n.error_uploading.replace("%s",a)+"
    "+c+"
    ");b.find("a.dismiss").click(function(){jQuery(this).parents(".media-item").slideUp(200,function(){jQuery(this).remove()})})}function fileQueueError(c,a,b){if(a==SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED){wpQueueError(swfuploadL10n.queue_limit_exceeded)}else{if(a==SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT){fileQueued(c);wpFileError(c,swfuploadL10n.file_exceeds_size_limit)}else{if(a==SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE){fileQueued(c);wpFileError(c,swfuploadL10n.zero_byte_file)}else{if(a==SWFUpload.QUEUE_ERROR.INVALID_FILETYPE){fileQueued(c);wpFileError(c,swfuploadL10n.invalid_filetype)}else{wpQueueError(swfuploadL10n.default_error)}}}}}function fileDialogComplete(b){try{if(b>0){this.startUpload()}}catch(a){this.debug(a)}}function switchUploader(b){var c=document.getElementById(swfu.customSettings.swfupload_element_id),a=document.getElementById(swfu.customSettings.degraded_element_id);if(b){c.style.display="block";a.style.display="none"}else{c.style.display="none";a.style.display="block"}}function swfuploadPreLoad(){if(!uploaderMode){switchUploader(1)}else{switchUploader(0)}}function swfuploadLoadFailed(){switchUploader(0);jQuery(".upload-html-bypass").hide()}function uploadError(b,c,a){switch(c){case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:wpFileError(b,swfuploadL10n.missing_upload_url);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:wpFileError(b,swfuploadL10n.upload_limit_exceeded);break;case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:wpQueueError(swfuploadL10n.http_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:wpQueueError(swfuploadL10n.upload_failed);break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:wpQueueError(swfuploadL10n.io_error);break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:wpQueueError(swfuploadL10n.security_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:jQuery("#media-item-"+b.id).remove();break;default:wpFileError(b,swfuploadL10n.default_error)}}function cancelUpload(){swfu.cancelQueue()}jQuery(document).ready(function(a){a('input[type="radio"]',"#media-items").live("click",function(){var b=a(this).closest("tr");if(a(b).hasClass("align")){setUserSetting("align",a(this).val())}else{if(a(b).hasClass("image-size")){setUserSetting("imgsize",a(this).val())}}});a("button.button","#media-items").live("click",function(){var b=this.className||"";b=b.match(/url([^ '"]+)/);if(b&&b[1]){setUserSetting("urlbutton",b[1]);a(this).siblings(".urlfield").val(a(this).attr("title"))}})}); \ No newline at end of file diff --git a/wp-includes/js/tinymce/langs/wp-langs-en.js b/wp-includes/js/tinymce/langs/wp-langs-en.js index 7909082a..53d784a2 100644 --- a/wp-includes/js/tinymce/langs/wp-langs-en.js +++ b/wp-includes/js/tinymce/langs/wp-langs-en.js @@ -12,7 +12,7 @@ not_set:"-- Not set --", clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.", clipboard_no_support:"Currently not supported by your browser, use keyboard shortcuts instead.", popup_blocked:"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.", -invalid_data:"Error: Invalid values entered, these are marked in red.", +invalid_data:"ERROR: Invalid values entered, these are marked in red.", invalid_data_number:"{#field} must be a number", invalid_data_min:"{#field} must be a number greater than {#min}", invalid_data_size:"{#field} must be a number or percentage", @@ -240,8 +240,8 @@ code:"Code", samp:"Code sample", dt:"Definition term ", dd:"Definition description", -bold_desc:"Bold (Ctrl / Alt + Shift + B)", -italic_desc:"Italic (Ctrl / Alt + Shift + I)", +bold_desc:"Bold (Ctrl + B)", +italic_desc:"Italic (Ctrl + I)", underline_desc:"Underline", striketrough_desc:"Strikethrough (Alt + Shift + D)", justifyleft_desc:"Align Left (Alt + Shift + L)", @@ -310,6 +310,7 @@ colorpicker_named_title:"Named colors", colorpicker_color:"Color:", colorpicker_name:"Name:", charmap_title:"Select custom character", +charmap_usage:"Use left and right arrows to navigate.", image_title:"Insert/edit image", image_src:"Image URL", image_alt:"Image description", diff --git a/wp-includes/js/tinymce/langs/wp-langs.php b/wp-includes/js/tinymce/langs/wp-langs.php index f9299fb1..04dfa0f5 100644 --- a/wp-includes/js/tinymce/langs/wp-langs.php +++ b/wp-includes/js/tinymce/langs/wp-langs.php @@ -1,512 +1,561 @@ array( + 'edit_confirm' => __('Do you want to use the WYSIWYG mode for this textarea?'), + 'apply' => __('Apply'), + 'insert' => __('Insert'), + 'update' => __('Update'), + 'cancel' => __('Cancel'), + 'close' => __('Close'), + 'browse' => __('Browse'), + 'class_name' => __('Class'), + 'not_set' => __('-- Not set --'), + 'clipboard_msg' => __('Copy/Cut/Paste is not available in Mozilla and Firefox.'), + 'clipboard_no_support' => __('Currently not supported by your browser, use keyboard shortcuts instead.'), + 'popup_blocked' => __('Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.'), + 'invalid_data' => __('ERROR: Invalid values entered, these are marked in red.'), + 'invalid_data_number' => __('{#field} must be a number'), + 'invalid_data_min' => __('{#field} must be a number greater than {#min}'), + 'invalid_data_size' => __('{#field} must be a number or percentage'), + 'more_colors' => __('More colors') + ), + + 'colors' => array( + '000000' => __('Black'), + '993300' => __('Burnt orange'), + '333300' => __('Dark olive'), + '003300' => __('Dark green'), + '003366' => __('Dark azure'), + '000080' => __('Navy Blue'), + '333399' => __('Indigo'), + '333333' => __('Very dark gray'), + '800000' => __('Maroon'), + 'FF6600' => __('Orange'), + '808000' => __('Olive'), + '008000' => __('Green'), + '008080' => __('Teal'), + '0000FF' => __('Blue'), + '666699' => __('Grayish blue'), + '808080' => __('Gray'), + 'FF0000' => __('Red'), + 'FF9900' => __('Amber'), + '99CC00' => __('Yellow green'), + '339966' => __('Sea green'), + '33CCCC' => __('Turquoise'), + '3366FF' => __('Royal blue'), + '800080' => __('Purple'), + '999999' => __('Medium gray'), + 'FF00FF' => __('Magenta'), + 'FFCC00' => __('Gold'), + 'FFFF00' => __('Yellow'), + '00FF00' => __('Lime'), + '00FFFF' => __('Aqua'), + '00CCFF' => __('Sky blue'), + '993366' => __('Brown'), + 'C0C0C0' => __('Silver'), + 'FF99CC' => __('Pink'), + 'FFCC99' => __('Peach'), + 'FFFF99' => __('Light yellow'), + 'CCFFCC' => __('Pale green'), + 'CCFFFF' => __('Pale cyan'), + '99CCFF' => __('Light sky blue'), + 'CC99FF' => __('Plum'), + 'FFFFFF' => __('White') + ), + + 'contextmenu' => array( + 'align' => __('Alignment'), /* translators: alignment */ + 'left' => __('Left'), /* translators: alignment */ + 'center' => __('Center'), /* translators: alignment */ + 'right' => __('Right'), /* translators: alignment */ + 'full' => __('Full') /* translators: alignment */ + ), + + 'insertdatetime' => array( + 'date_fmt' => __('%Y-%m-%d'), /* translators: year, month, date */ + 'time_fmt' => __('%H:%M:%S'), /* translators: hours, minutes, seconds */ + 'insertdate_desc' => __('Insert date'), + 'inserttime_desc' => __('Insert time'), + 'months_long' => __('January').','.__('February').','.__('March').','.__('April').','.__('May').','.__('June').','.__('July').','.__('August').','.__('September').','.__('October').','.__('November').','.__('December'), + 'months_short' => __('Jan_January_abbreviation').','.__('Feb_February_abbreviation').','.__('Mar_March_abbreviation').','.__('Apr_April_abbreviation').','.__('May_May_abbreviation').','.__('Jun_June_abbreviation').','.__('Jul_July_abbreviation').','.__('Aug_August_abbreviation').','.__('Sep_September_abbreviation').','.__('Oct_October_abbreviation').','.__('Nov_November_abbreviation').','.__('Dec_December_abbreviation'), + 'day_long' => __('Sunday').','.__('Monday').','.__('Tuesday').','.__('Wednesday').','.__('Thursday').','.__('Friday').','.__('Saturday'), + 'day_short' => __('Sun').','.__('Mon').','.__('Tue').','.__('Wed').','.__('Thu').','.__('Fri').','.__('Sat') + ), + + 'print' => array( + 'print_desc' => __('Print') + ), + + 'preview' => array( + 'preview_desc' => __('Preview') + ), + + 'directionality' => array( + 'ltr_desc' => __('Direction left to right'), + 'rtl_desc' => __('Direction right to left') + ), + + 'layer' => array( + 'insertlayer_desc' => __('Insert new layer'), + 'forward_desc' => __('Move forward'), + 'backward_desc' => __('Move backward'), + 'absolute_desc' => __('Toggle absolute positioning'), + 'content' => __('New layer...') + ), + + 'save' => array( + 'save_desc' => __('Save'), + 'cancel_desc' => __('Cancel all changes') + ), + + 'nonbreaking' => array( + 'nonbreaking_desc' => __('Insert non-breaking space character') + ), + + 'iespell' => array( + 'iespell_desc' => __('Run spell checking'), + 'download' => __('ieSpell not detected. Do you want to install it now?') + ), + + 'advhr' => array( + 'advhr_desc' => __('Horizontale rule') + ), + + 'emotions' => array( + 'emotions_desc' => __('Emotions') + ), + + 'searchreplace' => array( + 'search_desc' => __('Find'), + 'replace_desc' => __('Find/Replace') + ), + + 'advimage' => array( + 'image_desc' => __('Insert/edit image') + ), + + 'advlink' => array( + 'link_desc' => __('Insert/edit link') + ), + + 'xhtmlxtras' => array( + 'cite_desc' => __('Citation'), + 'abbr_desc' => __('Abbreviation'), + 'acronym_desc' => __('Acronym'), + 'del_desc' => __('Deletion'), + 'ins_desc' => __('Insertion'), + 'attribs_desc' => __('Insert/Edit Attributes') + ), + + 'style' => array( + 'desc' => __('Edit CSS Style') + ), + + 'paste' => array( + 'paste_text_desc' => __('Paste as Plain Text'), + 'paste_word_desc' => __('Paste from Word'), + 'selectall_desc' => __('Select All'), + 'plaintext_mode_sticky' => __('Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.'), + 'plaintext_mode' => __('Paste is now in plain text mode. Click again to toggle back to regular paste mode.') + ), + + 'paste_dlg' => array( + 'text_title' => __('Use CTRL+V on your keyboard to paste the text into the window.'), + 'text_linebreaks' => __('Keep linebreaks'), + 'word_title' => __('Use CTRL+V on your keyboard to paste the text into the window.') + ), + + 'table' => array( + 'desc' => __('Inserts a new table'), + 'row_before_desc' => __('Insert row before'), + 'row_after_desc' => __('Insert row after'), + 'delete_row_desc' => __('Delete row'), + 'col_before_desc' => __('Insert column before'), + 'col_after_desc' => __('Insert column after'), + 'delete_col_desc' => __('Remove column'), + 'split_cells_desc' => __('Split merged table cells'), + 'merge_cells_desc' => __('Merge table cells'), + 'row_desc' => __('Table row properties'), + 'cell_desc' => __('Table cell properties'), + 'props_desc' => __('Table properties'), + 'paste_row_before_desc' => __('Paste table row before'), + 'paste_row_after_desc' => __('Paste table row after'), + 'cut_row_desc' => __('Cut table row'), + 'copy_row_desc' => __('Copy table row'), + 'del' => __('Delete table'), + 'row' => __('Row'), + 'col' => __('Column'), + 'cell' => __('Cell') + ), + + 'autosave' => array( + 'unload_msg' => __('The changes you made will be lost if you navigate away from this page.') + ), + + 'fullscreen' => array( + 'desc' => __('Toggle fullscreen mode (Alt + Shift + G)') + ), + + 'media' => array( + 'desc' => __('Insert / edit embedded media'), + 'edit' => __('Edit embedded media') + ), + + 'fullpage' => array( + 'desc' => __('Document properties') + ), + + 'template' => array( + 'desc' => __('Insert predefined template content') + ), + + 'visualchars' => array( + 'desc' => __('Visual control characters on/off.') + ), + + 'spellchecker' => array( + 'desc' => __('Toggle spellchecker (Alt + Shift + N)'), + 'menu' => __('Spellchecker settings'), + 'ignore_word' => __('Ignore word'), + 'ignore_words' => __('Ignore all'), + 'langs' => __('Languages'), + 'wait' => __('Please wait...'), + 'sug' => __('Suggestions'), + 'no_sug' => __('No suggestions'), + 'no_mpell' => __('No misspellings found.'), + 'learn_word' => __('Learn word') + ), + + 'pagebreak' => array( + 'desc' => __('Insert Page Break') + ), + + 'advlist' => array( + 'types' => __('Types'), + 'def' => __('Default'), + 'lower_alpha' => __('Lower alpha'), + 'lower_greek' => __('Lower greek'), + 'lower_roman' => __('Lower roman'), + 'upper_alpha' => __('Upper alpha'), + 'upper_roman' => __('Upper roman'), + 'circle' => __('Circle'), + 'disc' => __('Disc'), + 'square' => __('Square') + ), + + 'aria' => array( + 'rich_text_area' => __('Rich Text Area') + ), + + 'wordcount' => array( + 'words' => __('Words:') + ) + ); + + $advanced = array( + 'style_select' => __('Styles'), /* translators: TinyMCE inline styles */ + 'font_size' => __('Font size'), + 'fontdefault' => __('Font family'), + 'block' => __('Format'), + 'paragraph' => __('Paragraph'), + 'div' => __('Div'), + 'address' => __('Address'), + 'pre' => __('Preformatted'), + 'h1' => __('Heading 1'), + 'h2' => __('Heading 2'), + 'h3' => __('Heading 3'), + 'h4' => __('Heading 4'), + 'h5' => __('Heading 5'), + 'h6' => __('Heading 6'), + 'blockquote' => __('Blockquote'), + 'code' => __('Code'), + 'samp' => __('Code sample'), + 'dt' => __('Definition term '), + 'dd' => __('Definition description'), + 'bold_desc' => __('Bold (Ctrl + B)'), + 'italic_desc' => __('Italic (Ctrl + I)'), + 'underline_desc' => __('Underline'), + 'striketrough_desc' => __('Strikethrough (Alt + Shift + D)'), + 'justifyleft_desc' => __('Align Left (Alt + Shift + L)'), + 'justifycenter_desc' => __('Align Center (Alt + Shift + C)'), + 'justifyright_desc' => __('Align Right (Alt + Shift + R)'), + 'justifyfull_desc' => __('Align Full (Alt + Shift + J)'), + 'bullist_desc' => __('Unordered list (Alt + Shift + U)'), + 'numlist_desc' => __('Ordered list (Alt + Shift + O)'), + 'outdent_desc' => __('Outdent'), + 'indent_desc' => __('Indent'), + 'undo_desc' => __('Undo (Ctrl + Z)'), + 'redo_desc' => __('Redo (Ctrl + Y)'), + 'link_desc' => __('Insert/edit link (Alt + Shift + A)'), + 'unlink_desc' => __('Unlink (Alt + Shift + S)'), + 'image_desc' => __('Insert/edit image (Alt + Shift + M)'), + 'cleanup_desc' => __('Cleanup messy code'), + 'code_desc' => __('Edit HTML Source'), + 'sub_desc' => __('Subscript'), + 'sup_desc' => __('Superscript'), + 'hr_desc' => __('Insert horizontal ruler'), + 'removeformat_desc' => __('Remove formatting'), + 'forecolor_desc' => __('Select text color'), + 'backcolor_desc' => __('Select background color'), + 'charmap_desc' => __('Insert custom character'), + 'visualaid_desc' => __('Toggle guidelines/invisible elements'), + 'anchor_desc' => __('Insert/edit anchor'), + 'cut_desc' => __('Cut'), + 'copy_desc' => __('Copy'), + 'paste_desc' => __('Paste'), + 'image_props_desc' => __('Image properties'), + 'newdocument_desc' => __('New document'), + 'help_desc' => __('Help'), + 'blockquote_desc' => __('Blockquote (Alt + Shift + Q)'), + 'clipboard_msg' => __('Copy/Cut/Paste is not available in Mozilla and Firefox.'), + 'path' => __('Path'), + 'newdocument' => __('Are you sure you want to clear all contents?'), + 'toolbar_focus' => __('Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X'), + 'more_colors' => __('More colors'), + 'shortcuts_desc' => __('Accessibility Help'), + 'help_shortcut' => __('Press ALT F10 for toolbar. Press ALT 0 for help.'), + 'rich_text_area' => __('Rich Text Area'), + 'toolbar' => __('Toolbar') + ); + + $advanced_dlg = array( + 'about_title' => __('About TinyMCE'), + 'about_general' => __('About'), + 'about_help' => __('Help'), + 'about_license' => __('License'), + 'about_plugins' => __('Plugins'), + 'about_plugin' => __('Plugin'), + 'about_author' => __('Author'), + 'about_version' => __('Version'), + 'about_loaded' => __('Loaded plugins'), + 'anchor_title' => __('Insert/edit anchor'), + 'anchor_name' => __('Anchor name'), + 'code_title' => __('HTML Source Editor'), + 'code_wordwrap' => __('Word wrap'), + 'colorpicker_title' => __('Select a color'), + 'colorpicker_picker_tab' => __('Picker'), + 'colorpicker_picker_title' => __('Color picker'), + 'colorpicker_palette_tab' => __('Palette'), + 'colorpicker_palette_title' => __('Palette colors'), + 'colorpicker_named_tab' => __('Named'), + 'colorpicker_named_title' => __('Named colors'), + 'colorpicker_color' => __('Color:'), + 'colorpicker_name' => _x('Name:', 'html attribute'), + 'charmap_title' => __('Select custom character'), + 'charmap_usage' => __('Use left and right arrows to navigate.'), + 'image_title' => __('Insert/edit image'), + 'image_src' => __('Image URL'), + 'image_alt' => __('Image description'), + 'image_list' => __('Image list'), + 'image_border' => __('Border'), + 'image_dimensions' => __('Dimensions'), + 'image_vspace' => __('Vertical space'), + 'image_hspace' => __('Horizontal space'), + 'image_align' => __('Alignment'), + 'image_align_baseline' => __('Baseline'), + 'image_align_top' => __('Top'), + 'image_align_middle' => __('Middle'), + 'image_align_bottom' => __('Bottom'), + 'image_align_texttop' => __('Text top'), + 'image_align_textbottom' => __('Text bottom'), + 'image_align_left' => __('Left'), + 'image_align_right' => __('Right'), + 'link_title' => __('Insert/edit link'), + 'link_url' => __('Link URL'), + 'link_target' => __('Target'), + 'link_target_same' => __('Open link in the same window'), + 'link_target_blank' => __('Open link in a new window'), + 'link_titlefield' => __('Title'), + 'link_is_email' => __('The URL you entered seems to be an email address, do you want to add the required mailto: prefix?'), + 'link_is_external' => __('The URL you entered seems to external link, do you want to add the required http:// prefix?'), + 'link_list' => __('Link list'), + 'accessibility_help' => __('Accessibility Help'), + 'accessibility_usage_title' => __('General Usage') + ); + + $media_dlg = array( + 'title' => __('Insert / edit embedded media'), + 'general' => __('General'), + 'advanced' => __('Advanced'), + 'file' => __('File/URL'), + 'list' => __('List'), + 'size' => __('Dimensions'), + 'preview' => __('Preview'), + 'constrain_proportions' => __('Constrain proportions'), + 'type' => __('Type'), + 'id' => __('Id'), + 'name' => _x('Name', 'html attribute'), + 'class_name' => __('Class'), + 'vspace' => __('V-Space'), + 'hspace' => __('H-Space'), + 'play' => __('Auto play'), + 'loop' => __('Loop'), + 'menu' => __('Show menu'), + 'quality' => __('Quality'), + 'scale' => __('Scale'), + 'align' => __('Align'), + 'salign' => __('SAlign'), + 'wmode' => __('WMode'), + 'bgcolor' => __('Background'), + 'base' => __('Base'), + 'flashvars' => __('Flashvars'), + 'liveconnect' => __('SWLiveConnect'), + 'autohref' => __('AutoHREF'), + 'cache' => __('Cache'), + 'hidden' => __('Hidden'), + 'controller' => __('Controller'), + 'kioskmode' => __('Kiosk mode'), + 'playeveryframe' => __('Play every frame'), + 'targetcache' => __('Target cache'), + 'correction' => __('No correction'), + 'enablejavascript' => __('Enable JavaScript'), + 'starttime' => __('Start time'), + 'endtime' => __('End time'), + 'href' => __('href'), + 'qtsrcchokespeed' => __('Choke speed'), + 'target' => __('Target'), + 'volume' => __('Volume'), + 'autostart' => __('Auto start'), + 'enabled' => __('Enabled'), + 'fullscreen' => __('Fullscreen'), + 'invokeurls' => __('Invoke URLs'), + 'mute' => __('Mute'), + 'stretchtofit' => __('Stretch to fit'), + 'windowlessvideo' => __('Windowless video'), + 'balance' => __('Balance'), + 'baseurl' => __('Base URL'), + 'captioningid' => __('Captioning id'), + 'currentmarker' => __('Current marker'), + 'currentposition' => __('Current position'), + 'defaultframe' => __('Default frame'), + 'playcount' => __('Play count'), + 'rate' => __('Rate'), + 'uimode' => __('UI Mode'), + 'flash_options' => __('Flash options'), + 'qt_options' => __('Quicktime options'), + 'wmp_options' => __('Windows media player options'), + 'rmp_options' => __('Real media player options'), + 'shockwave_options' => __('Shockwave options'), + 'autogotourl' => __('Auto goto URL'), + 'center' => __('Center'), + 'imagestatus' => __('Image status'), + 'maintainaspect' => __('Maintain aspect'), + 'nojava' => __('No java'), + 'prefetch' => __('Prefetch'), + 'shuffle' => __('Shuffle'), + 'console' => __('Console'), + 'numloop' => __('Num loops'), + 'controls' => __('Controls'), + 'scriptcallbacks' => __('Script callbacks'), + 'swstretchstyle' => __('Stretch style'), + 'swstretchhalign' => __('Stretch H-Align'), + 'swstretchvalign' => __('Stretch V-Align'), + 'sound' => __('Sound'), + 'progress' => __('Progress'), + 'qtsrc' => __('QT Src'), + 'qt_stream_warn' => __('Streamed rtsp resources should be added to the QT Src field under the advanced tab.'), + 'align_top' => __('Top'), + 'align_right' => __('Right'), + 'align_bottom' => __('Bottom'), + 'align_left' => __('Left'), + 'align_center' => __('Center'), + 'align_top_left' => __('Top left'), + 'align_top_right' => __('Top right'), + 'align_bottom_left' => __('Bottom left'), + 'align_bottom_right' => __('Bottom right'), + 'flv_options' => __('Flash video options'), + 'flv_scalemode' => __('Scale mode'), + 'flv_buffer' => __('Buffer'), + 'flv_startimage' => __('Start image'), + 'flv_starttime' => __('Start time'), + 'flv_defaultvolume' => __('Default volume'), + 'flv_hiddengui' => __('Hidden GUI'), + 'flv_autostart' => __('Auto start'), + 'flv_loop' => __('Loop'), + 'flv_showscalemodes' => __('Show scale modes'), + 'flv_smoothvideo' => __('Smooth video'), + 'flv_jscallback' => __('JS Callback'), + 'html5_video_options' => __('HTML5 Video Options'), + 'altsource1' => __('Alternative source 1'), + 'altsource2' => __('Alternative source 2'), + 'preload' => __('Preload'), + 'poster' => __('Poster'), + 'source' => __('Source') + ); + + $wordpress = array( + 'wp_adv_desc' => __('Show/Hide Kitchen Sink (Alt + Shift + Z)'), + 'wp_more_desc' => __('Insert More Tag (Alt + Shift + T)'), + 'wp_page_desc' => __('Insert Page break (Alt + Shift + P)'), + 'wp_help_desc' => __('Help (Alt + Shift + H)'), + 'wp_more_alt' => __('More...'), + 'wp_page_alt' => __('Next page...'), + 'add_media' => __('Add Media'), + 'add_image' => __('Add an Image'), + 'add_video' => __('Add Video'), + 'add_audio' => __('Add Audio'), + 'editgallery' => __('Edit Gallery'), + 'delgallery' => __('Delete Gallery') + ); + + $wpeditimage = array( + 'edit_img' => __('Edit Image'), + 'del_img' => __('Delete Image'), + 'adv_settings' => __('Advanced Settings'), + 'none' => __('None'), + 'size' => __('Size'), + 'thumbnail' => __('Thumbnail'), + 'medium' => __('Medium'), + 'full_size' => __('Full Size'), + 'current_link' => __('Current Link'), + 'link_to_img' => __('Link to Image'), + 'link_help' => __('Enter a link URL or click above for presets.'), + 'adv_img_settings' => __('Advanced Image Settings'), + 'source' => __('Source'), + 'width' => __('Width'), + 'height' => __('Height'), + 'orig_size' => __('Original Size'), + 'css' => __('CSS Class'), + 'adv_link_settings' => __('Advanced Link Settings'), + 'link_rel' => __('Link Rel'), + 'height' => __('Height'), + 'orig_size' => __('Original Size'), + 'css' => __('CSS Class'), + 's60' => __('60%'), + 's70' => __('70%'), + 's80' => __('80%'), + 's90' => __('90%'), + 's100' => __('100%'), + 's110' => __('110%'), + 's120' => __('120%'), + 's130' => __('130%'), + 'img_title' => __('Title'), + 'caption' => __('Caption'), + 'alt' => __('Alternate Text') + ); + + $locale = _WP_Editors::$mce_locale; + + $translated = 'tinyMCE.addI18n({' . $locale . ':' . json_encode( $default ) . "});\n"; + $translated .= 'tinyMCE.addI18n("' . $locale . '.advanced", ' . json_encode( $advanced ) . ");\n"; + $translated .= 'tinyMCE.addI18n("' . $locale . '.advanced_dlg", ' . json_encode( $advanced_dlg ) . ");\n"; + $translated .= 'tinyMCE.addI18n("' . $locale . '.media_dlg", ' . json_encode( $media_dlg ) . ");\n"; + $translated .= 'tinyMCE.addI18n("' . $locale . '.wordpress", ' . json_encode( $wordpress ) . ");\n"; + $translated .= 'tinyMCE.addI18n("' . $locale . '.wpeditimage", ' . json_encode( $wpeditimage ) . ');'; + + return $translated; } -}}); - -tinyMCE.addI18n("' . _WP_Editors::$mce_locale . '.advanced",{ -style_select:"' . mce_escape( /* translators: TinyMCE font styles */ _x('Styles', 'TinyMCE font styles') ) . '", -font_size:"' . mce_escape( __('Font size') ) . '", -fontdefault:"' . mce_escape( __('Font family') ) . '", -block:"' . mce_escape( __('Format') ) . '", -paragraph:"' . mce_escape( __('Paragraph') ) . '", -div:"' . mce_escape( __('Div') ) . '", -address:"' . mce_escape( __('Address') ) . '", -pre:"' . mce_escape( __('Preformatted') ) . '", -h1:"' . mce_escape( __('Heading 1') ) . '", -h2:"' . mce_escape( __('Heading 2') ) . '", -h3:"' . mce_escape( __('Heading 3') ) . '", -h4:"' . mce_escape( __('Heading 4') ) . '", -h5:"' . mce_escape( __('Heading 5') ) . '", -h6:"' . mce_escape( __('Heading 6') ) . '", -blockquote:"' . mce_escape( __('Blockquote') ) . '", -code:"' . mce_escape( __('Code') ) . '", -samp:"' . mce_escape( __('Code sample') ) . '", -dt:"' . mce_escape( __('Definition term ') ) . '", -dd:"' . mce_escape( __('Definition description') ) . '", -bold_desc:"' . mce_escape( __('Bold (Ctrl + B)') ) . '", -italic_desc:"' . mce_escape( __('Italic (Ctrl + I)') ) . '", -underline_desc:"' . mce_escape( __('Underline') ) . '", -striketrough_desc:"' . mce_escape( __('Strikethrough (Alt + Shift + D)') ) . '", -justifyleft_desc:"' . mce_escape( __('Align Left (Alt + Shift + L)') ) . '", -justifycenter_desc:"' . mce_escape( __('Align Center (Alt + Shift + C)') ) . '", -justifyright_desc:"' . mce_escape( __('Align Right (Alt + Shift + R)') ) . '", -justifyfull_desc:"' . mce_escape( __('Align Full (Alt + Shift + J)') ) . '", -bullist_desc:"' . mce_escape( __('Unordered list (Alt + Shift + U)') ) . '", -numlist_desc:"' . mce_escape( __('Ordered list (Alt + Shift + O)') ) . '", -outdent_desc:"' . mce_escape( __('Outdent') ) . '", -indent_desc:"' . mce_escape( __('Indent') ) . '", -undo_desc:"' . mce_escape( __('Undo (Ctrl + Z)') ) . '", -redo_desc:"' . mce_escape( __('Redo (Ctrl + Y)') ) . '", -link_desc:"' . mce_escape( __('Insert/edit link (Alt + Shift + A)') ) . '", -unlink_desc:"' . mce_escape( __('Unlink (Alt + Shift + S)') ) . '", -image_desc:"' . mce_escape( __('Insert/edit image (Alt + Shift + M)') ) . '", -cleanup_desc:"' . mce_escape( __('Cleanup messy code') ) . '", -code_desc:"' . mce_escape( __('Edit HTML Source') ) . '", -sub_desc:"' . mce_escape( __('Subscript') ) . '", -sup_desc:"' . mce_escape( __('Superscript') ) . '", -hr_desc:"' . mce_escape( __('Insert horizontal ruler') ) . '", -removeformat_desc:"' . mce_escape( __('Remove formatting') ) . '", -forecolor_desc:"' . mce_escape( __('Select text color') ) . '", -backcolor_desc:"' . mce_escape( __('Select background color') ) . '", -charmap_desc:"' . mce_escape( __('Insert custom character') ) . '", -visualaid_desc:"' . mce_escape( __('Toggle guidelines/invisible elements') ) . '", -anchor_desc:"' . mce_escape( __('Insert/edit anchor') ) . '", -cut_desc:"' . mce_escape( __('Cut') ) . '", -copy_desc:"' . mce_escape( __('Copy') ) . '", -paste_desc:"' . mce_escape( __('Paste') ) . '", -image_props_desc:"' . mce_escape( __('Image properties') ) . '", -newdocument_desc:"' . mce_escape( __('New document') ) . '", -help_desc:"' . mce_escape( __('Help') ) . '", -blockquote_desc:"' . mce_escape( __('Blockquote (Alt + Shift + Q)') ) . '", -clipboard_msg:"' . mce_escape( __('Copy/Cut/Paste is not available in Mozilla and Firefox.') ) . '", -path:"' . mce_escape( __('Path') ) . '", -newdocument:"' . mce_escape( __('Are you sure you want to clear all contents?') ) . '", -toolbar_focus:"' . mce_escape( __('Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X') ) . '", -more_colors:"' . mce_escape( __('More colors') ) . '", -shortcuts_desc:"' . mce_escape( __('Accessibility Help') ) . '", -help_shortcut:" ' . mce_escape( __('Press ALT F10 for toolbar. Press ALT 0 for help.') ) . '", -rich_text_area:"' . mce_escape( __('Rich Text Area') ) . '", -toolbar:"' . mce_escape( __('Toolbar') ) . '" -}); - -tinyMCE.addI18n("' . _WP_Editors::$mce_locale . '.advanced_dlg",{ -about_title:"' . mce_escape( __('About TinyMCE') ) . '", -about_general:"' . mce_escape( __('About') ) . '", -about_help:"' . mce_escape( __('Help') ) . '", -about_license:"' . mce_escape( __('License') ) . '", -about_plugins:"' . mce_escape( __('Plugins') ) . '", -about_plugin:"' . mce_escape( __('Plugin') ) . '", -about_author:"' . mce_escape( __('Author') ) . '", -about_version:"' . mce_escape( __('Version') ) . '", -about_loaded:"' . mce_escape( __('Loaded plugins') ) . '", -anchor_title:"' . mce_escape( __('Insert/edit anchor') ) . '", -anchor_name:"' . mce_escape( __('Anchor name') ) . '", -code_title:"' . mce_escape( __('HTML Source Editor') ) . '", -code_wordwrap:"' . mce_escape( __('Word wrap') ) . '", -colorpicker_title:"' . mce_escape( __('Select a color') ) . '", -colorpicker_picker_tab:"' . mce_escape( __('Picker') ) . '", -colorpicker_picker_title:"' . mce_escape( __('Color picker') ) . '", -colorpicker_palette_tab:"' . mce_escape( __('Palette') ) . '", -colorpicker_palette_title:"' . mce_escape( __('Palette colors') ) . '", -colorpicker_named_tab:"' . mce_escape( __('Named') ) . '", -colorpicker_named_title:"' . mce_escape( __('Named colors') ) . '", -colorpicker_color:"' . mce_escape( __('Color:') ) . '", -colorpicker_name:"' . mce_escape( _x('Name:', 'html attribute') ) . '", -charmap_title:"' . mce_escape( __('Select custom character') ) . '", -image_title:"' . mce_escape( __('Insert/edit image') ) . '", -image_src:"' . mce_escape( __('Image URL') ) . '", -image_alt:"' . mce_escape( __('Image description') ) . '", -image_list:"' . mce_escape( __('Image list') ) . '", -image_border:"' . mce_escape( __('Border') ) . '", -image_dimensions:"' . mce_escape( __('Dimensions') ) . '", -image_vspace:"' . mce_escape( __('Vertical space') ) . '", -image_hspace:"' . mce_escape( __('Horizontal space') ) . '", -image_align:"' . mce_escape( __('Alignment') ) . '", -image_align_baseline:"' . mce_escape( __('Baseline') ) . '", -image_align_top:"' . mce_escape( __('Top') ) . '", -image_align_middle:"' . mce_escape( __('Middle') ) . '", -image_align_bottom:"' . mce_escape( __('Bottom') ) . '", -image_align_texttop:"' . mce_escape( __('Text top') ) . '", -image_align_textbottom:"' . mce_escape( __('Text bottom') ) . '", -image_align_left:"' . mce_escape( __('Left') ) . '", -image_align_right:"' . mce_escape( __('Right') ) . '", -link_title:"' . mce_escape( __('Insert/edit link') ) . '", -link_url:"' . mce_escape( __('Link URL') ) . '", -link_target:"' . mce_escape( __('Target') ) . '", -link_target_same:"' . mce_escape( __('Open link in the same window') ) . '", -link_target_blank:"' . mce_escape( __('Open link in a new window') ) . '", -link_titlefield:"' . mce_escape( __('Title') ) . '", -link_is_email:"' . mce_escape( __('The URL you entered seems to be an email address, do you want to add the required mailto: prefix?') ) . '", -link_is_external:"' . mce_escape( __('The URL you entered seems to external link, do you want to add the required http:// prefix?') ) . '", -link_list:"' . mce_escape( __('Link list') ) . '", -accessibility_help:"' . mce_escape( __('Accessibility Help') ) . '", -accessibility_usage_title:"' . mce_escape( __('General Usage') ) . '" -}); - -tinyMCE.addI18n("' . _WP_Editors::$mce_locale . '.media_dlg",{ -title:"' . mce_escape( __('Insert / edit embedded media') ) . '", -general:"' . mce_escape( __('General') ) . '", -advanced:"' . mce_escape( __('Advanced') ) . '", -file:"' . mce_escape( __('File/URL') ) . '", -list:"' . mce_escape( __('List') ) . '", -size:"' . mce_escape( __('Dimensions') ) . '", -preview:"' . mce_escape( __('Preview') ) . '", -constrain_proportions:"' . mce_escape( __('Constrain proportions') ) . '", -type:"' . mce_escape( __('Type') ) . '", -id:"' . mce_escape( __('Id') ) . '", -name:"' . mce_escape( _x('Name', 'html attribute') ) . '", -class_name:"' . mce_escape( __('Class') ) . '", -vspace:"' . mce_escape( __('V-Space') ) . '", -hspace:"' . mce_escape( __('H-Space') ) . '", -play:"' . mce_escape( __('Auto play') ) . '", -loop:"' . mce_escape( __('Loop') ) . '", -menu:"' . mce_escape( __('Show menu') ) . '", -quality:"' . mce_escape( __('Quality') ) . '", -scale:"' . mce_escape( __('Scale') ) . '", -align:"' . mce_escape( __('Align') ) . '", -salign:"' . mce_escape( __('SAlign') ) . '", -wmode:"' . mce_escape( __('WMode') ) . '", -bgcolor:"' . mce_escape( __('Background') ) . '", -base:"' . mce_escape( __('Base') ) . '", -flashvars:"' . mce_escape( __('Flashvars') ) . '", -liveconnect:"' . mce_escape( __('SWLiveConnect') ) . '", -autohref:"' . mce_escape( __('AutoHREF') ) . '", -cache:"' . mce_escape( __('Cache') ) . '", -hidden:"' . mce_escape( __('Hidden') ) . '", -controller:"' . mce_escape( __('Controller') ) . '", -kioskmode:"' . mce_escape( __('Kiosk mode') ) . '", -playeveryframe:"' . mce_escape( __('Play every frame') ) . '", -targetcache:"' . mce_escape( __('Target cache') ) . '", -correction:"' . mce_escape( __('No correction') ) . '", -enablejavascript:"' . mce_escape( __('Enable JavaScript') ) . '", -starttime:"' . mce_escape( __('Start time') ) . '", -endtime:"' . mce_escape( __('End time') ) . '", -href:"' . mce_escape( __('href') ) . '", -qtsrcchokespeed:"' . mce_escape( __('Choke speed') ) . '", -target:"' . mce_escape( __('Target') ) . '", -volume:"' . mce_escape( __('Volume') ) . '", -autostart:"' . mce_escape( __('Auto start') ) . '", -enabled:"' . mce_escape( __('Enabled') ) . '", -fullscreen:"' . mce_escape( __('Fullscreen') ) . '", -invokeurls:"' . mce_escape( __('Invoke URLs') ) . '", -mute:"' . mce_escape( __('Mute') ) . '", -stretchtofit:"' . mce_escape( __('Stretch to fit') ) . '", -windowlessvideo:"' . mce_escape( __('Windowless video') ) . '", -balance:"' . mce_escape( __('Balance') ) . '", -baseurl:"' . mce_escape( __('Base URL') ) . '", -captioningid:"' . mce_escape( __('Captioning id') ) . '", -currentmarker:"' . mce_escape( __('Current marker') ) . '", -currentposition:"' . mce_escape( __('Current position') ) . '", -defaultframe:"' . mce_escape( __('Default frame') ) . '", -playcount:"' . mce_escape( __('Play count') ) . '", -rate:"' . mce_escape( __('Rate') ) . '", -uimode:"' . mce_escape( __('UI Mode') ) . '", -flash_options:"' . mce_escape( __('Flash options') ) . '", -qt_options:"' . mce_escape( __('Quicktime options') ) . '", -wmp_options:"' . mce_escape( __('Windows media player options') ) . '", -rmp_options:"' . mce_escape( __('Real media player options') ) . '", -shockwave_options:"' . mce_escape( __('Shockwave options') ) . '", -autogotourl:"' . mce_escape( __('Auto goto URL') ) . '", -center:"' . mce_escape( __('Center') ) . '", -imagestatus:"' . mce_escape( __('Image status') ) . '", -maintainaspect:"' . mce_escape( __('Maintain aspect') ) . '", -nojava:"' . mce_escape( __('No java') ) . '", -prefetch:"' . mce_escape( __('Prefetch') ) . '", -shuffle:"' . mce_escape( __('Shuffle') ) . '", -console:"' . mce_escape( __('Console') ) . '", -numloop:"' . mce_escape( __('Num loops') ) . '", -controls:"' . mce_escape( __('Controls') ) . '", -scriptcallbacks:"' . mce_escape( __('Script callbacks') ) . '", -swstretchstyle:"' . mce_escape( __('Stretch style') ) . '", -swstretchhalign:"' . mce_escape( __('Stretch H-Align') ) . '", -swstretchvalign:"' . mce_escape( __('Stretch V-Align') ) . '", -sound:"' . mce_escape( __('Sound') ) . '", -progress:"' . mce_escape( __('Progress') ) . '", -qtsrc:"' . mce_escape( __('QT Src') ) . '", -qt_stream_warn:"' . mce_escape( __('Streamed rtsp resources should be added to the QT Src field under the advanced tab.') ) . '", -align_top:"' . mce_escape( __('Top') ) . '", -align_right:"' . mce_escape( __('Right') ) . '", -align_bottom:"' . mce_escape( __('Bottom') ) . '", -align_left:"' . mce_escape( __('Left') ) . '", -align_center:"' . mce_escape( __('Center') ) . '", -align_top_left:"' . mce_escape( __('Top left') ) . '", -align_top_right:"' . mce_escape( __('Top right') ) . '", -align_bottom_left:"' . mce_escape( __('Bottom left') ) . '", -align_bottom_right:"' . mce_escape( __('Bottom right') ) . '", -flv_options:"' . mce_escape( __('Flash video options') ) . '", -flv_scalemode:"' . mce_escape( __('Scale mode') ) . '", -flv_buffer:"' . mce_escape( __('Buffer') ) . '", -flv_startimage:"' . mce_escape( __('Start image') ) . '", -flv_starttime:"' . mce_escape( __('Start time') ) . '", -flv_defaultvolume:"' . mce_escape( __('Default volume') ) . '", -flv_hiddengui:"' . mce_escape( __('Hidden GUI') ) . '", -flv_autostart:"' . mce_escape( __('Auto start') ) . '", -flv_loop:"' . mce_escape( __('Loop') ) . '", -flv_showscalemodes:"' . mce_escape( __('Show scale modes') ) . '", -flv_smoothvideo:"' . mce_escape( __('Smooth video') ) . '", -flv_jscallback:"' . mce_escape( __('JS Callback') ) . '", -html5_video_options:"' . mce_escape( __('HTML5 Video Options') ) . '", -altsource1:"' . mce_escape( __('Alternative source 1') ) . '", -altsource2:"' . mce_escape( __('Alternative source 2') ) . '", -preload:"' . mce_escape( __('Preload') ) . '", -poster:"' . mce_escape( __('Poster') ) . '", -source:"' . mce_escape( __('Source') ) . '" -}); - -tinyMCE.addI18n("' . _WP_Editors::$mce_locale . '.wordpress",{ -wp_adv_desc:"' . mce_escape( __('Show/Hide Kitchen Sink (Alt + Shift + Z)') ) . '", -wp_more_desc:"' . mce_escape( __('Insert More Tag (Alt + Shift + T)') ) . '", -wp_page_desc:"' . mce_escape( __('Insert Page break (Alt + Shift + P)') ) . '", -wp_help_desc:"' . mce_escape( __('Help (Alt + Shift + H)') ) . '", -wp_more_alt:"' . mce_escape( __('More...') ) . '", -wp_page_alt:"' . mce_escape( __('Next page...') ) . '", -add_media:"' . mce_escape( __('Add Media') ) . '", -add_image:"' . mce_escape( __('Add an Image') ) . '", -add_video:"' . mce_escape( __('Add Video') ) . '", -add_audio:"' . mce_escape( __('Add Audio') ) . '", -editgallery:"' . mce_escape( __('Edit Gallery') ) . '", -delgallery:"' . mce_escape( __('Delete Gallery') ) . '" -}); - -tinyMCE.addI18n("' . _WP_Editors::$mce_locale . '.wpeditimage",{ -edit_img:"' . mce_escape( __('Edit Image') ) . '", -del_img:"' . mce_escape( __('Delete Image') ) . '", -adv_settings:"' . mce_escape( __('Advanced Settings') ) . '", -none:"' . mce_escape( __('None') ) . '", -size:"' . mce_escape( __('Size') ) . '", -thumbnail:"' . mce_escape( __('Thumbnail') ) . '", -medium:"' . mce_escape( __('Medium') ) . '", -full_size:"' . mce_escape( __('Full Size') ) . '", -current_link:"' . mce_escape( __('Current Link') ) . '", -link_to_img:"' . mce_escape( __('Link to Image') ) . '", -link_help:"' . mce_escape( __('Enter a link URL or click above for presets.') ) . '", -adv_img_settings:"' . mce_escape( __('Advanced Image Settings') ) . '", -source:"' . mce_escape( __('Source') ) . '", -width:"' . mce_escape( __('Width') ) . '", -height:"' . mce_escape( __('Height') ) . '", -orig_size:"' . mce_escape( __('Original Size') ) . '", -css:"' . mce_escape( __('CSS Class') ) . '", -adv_link_settings:"' . mce_escape( __('Advanced Link Settings') ) . '", -link_rel:"' . mce_escape( __('Link Rel') ) . '", -height:"' . mce_escape( __('Height') ) . '", -orig_size:"' . mce_escape( __('Original Size') ) . '", -css:"' . mce_escape( __('CSS Class') ) . '", -s60:"' . mce_escape( __('60%') ) . '", -s70:"' . mce_escape( __('70%') ) . '", -s80:"' . mce_escape( __('80%') ) . '", -s90:"' . mce_escape( __('90%') ) . '", -s100:"' . mce_escape( __('100%') ) . '", -s110:"' . mce_escape( __('110%') ) . '", -s120:"' . mce_escape( __('120%') ) . '", -s130:"' . mce_escape( __('130%') ) . '", -img_title:"' . mce_escape( __('Title') ) . '", -caption:"' . mce_escape( __('Caption') ) . '", -alt:"' . mce_escape( __('Alternate Text') ) . '" -}); -'; + +$lang = wp_mce_translation(); + diff --git a/wp-includes/js/tinymce/mark_loaded_src.js b/wp-includes/js/tinymce/mark_loaded_src.js new file mode 100644 index 00000000..2b531926 --- /dev/null +++ b/wp-includes/js/tinymce/mark_loaded_src.js @@ -0,0 +1,20 @@ +(function(){ + if ( typeof tinyMCEPreInit === 'undefined' ) + return; + + var t = tinyMCEPreInit, baseurl = t.base, markDone = tinymce.ScriptLoader.markDone, lang = t.ref.language, + theme = t.ref.theme, plugins = t.ref.plugins, suffix = t.suffix; + + markDone( baseurl+'/langs/'+lang+'.js' ); + markDone( baseurl+'/themes/'+theme+'/editor_template'+suffix+'.js' ); + markDone( baseurl+'/themes/'+theme+'/langs/'+lang+'.js' ); + markDone( baseurl+'/themes/'+theme+'/langs/'+lang+'_dlg.js' ); + + tinymce.each( plugins.split(','), function(plugin){ + if ( plugin && plugin.charAt(0) != '-' ) { + markDone( baseurl+'/plugins/'+plugin+'/editor_plugin'+suffix+'.js' ); + markDone( baseurl+'/plugins/'+plugin+'/langs/'+lang+'.js' ); + markDone( baseurl+'/plugins/'+plugin+'/langs/'+lang+'_dlg.js' ) + } + }); +})(); diff --git a/wp-includes/js/tinymce/plugins/directionality/editor_plugin_src.js b/wp-includes/js/tinymce/plugins/directionality/editor_plugin_src.js new file mode 100644 index 00000000..205d02cd --- /dev/null +++ b/wp-includes/js/tinymce/plugins/directionality/editor_plugin_src.js @@ -0,0 +1,82 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.Directionality', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + ed.addCommand('mceDirectionLTR', function() { + var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock); + + if (e) { + if (ed.dom.getAttrib(e, "dir") != "ltr") + ed.dom.setAttrib(e, "dir", "ltr"); + else + ed.dom.setAttrib(e, "dir", ""); + } + + ed.nodeChanged(); + }); + + ed.addCommand('mceDirectionRTL', function() { + var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock); + + if (e) { + if (ed.dom.getAttrib(e, "dir") != "rtl") + ed.dom.setAttrib(e, "dir", "rtl"); + else + ed.dom.setAttrib(e, "dir", ""); + } + + ed.nodeChanged(); + }); + + ed.addButton('ltr', {title : 'directionality.ltr_desc', cmd : 'mceDirectionLTR'}); + ed.addButton('rtl', {title : 'directionality.rtl_desc', cmd : 'mceDirectionRTL'}); + + ed.onNodeChange.add(t._nodeChange, t); + }, + + getInfo : function() { + return { + longname : 'Directionality', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private methods + + _nodeChange : function(ed, cm, n) { + var dom = ed.dom, dir; + + n = dom.getParent(n, dom.isBlock); + if (!n) { + cm.setDisabled('ltr', 1); + cm.setDisabled('rtl', 1); + return; + } + + dir = dom.getAttrib(n, 'dir'); + cm.setActive('ltr', dir == "ltr"); + cm.setDisabled('ltr', 0); + cm.setActive('rtl', dir == "rtl"); + cm.setDisabled('rtl', 0); + } + }); + + // Register plugin + tinymce.PluginManager.add('directionality', tinymce.plugins.Directionality); +})(); \ No newline at end of file diff --git a/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin_src.js b/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin_src.js new file mode 100644 index 00000000..42af070a --- /dev/null +++ b/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin_src.js @@ -0,0 +1,159 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var DOM = tinymce.DOM; + + tinymce.create('tinymce.plugins.FullScreenPlugin', { + init : function(ed, url) { + var t = this, s = {}, vp, posCss; + + t.editor = ed; + + // Register commands + ed.addCommand('mceFullScreen', function() { + var win, de = DOM.doc.documentElement; + + if (ed.getParam('fullscreen_is_enabled')) { + if (ed.getParam('fullscreen_new_window')) + closeFullscreen(); // Call to close in new window + else { + DOM.win.setTimeout(function() { + tinymce.dom.Event.remove(DOM.win, 'resize', t.resizeFunc); + tinyMCE.get(ed.getParam('fullscreen_editor_id')).setContent(ed.getContent()); + tinyMCE.remove(ed); + DOM.remove('mce_fullscreen_container'); + de.style.overflow = ed.getParam('fullscreen_html_overflow'); + DOM.setStyle(DOM.doc.body, 'overflow', ed.getParam('fullscreen_overflow')); + DOM.win.scrollTo(ed.getParam('fullscreen_scrollx'), ed.getParam('fullscreen_scrolly')); + tinyMCE.settings = tinyMCE.oldSettings; // Restore old settings + }, 10); + } + + return; + } + + if (ed.getParam('fullscreen_new_window')) { + win = DOM.win.open(url + "/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight); + try { + win.resizeTo(screen.availWidth, screen.availHeight); + } catch (e) { + // Ignore + } + } else { + tinyMCE.oldSettings = tinyMCE.settings; // Store old settings + s.fullscreen_overflow = DOM.getStyle(DOM.doc.body, 'overflow', 1) || 'auto'; + s.fullscreen_html_overflow = DOM.getStyle(de, 'overflow', 1); + vp = DOM.getViewPort(); + s.fullscreen_scrollx = vp.x; + s.fullscreen_scrolly = vp.y; + + // Fixes an Opera bug where the scrollbars doesn't reappear + if (tinymce.isOpera && s.fullscreen_overflow == 'visible') + s.fullscreen_overflow = 'auto'; + + // Fixes an IE bug where horizontal scrollbars would appear + if (tinymce.isIE && s.fullscreen_overflow == 'scroll') + s.fullscreen_overflow = 'auto'; + + // Fixes an IE bug where the scrollbars doesn't reappear + if (tinymce.isIE && (s.fullscreen_html_overflow == 'visible' || s.fullscreen_html_overflow == 'scroll')) + s.fullscreen_html_overflow = 'auto'; + + if (s.fullscreen_overflow == '0px') + s.fullscreen_overflow = ''; + + DOM.setStyle(DOM.doc.body, 'overflow', 'hidden'); + de.style.overflow = 'hidden'; //Fix for IE6/7 + vp = DOM.getViewPort(); + DOM.win.scrollTo(0, 0); + + if (tinymce.isIE) + vp.h -= 1; + + // Use fixed position if it exists + if (tinymce.isIE6) + posCss = 'absolute;top:' + vp.y; + else + posCss = 'fixed;top:0'; + + n = DOM.add(DOM.doc.body, 'div', { + id : 'mce_fullscreen_container', + style : 'position:' + posCss + ';left:0;width:' + vp.w + 'px;height:' + vp.h + 'px;z-index:200000;'}); + DOM.add(n, 'div', {id : 'mce_fullscreen'}); + + tinymce.each(ed.settings, function(v, n) { + s[n] = v; + }); + + s.id = 'mce_fullscreen'; + s.width = n.clientWidth; + s.height = n.clientHeight - 15; + s.fullscreen_is_enabled = true; + s.fullscreen_editor_id = ed.id; + s.theme_advanced_resizing = false; + s.save_onsavecallback = function() { + ed.setContent(tinyMCE.get(s.id).getContent()); + ed.execCommand('mceSave'); + }; + + tinymce.each(ed.getParam('fullscreen_settings'), function(v, k) { + s[k] = v; + }); + + if (s.theme_advanced_toolbar_location === 'external') + s.theme_advanced_toolbar_location = 'top'; + + t.fullscreenEditor = new tinymce.Editor('mce_fullscreen', s); + t.fullscreenEditor.onInit.add(function() { + t.fullscreenEditor.setContent(ed.getContent()); + t.fullscreenEditor.focus(); + }); + + t.fullscreenEditor.render(); + + t.fullscreenElement = new tinymce.dom.Element('mce_fullscreen_container'); + t.fullscreenElement.update(); + //document.body.overflow = 'hidden'; + + t.resizeFunc = tinymce.dom.Event.add(DOM.win, 'resize', function() { + var vp = tinymce.DOM.getViewPort(), fed = t.fullscreenEditor, outerSize, innerSize; + + // Get outer/inner size to get a delta size that can be used to calc the new iframe size + outerSize = fed.dom.getSize(fed.getContainer().firstChild); + innerSize = fed.dom.getSize(fed.getContainer().getElementsByTagName('iframe')[0]); + + fed.theme.resizeTo(vp.w - outerSize.w + innerSize.w, vp.h - outerSize.h + innerSize.h); + }); + } + }); + + // Register buttons + ed.addButton('fullscreen', {title : 'fullscreen.desc', cmd : 'mceFullScreen'}); + + ed.onNodeChange.add(function(ed, cm) { + cm.setActive('fullscreen', ed.getParam('fullscreen_is_enabled')); + }); + }, + + getInfo : function() { + return { + longname : 'Fullscreen', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('fullscreen', tinymce.plugins.FullScreenPlugin); +})(); \ No newline at end of file diff --git a/wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm b/wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm index fe49d3b6..48744fab 100644 --- a/wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm +++ b/wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm @@ -3,7 +3,7 @@ - + - - - - - - + + + + + + + @@ -29,16 +29,7 @@ - + @@ -214,6 +205,41 @@ +
    + {#media_dlg.embedded_audio_options} + + + + + + + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +
    +
    {#media_dlg.html5_audio_options} @@ -246,7 +272,7 @@ @@ -286,7 +312,6 @@
    -
    {#media_dlg.flash_options} diff --git a/wp-includes/js/tinymce/plugins/media/moxieplayer.swf b/wp-includes/js/tinymce/plugins/media/moxieplayer.swf index 2a040358..585d772d 100644 Binary files a/wp-includes/js/tinymce/plugins/media/moxieplayer.swf and b/wp-includes/js/tinymce/plugins/media/moxieplayer.swf differ diff --git a/wp-includes/js/tinymce/plugins/paste/blank.htm b/wp-includes/js/tinymce/plugins/paste/blank.htm deleted file mode 100644 index 4382a11c..00000000 --- a/wp-includes/js/tinymce/plugins/paste/blank.htm +++ /dev/null @@ -1,21 +0,0 @@ - - -blank_page - - - - - - - - diff --git a/wp-includes/js/tinymce/plugins/paste/editor_plugin.js b/wp-includes/js/tinymce/plugins/paste/editor_plugin.js index 4de97103..e47a5c63 100644 --- a/wp-includes/js/tinymce/plugins/paste/editor_plugin.js +++ b/wp-includes/js/tinymce/plugins/paste/editor_plugin.js @@ -1 +1 @@ -(function(){var c=tinymce.each,a={paste_auto_cleanup_on_paste:true,paste_enable_default_filters:true,paste_block_drop:false,paste_retain_style_properties:"none",paste_strip_class_attributes:"mso",paste_remove_spans:false,paste_remove_styles:false,paste_remove_styles_if_webkit:true,paste_convert_middot_lists:true,paste_convert_headers_to_strong:false,paste_dialog_width:"450",paste_dialog_height:"400",paste_text_use_dialog:false,paste_text_sticky:false,paste_text_sticky_default:false,paste_text_notifyalways:false,paste_text_linebreaktype:"p",paste_text_replacements:[[/\u2026/g,"..."],[/[\x93\x94\u201c\u201d]/g,'"'],[/[\x60\x91\x92\u2018\u2019]/g,"'"]]};function b(d,e){return d.getParam(e,a[e])}tinymce.create("tinymce.plugins.PastePlugin",{init:function(d,e){var f=this;f.editor=d;f.url=e;f.onPreProcess=new tinymce.util.Dispatcher(f);f.onPostProcess=new tinymce.util.Dispatcher(f);f.onPreProcess.add(f._preProcess);f.onPostProcess.add(f._postProcess);f.onPreProcess.add(function(i,j){d.execCallback("paste_preprocess",i,j)});f.onPostProcess.add(function(i,j){d.execCallback("paste_postprocess",i,j)});d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){return false}});d.pasteAsPlainText=b(d,"paste_text_sticky_default");function h(l,j){var k=d.dom,i;f.onPreProcess.dispatch(f,l);l.node=k.create("div",0,l.content);if(tinymce.isGecko){i=d.selection.getRng(true);if(i.startContainer==i.endContainer&&i.startContainer.nodeType==3){if(l.node.childNodes.length===1&&/^(p|h[1-6]|pre)$/i.test(l.node.firstChild.nodeName)&&l.content.indexOf("__MCE_ITEM__")===-1){k.remove(l.node.firstChild,true)}}}f.onPostProcess.dispatch(f,l);l.content=d.serializer.serialize(l.node,{getInner:1,forced_root_block:""});if((!j)&&(d.pasteAsPlainText)){f._insertPlainText(l.content);if(!b(d,"paste_text_sticky")){d.pasteAsPlainText=false;d.controlManager.setActive("pastetext",false)}}else{f._insert(l.content)}}d.addCommand("mceInsertClipboardContent",function(i,j){h(j,true)});if(!b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(j,i){var k=tinymce.util.Cookie;d.pasteAsPlainText=!d.pasteAsPlainText;d.controlManager.setActive("pastetext",d.pasteAsPlainText);if((d.pasteAsPlainText)&&(!k.get("tinymcePasteText"))){if(b(d,"paste_text_sticky")){d.windowManager.alert(d.translate("paste.plaintext_mode_sticky"))}else{d.windowManager.alert(d.translate("paste.plaintext_mode"))}if(!b(d,"paste_text_notifyalways")){k.set("tinymcePasteText","1",new Date(new Date().getFullYear()+1,12,31))}}})}d.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});d.addButton("selectall",{title:"paste.selectall_desc",cmd:"selectall"});function g(s){var l,p,j,t,k=d.selection,o=d.dom,q=d.getBody(),i,r;if(s.clipboardData||o.doc.dataTransfer){r=(s.clipboardData||o.doc.dataTransfer).getData("Text");if(d.pasteAsPlainText){s.preventDefault();h({content:o.encode(r).replace(/\r?\n/g,"
    ")});return}}if(o.get("_mcePaste")){return}l=o.add(q,"div",{id:"_mcePaste","class":"mcePaste","data-mce-bogus":"1"},"\uFEFF\uFEFF");if(q!=d.getDoc().body){i=o.getPos(d.selection.getStart(),q).y}else{i=q.scrollTop+o.getViewPort(d.getWin()).y}o.setStyles(l,{position:"absolute",left:tinymce.isGecko?-40:0,top:i-25,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){t=k.getRng();j=o.doc.body.createTextRange();j.moveToElementText(l);j.execCommand("Paste");o.remove(l);if(l.innerHTML==="\uFEFF\uFEFF"){d.execCommand("mcePasteWord");s.preventDefault();return}k.setRng(t);k.setContent("");setTimeout(function(){h({content:l.innerHTML})},0);return tinymce.dom.Event.cancel(s)}else{function m(n){n.preventDefault()}o.bind(d.getDoc(),"mousedown",m);o.bind(d.getDoc(),"keydown",m);p=d.selection.getRng();l=l.firstChild;j=d.getDoc().createRange();j.setStart(l,0);j.setEnd(l,2);k.setRng(j);window.setTimeout(function(){var u="",n;if(!o.select("div.mcePaste > div.mcePaste").length){n=o.select("div.mcePaste");c(n,function(w){var v=w.firstChild;if(v&&v.nodeName=="DIV"&&v.style.marginTop&&v.style.backgroundColor){o.remove(v,1)}c(o.select("span.Apple-style-span",w),function(x){o.remove(x,1)});c(o.select("br[data-mce-bogus]",w),function(x){o.remove(x)});if(w.parentNode.className!="mcePaste"){u+=w.innerHTML}})}else{u="

    "+o.encode(r).replace(/\r?\n\r?\n/g,"

    ").replace(/\r?\n/g,"
    ")+"

    "}c(o.select("div.mcePaste"),function(v){o.remove(v)});if(p){k.setRng(p)}h({content:u});o.unbind(d.getDoc(),"mousedown",m);o.unbind(d.getDoc(),"keydown",m)},0)}}if(b(d,"paste_auto_cleanup_on_paste")){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){g(j)}})}else{d.onPaste.addToTop(function(i,j){return g(j)})}}d.onInit.add(function(){d.controlManager.setActive("pastetext",d.pasteAsPlainText);if(b(d,"paste_block_drop")){d.dom.bind(d.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(i){i.preventDefault();i.stopPropagation();return false})}});f._legacySupport()},getInfo:function(){return{longname:"Paste text/word",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_preProcess:function(g,e){var k=this.editor,j=e.content,p=tinymce.grep,n=tinymce.explode,f=tinymce.trim,l,i;function d(h){c(h,function(o){if(o.constructor==RegExp){j=j.replace(o,"")}else{j=j.replace(o[0],o[1])}})}if(k.settings.paste_enable_default_filters==false){return}if(tinymce.isIE&&document.documentMode>=9){d([[/(?:
     [\s\r\n]+|
    )*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:
     [\s\r\n]+|
    )*/g,"$1"]]);d([[/

    /g,"

    "],[/
    /g," "],[/

    /g,"
    "]])}if(/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(j)||e.wordContent){e.wordContent=true;d([/^\s*( )+/gi,/( |]*>)+\s*$/gi]);if(b(k,"paste_convert_headers_to_strong")){j=j.replace(/

    ]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"

    $1

    ")}if(b(k,"paste_convert_middot_lists")){d([[//gi,"$&__MCE_ITEM__"],[/(]+(?:mso-list:|:\s*symbol)[^>]+>)/gi,"$1__MCE_ITEM__"],[/(]+(?:MsoListParagraph)[^>]+>)/gi,"$1__MCE_ITEM__"]])}d([//gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\u00a0"]]);do{l=j.length;j=j.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi,"$1")}while(l!=j.length);if(b(k,"paste_retain_style_properties").replace(/^none$/i,"").length==0){j=j.replace(/<\/?span[^>]*>/gi,"")}else{d([[/([\s\u00a0]*)<\/span>/gi,function(o,h){return(h.length>0)?h.replace(/./," ").slice(Math.floor(h.length/2)).split("").join("\u00a0"):""}],[/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,function(t,h,r){var u=[],o=0,q=n(f(r).replace(/"/gi,"'"),";");c(q,function(s){var w,y,z=n(s,":");function x(A){return A+((A!=="0")&&(/\d$/.test(A)))?"px":""}if(z.length==2){w=z[0].toLowerCase();y=z[1].toLowerCase();switch(w){case"mso-padding-alt":case"mso-padding-top-alt":case"mso-padding-right-alt":case"mso-padding-bottom-alt":case"mso-padding-left-alt":case"mso-margin-alt":case"mso-margin-top-alt":case"mso-margin-right-alt":case"mso-margin-bottom-alt":case"mso-margin-left-alt":case"mso-table-layout-alt":case"mso-height":case"mso-width":case"mso-vertical-align-alt":u[o++]=w.replace(/^mso-|-alt$/g,"")+":"+x(y);return;case"horiz-align":u[o++]="text-align:"+y;return;case"vert-align":u[o++]="vertical-align:"+y;return;case"font-color":case"mso-foreground":u[o++]="color:"+y;return;case"mso-background":case"mso-highlight":u[o++]="background:"+y;return;case"mso-default-height":u[o++]="min-height:"+x(y);return;case"mso-default-width":u[o++]="min-width:"+x(y);return;case"mso-padding-between-alt":u[o++]="border-collapse:separate;border-spacing:"+x(y);return;case"text-line-through":if((y=="single")||(y=="double")){u[o++]="text-decoration:line-through"}return;case"mso-zero-height":if(y=="yes"){u[o++]="display:none"}return}if(/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(w)){return}u[o++]=w+":"+z[1]}});if(o>0){return h+' style="'+u.join(";")+'"'}else{return h}}]])}}if(b(k,"paste_convert_headers_to_strong")){d([[/]*>/gi,"

    "],[/<\/h[1-6][^>]*>/gi,"

    "]])}d([[/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi,""]]);i=b(k,"paste_strip_class_attributes");if(i!=="none"){function m(q,o){if(i==="all"){return""}var h=p(n(o.replace(/^(["'])(.*)\1$/,"$2")," "),function(r){return(/^(?!mso)/i.test(r))});return h.length?' class="'+h.join(" ")+'"':""}j=j.replace(/ class="([^"]+)"/gi,m);j=j.replace(/ class=([\-\w]+)/gi,m)}if(b(k,"paste_remove_spans")){j=j.replace(/<\/?span[^>]*>/gi,"")}e.content=j},_postProcess:function(g,i){var f=this,e=f.editor,h=e.dom,d;if(e.settings.paste_enable_default_filters==false){return}if(i.wordContent){c(h.select("a",i.node),function(j){if(!j.href||j.href.indexOf("#_Toc")!=-1){h.remove(j,1)}});if(b(e,"paste_convert_middot_lists")){f._convertLists(g,i)}d=b(e,"paste_retain_style_properties");if((tinymce.is(d,"string"))&&(d!=="all")&&(d!=="*")){d=tinymce.explode(d.replace(/^none$/i,""));c(h.select("*",i.node),function(m){var n={},k=0,l,o,j;if(d){for(l=0;l0){h.setStyles(m,n)}else{if(m.nodeName=="SPAN"&&!m.className){h.remove(m,true)}}})}}if(b(e,"paste_remove_styles")||(b(e,"paste_remove_styles_if_webkit")&&tinymce.isWebKit)){c(h.select("*[style]",i.node),function(j){j.removeAttribute("style");j.removeAttribute("data-mce-style")})}else{if(tinymce.isWebKit){c(h.select("*",i.node),function(j){j.removeAttribute("data-mce-style")})}}},_convertLists:function(g,e){var i=g.editor.dom,h,l,d=-1,f,m=[],k,j;c(i.select("p",e.node),function(t){var q,u="",s,r,n,o;for(q=t.firstChild;q&&q.nodeType==3;q=q.nextSibling){u+=q.nodeValue}u=t.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/ /g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(u)){s="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(u)){s="ol"}if(s){f=parseFloat(t.style.marginLeft||0);if(f>d){m.push(f)}if(!h||s!=k){h=i.create(s);i.insertAfter(h,t)}else{if(f>d){h=l.appendChild(i.create(s))}else{if(f]*>/gi,"");if(s=="ul"&&/^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(p)){i.remove(v)}else{if(/^__MCE_ITEM__[\s\S]*\w+\.( |\u00a0)*\s*/.test(p)){i.remove(v)}}});r=t.innerHTML;if(s=="ul"){r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*( |\u00a0)+\s*/,"")}else{r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.( |\u00a0)+\s*/,"")}l=h.appendChild(i.create("li",0,r));i.remove(t);d=f;k=s}else{h=d=0}});j=e.node.innerHTML;if(j.indexOf("__MCE_ITEM__")!=-1){e.node.innerHTML=j.replace(/__MCE_ITEM__/g,"")}},_insert:function(f,d){var e=this.editor,g=e.selection.getRng();if(!e.selection.isCollapsed()&&g.startContainer!=g.endContainer){e.getDoc().execCommand("Delete",false,null)}e.execCommand("mceInsertContent",false,f,{skip_undo:d})},_insertPlainText:function(g){var d=this.editor,e=b(d,"paste_text_linebreaktype"),i=b(d,"paste_text_replacements"),f=tinymce.is;function h(j){c(j,function(k){if(k.constructor==RegExp){g=g.replace(k,"")}else{g=g.replace(k[0],k[1])}})}if((typeof(g)==="string")&&(g.length>0)){if(/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(g)){h([/[\n\r]+/g])}else{h([/\r+/g])}h([[/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi,"\n\n"],[/]*>|<\/tr>/gi,"\n"],[/<\/t[dh]>\s*]*>/gi,"\t"],/<[a-z!\/?][^>]*>/gi,[/ /gi," "],[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi,"$1"],[/\n{3,}/g,"\n\n"]]);g=d.dom.decode(tinymce.html.Entities.encodeRaw(g));if(f(i,"array")){h(i)}else{if(f(i,"string")){h(new RegExp(i,"gi"))}}if(e=="none"){h([[/\n+/g," "]])}else{if(e=="br"){h([[/\n/g,"
    "]])}else{h([[/\n\n/g,"

    "],[/^(.*<\/p>)(

    )$/,"

    $1"],[/\n/g,"
    "]])}}d.execCommand("mceInsertContent",false,g)}},_legacySupport:function(){var e=this,d=e.editor;d.addCommand("mcePasteWord",function(){d.windowManager.open({file:e.url+"/pasteword.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})});if(b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(){d.windowManager.open({file:e.url+"/pastetext.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})})}d.addButton("pasteword",{title:"paste.paste_word_desc",cmd:"mcePasteWord"})}});tinymce.PluginManager.add("paste",tinymce.plugins.PastePlugin)})(); \ No newline at end of file +(function(){var c=tinymce.each,a={paste_auto_cleanup_on_paste:true,paste_enable_default_filters:true,paste_block_drop:false,paste_retain_style_properties:"none",paste_strip_class_attributes:"mso",paste_remove_spans:false,paste_remove_styles:false,paste_remove_styles_if_webkit:true,paste_convert_middot_lists:true,paste_convert_headers_to_strong:false,paste_dialog_width:"450",paste_dialog_height:"400",paste_text_use_dialog:false,paste_text_sticky:false,paste_text_sticky_default:false,paste_text_notifyalways:false,paste_text_linebreaktype:"combined",paste_text_replacements:[[/\u2026/g,"..."],[/[\x93\x94\u201c\u201d]/g,'"'],[/[\x60\x91\x92\u2018\u2019]/g,"'"]]};function b(d,e){return d.getParam(e,a[e])}tinymce.create("tinymce.plugins.PastePlugin",{init:function(d,e){var f=this;f.editor=d;f.url=e;f.onPreProcess=new tinymce.util.Dispatcher(f);f.onPostProcess=new tinymce.util.Dispatcher(f);f.onPreProcess.add(f._preProcess);f.onPostProcess.add(f._postProcess);f.onPreProcess.add(function(i,j){d.execCallback("paste_preprocess",i,j)});f.onPostProcess.add(function(i,j){d.execCallback("paste_postprocess",i,j)});d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){return false}});d.pasteAsPlainText=b(d,"paste_text_sticky_default");function h(l,j){var k=d.dom,i;f.onPreProcess.dispatch(f,l);l.node=k.create("div",0,l.content);if(tinymce.isGecko){i=d.selection.getRng(true);if(i.startContainer==i.endContainer&&i.startContainer.nodeType==3){if(l.node.childNodes.length===1&&/^(p|h[1-6]|pre)$/i.test(l.node.firstChild.nodeName)&&l.content.indexOf("__MCE_ITEM__")===-1){k.remove(l.node.firstChild,true)}}}f.onPostProcess.dispatch(f,l);l.content=d.serializer.serialize(l.node,{getInner:1,forced_root_block:""});if((!j)&&(d.pasteAsPlainText)){f._insertPlainText(l.content);if(!b(d,"paste_text_sticky")){d.pasteAsPlainText=false;d.controlManager.setActive("pastetext",false)}}else{f._insert(l.content)}}d.addCommand("mceInsertClipboardContent",function(i,j){h(j,true)});if(!b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(j,i){var k=tinymce.util.Cookie;d.pasteAsPlainText=!d.pasteAsPlainText;d.controlManager.setActive("pastetext",d.pasteAsPlainText);if((d.pasteAsPlainText)&&(!k.get("tinymcePasteText"))){if(b(d,"paste_text_sticky")){d.windowManager.alert(d.translate("paste.plaintext_mode_sticky"))}else{d.windowManager.alert(d.translate("paste.plaintext_mode"))}if(!b(d,"paste_text_notifyalways")){k.set("tinymcePasteText","1",new Date(new Date().getFullYear()+1,12,31))}}})}d.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});d.addButton("selectall",{title:"paste.selectall_desc",cmd:"selectall"});function g(s){var l,p,j,t,k=d.selection,o=d.dom,q=d.getBody(),i,r;if(s.clipboardData||o.doc.dataTransfer){r=(s.clipboardData||o.doc.dataTransfer).getData("Text");if(d.pasteAsPlainText){s.preventDefault();h({content:o.encode(r).replace(/\r?\n/g,"
    ")});return}}if(o.get("_mcePaste")){return}l=o.add(q,"div",{id:"_mcePaste","class":"mcePaste","data-mce-bogus":"1"},"\uFEFF\uFEFF");if(q!=d.getDoc().body){i=o.getPos(d.selection.getStart(),q).y}else{i=q.scrollTop+o.getViewPort(d.getWin()).y}o.setStyles(l,{position:"absolute",left:tinymce.isGecko?-40:0,top:i-25,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){t=k.getRng();j=o.doc.body.createTextRange();j.moveToElementText(l);j.execCommand("Paste");o.remove(l);if(l.innerHTML==="\uFEFF\uFEFF"){d.execCommand("mcePasteWord");s.preventDefault();return}k.setRng(t);k.setContent("");setTimeout(function(){h({content:l.innerHTML})},0);return tinymce.dom.Event.cancel(s)}else{function m(n){n.preventDefault()}o.bind(d.getDoc(),"mousedown",m);o.bind(d.getDoc(),"keydown",m);p=d.selection.getRng();l=l.firstChild;j=d.getDoc().createRange();j.setStart(l,0);j.setEnd(l,2);k.setRng(j);window.setTimeout(function(){var u="",n;if(!o.select("div.mcePaste > div.mcePaste").length){n=o.select("div.mcePaste");c(n,function(w){var v=w.firstChild;if(v&&v.nodeName=="DIV"&&v.style.marginTop&&v.style.backgroundColor){o.remove(v,1)}c(o.select("span.Apple-style-span",w),function(x){o.remove(x,1)});c(o.select("br[data-mce-bogus]",w),function(x){o.remove(x)});if(w.parentNode.className!="mcePaste"){u+=w.innerHTML}})}else{u="

    "+o.encode(r).replace(/\r?\n\r?\n/g,"

    ").replace(/\r?\n/g,"
    ")+"

    "}c(o.select("div.mcePaste"),function(v){o.remove(v)});if(p){k.setRng(p)}h({content:u});o.unbind(d.getDoc(),"mousedown",m);o.unbind(d.getDoc(),"keydown",m)},0)}}if(b(d,"paste_auto_cleanup_on_paste")){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){g(j)}})}else{d.onPaste.addToTop(function(i,j){return g(j)})}}d.onInit.add(function(){d.controlManager.setActive("pastetext",d.pasteAsPlainText);if(b(d,"paste_block_drop")){d.dom.bind(d.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(i){i.preventDefault();i.stopPropagation();return false})}});f._legacySupport()},getInfo:function(){return{longname:"Paste text/word",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_preProcess:function(g,e){var k=this.editor,j=e.content,p=tinymce.grep,n=tinymce.explode,f=tinymce.trim,l,i;function d(h){c(h,function(o){if(o.constructor==RegExp){j=j.replace(o,"")}else{j=j.replace(o[0],o[1])}})}if(k.settings.paste_enable_default_filters==false){return}if(tinymce.isIE&&document.documentMode>=9){d([[/(?:
     [\s\r\n]+|
    )*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:
     [\s\r\n]+|
    )*/g,"$1"]]);d([[/

    /g,"

    "],[/
    /g," "],[/

    /g,"
    "]])}if(/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(j)||e.wordContent){e.wordContent=true;d([/^\s*( )+/gi,/( |]*>)+\s*$/gi]);if(b(k,"paste_convert_headers_to_strong")){j=j.replace(/

    ]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"

    $1

    ")}if(b(k,"paste_convert_middot_lists")){d([[//gi,"$&__MCE_ITEM__"],[/(]+(?:mso-list:|:\s*symbol)[^>]+>)/gi,"$1__MCE_ITEM__"],[/(]+(?:MsoListParagraph)[^>]+>)/gi,"$1__MCE_ITEM__"]])}d([//gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\u00a0"]]);do{l=j.length;j=j.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi,"$1")}while(l!=j.length);if(b(k,"paste_retain_style_properties").replace(/^none$/i,"").length==0){j=j.replace(/<\/?span[^>]*>/gi,"")}else{d([[/([\s\u00a0]*)<\/span>/gi,function(o,h){return(h.length>0)?h.replace(/./," ").slice(Math.floor(h.length/2)).split("").join("\u00a0"):""}],[/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,function(t,h,r){var u=[],o=0,q=n(f(r).replace(/"/gi,"'"),";");c(q,function(s){var w,y,z=n(s,":");function x(A){return A+((A!=="0")&&(/\d$/.test(A)))?"px":""}if(z.length==2){w=z[0].toLowerCase();y=z[1].toLowerCase();switch(w){case"mso-padding-alt":case"mso-padding-top-alt":case"mso-padding-right-alt":case"mso-padding-bottom-alt":case"mso-padding-left-alt":case"mso-margin-alt":case"mso-margin-top-alt":case"mso-margin-right-alt":case"mso-margin-bottom-alt":case"mso-margin-left-alt":case"mso-table-layout-alt":case"mso-height":case"mso-width":case"mso-vertical-align-alt":u[o++]=w.replace(/^mso-|-alt$/g,"")+":"+x(y);return;case"horiz-align":u[o++]="text-align:"+y;return;case"vert-align":u[o++]="vertical-align:"+y;return;case"font-color":case"mso-foreground":u[o++]="color:"+y;return;case"mso-background":case"mso-highlight":u[o++]="background:"+y;return;case"mso-default-height":u[o++]="min-height:"+x(y);return;case"mso-default-width":u[o++]="min-width:"+x(y);return;case"mso-padding-between-alt":u[o++]="border-collapse:separate;border-spacing:"+x(y);return;case"text-line-through":if((y=="single")||(y=="double")){u[o++]="text-decoration:line-through"}return;case"mso-zero-height":if(y=="yes"){u[o++]="display:none"}return}if(/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(w)){return}u[o++]=w+":"+z[1]}});if(o>0){return h+' style="'+u.join(";")+'"'}else{return h}}]])}}if(b(k,"paste_convert_headers_to_strong")){d([[/]*>/gi,"

    "],[/<\/h[1-6][^>]*>/gi,"

    "]])}d([[/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi,""]]);i=b(k,"paste_strip_class_attributes");if(i!=="none"){function m(q,o){if(i==="all"){return""}var h=p(n(o.replace(/^(["'])(.*)\1$/,"$2")," "),function(r){return(/^(?!mso)/i.test(r))});return h.length?' class="'+h.join(" ")+'"':""}j=j.replace(/ class="([^"]+)"/gi,m);j=j.replace(/ class=([\-\w]+)/gi,m)}if(b(k,"paste_remove_spans")){j=j.replace(/<\/?span[^>]*>/gi,"")}e.content=j},_postProcess:function(g,i){var f=this,e=f.editor,h=e.dom,d;if(e.settings.paste_enable_default_filters==false){return}if(i.wordContent){c(h.select("a",i.node),function(j){if(!j.href||j.href.indexOf("#_Toc")!=-1){h.remove(j,1)}});if(b(e,"paste_convert_middot_lists")){f._convertLists(g,i)}d=b(e,"paste_retain_style_properties");if((tinymce.is(d,"string"))&&(d!=="all")&&(d!=="*")){d=tinymce.explode(d.replace(/^none$/i,""));c(h.select("*",i.node),function(m){var n={},k=0,l,o,j;if(d){for(l=0;l0){h.setStyles(m,n)}else{if(m.nodeName=="SPAN"&&!m.className){h.remove(m,true)}}})}}if(b(e,"paste_remove_styles")||(b(e,"paste_remove_styles_if_webkit")&&tinymce.isWebKit)){c(h.select("*[style]",i.node),function(j){j.removeAttribute("style");j.removeAttribute("data-mce-style")})}else{if(tinymce.isWebKit){c(h.select("*",i.node),function(j){j.removeAttribute("data-mce-style")})}}},_convertLists:function(g,e){var i=g.editor.dom,h,l,d=-1,f,m=[],k,j;c(i.select("p",e.node),function(t){var q,u="",s,r,n,o;for(q=t.firstChild;q&&q.nodeType==3;q=q.nextSibling){u+=q.nodeValue}u=t.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/ /g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(u)){s="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(u)){s="ol"}if(s){f=parseFloat(t.style.marginLeft||0);if(f>d){m.push(f)}if(!h||s!=k){h=i.create(s);i.insertAfter(h,t)}else{if(f>d){h=l.appendChild(i.create(s))}else{if(f]*>/gi,"");if(s=="ul"&&/^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(p)){i.remove(v)}else{if(/^__MCE_ITEM__[\s\S]*\w+\.( |\u00a0)*\s*/.test(p)){i.remove(v)}}});r=t.innerHTML;if(s=="ul"){r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*( |\u00a0)+\s*/,"")}else{r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.( |\u00a0)+\s*/,"")}l=h.appendChild(i.create("li",0,r));i.remove(t);d=f;k=s}else{h=d=0}});j=e.node.innerHTML;if(j.indexOf("__MCE_ITEM__")!=-1){e.node.innerHTML=j.replace(/__MCE_ITEM__/g,"")}},_insert:function(f,d){var e=this.editor,g=e.selection.getRng();if(!e.selection.isCollapsed()&&g.startContainer!=g.endContainer){e.getDoc().execCommand("Delete",false,null)}e.execCommand("mceInsertContent",false,f,{skip_undo:d})},_insertPlainText:function(g){var d=this.editor,e=b(d,"paste_text_linebreaktype"),i=b(d,"paste_text_replacements"),f=tinymce.is;function h(j){c(j,function(k){if(k.constructor==RegExp){g=g.replace(k,"")}else{g=g.replace(k[0],k[1])}})}if((typeof(g)==="string")&&(g.length>0)){if(/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(g)){h([/[\n\r]+/g])}else{h([/\r+/g])}h([[/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi,"\n\n"],[/]*>|<\/tr>/gi,"\n"],[/<\/t[dh]>\s*]*>/gi,"\t"],/<[a-z!\/?][^>]*>/gi,[/ /gi," "],[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi,"$1"],[/\n{3,}/g,"\n\n"]]);g=d.dom.decode(tinymce.html.Entities.encodeRaw(g));if(f(i,"array")){h(i)}else{if(f(i,"string")){h(new RegExp(i,"gi"))}}if(e=="none"){h([[/\n+/g," "]])}else{if(e=="br"){h([[/\n/g,"
    "]])}else{if(e=="p"){h([[/\n+/g,"

    "],[/^(.*<\/p>)(

    )$/,"

    $1"]])}else{h([[/\n\n/g,"

    "],[/^(.*<\/p>)(

    )$/,"

    $1"],[/\n/g,"
    "]])}}}d.execCommand("mceInsertContent",false,g)}},_legacySupport:function(){var e=this,d=e.editor;d.addCommand("mcePasteWord",function(){d.windowManager.open({file:e.url+"/pasteword.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})});if(b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(){d.windowManager.open({file:e.url+"/pastetext.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})})}d.addButton("pasteword",{title:"paste.paste_word_desc",cmd:"mcePasteWord"})}});tinymce.PluginManager.add("paste",tinymce.plugins.PastePlugin)})(); \ No newline at end of file diff --git a/wp-includes/js/tinymce/plugins/paste/editor_plugin_src.js b/wp-includes/js/tinymce/plugins/paste/editor_plugin_src.js new file mode 100644 index 00000000..cec4abf9 --- /dev/null +++ b/wp-includes/js/tinymce/plugins/paste/editor_plugin_src.js @@ -0,0 +1,871 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var each = tinymce.each, + defs = { + paste_auto_cleanup_on_paste : true, + paste_enable_default_filters : true, + paste_block_drop : false, + paste_retain_style_properties : "none", + paste_strip_class_attributes : "mso", + paste_remove_spans : false, + paste_remove_styles : false, + paste_remove_styles_if_webkit : true, + paste_convert_middot_lists : true, + paste_convert_headers_to_strong : false, + paste_dialog_width : "450", + paste_dialog_height : "400", + paste_text_use_dialog : false, + paste_text_sticky : false, + paste_text_sticky_default : false, + paste_text_notifyalways : false, + paste_text_linebreaktype : "combined", + paste_text_replacements : [ + [/\u2026/g, "..."], + [/[\x93\x94\u201c\u201d]/g, '"'], + [/[\x60\x91\x92\u2018\u2019]/g, "'"] + ] + }; + + function getParam(ed, name) { + return ed.getParam(name, defs[name]); + } + + tinymce.create('tinymce.plugins.PastePlugin', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + t.url = url; + + // Setup plugin events + t.onPreProcess = new tinymce.util.Dispatcher(t); + t.onPostProcess = new tinymce.util.Dispatcher(t); + + // Register default handlers + t.onPreProcess.add(t._preProcess); + t.onPostProcess.add(t._postProcess); + + // Register optional preprocess handler + t.onPreProcess.add(function(pl, o) { + ed.execCallback('paste_preprocess', pl, o); + }); + + // Register optional postprocess + t.onPostProcess.add(function(pl, o) { + ed.execCallback('paste_postprocess', pl, o); + }); + + ed.onKeyDown.addToTop(function(ed, e) { + // Block ctrl+v from adding an undo level since the default logic in tinymce.Editor will add that + if (((tinymce.isMac ? e.metaKey : e.ctrlKey) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45)) + return false; // Stop other listeners + }); + + // Initialize plain text flag + ed.pasteAsPlainText = getParam(ed, 'paste_text_sticky_default'); + + // This function executes the process handlers and inserts the contents + // force_rich overrides plain text mode set by user, important for pasting with execCommand + function process(o, force_rich) { + var dom = ed.dom, rng; + + // Execute pre process handlers + t.onPreProcess.dispatch(t, o); + + // Create DOM structure + o.node = dom.create('div', 0, o.content); + + // If pasting inside the same element and the contents is only one block + // remove the block and keep the text since Firefox will copy parts of pre and h1-h6 as a pre element + if (tinymce.isGecko) { + rng = ed.selection.getRng(true); + if (rng.startContainer == rng.endContainer && rng.startContainer.nodeType == 3) { + // Is only one block node and it doesn't contain word stuff + if (o.node.childNodes.length === 1 && /^(p|h[1-6]|pre)$/i.test(o.node.firstChild.nodeName) && o.content.indexOf('__MCE_ITEM__') === -1) + dom.remove(o.node.firstChild, true); + } + } + + // Execute post process handlers + t.onPostProcess.dispatch(t, o); + + // Serialize content + o.content = ed.serializer.serialize(o.node, {getInner : 1, forced_root_block : ''}); + + // Plain text option active? + if ((!force_rich) && (ed.pasteAsPlainText)) { + t._insertPlainText(o.content); + + if (!getParam(ed, "paste_text_sticky")) { + ed.pasteAsPlainText = false; + ed.controlManager.setActive("pastetext", false); + } + } else { + t._insert(o.content); + } + } + + // Add command for external usage + ed.addCommand('mceInsertClipboardContent', function(u, o) { + process(o, true); + }); + + if (!getParam(ed, "paste_text_use_dialog")) { + ed.addCommand('mcePasteText', function(u, v) { + var cookie = tinymce.util.Cookie; + + ed.pasteAsPlainText = !ed.pasteAsPlainText; + ed.controlManager.setActive('pastetext', ed.pasteAsPlainText); + + if ((ed.pasteAsPlainText) && (!cookie.get("tinymcePasteText"))) { + if (getParam(ed, "paste_text_sticky")) { + ed.windowManager.alert(ed.translate('paste.plaintext_mode_sticky')); + } else { + ed.windowManager.alert(ed.translate('paste.plaintext_mode')); + } + + if (!getParam(ed, "paste_text_notifyalways")) { + cookie.set("tinymcePasteText", "1", new Date(new Date().getFullYear() + 1, 12, 31)) + } + } + }); + } + + ed.addButton('pastetext', {title: 'paste.paste_text_desc', cmd: 'mcePasteText'}); + ed.addButton('selectall', {title: 'paste.selectall_desc', cmd: 'selectall'}); + + // This function grabs the contents from the clipboard by adding a + // hidden div and placing the caret inside it and after the browser paste + // is done it grabs that contents and processes that + function grabContent(e) { + var n, or, rng, oldRng, sel = ed.selection, dom = ed.dom, body = ed.getBody(), posY, textContent; + + // Check if browser supports direct plaintext access + if (e.clipboardData || dom.doc.dataTransfer) { + textContent = (e.clipboardData || dom.doc.dataTransfer).getData('Text'); + + if (ed.pasteAsPlainText) { + e.preventDefault(); + process({content : dom.encode(textContent).replace(/\r?\n/g, '
    ')}); + return; + } + } + + if (dom.get('_mcePaste')) + return; + + // Create container to paste into + n = dom.add(body, 'div', {id : '_mcePaste', 'class' : 'mcePaste', 'data-mce-bogus' : '1'}, '\uFEFF\uFEFF'); + + // If contentEditable mode we need to find out the position of the closest element + if (body != ed.getDoc().body) + posY = dom.getPos(ed.selection.getStart(), body).y; + else + posY = body.scrollTop + dom.getViewPort(ed.getWin()).y; + + // Styles needs to be applied after the element is added to the document since WebKit will otherwise remove all styles + // If also needs to be in view on IE or the paste would fail + dom.setStyles(n, { + position : 'absolute', + left : tinymce.isGecko ? -40 : 0, // Need to move it out of site on Gecko since it will othewise display a ghost resize rect for the div + top : posY - 25, + width : 1, + height : 1, + overflow : 'hidden' + }); + + if (tinymce.isIE) { + // Store away the old range + oldRng = sel.getRng(); + + // Select the container + rng = dom.doc.body.createTextRange(); + rng.moveToElementText(n); + rng.execCommand('Paste'); + + // Remove container + dom.remove(n); + + // Check if the contents was changed, if it wasn't then clipboard extraction failed probably due + // to IE security settings so we pass the junk though better than nothing right + if (n.innerHTML === '\uFEFF\uFEFF') { + ed.execCommand('mcePasteWord'); + e.preventDefault(); + return; + } + + // Restore the old range and clear the contents before pasting + sel.setRng(oldRng); + sel.setContent(''); + + // For some odd reason we need to detach the the mceInsertContent call from the paste event + // It's like IE has a reference to the parent element that you paste in and the selection gets messed up + // when it tries to restore the selection + setTimeout(function() { + // Process contents + process({content : n.innerHTML}); + }, 0); + + // Block the real paste event + return tinymce.dom.Event.cancel(e); + } else { + function block(e) { + e.preventDefault(); + }; + + // Block mousedown and click to prevent selection change + dom.bind(ed.getDoc(), 'mousedown', block); + dom.bind(ed.getDoc(), 'keydown', block); + + or = ed.selection.getRng(); + + // Move select contents inside DIV + n = n.firstChild; + rng = ed.getDoc().createRange(); + rng.setStart(n, 0); + rng.setEnd(n, 2); + sel.setRng(rng); + + // Wait a while and grab the pasted contents + window.setTimeout(function() { + var h = '', nl; + + // Paste divs duplicated in paste divs seems to happen when you paste plain text so lets first look for that broken behavior in WebKit + if (!dom.select('div.mcePaste > div.mcePaste').length) { + nl = dom.select('div.mcePaste'); + + // WebKit will split the div into multiple ones so this will loop through then all and join them to get the whole HTML string + each(nl, function(n) { + var child = n.firstChild; + + // WebKit inserts a DIV container with lots of odd styles + if (child && child.nodeName == 'DIV' && child.style.marginTop && child.style.backgroundColor) { + dom.remove(child, 1); + } + + // Remove apply style spans + each(dom.select('span.Apple-style-span', n), function(n) { + dom.remove(n, 1); + }); + + // Remove bogus br elements + each(dom.select('br[data-mce-bogus]', n), function(n) { + dom.remove(n); + }); + + // WebKit will make a copy of the DIV for each line of plain text pasted and insert them into the DIV + if (n.parentNode.className != 'mcePaste') + h += n.innerHTML; + }); + } else { + // Found WebKit weirdness so force the content into paragraphs this seems to happen when you paste plain text from Nodepad etc + // So this logic will replace double enter with paragraphs and single enter with br so it kind of looks the same + h = '

    ' + dom.encode(textContent).replace(/\r?\n\r?\n/g, '

    ').replace(/\r?\n/g, '
    ') + '

    '; + } + + // Remove the nodes + each(dom.select('div.mcePaste'), function(n) { + dom.remove(n); + }); + + // Restore the old selection + if (or) + sel.setRng(or); + + process({content : h}); + + // Unblock events ones we got the contents + dom.unbind(ed.getDoc(), 'mousedown', block); + dom.unbind(ed.getDoc(), 'keydown', block); + }, 0); + } + } + + // Check if we should use the new auto process method + if (getParam(ed, "paste_auto_cleanup_on_paste")) { + // Is it's Opera or older FF use key handler + if (tinymce.isOpera || /Firefox\/2/.test(navigator.userAgent)) { + ed.onKeyDown.addToTop(function(ed, e) { + if (((tinymce.isMac ? e.metaKey : e.ctrlKey) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45)) + grabContent(e); + }); + } else { + // Grab contents on paste event on Gecko and WebKit + ed.onPaste.addToTop(function(ed, e) { + return grabContent(e); + }); + } + } + + ed.onInit.add(function() { + ed.controlManager.setActive("pastetext", ed.pasteAsPlainText); + + // Block all drag/drop events + if (getParam(ed, "paste_block_drop")) { + ed.dom.bind(ed.getBody(), ['dragend', 'dragover', 'draggesture', 'dragdrop', 'drop', 'drag'], function(e) { + e.preventDefault(); + e.stopPropagation(); + + return false; + }); + } + }); + + // Add legacy support + t._legacySupport(); + }, + + getInfo : function() { + return { + longname : 'Paste text/word', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + _preProcess : function(pl, o) { + var ed = this.editor, + h = o.content, + grep = tinymce.grep, + explode = tinymce.explode, + trim = tinymce.trim, + len, stripClass; + + //console.log('Before preprocess:' + o.content); + + function process(items) { + each(items, function(v) { + // Remove or replace + if (v.constructor == RegExp) + h = h.replace(v, ''); + else + h = h.replace(v[0], v[1]); + }); + } + + if (ed.settings.paste_enable_default_filters == false) { + return; + } + + // IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser + if (tinymce.isIE && document.documentMode >= 9) { + // IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser + process([[/(?:
     [\s\r\n]+|
    )*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:
     [\s\r\n]+|
    )*/g, '$1']]); + + // IE9 also adds an extra BR element for each soft-linefeed and it also adds a BR for each word wrap break + process([ + [/

    /g, '

    '], // Replace multiple BR elements with uppercase BR to keep them intact + [/
    /g, ' '], // Replace single br elements with space since they are word wrap BR:s + [/

    /g, '
    '] // Replace back the double brs but into a single BR + ]); + } + + // Detect Word content and process it more aggressive + if (/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(h) || o.wordContent) { + o.wordContent = true; // Mark the pasted contents as word specific content + //console.log('Word contents detected.'); + + // Process away some basic content + process([ + /^\s*( )+/gi, //   entities at the start of contents + /( |]*>)+\s*$/gi //   entities at the end of contents + ]); + + if (getParam(ed, "paste_convert_headers_to_strong")) { + h = h.replace(/

    ]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi, "

    $1

    "); + } + + if (getParam(ed, "paste_convert_middot_lists")) { + process([ + [//gi, '$&__MCE_ITEM__'], // Convert supportLists to a list item marker + [/(]+(?:mso-list:|:\s*symbol)[^>]+>)/gi, '$1__MCE_ITEM__'], // Convert mso-list and symbol spans to item markers + [/(]+(?:MsoListParagraph)[^>]+>)/gi, '$1__MCE_ITEM__'] // Convert mso-list and symbol paragraphs to item markers (FF) + ]); + } + + process([ + // Word comments like conditional comments etc + //gi, + + // Remove comments, scripts (e.g., msoShowComment), XML tag, VML content, MS Office namespaced tags, and a few other tags + /<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi, + + // Convert into for line-though + [/<(\/?)s>/gi, "<$1strike>"], + + // Replace nsbp entites to char since it's easier to handle + [/ /gi, "\u00a0"] + ]); + + // Remove bad attributes, with or without quotes, ensuring that attribute text is really inside a tag. + // If JavaScript had a RegExp look-behind, we could have integrated this with the last process() array and got rid of the loop. But alas, it does not, so we cannot. + do { + len = h.length; + h = h.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi, "$1"); + } while (len != h.length); + + // Remove all spans if no styles is to be retained + if (getParam(ed, "paste_retain_style_properties").replace(/^none$/i, "").length == 0) { + h = h.replace(/<\/?span[^>]*>/gi, ""); + } else { + // We're keeping styles, so at least clean them up. + // CSS Reference: http://msdn.microsoft.com/en-us/library/aa155477.aspx + + process([ + // Convert ___ to string of alternating breaking/non-breaking spaces of same length + [/([\s\u00a0]*)<\/span>/gi, + function(str, spaces) { + return (spaces.length > 0)? spaces.replace(/./, " ").slice(Math.floor(spaces.length/2)).split("").join("\u00a0") : ""; + } + ], + + // Examine all styles: delete junk, transform some, and keep the rest + [/(<[a-z][^>]*)\sstyle="([^"]*)"/gi, + function(str, tag, style) { + var n = [], + i = 0, + s = explode(trim(style).replace(/"/gi, "'"), ";"); + + // Examine each style definition within the tag's style attribute + each(s, function(v) { + var name, value, + parts = explode(v, ":"); + + function ensureUnits(v) { + return v + ((v !== "0") && (/\d$/.test(v)))? "px" : ""; + } + + if (parts.length == 2) { + name = parts[0].toLowerCase(); + value = parts[1].toLowerCase(); + + // Translate certain MS Office styles into their CSS equivalents + switch (name) { + case "mso-padding-alt": + case "mso-padding-top-alt": + case "mso-padding-right-alt": + case "mso-padding-bottom-alt": + case "mso-padding-left-alt": + case "mso-margin-alt": + case "mso-margin-top-alt": + case "mso-margin-right-alt": + case "mso-margin-bottom-alt": + case "mso-margin-left-alt": + case "mso-table-layout-alt": + case "mso-height": + case "mso-width": + case "mso-vertical-align-alt": + n[i++] = name.replace(/^mso-|-alt$/g, "") + ":" + ensureUnits(value); + return; + + case "horiz-align": + n[i++] = "text-align:" + value; + return; + + case "vert-align": + n[i++] = "vertical-align:" + value; + return; + + case "font-color": + case "mso-foreground": + n[i++] = "color:" + value; + return; + + case "mso-background": + case "mso-highlight": + n[i++] = "background:" + value; + return; + + case "mso-default-height": + n[i++] = "min-height:" + ensureUnits(value); + return; + + case "mso-default-width": + n[i++] = "min-width:" + ensureUnits(value); + return; + + case "mso-padding-between-alt": + n[i++] = "border-collapse:separate;border-spacing:" + ensureUnits(value); + return; + + case "text-line-through": + if ((value == "single") || (value == "double")) { + n[i++] = "text-decoration:line-through"; + } + return; + + case "mso-zero-height": + if (value == "yes") { + n[i++] = "display:none"; + } + return; + } + + // Eliminate all MS Office style definitions that have no CSS equivalent by examining the first characters in the name + if (/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(name)) { + return; + } + + // If it reached this point, it must be a valid CSS style + n[i++] = name + ":" + parts[1]; // Lower-case name, but keep value case + } + }); + + // If style attribute contained any valid styles the re-write it; otherwise delete style attribute. + if (i > 0) { + return tag + ' style="' + n.join(';') + '"'; + } else { + return tag; + } + } + ] + ]); + } + } + + // Replace headers with + if (getParam(ed, "paste_convert_headers_to_strong")) { + process([ + [/]*>/gi, "

    "], + [/<\/h[1-6][^>]*>/gi, "

    "] + ]); + } + + process([ + // Copy paste from Java like Open Office will produce this junk on FF + [/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi, ''] + ]); + + // Class attribute options are: leave all as-is ("none"), remove all ("all"), or remove only those starting with mso ("mso"). + // Note:- paste_strip_class_attributes: "none", verify_css_classes: true is also a good variation. + stripClass = getParam(ed, "paste_strip_class_attributes"); + + if (stripClass !== "none") { + function removeClasses(match, g1) { + if (stripClass === "all") + return ''; + + var cls = grep(explode(g1.replace(/^(["'])(.*)\1$/, "$2"), " "), + function(v) { + return (/^(?!mso)/i.test(v)); + } + ); + + return cls.length ? ' class="' + cls.join(" ") + '"' : ''; + }; + + h = h.replace(/ class="([^"]+)"/gi, removeClasses); + h = h.replace(/ class=([\-\w]+)/gi, removeClasses); + } + + // Remove spans option + if (getParam(ed, "paste_remove_spans")) { + h = h.replace(/<\/?span[^>]*>/gi, ""); + } + + //console.log('After preprocess:' + h); + + o.content = h; + }, + + /** + * Various post process items. + */ + _postProcess : function(pl, o) { + var t = this, ed = t.editor, dom = ed.dom, styleProps; + + if (ed.settings.paste_enable_default_filters == false) { + return; + } + + if (o.wordContent) { + // Remove named anchors or TOC links + each(dom.select('a', o.node), function(a) { + if (!a.href || a.href.indexOf('#_Toc') != -1) + dom.remove(a, 1); + }); + + if (getParam(ed, "paste_convert_middot_lists")) { + t._convertLists(pl, o); + } + + // Process styles + styleProps = getParam(ed, "paste_retain_style_properties"); // retained properties + + // Process only if a string was specified and not equal to "all" or "*" + if ((tinymce.is(styleProps, "string")) && (styleProps !== "all") && (styleProps !== "*")) { + styleProps = tinymce.explode(styleProps.replace(/^none$/i, "")); + + // Retains some style properties + each(dom.select('*', o.node), function(el) { + var newStyle = {}, npc = 0, i, sp, sv; + + // Store a subset of the existing styles + if (styleProps) { + for (i = 0; i < styleProps.length; i++) { + sp = styleProps[i]; + sv = dom.getStyle(el, sp); + + if (sv) { + newStyle[sp] = sv; + npc++; + } + } + } + + // Remove all of the existing styles + dom.setAttrib(el, 'style', ''); + + if (styleProps && npc > 0) + dom.setStyles(el, newStyle); // Add back the stored subset of styles + else // Remove empty span tags that do not have class attributes + if (el.nodeName == 'SPAN' && !el.className) + dom.remove(el, true); + }); + } + } + + // Remove all style information or only specifically on WebKit to avoid the style bug on that browser + if (getParam(ed, "paste_remove_styles") || (getParam(ed, "paste_remove_styles_if_webkit") && tinymce.isWebKit)) { + each(dom.select('*[style]', o.node), function(el) { + el.removeAttribute('style'); + el.removeAttribute('data-mce-style'); + }); + } else { + if (tinymce.isWebKit) { + // We need to compress the styles on WebKit since if you paste it will become + // Removing the mce_style that contains the real value will force the Serializer engine to compress the styles + each(dom.select('*', o.node), function(el) { + el.removeAttribute('data-mce-style'); + }); + } + } + }, + + /** + * Converts the most common bullet and number formats in Office into a real semantic UL/LI list. + */ + _convertLists : function(pl, o) { + var dom = pl.editor.dom, listElm, li, lastMargin = -1, margin, levels = [], lastType, html; + + // Convert middot lists into real semantic lists + each(dom.select('p', o.node), function(p) { + var sib, val = '', type, html, idx, parents; + + // Get text node value at beginning of paragraph + for (sib = p.firstChild; sib && sib.nodeType == 3; sib = sib.nextSibling) + val += sib.nodeValue; + + val = p.innerHTML.replace(/<\/?\w+[^>]*>/gi, '').replace(/ /g, '\u00a0'); + + // Detect unordered lists look for bullets + if (/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(val)) + type = 'ul'; + + // Detect ordered lists 1., a. or ixv. + if (/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(val)) + type = 'ol'; + + // Check if node value matches the list pattern: o   + if (type) { + margin = parseFloat(p.style.marginLeft || 0); + + if (margin > lastMargin) + levels.push(margin); + + if (!listElm || type != lastType) { + listElm = dom.create(type); + dom.insertAfter(listElm, p); + } else { + // Nested list element + if (margin > lastMargin) { + listElm = li.appendChild(dom.create(type)); + } else if (margin < lastMargin) { + // Find parent level based on margin value + idx = tinymce.inArray(levels, margin); + parents = dom.getParents(listElm.parentNode, type); + listElm = parents[parents.length - 1 - idx] || listElm; + } + } + + // Remove middot or number spans if they exists + each(dom.select('span', p), function(span) { + var html = span.innerHTML.replace(/<\/?\w+[^>]*>/gi, ''); + + // Remove span with the middot or the number + if (type == 'ul' && /^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(html)) + dom.remove(span); + else if (/^__MCE_ITEM__[\s\S]*\w+\.( |\u00a0)*\s*/.test(html)) + dom.remove(span); + }); + + html = p.innerHTML; + + // Remove middot/list items + if (type == 'ul') + html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*( |\u00a0)+\s*/, ''); + else + html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^\s*\w+\.( |\u00a0)+\s*/, ''); + + // Create li and add paragraph data into the new li + li = listElm.appendChild(dom.create('li', 0, html)); + dom.remove(p); + + lastMargin = margin; + lastType = type; + } else + listElm = lastMargin = 0; // End list element + }); + + // Remove any left over makers + html = o.node.innerHTML; + if (html.indexOf('__MCE_ITEM__') != -1) + o.node.innerHTML = html.replace(/__MCE_ITEM__/g, ''); + }, + + /** + * Inserts the specified contents at the caret position. + */ + _insert : function(h, skip_undo) { + var ed = this.editor, r = ed.selection.getRng(); + + // First delete the contents seems to work better on WebKit when the selection spans multiple list items or multiple table cells. + if (!ed.selection.isCollapsed() && r.startContainer != r.endContainer) + ed.getDoc().execCommand('Delete', false, null); + + ed.execCommand('mceInsertContent', false, h, {skip_undo : skip_undo}); + }, + + /** + * Instead of the old plain text method which tried to re-create a paste operation, the + * new approach adds a plain text mode toggle switch that changes the behavior of paste. + * This function is passed the same input that the regular paste plugin produces. + * It performs additional scrubbing and produces (and inserts) the plain text. + * This approach leverages all of the great existing functionality in the paste + * plugin, and requires minimal changes to add the new functionality. + * Speednet - June 2009 + */ + _insertPlainText : function(content) { + var ed = this.editor, + linebr = getParam(ed, "paste_text_linebreaktype"), + rl = getParam(ed, "paste_text_replacements"), + is = tinymce.is; + + function process(items) { + each(items, function(v) { + if (v.constructor == RegExp) + content = content.replace(v, ""); + else + content = content.replace(v[0], v[1]); + }); + }; + + if ((typeof(content) === "string") && (content.length > 0)) { + // If HTML content with line-breaking tags, then remove all cr/lf chars because only tags will break a line + if (/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(content)) { + process([ + /[\n\r]+/g + ]); + } else { + // Otherwise just get rid of carriage returns (only need linefeeds) + process([ + /\r+/g + ]); + } + + process([ + [/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi, "\n\n"], // Block tags get a blank line after them + [/]*>|<\/tr>/gi, "\n"], // Single linebreak for
    tags and table rows + [/<\/t[dh]>\s*]*>/gi, "\t"], // Table cells get tabs betweem them + /<[a-z!\/?][^>]*>/gi, // Delete all remaining tags + [/ /gi, " "], // Convert non-break spaces to regular spaces (remember, *plain text*) + [/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi, "$1"],// Cool little RegExp deletes whitespace around linebreak chars. + [/\n{3,}/g, "\n\n"] // Max. 2 consecutive linebreaks + ]); + + content = ed.dom.decode(tinymce.html.Entities.encodeRaw(content)); + + // Perform default or custom replacements + if (is(rl, "array")) { + process(rl); + } else if (is(rl, "string")) { + process(new RegExp(rl, "gi")); + } + + // Treat paragraphs as specified in the config + if (linebr == "none") { + // Convert all line breaks to space + process([ + [/\n+/g, " "] + ]); + } else if (linebr == "br") { + // Convert all line breaks to
    + process([ + [/\n/g, "
    "] + ]); + } else if (linebr == "p") { + // Convert all line breaks to

    ...

    + process([ + [/\n+/g, "

    "], + [/^(.*<\/p>)(

    )$/, '

    $1'] + ]); + } else { + // defaults to "combined" + // Convert single line breaks to
    and double line breaks to

    ...

    + process([ + [/\n\n/g, "

    "], + [/^(.*<\/p>)(

    )$/, '

    $1'], + [/\n/g, "
    "] + ]); + } + + ed.execCommand('mceInsertContent', false, content); + } + }, + + /** + * This method will open the old style paste dialogs. Some users might want the old behavior but still use the new cleanup engine. + */ + _legacySupport : function() { + var t = this, ed = t.editor; + + // Register command(s) for backwards compatibility + ed.addCommand("mcePasteWord", function() { + ed.windowManager.open({ + file: t.url + "/pasteword.htm", + width: parseInt(getParam(ed, "paste_dialog_width")), + height: parseInt(getParam(ed, "paste_dialog_height")), + inline: 1 + }); + }); + + if (getParam(ed, "paste_text_use_dialog")) { + ed.addCommand("mcePasteText", function() { + ed.windowManager.open({ + file : t.url + "/pastetext.htm", + width: parseInt(getParam(ed, "paste_dialog_width")), + height: parseInt(getParam(ed, "paste_dialog_height")), + inline : 1 + }); + }); + } + + // Register button for backwards compatibility + ed.addButton("pasteword", {title : "paste.paste_word_desc", cmd : "mcePasteWord"}); + } + }); + + // Register plugin + tinymce.PluginManager.add("paste", tinymce.plugins.PastePlugin); +})(); diff --git a/wp-includes/js/tinymce/plugins/paste/pastetext.htm b/wp-includes/js/tinymce/plugins/paste/pastetext.htm index dcf1a4b4..eb352ef3 100644 --- a/wp-includes/js/tinymce/plugins/paste/pastetext.htm +++ b/wp-includes/js/tinymce/plugins/paste/pastetext.htm @@ -1,8 +1,8 @@ {#paste.paste_text_desc} - - + + diff --git a/wp-includes/js/tinymce/plugins/paste/pasteword.htm b/wp-includes/js/tinymce/plugins/paste/pasteword.htm index 31583e3f..ee9b9e8f 100644 --- a/wp-includes/js/tinymce/plugins/paste/pasteword.htm +++ b/wp-includes/js/tinymce/plugins/paste/pasteword.htm @@ -1,8 +1,8 @@ {#paste.paste_word_desc} - - + + diff --git a/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin.js b/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin.js index f7cadd6e..71fbb68a 100644 --- a/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin.js +++ b/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin.js @@ -1 +1 @@ -(function(){var a=tinymce.util.JSONRequest,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.SpellcheckerPlugin",{getInfo:function(){return{longname:"Spellchecker",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker",version:tinymce.majorVersion+"."+tinymce.minorVersion}},init:function(e,f){var g=this,d;g.url=f;g.editor=e;g.rpcUrl=e.getParam("spellchecker_rpc_url",this.url+'/rpc.php');if(g.rpcUrl=="{backend}"){if(tinymce.isIE){return}g.hasSupport=true;e.onContextMenu.addToTop(function(h,i){if(g.active){return false}})}e.addCommand("mceSpellCheck",function(){if(g.rpcUrl=="{backend}"){g.editor.getBody().spellcheck=g.active=!g.active;return}if(!g.active){e.setProgressState(1);g._sendRPC("checkWords",[g.selectedLang,g._getWords()],function(h){if(h.length>0){g.active=1;g._markWords(h);e.setProgressState(0);e.nodeChanged()}else{e.setProgressState(0);if(e.getParam("spellchecker_report_no_misspellings",true)){e.windowManager.alert("spellchecker.no_mpell")}}})}else{g._done()}});if(e.settings.content_css!==false){e.contentCSS.push(f+"/css/content.css")}e.onClick.add(g._showMenu,g);e.onContextMenu.add(g._showMenu,g);e.onBeforeGetContent.add(function(){if(g.active){g._removeWords()}});e.onNodeChange.add(function(i,h){h.setActive("spellchecker",g.active)});e.onSetContent.add(function(){g._done()});e.onBeforeGetContent.add(function(){g._done()});e.onBeforeExecCommand.add(function(h,i){if(i=="mceFullScreen"){g._done()}});g.languages={};c(e.getParam("spellchecker_languages","+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv","hash"),function(i,h){if(h.indexOf("+")===0){h=h.substring(1);g.selectedLang=i}g.languages[h]=i})},createControl:function(h,d){var f=this,g,e=f.editor;if(h=="spellchecker"){if(f.rpcUrl=="{backend}"){if(f.hasSupport){g=d.createButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f})}return g}g=d.createSplitButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f});g.onRenderMenu.add(function(j,i){i.add({title:"spellchecker.langs","class":"mceMenuItemTitle"}).setDisabled(1);c(f.languages,function(n,m){var p={icon:1},l;p.onclick=function(){if(n==f.selectedLang){return}l.setSelected(1);f.selectedItem.setSelected(0);f.selectedItem=l;f.selectedLang=n};p.title=m;l=i.add(p);l.setSelected(n==f.selectedLang);if(n==f.selectedLang){f.selectedItem=l}})});return g}},_walk:function(i,g){var h=this.editor.getDoc(),e;if(h.createTreeWalker){e=h.createTreeWalker(i,NodeFilter.SHOW_TEXT,null,false);while((i=e.nextNode())!=null){g.call(this,i)}}else{tinymce.walk(i,g,"childNodes")}},_getSeparators:function(){var e="",d,f=this.editor.getParam("spellchecker_word_separator_chars",'\\s!"#$%&()*+,-./:;<=>?@[]^_{|}§©«®±¶·¸»¼½¾¿×÷¤\u201d\u201c');for(d=0;d$2");while((s=p.indexOf(""))!=-1){o=p.substring(0,s);if(o.length){r=j.createTextNode(f.decode(o));q.appendChild(r)}p=p.substring(s+10);s=p.indexOf("");o=p.substring(0,s);p=p.substring(s+11);q.appendChild(f.create("span",{"class":"mceItemHiddenSpellWord"},o))}if(p.length){r=j.createTextNode(f.decode(p));q.appendChild(r)}}else{q.innerHTML=p.replace(e,'$1$2')}f.replace(q,t)}});h.moveToBookmark(i)},_showMenu:function(h,j){var i=this,h=i.editor,d=i._menu,l,k=h.dom,g=k.getViewPort(h.getWin()),f=j.target;j=0;if(!d){d=h.controlManager.createDropMenu("spellcheckermenu",{"class":"mceNoIcons"});i._menu=d}if(k.hasClass(f,"mceItemHiddenSpellWord")){d.removeAll();d.add({title:"spellchecker.wait","class":"mceMenuItemTitle"}).setDisabled(1);i._sendRPC("getSuggestions",[i.selectedLang,k.decode(f.innerHTML)],function(m){var e;d.removeAll();if(m.length>0){d.add({title:"spellchecker.sug","class":"mceMenuItemTitle"}).setDisabled(1);c(m,function(n){d.add({title:n,onclick:function(){k.replace(h.getDoc().createTextNode(n),f);i._checkDone()}})});d.addSeparator()}else{d.add({title:"spellchecker.no_sug","class":"mceMenuItemTitle"}).setDisabled(1)}if(h.getParam("show_ignore_words",true)){e=i.editor.getParam("spellchecker_enable_ignore_rpc","");d.add({title:"spellchecker.ignore_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}}});d.add({title:"spellchecker.ignore_words",onclick:function(){var n=f.innerHTML;i._removeWords(k.decode(n));i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWords",[i.selectedLang,n],function(o){h.setProgressState(0)})}}})}if(i.editor.getParam("spellchecker_enable_learn_rpc")){d.add({title:"spellchecker.learn_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();h.setProgressState(1);i._sendRPC("learnWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}})}d.update()});l=b.getPos(h.getContentAreaContainer());d.settings.offset_x=l.x;d.settings.offset_y=l.y;h.selection.select(f);l=k.getPos(f);d.showMenu(l.x,l.y+f.offsetHeight-g.y);return tinymce.dom.Event.cancel(j)}else{d.hideMenu()}},_checkDone:function(){var e=this,d=e.editor,g=d.dom,f;c(g.select("span"),function(h){if(h&&g.hasClass(h,"mceItemHiddenSpellWord")){f=true;return false}});if(!f){e._done()}},_done:function(){var d=this,e=d.active;if(d.active){d.active=0;d._removeWords();if(d._menu){d._menu.hideMenu()}if(e){d.editor.nodeChanged()}}},_sendRPC:function(e,g,d){var f=this;a.sendRPC({url:f.rpcUrl,method:e,params:g,success:d,error:function(i,h){f.editor.setProgressState(0);f.editor.windowManager.alert(i.errstr||("Error response: "+h.responseText))}})}});tinymce.PluginManager.add("spellchecker",tinymce.plugins.SpellcheckerPlugin)})(); \ No newline at end of file +(function(){var a=tinymce.util.JSONRequest,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.SpellcheckerPlugin",{getInfo:function(){return{longname:"Spellchecker",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker",version:tinymce.majorVersion+"."+tinymce.minorVersion}},init:function(e,f){var g=this,d;g.url=f;g.editor=e;g.rpcUrl=e.getParam("spellchecker_rpc_url","{backend}");if(g.rpcUrl=="{backend}"){if(tinymce.isIE){return}g.hasSupport=true;e.onContextMenu.addToTop(function(h,i){if(g.active){return false}})}e.addCommand("mceSpellCheck",function(){if(g.rpcUrl=="{backend}"){g.editor.getBody().spellcheck=g.active=!g.active;return}if(!g.active){e.setProgressState(1);g._sendRPC("checkWords",[g.selectedLang,g._getWords()],function(h){if(h.length>0){g.active=1;g._markWords(h);e.setProgressState(0);e.nodeChanged()}else{e.setProgressState(0);if(e.getParam("spellchecker_report_no_misspellings",true)){e.windowManager.alert("spellchecker.no_mpell")}}})}else{g._done()}});if(e.settings.content_css!==false){e.contentCSS.push(f+"/css/content.css")}e.onClick.add(g._showMenu,g);e.onContextMenu.add(g._showMenu,g);e.onBeforeGetContent.add(function(){if(g.active){g._removeWords()}});e.onNodeChange.add(function(i,h){h.setActive("spellchecker",g.active)});e.onSetContent.add(function(){g._done()});e.onBeforeGetContent.add(function(){g._done()});e.onBeforeExecCommand.add(function(h,i){if(i=="mceFullScreen"){g._done()}});g.languages={};c(e.getParam("spellchecker_languages","+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv","hash"),function(i,h){if(h.indexOf("+")===0){h=h.substring(1);g.selectedLang=i}g.languages[h]=i})},createControl:function(h,d){var f=this,g,e=f.editor;if(h=="spellchecker"){if(f.rpcUrl=="{backend}"){if(f.hasSupport){g=d.createButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f})}return g}g=d.createSplitButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f});g.onRenderMenu.add(function(j,i){i.add({title:"spellchecker.langs","class":"mceMenuItemTitle"}).setDisabled(1);c(f.languages,function(n,m){var p={icon:1},l;p.onclick=function(){if(n==f.selectedLang){return}l.setSelected(1);f.selectedItem.setSelected(0);f.selectedItem=l;f.selectedLang=n};p.title=m;l=i.add(p);l.setSelected(n==f.selectedLang);if(n==f.selectedLang){f.selectedItem=l}})});return g}},_walk:function(i,g){var h=this.editor.getDoc(),e;if(h.createTreeWalker){e=h.createTreeWalker(i,NodeFilter.SHOW_TEXT,null,false);while((i=e.nextNode())!=null){g.call(this,i)}}else{tinymce.walk(i,g,"childNodes")}},_getSeparators:function(){var e="",d,f=this.editor.getParam("spellchecker_word_separator_chars",'\\s!"#$%&()*+,-./:;<=>?@[]^_{|}§©«®±¶·¸»¼½¾¿×÷¤\u201d\u201c');for(d=0;d$2");while((s=p.indexOf(""))!=-1){o=p.substring(0,s);if(o.length){r=j.createTextNode(f.decode(o));q.appendChild(r)}p=p.substring(s+10);s=p.indexOf("");o=p.substring(0,s);p=p.substring(s+11);q.appendChild(f.create("span",{"class":"mceItemHiddenSpellWord"},o))}if(p.length){r=j.createTextNode(f.decode(p));q.appendChild(r)}}else{q.innerHTML=p.replace(e,'$1$2')}f.replace(q,t)}});h.moveToBookmark(i)},_showMenu:function(h,j){var i=this,h=i.editor,d=i._menu,l,k=h.dom,g=k.getViewPort(h.getWin()),f=j.target;j=0;if(!d){d=h.controlManager.createDropMenu("spellcheckermenu",{"class":"mceNoIcons"});i._menu=d}if(k.hasClass(f,"mceItemHiddenSpellWord")){d.removeAll();d.add({title:"spellchecker.wait","class":"mceMenuItemTitle"}).setDisabled(1);i._sendRPC("getSuggestions",[i.selectedLang,k.decode(f.innerHTML)],function(m){var e;d.removeAll();if(m.length>0){d.add({title:"spellchecker.sug","class":"mceMenuItemTitle"}).setDisabled(1);c(m,function(n){d.add({title:n,onclick:function(){k.replace(h.getDoc().createTextNode(n),f);i._checkDone()}})});d.addSeparator()}else{d.add({title:"spellchecker.no_sug","class":"mceMenuItemTitle"}).setDisabled(1)}if(h.getParam("show_ignore_words",true)){e=i.editor.getParam("spellchecker_enable_ignore_rpc","");d.add({title:"spellchecker.ignore_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}}});d.add({title:"spellchecker.ignore_words",onclick:function(){var n=f.innerHTML;i._removeWords(k.decode(n));i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWords",[i.selectedLang,n],function(o){h.setProgressState(0)})}}})}if(i.editor.getParam("spellchecker_enable_learn_rpc")){d.add({title:"spellchecker.learn_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();h.setProgressState(1);i._sendRPC("learnWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}})}d.update()});l=b.getPos(h.getContentAreaContainer());d.settings.offset_x=l.x;d.settings.offset_y=l.y;h.selection.select(f);l=k.getPos(f);d.showMenu(l.x,l.y+f.offsetHeight-g.y);return tinymce.dom.Event.cancel(j)}else{d.hideMenu()}},_checkDone:function(){var e=this,d=e.editor,g=d.dom,f;c(g.select("span"),function(h){if(h&&g.hasClass(h,"mceItemHiddenSpellWord")){f=true;return false}});if(!f){e._done()}},_done:function(){var d=this,e=d.active;if(d.active){d.active=0;d._removeWords();if(d._menu){d._menu.hideMenu()}if(e){d.editor.nodeChanged()}}},_sendRPC:function(e,g,d){var f=this;a.sendRPC({url:f.rpcUrl,method:e,params:g,success:d,error:function(i,h){f.editor.setProgressState(0);f.editor.windowManager.alert(i.errstr||("Error response: "+h.responseText))}})}});tinymce.PluginManager.add("spellchecker",tinymce.plugins.SpellcheckerPlugin)})(); \ No newline at end of file diff --git a/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin_src.js b/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin_src.js new file mode 100644 index 00000000..0d7cc6eb --- /dev/null +++ b/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin_src.js @@ -0,0 +1,436 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var JSONRequest = tinymce.util.JSONRequest, each = tinymce.each, DOM = tinymce.DOM; + + tinymce.create('tinymce.plugins.SpellcheckerPlugin', { + getInfo : function() { + return { + longname : 'Spellchecker', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + init : function(ed, url) { + var t = this, cm; + + t.url = url; + t.editor = ed; + t.rpcUrl = ed.getParam("spellchecker_rpc_url", "{backend}"); + + if (t.rpcUrl == '{backend}') { + // Sniff if the browser supports native spellchecking (Don't know of a better way) + if (tinymce.isIE) + return; + + t.hasSupport = true; + + // Disable the context menu when spellchecking is active + ed.onContextMenu.addToTop(function(ed, e) { + if (t.active) + return false; + }); + } + + // Register commands + ed.addCommand('mceSpellCheck', function() { + if (t.rpcUrl == '{backend}') { + // Enable/disable native spellchecker + t.editor.getBody().spellcheck = t.active = !t.active; + return; + } + + if (!t.active) { + ed.setProgressState(1); + t._sendRPC('checkWords', [t.selectedLang, t._getWords()], function(r) { + if (r.length > 0) { + t.active = 1; + t._markWords(r); + ed.setProgressState(0); + ed.nodeChanged(); + } else { + ed.setProgressState(0); + + if (ed.getParam('spellchecker_report_no_misspellings', true)) + ed.windowManager.alert('spellchecker.no_mpell'); + } + }); + } else + t._done(); + }); + + if (ed.settings.content_css !== false) + ed.contentCSS.push(url + '/css/content.css'); + + ed.onClick.add(t._showMenu, t); + ed.onContextMenu.add(t._showMenu, t); + ed.onBeforeGetContent.add(function() { + if (t.active) + t._removeWords(); + }); + + ed.onNodeChange.add(function(ed, cm) { + cm.setActive('spellchecker', t.active); + }); + + ed.onSetContent.add(function() { + t._done(); + }); + + ed.onBeforeGetContent.add(function() { + t._done(); + }); + + ed.onBeforeExecCommand.add(function(ed, cmd) { + if (cmd == 'mceFullScreen') + t._done(); + }); + + // Find selected language + t.languages = {}; + each(ed.getParam('spellchecker_languages', '+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv', 'hash'), function(v, k) { + if (k.indexOf('+') === 0) { + k = k.substring(1); + t.selectedLang = v; + } + + t.languages[k] = v; + }); + }, + + createControl : function(n, cm) { + var t = this, c, ed = t.editor; + + if (n == 'spellchecker') { + // Use basic button if we use the native spellchecker + if (t.rpcUrl == '{backend}') { + // Create simple toggle button if we have native support + if (t.hasSupport) + c = cm.createButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t}); + + return c; + } + + c = cm.createSplitButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t}); + + c.onRenderMenu.add(function(c, m) { + m.add({title : 'spellchecker.langs', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + each(t.languages, function(v, k) { + var o = {icon : 1}, mi; + + o.onclick = function() { + if (v == t.selectedLang) { + return; + } + mi.setSelected(1); + t.selectedItem.setSelected(0); + t.selectedItem = mi; + t.selectedLang = v; + }; + + o.title = k; + mi = m.add(o); + mi.setSelected(v == t.selectedLang); + + if (v == t.selectedLang) + t.selectedItem = mi; + }) + }); + + return c; + } + }, + + // Internal functions + + _walk : function(n, f) { + var d = this.editor.getDoc(), w; + + if (d.createTreeWalker) { + w = d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, false); + + while ((n = w.nextNode()) != null) + f.call(this, n); + } else + tinymce.walk(n, f, 'childNodes'); + }, + + _getSeparators : function() { + var re = '', i, str = this.editor.getParam('spellchecker_word_separator_chars', '\\s!"#$%&()*+,-./:;<=>?@[\]^_{|}§©«®±¶·¸»¼½¾¿×÷¤\u201d\u201c'); + + // Build word separator regexp + for (i=0; i elements content is broken after spellchecking. + // Bug #1408: Preceding whitespace characters are removed + // @TODO: I'm not sure that both are still issues on IE9. + if (tinymce.isIE) { + // Enclose mispelled words with temporal tag + v = v.replace(rx, '$1$2'); + // Loop over the content finding mispelled words + while ((pos = v.indexOf('')) != -1) { + // Add text node for the content before the word + txt = v.substring(0, pos); + if (txt.length) { + node = doc.createTextNode(dom.decode(txt)); + elem.appendChild(node); + } + v = v.substring(pos+10); + pos = v.indexOf(''); + txt = v.substring(0, pos); + v = v.substring(pos+11); + // Add span element for the word + elem.appendChild(dom.create('span', {'class' : 'mceItemHiddenSpellWord'}, txt)); + } + // Add text node for the rest of the content + if (v.length) { + node = doc.createTextNode(dom.decode(v)); + elem.appendChild(node); + } + } else { + // Other browsers preserve whitespace characters on innerHTML usage + elem.innerHTML = v.replace(rx, '$1$2'); + } + + // Finally, replace the node with the container + dom.replace(elem, n); + } + }); + + se.moveToBookmark(b); + }, + + _showMenu : function(ed, e) { + var t = this, ed = t.editor, m = t._menu, p1, dom = ed.dom, vp = dom.getViewPort(ed.getWin()), wordSpan = e.target; + + e = 0; // Fixes IE memory leak + + if (!m) { + m = ed.controlManager.createDropMenu('spellcheckermenu', {'class' : 'mceNoIcons'}); + t._menu = m; + } + + if (dom.hasClass(wordSpan, 'mceItemHiddenSpellWord')) { + m.removeAll(); + m.add({title : 'spellchecker.wait', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + + t._sendRPC('getSuggestions', [t.selectedLang, dom.decode(wordSpan.innerHTML)], function(r) { + var ignoreRpc; + + m.removeAll(); + + if (r.length > 0) { + m.add({title : 'spellchecker.sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + each(r, function(v) { + m.add({title : v, onclick : function() { + dom.replace(ed.getDoc().createTextNode(v), wordSpan); + t._checkDone(); + }}); + }); + + m.addSeparator(); + } else + m.add({title : 'spellchecker.no_sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + + if (ed.getParam('show_ignore_words', true)) { + ignoreRpc = t.editor.getParam("spellchecker_enable_ignore_rpc", ''); + m.add({ + title : 'spellchecker.ignore_word', + onclick : function() { + var word = wordSpan.innerHTML; + + dom.remove(wordSpan, 1); + t._checkDone(); + + // tell the server if we need to + if (ignoreRpc) { + ed.setProgressState(1); + t._sendRPC('ignoreWord', [t.selectedLang, word], function(r) { + ed.setProgressState(0); + }); + } + } + }); + + m.add({ + title : 'spellchecker.ignore_words', + onclick : function() { + var word = wordSpan.innerHTML; + + t._removeWords(dom.decode(word)); + t._checkDone(); + + // tell the server if we need to + if (ignoreRpc) { + ed.setProgressState(1); + t._sendRPC('ignoreWords', [t.selectedLang, word], function(r) { + ed.setProgressState(0); + }); + } + } + }); + } + + if (t.editor.getParam("spellchecker_enable_learn_rpc")) { + m.add({ + title : 'spellchecker.learn_word', + onclick : function() { + var word = wordSpan.innerHTML; + + dom.remove(wordSpan, 1); + t._checkDone(); + + ed.setProgressState(1); + t._sendRPC('learnWord', [t.selectedLang, word], function(r) { + ed.setProgressState(0); + }); + } + }); + } + + m.update(); + }); + + p1 = DOM.getPos(ed.getContentAreaContainer()); + m.settings.offset_x = p1.x; + m.settings.offset_y = p1.y; + + ed.selection.select(wordSpan); + p1 = dom.getPos(wordSpan); + m.showMenu(p1.x, p1.y + wordSpan.offsetHeight - vp.y); + + return tinymce.dom.Event.cancel(e); + } else + m.hideMenu(); + }, + + _checkDone : function() { + var t = this, ed = t.editor, dom = ed.dom, o; + + each(dom.select('span'), function(n) { + if (n && dom.hasClass(n, 'mceItemHiddenSpellWord')) { + o = true; + return false; + } + }); + + if (!o) + t._done(); + }, + + _done : function() { + var t = this, la = t.active; + + if (t.active) { + t.active = 0; + t._removeWords(); + + if (t._menu) + t._menu.hideMenu(); + + if (la) + t.editor.nodeChanged(); + } + }, + + _sendRPC : function(m, p, cb) { + var t = this; + + JSONRequest.sendRPC({ + url : t.rpcUrl, + method : m, + params : p, + success : cb, + error : function(e, x) { + t.editor.setProgressState(0); + t.editor.windowManager.alert(e.errstr || ('Error response: ' + x.responseText)); + } + }); + } + }); + + // Register plugin + tinymce.PluginManager.add('spellchecker', tinymce.plugins.SpellcheckerPlugin); +})(); diff --git a/wp-includes/js/tinymce/plugins/tabfocus/editor_plugin_src.js b/wp-includes/js/tinymce/plugins/tabfocus/editor_plugin_src.js new file mode 100644 index 00000000..a1579c85 --- /dev/null +++ b/wp-includes/js/tinymce/plugins/tabfocus/editor_plugin_src.js @@ -0,0 +1,122 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, explode = tinymce.explode; + + tinymce.create('tinymce.plugins.TabFocusPlugin', { + init : function(ed, url) { + function tabCancel(ed, e) { + if (e.keyCode === 9) + return Event.cancel(e); + } + + function tabHandler(ed, e) { + var x, i, f, el, v; + + function find(d) { + el = DOM.select(':input:enabled,*[tabindex]'); + + function canSelectRecursive(e) { + return e.nodeName==="BODY" || (e.type != 'hidden' && + !(e.style.display == "none") && + !(e.style.visibility == "hidden") && canSelectRecursive(e.parentNode)); + } + function canSelectInOldIe(el) { + return el.attributes["tabIndex"].specified || el.nodeName == "INPUT" || el.nodeName == "TEXTAREA"; + } + function isOldIe() { + return tinymce.isIE6 || tinymce.isIE7; + } + function canSelect(el) { + return ((!isOldIe() || canSelectInOldIe(el))) && el.getAttribute("tabindex") != '-1' && canSelectRecursive(el); + } + + each(el, function(e, i) { + if (e.id == ed.id) { + x = i; + return false; + } + }); + if (d > 0) { + for (i = x + 1; i < el.length; i++) { + if (canSelect(el[i])) + return el[i]; + } + } else { + for (i = x - 1; i >= 0; i--) { + if (canSelect(el[i])) + return el[i]; + } + } + + return null; + } + + if (e.keyCode === 9) { + v = explode(ed.getParam('tab_focus', ed.getParam('tabfocus_elements', ':prev,:next'))); + + if (v.length == 1) { + v[1] = v[0]; + v[0] = ':prev'; + } + + // Find element to focus + if (e.shiftKey) { + if (v[0] == ':prev') + el = find(-1); + else + el = DOM.get(v[0]); + } else { + if (v[1] == ':next') + el = find(1); + else + el = DOM.get(v[1]); + } + + if (el) { + if (el.id && (ed = tinymce.get(el.id || el.name))) + ed.focus(); + else + window.setTimeout(function() { + if (!tinymce.isWebKit) + window.focus(); + el.focus(); + }, 10); + + return Event.cancel(e); + } + } + } + + ed.onKeyUp.add(tabCancel); + + if (tinymce.isGecko) { + ed.onKeyPress.add(tabHandler); + ed.onKeyDown.add(tabCancel); + } else + ed.onKeyDown.add(tabHandler); + + }, + + getInfo : function() { + return { + longname : 'Tabfocus', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('tabfocus', tinymce.plugins.TabFocusPlugin); +})(); diff --git a/wp-includes/js/tinymce/plugins/wordpress/css/content.css b/wp-includes/js/tinymce/plugins/wordpress/css/content.css deleted file mode 100644 index 8cf986c5..00000000 --- a/wp-includes/js/tinymce/plugins/wordpress/css/content.css +++ /dev/null @@ -1,29 +0,0 @@ - -.mceWPnextpage, .mceWPmore { - border: 0; - border-top: 1px dotted #cccccc; - display: block; - width: 95%; - height: 12px; - margin: 15px auto 0; -} -.mceWPmore { - background: transparent url(../img/more_bug.gif) no-repeat right top; -} -.mceWPnextpage { - background: transparent url(../img/page_bug.gif) no-repeat right top; -} - -img.wpGallery { - border: 1px dashed #888; - background: #f2f8ff url("../../wpgallery/img/gallery.png") no-repeat scroll center center; - width: 99%; - height: 250px; -} - -img.wp-oembed { - border: 1px dashed #888; - background: #f7f5f2 url("../img/embedded.png") no-repeat scroll center center; - width: 300px; - height: 250px; -} diff --git a/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js b/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js index 00278c85..5d905efc 100644 --- a/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js +++ b/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js @@ -1 +1 @@ -(function(){var a=tinymce.DOM;tinymce.create("tinymce.plugins.WordPress",{mceTout:0,init:function(c,d){var e=this,h=c.getParam("wordpress_adv_toolbar","toolbar2"),g=0,f,b;f='';b='';if(getUserSetting("hidetb","0")=="1"){c.settings.wordpress_adv_hidden=0}c.onPostRender.add(function(){var i=c.controlManager.get(h);if(c.getParam("wordpress_adv_hidden",1)&&i){a.hide(i.id);e._resizeIframe(c,h,28)}});c.addCommand("WP_More",function(){c.execCommand("mceInsertContent",0,f)});c.addCommand("WP_Page",function(){c.execCommand("mceInsertContent",0,b)});c.addCommand("WP_Help",function(){c.windowManager.open({url:tinymce.baseURL+"/wp-mce-help.php",width:450,height:420,inline:1})});c.addCommand("WP_Adv",function(){var i=c.controlManager,j=i.get(h).id;if("undefined"==j){return}if(a.isHidden(j)){i.setActive("wp_adv",1);a.show(j);e._resizeIframe(c,h,-28);c.settings.wordpress_adv_hidden=0;setUserSetting("hidetb","1")}else{i.setActive("wp_adv",0);a.hide(j);e._resizeIframe(c,h,28);c.settings.wordpress_adv_hidden=1;setUserSetting("hidetb","0")}});c.addCommand("WP_Medialib",function(){var j=c.getParam("wp_fullscreen_editor_id")||c.getParam("fullscreen_editor_id")||c.id,i=tinymce.DOM.select("#wp-"+j+"-media-buttons a.thickbox");if(i&&i[0]){i=i[0]}else{return}tb_show("",i.href);tinymce.DOM.setStyle(["TB_overlay","TB_window","TB_load"],"z-index","999999")});c.addButton("wp_more",{title:"wordpress.wp_more_desc",cmd:"WP_More"});c.addButton("wp_page",{title:"wordpress.wp_page_desc",image:d+"/img/page.gif",cmd:"WP_Page"});c.addButton("wp_help",{title:"wordpress.wp_help_desc",cmd:"WP_Help"});c.addButton("wp_adv",{title:"wordpress.wp_adv_desc",cmd:"WP_Adv"});c.addButton("add_media",{title:"wordpress.add_media",image:d+"/img/image.gif",cmd:"WP_Medialib"});c.onBeforeExecCommand.add(function(p,m,s,l,j){var v=tinymce.DOM,k,i,r,u,t,q;if("mceFullScreen"==m){if("mce_fullscreen"!=p.id&&v.select("a.thickbox").length){p.settings.theme_advanced_buttons1+=",|,add_media"}}if("JustifyLeft"==m||"JustifyRight"==m||"JustifyCenter"==m){k=p.selection.getNode();if(k.nodeName=="IMG"){q=m.substr(7).toLowerCase();t="align"+q;i=p.dom.getParent(k,"dl.wp-caption");r=p.dom.getParent(k,"div.mceTemp");if(i&&r){u=p.dom.hasClass(i,t)?"alignnone":t;i.className=i.className.replace(/align[^ '"]+\s?/g,"");p.dom.addClass(i,u);if(u=="aligncenter"){p.dom.addClass(r,"mceIEcenter")}else{p.dom.removeClass(r,"mceIEcenter")}j.terminate=true;p.execCommand("mceRepaint")}else{if(p.dom.hasClass(k,t)){p.dom.addClass(k,"alignnone")}else{p.dom.removeClass(k,"alignnone")}}}}});c.onInit.add(function(i){i.onNodeChange.add(function(k,j,m){var l;if(m.nodeName=="IMG"){l=k.dom.getParent(m,"dl.wp-caption")}else{if(m.nodeName=="DIV"&&k.dom.hasClass(m,"mceTemp")){l=m.firstChild;if(!k.dom.hasClass(l,"wp-caption")){l=false}}}if(l){if(k.dom.hasClass(l,"alignleft")){j.setActive("justifyleft",1)}else{if(k.dom.hasClass(l,"alignright")){j.setActive("justifyright",1)}else{if(k.dom.hasClass(l,"aligncenter")){j.setActive("justifycenter",1)}}}}});if(i.id!="wp_mce_fullscreen"&&i.id!="mce_fullscreen"){i.dom.addClass(i.getBody(),"wp-editor")}else{if(i.id=="mce_fullscreen"){i.dom.addClass(i.getBody(),"mce-fullscreen")}}i.onBeforeSetContent.add(function(j,k){if(k.content){k.content=k.content.replace(/

    \s*<(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre|address)( [^>]*)?>/gi,"<$1$2>");k.content=k.content.replace(/<\/(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre|address)>\s*<\/p>/gi,"")}})});if("undefined"!=typeof(jQuery)){c.onKeyUp.add(function(j,l){var i=l.keyCode||l.charCode;if(i==g){return}if(13==i||8==g||46==g){jQuery(document).triggerHandler("wpcountwords",[j.getContent({format:"raw"})])}g=i})}c.onSaveContent.addToTop(function(i,j){j.content=j.content.replace(/

    (
    |\u00a0|\uFEFF)?<\/p>/g,"

     

    ")});c.onSaveContent.add(function(i,j){if(i.getParam("wpautop",true)&&typeof(switchEditors)=="object"){if(i.isHidden()){j.content=j.element.value}else{j.content=switchEditors.pre_wpautop(j.content)}}});e._handleMoreBreak(c,d);c.addShortcut("alt+shift+c",c.getLang("justifycenter_desc"),"JustifyCenter");c.addShortcut("alt+shift+r",c.getLang("justifyright_desc"),"JustifyRight");c.addShortcut("alt+shift+l",c.getLang("justifyleft_desc"),"JustifyLeft");c.addShortcut("alt+shift+j",c.getLang("justifyfull_desc"),"JustifyFull");c.addShortcut("alt+shift+q",c.getLang("blockquote_desc"),"mceBlockQuote");c.addShortcut("alt+shift+u",c.getLang("bullist_desc"),"InsertUnorderedList");c.addShortcut("alt+shift+o",c.getLang("numlist_desc"),"InsertOrderedList");c.addShortcut("alt+shift+d",c.getLang("striketrough_desc"),"Strikethrough");c.addShortcut("alt+shift+n",c.getLang("spellchecker.desc"),"mceSpellCheck");c.addShortcut("alt+shift+a",c.getLang("link_desc"),"mceLink");c.addShortcut("alt+shift+s",c.getLang("unlink_desc"),"unlink");c.addShortcut("alt+shift+m",c.getLang("image_desc"),"WP_Medialib");c.addShortcut("alt+shift+g",c.getLang("fullscreen.desc"),"mceFullScreen");c.addShortcut("alt+shift+z",c.getLang("wp_adv_desc"),"WP_Adv");c.addShortcut("alt+shift+h",c.getLang("help_desc"),"WP_Help");c.addShortcut("alt+shift+t",c.getLang("wp_more_desc"),"WP_More");c.addShortcut("alt+shift+p",c.getLang("wp_page_desc"),"WP_Page");c.addShortcut("ctrl+s",c.getLang("save_desc"),function(){if("function"==typeof autosave){autosave()}});if(tinymce.isWebKit){c.addShortcut("alt+shift+b",c.getLang("bold_desc"),"Bold");c.addShortcut("alt+shift+i",c.getLang("italic_desc"),"Italic")}c.onInit.add(function(i){tinymce.dom.Event.add(i.getWin(),"scroll",function(j){i.plugins.wordpress._hideButtons()});tinymce.dom.Event.add(i.getBody(),"dragstart",function(j){i.plugins.wordpress._hideButtons()})});c.onBeforeExecCommand.add(function(i,k,j,l){i.plugins.wordpress._hideButtons()});c.onSaveContent.add(function(i,j){i.plugins.wordpress._hideButtons()});c.onMouseDown.add(function(i,j){if(j.target.nodeName!="IMG"){i.plugins.wordpress._hideButtons()}})},getInfo:function(){return{longname:"WordPress Plugin",author:"WordPress",authorurl:"http://wordpress.org",infourl:"http://wordpress.org",version:"3.0"}},_setEmbed:function(b){return b.replace(/\[embed\]([\s\S]+?)\[\/embed\][\s\u00a0]*/g,function(d,c){return''+c+''})},_getEmbed:function(b){return b.replace(/]+>/g,function(c){if(c.indexOf('class="wp-oembed')!=-1){var d=c.match(/alt="([^\"]+)"/);if(d[1]){c="[embed]"+d[1]+"[/embed]"}}return c})},_showButtons:function(f,d){var g=tinyMCE.activeEditor,i,h,b,j=tinymce.DOM,e,c;b=g.dom.getViewPort(g.getWin());i=j.getPos(g.getContentAreaContainer());h=g.dom.getPos(f);e=Math.max(h.x-b.x,0)+i.x;c=Math.max(h.y-b.y,0)+i.y;j.setStyles(d,{top:c+5+"px",left:e+5+"px",display:"block"});if(this.mceTout){clearTimeout(this.mceTout)}this.mceTout=setTimeout(function(){g.plugins.wordpress._hideButtons()},5000)},_hideButtons:function(){if(!this.mceTout){return}if(document.getElementById("wp_editbtns")){tinymce.DOM.hide("wp_editbtns")}if(document.getElementById("wp_gallerybtns")){tinymce.DOM.hide("wp_gallerybtns")}clearTimeout(this.mceTout);this.mceTout=0},_resizeIframe:function(c,e,b){var d=c.getContentAreaContainer().firstChild;a.setStyle(d,"height",d.clientHeight+b);c.theme.deltaHeight+=b},_handleMoreBreak:function(c,d){var e,b;e='$1';b='';c.onInit.add(function(){c.dom.loadCSS(d+"/css/content.css")});c.onPostRender.add(function(){if(c.theme.onResolveName){c.theme.onResolveName.add(function(f,g){if(g.node.nodeName=="IMG"){if(c.dom.hasClass(g.node,"mceWPmore")){g.name="wpmore"}if(c.dom.hasClass(g.node,"mceWPnextpage")){g.name="wppage"}}})}});c.onBeforeSetContent.add(function(f,g){if(g.content){g.content=g.content.replace(//g,e);g.content=g.content.replace(//g,b)}});c.onPostProcess.add(function(f,g){if(g.get){g.content=g.content.replace(/]+>/g,function(i){if(i.indexOf('class="mceWPmore')!==-1){var h,j=(h=i.match(/alt="(.*?)"/))?h[1]:"";i=""}if(i.indexOf('class="mceWPnextpage')!==-1){i=""}return i})}});c.onNodeChange.add(function(g,f,h){f.setActive("wp_page",h.nodeName==="IMG"&&g.dom.hasClass(h,"mceWPnextpage"));f.setActive("wp_more",h.nodeName==="IMG"&&g.dom.hasClass(h,"mceWPmore"))})}});tinymce.PluginManager.add("wordpress",tinymce.plugins.WordPress)})(); \ No newline at end of file +(function(){var a=tinymce.DOM;tinymce.create("tinymce.plugins.WordPress",{mceTout:0,init:function(c,d){var e=this,h=c.getParam("wordpress_adv_toolbar","toolbar2"),g=0,f,b,i;f='';b='';if(getUserSetting("hidetb","0")=="1"){c.settings.wordpress_adv_hidden=0}c.onPostRender.add(function(){var j=c.controlManager.get(h);if(c.getParam("wordpress_adv_hidden",1)&&j){a.hide(j.id);e._resizeIframe(c,h,28)}});c.addCommand("WP_More",function(){c.execCommand("mceInsertContent",0,f)});c.addCommand("WP_Page",function(){c.execCommand("mceInsertContent",0,b)});c.addCommand("WP_Help",function(){c.windowManager.open({url:tinymce.baseURL+"/wp-mce-help.php",width:450,height:420,inline:1})});c.addCommand("WP_Adv",function(){var j=c.controlManager,k=j.get(h).id;if("undefined"==k){return}if(a.isHidden(k)){j.setActive("wp_adv",1);a.show(k);e._resizeIframe(c,h,-28);c.settings.wordpress_adv_hidden=0;setUserSetting("hidetb","1")}else{j.setActive("wp_adv",0);a.hide(k);e._resizeIframe(c,h,28);c.settings.wordpress_adv_hidden=1;setUserSetting("hidetb","0")}});c.addCommand("WP_Medialib",function(){var k=c.getParam("wp_fullscreen_editor_id")||c.getParam("fullscreen_editor_id")||c.id,j=tinymce.DOM.select("#wp-"+k+"-media-buttons a.thickbox");if(j&&j[0]){j=j[0]}else{return}tb_show("",j.href);tinymce.DOM.setStyle(["TB_overlay","TB_window","TB_load"],"z-index","999999")});c.addButton("wp_more",{title:"wordpress.wp_more_desc",cmd:"WP_More"});c.addButton("wp_page",{title:"wordpress.wp_page_desc",image:d+"/img/page.gif",cmd:"WP_Page"});c.addButton("wp_help",{title:"wordpress.wp_help_desc",cmd:"WP_Help"});c.addButton("wp_adv",{title:"wordpress.wp_adv_desc",cmd:"WP_Adv"});c.addButton("add_media",{title:"wordpress.add_media",image:d+"/img/image.gif",cmd:"WP_Medialib"});c.onBeforeExecCommand.add(function(q,p,t,m,k){var w=tinymce.DOM,l,j,s,v,u,r;if("mceFullScreen"==p){if("mce_fullscreen"!=q.id&&w.select("a.thickbox").length){q.settings.theme_advanced_buttons1+=",|,add_media"}}if("JustifyLeft"==p||"JustifyRight"==p||"JustifyCenter"==p){l=q.selection.getNode();if(l.nodeName=="IMG"){r=p.substr(7).toLowerCase();u="align"+r;j=q.dom.getParent(l,"dl.wp-caption");s=q.dom.getParent(l,"div.mceTemp");if(j&&s){v=q.dom.hasClass(j,u)?"alignnone":u;j.className=j.className.replace(/align[^ '"]+\s?/g,"");q.dom.addClass(j,v);if(v=="aligncenter"){q.dom.addClass(s,"mceIEcenter")}else{q.dom.removeClass(s,"mceIEcenter")}k.terminate=true;q.execCommand("mceRepaint")}else{if(q.dom.hasClass(l,u)){q.dom.addClass(l,"alignnone")}else{q.dom.removeClass(l,"alignnone")}}}}});c.onInit.add(function(l){var k=l.getParam("body_class",""),j=l.getBody();if(k){k=k.split(" ")}else{k=[]}if(l.getParam("directionality","")=="rtl"){k.push("rtl")}if(tinymce.isIE9){k.push("ie9")}else{if(tinymce.isIE8){k.push("ie8")}else{if(tinymce.isIE7){k.push("ie7")}}}if(l.id!="wp_mce_fullscreen"&&l.id!="mce_fullscreen"){k.push("wp-editor")}else{if(l.id=="mce_fullscreen"){k.push("mce-fullscreen")}}tinymce.each(k,function(m){if(m){l.dom.addClass(j,m)}});l.onNodeChange.add(function(n,m,p){var o;if(p.nodeName=="IMG"){o=n.dom.getParent(p,"dl.wp-caption")}else{if(p.nodeName=="DIV"&&n.dom.hasClass(p,"mceTemp")){o=p.firstChild;if(!n.dom.hasClass(o,"wp-caption")){o=false}}}if(o){if(n.dom.hasClass(o,"alignleft")){m.setActive("justifyleft",1)}else{if(n.dom.hasClass(o,"alignright")){m.setActive("justifyright",1)}else{if(n.dom.hasClass(o,"aligncenter")){m.setActive("justifycenter",1)}}}}});l.onBeforeSetContent.add(function(m,n){if(n.content){n.content=n.content.replace(/

    \s*<(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre|address)( [^>]*)?>/gi,"<$1$2>");n.content=n.content.replace(/<\/(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre|address)>\s*<\/p>/gi,"")}})});if("undefined"!=typeof(jQuery)){c.onKeyUp.add(function(l,m){var j=m.keyCode||m.charCode;if(j==g){return}if(13==j||8==g||46==g){jQuery(document).triggerHandler("wpcountwords",[l.getContent({format:"raw"})])}g=j})}c.onSaveContent.addToTop(function(j,k){k.content=k.content.replace(/

    (
    |\u00a0|\uFEFF)?<\/p>/g,"

     

    ")});c.onSaveContent.add(function(j,k){if(j.getParam("wpautop",true)&&typeof(switchEditors)=="object"){if(j.isHidden()){k.content=k.element.value}else{k.content=switchEditors.pre_wpautop(k.content)}}});e._handleMoreBreak(c,d);c.addShortcut("alt+shift+c",c.getLang("justifycenter_desc"),"JustifyCenter");c.addShortcut("alt+shift+r",c.getLang("justifyright_desc"),"JustifyRight");c.addShortcut("alt+shift+l",c.getLang("justifyleft_desc"),"JustifyLeft");c.addShortcut("alt+shift+j",c.getLang("justifyfull_desc"),"JustifyFull");c.addShortcut("alt+shift+q",c.getLang("blockquote_desc"),"mceBlockQuote");c.addShortcut("alt+shift+u",c.getLang("bullist_desc"),"InsertUnorderedList");c.addShortcut("alt+shift+o",c.getLang("numlist_desc"),"InsertOrderedList");c.addShortcut("alt+shift+d",c.getLang("striketrough_desc"),"Strikethrough");c.addShortcut("alt+shift+n",c.getLang("spellchecker.desc"),"mceSpellCheck");c.addShortcut("alt+shift+a",c.getLang("link_desc"),"mceLink");c.addShortcut("alt+shift+s",c.getLang("unlink_desc"),"unlink");c.addShortcut("alt+shift+m",c.getLang("image_desc"),"WP_Medialib");c.addShortcut("alt+shift+g",c.getLang("fullscreen.desc"),"mceFullScreen");c.addShortcut("alt+shift+z",c.getLang("wp_adv_desc"),"WP_Adv");c.addShortcut("alt+shift+h",c.getLang("help_desc"),"WP_Help");c.addShortcut("alt+shift+t",c.getLang("wp_more_desc"),"WP_More");c.addShortcut("alt+shift+p",c.getLang("wp_page_desc"),"WP_Page");c.addShortcut("ctrl+s",c.getLang("save_desc"),function(){if("function"==typeof autosave){autosave()}});if(tinymce.isWebKit){c.addShortcut("alt+shift+b",c.getLang("bold_desc"),"Bold");c.addShortcut("alt+shift+i",c.getLang("italic_desc"),"Italic")}c.onInit.add(function(j){tinymce.dom.Event.add(j.getWin(),"scroll",function(k){j.plugins.wordpress._hideButtons()});tinymce.dom.Event.add(j.getBody(),"dragstart",function(k){j.plugins.wordpress._hideButtons()})});c.onBeforeExecCommand.add(function(j,l,k,m){j.plugins.wordpress._hideButtons()});c.onSaveContent.add(function(j,k){j.plugins.wordpress._hideButtons()});c.onMouseDown.add(function(j,k){if(k.target.nodeName!="IMG"){j.plugins.wordpress._hideButtons()}});i=function(j){var k;if(j.target.id=="mceModalBlocker"||j.target.className=="ui-widget-overlay"){for(k in c.windowManager.windows){c.windowManager.close(null,k)}}};tinymce.dom.Event.remove(document.body,"click",i);tinymce.dom.Event.add(document.body,"click",i)},getInfo:function(){return{longname:"WordPress Plugin",author:"WordPress",authorurl:"http://wordpress.org",infourl:"http://wordpress.org",version:"3.0"}},_setEmbed:function(b){return b.replace(/\[embed\]([\s\S]+?)\[\/embed\][\s\u00a0]*/g,function(d,c){return''+c+''})},_getEmbed:function(b){return b.replace(/]+>/g,function(c){if(c.indexOf('class="wp-oembed')!=-1){var d=c.match(/alt="([^\"]+)"/);if(d[1]){c="[embed]"+d[1]+"[/embed]"}}return c})},_showButtons:function(f,d){var g=tinyMCE.activeEditor,i,h,b,j=tinymce.DOM,e,c;b=g.dom.getViewPort(g.getWin());i=j.getPos(g.getContentAreaContainer());h=g.dom.getPos(f);e=Math.max(h.x-b.x,0)+i.x;c=Math.max(h.y-b.y,0)+i.y;j.setStyles(d,{top:c+5+"px",left:e+5+"px",display:"block"});if(this.mceTout){clearTimeout(this.mceTout)}this.mceTout=setTimeout(function(){g.plugins.wordpress._hideButtons()},5000)},_hideButtons:function(){if(!this.mceTout){return}if(document.getElementById("wp_editbtns")){tinymce.DOM.hide("wp_editbtns")}if(document.getElementById("wp_gallerybtns")){tinymce.DOM.hide("wp_gallerybtns")}clearTimeout(this.mceTout);this.mceTout=0},_resizeIframe:function(c,e,b){var d=c.getContentAreaContainer().firstChild;a.setStyle(d,"height",d.clientHeight+b);c.theme.deltaHeight+=b},_handleMoreBreak:function(c,d){var e,b;e='$1';b='';c.onPostRender.add(function(){if(c.theme.onResolveName){c.theme.onResolveName.add(function(f,g){if(g.node.nodeName=="IMG"){if(c.dom.hasClass(g.node,"mceWPmore")){g.name="wpmore"}if(c.dom.hasClass(g.node,"mceWPnextpage")){g.name="wppage"}}})}});c.onBeforeSetContent.add(function(f,g){if(g.content){g.content=g.content.replace(//g,e);g.content=g.content.replace(//g,b)}});c.onPostProcess.add(function(f,g){if(g.get){g.content=g.content.replace(/]+>/g,function(i){if(i.indexOf('class="mceWPmore')!==-1){var h,j=(h=i.match(/alt="(.*?)"/))?h[1]:"";i=""}if(i.indexOf('class="mceWPnextpage')!==-1){i=""}return i})}});c.onNodeChange.add(function(g,f,h){f.setActive("wp_page",h.nodeName==="IMG"&&g.dom.hasClass(h,"mceWPnextpage"));f.setActive("wp_more",h.nodeName==="IMG"&&g.dom.hasClass(h,"mceWPmore"))})}});tinymce.PluginManager.add("wordpress",tinymce.plugins.WordPress)})(); \ No newline at end of file diff --git a/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.dev.js b/wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js similarity index 91% rename from wp-includes/js/tinymce/plugins/wordpress/editor_plugin.dev.js rename to wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js index c897a601..40d978ff 100644 --- a/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.dev.js +++ b/wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js @@ -9,7 +9,7 @@ mceTout : 0, init : function(ed, url) { - var t = this, tbId = ed.getParam('wordpress_adv_toolbar', 'toolbar2'), last = 0, moreHTML, nextpageHTML; + var t = this, tbId = ed.getParam('wordpress_adv_toolbar', 'toolbar2'), last = 0, moreHTML, nextpageHTML, closeOnClick; moreHTML = ''; nextpageHTML = ''; @@ -63,7 +63,7 @@ setUserSetting('hidetb', '0'); } }); - + ed.addCommand('WP_Medialib', function() { var id = ed.getParam('wp_fullscreen_editor_id') || ed.getParam('fullscreen_editor_id') || ed.id, link = tinymce.DOM.select('#wp-' + id + '-media-buttons a.thickbox'); @@ -144,8 +144,36 @@ } } }); - + ed.onInit.add(function(ed) { + var bodyClass = ed.getParam('body_class', ''), body = ed.getBody(); + + // add body classes + if ( bodyClass ) + bodyClass = bodyClass.split(' '); + else + bodyClass = []; + + if ( ed.getParam('directionality', '') == 'rtl' ) + bodyClass.push('rtl'); + + if ( tinymce.isIE9 ) + bodyClass.push('ie9'); + else if ( tinymce.isIE8 ) + bodyClass.push('ie8'); + else if ( tinymce.isIE7 ) + bodyClass.push('ie7'); + + if ( ed.id != 'wp_mce_fullscreen' && ed.id != 'mce_fullscreen' ) + bodyClass.push('wp-editor'); + else if ( ed.id == 'mce_fullscreen' ) + bodyClass.push('mce-fullscreen'); + + tinymce.each( bodyClass, function(cls){ + if ( cls ) + ed.dom.addClass(body, cls); + }); + // make sure these run last ed.onNodeChange.add( function(ed, cm, e) { var DL; @@ -169,11 +197,6 @@ } }); - if ( ed.id != 'wp_mce_fullscreen' && ed.id != 'mce_fullscreen' ) - ed.dom.addClass(ed.getBody(), 'wp-editor'); - else if ( ed.id == 'mce_fullscreen' ) - ed.dom.addClass(ed.getBody(), 'mce-fullscreen'); - // remove invalid parent paragraphs when pasting HTML and/or switching to the HTML editor and back ed.onBeforeSetContent.add(function(ed, o) { if ( o.content ) { @@ -272,6 +295,20 @@ if ( e.target.nodeName != 'IMG' ) ed.plugins.wordpress._hideButtons(); }); + + closeOnClick = function(e){ + var id; + + if ( e.target.id == 'mceModalBlocker' || e.target.className == 'ui-widget-overlay' ) { + for ( id in ed.windowManager.windows ) { + ed.windowManager.close(null, id); + } + } + } + + // close popups when clicking on the background + tinymce.dom.Event.remove(document.body, 'click', closeOnClick); + tinymce.dom.Event.add(document.body, 'click', closeOnClick); }, getInfo : function() { @@ -352,11 +389,6 @@ moreHTML = '$1'; nextpageHTML = ''; - // Load plugin specific CSS into editor - ed.onInit.add(function() { - ed.dom.loadCSS(url + '/css/content.css'); - }); - // Display morebreak instead if img in element path ed.onPostRender.add(function() { if (ed.theme.onResolveName) { @@ -406,4 +438,3 @@ // Register plugin tinymce.PluginManager.add('wordpress', tinymce.plugins.WordPress); })(); - diff --git a/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin.dev.js b/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin_src.js similarity index 100% rename from wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin.dev.js rename to wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin_src.js diff --git a/wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css b/wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css deleted file mode 100644 index e78820ff..00000000 --- a/wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css +++ /dev/null @@ -1,68 +0,0 @@ - -body#media-upload ul#sidemenu { - left: auto; - right: 0; -} - -#basic .align .field label { - display: block; - float: right; - padding: 0 24px 0 0; - margin: 5px 3px 5px 5px; -} - -.align .field input { - display: block; - float: right; - margin: 5px 15px 5px 0; -} - -tr.image-size label { - margin: 0; -} - -tr.image-size input { - margin: 3px 15px 0 5px; -} - -.image-align-none-label, -.image-align-left-label, -.image-align-center-label, -.image-align-right-label { - background-position: center right; -} - -#media-upload .describe th.label { - text-align: right; -} - -.show-align, -.alignright, -#img_size { - float: left; -} - -tr.image-size label, -tr.image-size input, -#img_dim label, -#img_dim input, -#img_prop label, -#img_prop input, -#img_size_div, -.alignleft { - float: right; -} - -#img_dim label, -#img_prop label { - margin: 5px 0pt; -} - -#img_dim input, -#img_prop input { - margin: 0 5px 0 10px; -} - -#img_size_title { - text-align: left; -} diff --git a/wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css b/wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css index 323591d9..3b7e1566 100644 --- a/wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css +++ b/wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css @@ -334,7 +334,7 @@ div#media-upload-header { position: relative; border-bottom-width: 1px; border-bottom-style: solid; - height: 2.5em; + height: 33px; background-color: #f9f9f9; border-bottom-color: #dfdfdf; } @@ -357,3 +357,75 @@ div#media-upload-error { color: #CFCFCF; } +.hidden { + display: none; +} + +/* RTL */ +body#media-upload.rtl ul#sidemenu { + left: auto; + right: 0; +} + +.rtl #basic .align .field label { + display: block; + float: right; + padding: 0 24px 0 0; + margin: 5px 3px 5px 5px; +} + +.rtl .align .field input { + display: block; + float: right; + margin: 5px 15px 5px 0; +} + +.rtl tr.image-size label { + margin: 0; +} + +.rtl tr.image-size input { + margin: 3px 15px 0 5px; +} + +.rtl .image-align-none-label, +.rtl .image-align-left-label, +.rtl .image-align-center-label, +.rtl .image-align-right-label { + background-position: center right; +} + +#media-upload.rtl .describe th.label { + text-align: right; +} + +.rtl .show-align, +.rtl .alignright, +.rtl #img_size { + float: left; +} + +.rtl tr.image-size label, +.rtl tr.image-size input, +.rtl #img_dim label, +.rtl #img_dim input, +.rtl #img_prop label, +.rtl #img_prop input, +.rtl #img_size_div, +.rtl .alignleft { + float: right; +} + +.rtl #img_dim label, +.rtl #img_prop label { + margin: 5px 0pt; +} + +.rtl #img_dim input, +.rtl #img_prop input { + margin: 0 5px 0 10px; +} + +.rtl #img_size_title { + text-align: left; +} diff --git a/wp-includes/js/tinymce/plugins/wpeditimage/editimage.html b/wp-includes/js/tinymce/plugins/wpeditimage/editimage.html index d7ad2271..b7460289 100644 --- a/wp-includes/js/tinymce/plugins/wpeditimage/editimage.html +++ b/wp-includes/js/tinymce/plugins/wpeditimage/editimage.html @@ -1,22 +1,20 @@ - + - - - - - - + + + +
    • {#wpeditimage.edit_img}
    • @@ -103,7 +101,7 @@ if ( 'rtl' == tinyMCEPopup.editor.getParam('directionality','') ) - + diff --git a/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.dev.js b/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.dev.js deleted file mode 100644 index f79b6250..00000000 --- a/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.dev.js +++ /dev/null @@ -1,233 +0,0 @@ - -(function() { - tinymce.create('tinymce.plugins.wpEditImage', { - - init : function(ed, url) { - var t = this, mouse = {}; - - t.url = url; - t._createButtons(); - - // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('...'); - ed.addCommand('WP_EditImage', function() { - var el = ed.selection.getNode(), vp = tinymce.DOM.getViewPort(), H = vp.h, W = ( 720 < vp.w ) ? 720 : vp.w, cls = ed.dom.getAttrib(el, 'class'); - - if ( cls.indexOf('mceItem') != -1 || cls.indexOf('wpGallery') != -1 || el.nodeName != 'IMG' ) - return; - - tb_show('', url + '/editimage.html?ver=321&TB_iframe=true'); - tinymce.DOM.setStyles('TB_window', { - 'width':( W - 50 )+'px', - 'height':( H - 45 )+'px', - 'margin-left':'-'+parseInt((( W - 50 ) / 2),10) + 'px' - }); - - if ( ! tinymce.isIE6 ) { - tinymce.DOM.setStyles('TB_window', { - 'top':'20px', - 'marginTop':'0' - }); - } - - tinymce.DOM.setStyles('TB_iframeContent', { - 'width':( W - 50 )+'px', - 'height':( H - 75 )+'px' - }); - tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' ); - }); - - ed.onInit.add(function(ed) { - tinymce.dom.Event.add(ed.getBody(), 'dragstart', function(e) { - if ( !tinymce.isGecko && e.target.nodeName == 'IMG' && ed.dom.getParent(e.target, 'dl.wp-caption') ) - return tinymce.dom.Event.cancel(e); - }); - }); - - // resize the caption
      when the image is soft-resized by the user (only possible in Firefox and IE) - ed.onMouseUp.add(function(ed, e) { - if ( tinymce.isWebKit || tinymce.isOpera ) - return; - - if ( mouse.x && (e.clientX != mouse.x || e.clientY != mouse.y) ) { - var n = ed.selection.getNode(); - - if ( 'IMG' == n.nodeName ) { - window.setTimeout(function(){ - var DL, width; - - if ( n.width != mouse.img_w || n.height != mouse.img_h ) - n.className = n.className.replace(/size-[^ "']+/, ''); - - if ( ed.dom.getParent(n, 'div.mceTemp') ) { - DL = ed.dom.getParent(n, 'dl.wp-caption'); - - if ( DL ) { - width = ed.dom.getAttrib(n, 'width') || n.width; - width = parseInt(width, 10); - ed.dom.setStyle(DL, 'width', 10 + width); - ed.execCommand('mceRepaint'); - } - - } - }, 100); - } - } - mouse = {}; - }); - - // show editimage buttons - ed.onMouseDown.add(function(ed, e) { - - if ( e.target && ( e.target.nodeName == 'IMG' || (e.target.firstChild && e.target.firstChild.nodeName == 'IMG') ) ) { - mouse = { - x: e.clientX, - y: e.clientY, - img_w: e.target.clientWidth, - img_h: e.target.clientHeight - }; - - if ( ed.dom.getAttrib(e.target, 'class').indexOf('mceItem') == -1 ) - ed.plugins.wordpress._showButtons(e.target, 'wp_editbtns'); - } - }); - - // when pressing Return inside a caption move the cursor to a new parapraph under it - ed.onKeyPress.add(function(ed, e) { - var n, DL, DIV, P; - - if ( e.keyCode == 13 ) { - n = ed.selection.getNode(); - DL = ed.dom.getParent(n, 'dl.wp-caption'); - DIV = ed.dom.getParent(DL, 'div.mceTemp'); - - if ( DL && DIV ) { - P = ed.dom.create('p', {}, ' '); - ed.dom.insertAfter( P, DIV ); - - if ( P.firstChild ) - ed.selection.select(P.firstChild); - else - ed.selection.select(P); - - tinymce.dom.Event.cancel(e); - return false; - } - } - }); - - ed.onBeforeSetContent.add(function(ed, o) { - o.content = t._do_shcode(o.content); - }); - - ed.onPostProcess.add(function(ed, o) { - if (o.get) - o.content = t._get_shcode(o.content); - }); - }, - - _do_shcode : function(co) { - return co.replace(/(?:

      )?\[(?:wp_)?caption([^\]]+)\]([\s\S]+?)\[\/(?:wp_)?caption\](?:<\/p>)?[\s\u00a0]*/g, function(a,b,c){ - var id, cls, w, cap, div_cls; - - b = b.replace(/\\'|\\'|\\'/g, ''').replace(/\\"|\\"/g, '"'); - c = c.replace(/\\'|\\'/g, ''').replace(/\\"/g, '"'); - id = b.match(/id=['"]([^'"]+)/i); - cls = b.match(/align=['"]([^'"]+)/i); - w = b.match(/width=['"]([0-9]+)/); - cap = b.match(/caption=['"]([^'"]+)/i); - - id = ( id && id[1] ) ? id[1] : ''; - cls = ( cls && cls[1] ) ? cls[1] : 'alignnone'; - w = ( w && w[1] ) ? w[1] : ''; - cap = ( cap && cap[1] ) ? cap[1] : ''; - if ( ! w || ! cap ) return c; - - div_cls = (cls == 'aligncenter') ? 'mceTemp mceIEcenter' : 'mceTemp'; - - return '

      '+c+'
      '+cap+'
      '; - }); - }, - - _get_shcode : function(co) { - return co.replace(/
      \s*]+)>\s*]+>([\s\S]+?)<\/dt>\s*]+>(.+?)<\/dd>\s*<\/dl>\s*<\/div>\s*/gi, function(a,b,c,cap){ - var id, cls, w; - - id = b.match(/id=['"]([^'"]+)/i); - cls = b.match(/class=['"]([^'"]+)/i); - w = c.match(/width=['"]([0-9]+)/); - - id = ( id && id[1] ) ? id[1] : ''; - cls = ( cls && cls[1] ) ? cls[1] : 'alignnone'; - w = ( w && w[1] ) ? w[1] : ''; - - if ( ! w || ! cap ) return c; - cls = cls.match(/align[^ '"]+/) || 'alignnone'; - cap = cap.replace(/<\S[^<>]*>/gi, '').replace(/'/g, ''').replace(/"/g, '"'); - - return '[caption id="'+id+'" align="'+cls+'" width="'+w+'" caption="'+cap+'"]'+c+'[/caption]'; - }); - }, - - _createButtons : function() { - var t = this, ed = tinyMCE.activeEditor, DOM = tinymce.DOM, editButton, dellButton; - - DOM.remove('wp_editbtns'); - - DOM.add(document.body, 'div', { - id : 'wp_editbtns', - style : 'display:none;' - }); - - editButton = DOM.add('wp_editbtns', 'img', { - src : t.url+'/img/image.png', - id : 'wp_editimgbtn', - width : '24', - height : '24', - title : ed.getLang('wpeditimage.edit_img') - }); - - tinymce.dom.Event.add(editButton, 'mousedown', function(e) { - var ed = tinyMCE.activeEditor; - ed.windowManager.bookmark = ed.selection.getBookmark('simple'); - ed.execCommand("WP_EditImage"); - }); - - dellButton = DOM.add('wp_editbtns', 'img', { - src : t.url+'/img/delete.png', - id : 'wp_delimgbtn', - width : '24', - height : '24', - title : ed.getLang('wpeditimage.del_img') - }); - - tinymce.dom.Event.add(dellButton, 'mousedown', function(e) { - var ed = tinyMCE.activeEditor, el = ed.selection.getNode(), p; - - if ( el.nodeName == 'IMG' && ed.dom.getAttrib(el, 'class').indexOf('mceItem') == -1 ) { - if ( (p = ed.dom.getParent(el, 'div')) && ed.dom.hasClass(p, 'mceTemp') ) - ed.dom.remove(p); - else if ( (p = ed.dom.getParent(el, 'A')) && p.childNodes.length == 1 ) - ed.dom.remove(p); - else - ed.dom.remove(el); - - ed.execCommand('mceRepaint'); - return false; - } - }); - }, - - getInfo : function() { - return { - longname : 'Edit Image', - author : 'WordPress', - authorurl : 'http://wordpress.org', - infourl : '', - version : "1.0" - }; - } - }); - - tinymce.PluginManager.add('wpeditimage', tinymce.plugins.wpEditImage); -})(); diff --git a/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js b/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js index fae5b5c9..57044435 100644 --- a/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js +++ b/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create("tinymce.plugins.wpEditImage",{init:function(a,c){var d=this,b={};d.url=c;d._createButtons();a.addCommand("WP_EditImage",function(){var i=a.selection.getNode(),g=tinymce.DOM.getViewPort(),h=g.h,e=(720)?\[(?:wp_)?caption([^\]]+)\]([\s\S]+?)\[\/(?:wp_)?caption\](?:<\/p>)?[\s\u00a0]*/g,function(g,d,k){var j,f,e,h,i;d=d.replace(/\\'|\\'|\\'/g,"'").replace(/\\"|\\"/g,""");k=k.replace(/\\'|\\'/g,"'").replace(/\\"/g,""");j=d.match(/id=['"]([^'"]+)/i);f=d.match(/align=['"]([^'"]+)/i);e=d.match(/width=['"]([0-9]+)/);h=d.match(/caption=['"]([^'"]+)/i);j=(j&&j[1])?j[1]:"";f=(f&&f[1])?f[1]:"alignnone";e=(e&&e[1])?e[1]:"";h=(h&&h[1])?h[1]:"";if(!e||!h){return k}i=(f=="aligncenter")?"mceTemp mceIEcenter":"mceTemp";return'
      '+k+'
      '+h+"
      "})},_get_shcode:function(a){return a.replace(/
      \s*]+)>\s*]+>([\s\S]+?)<\/dt>\s*]+>(.+?)<\/dd>\s*<\/dl>\s*<\/div>\s*/gi,function(g,d,j,h){var i,f,e;i=d.match(/id=['"]([^'"]+)/i);f=d.match(/class=['"]([^'"]+)/i);e=j.match(/width=['"]([0-9]+)/);i=(i&&i[1])?i[1]:"";f=(f&&f[1])?f[1]:"alignnone";e=(e&&e[1])?e[1]:"";if(!e||!h){return j}f=f.match(/align[^ '"]+/)||"alignnone";h=h.replace(/<\S[^<>]*>/gi,"").replace(/'/g,"'").replace(/"/g,""");return'[caption id="'+i+'" align="'+f+'" width="'+e+'" caption="'+h+'"]'+j+"[/caption]"})},_createButtons:function(){var b=this,a=tinyMCE.activeEditor,d=tinymce.DOM,e,c;d.remove("wp_editbtns");d.add(document.body,"div",{id:"wp_editbtns",style:"display:none;"});e=d.add("wp_editbtns","img",{src:b.url+"/img/image.png",id:"wp_editimgbtn",width:"24",height:"24",title:a.getLang("wpeditimage.edit_img")});tinymce.dom.Event.add(e,"mousedown",function(g){var f=tinyMCE.activeEditor;f.windowManager.bookmark=f.selection.getBookmark("simple");f.execCommand("WP_EditImage")});c=d.add("wp_editbtns","img",{src:b.url+"/img/delete.png",id:"wp_delimgbtn",width:"24",height:"24",title:a.getLang("wpeditimage.del_img")});tinymce.dom.Event.add(c,"mousedown",function(i){var f=tinyMCE.activeEditor,g=f.selection.getNode(),h;if(g.nodeName=="IMG"&&f.dom.getAttrib(g,"class").indexOf("mceItem")==-1){if((h=f.dom.getParent(g,"div"))&&f.dom.hasClass(h,"mceTemp")){f.dom.remove(h)}else{if((h=f.dom.getParent(g,"A"))&&h.childNodes.length==1){f.dom.remove(h)}else{f.dom.remove(g)}}f.execCommand("mceRepaint");return false}})},getInfo:function(){return{longname:"Edit Image",author:"WordPress",authorurl:"http://wordpress.org",infourl:"",version:"1.0"}}});tinymce.PluginManager.add("wpeditimage",tinymce.plugins.wpEditImage)})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.wpEditImage",{url:"",editor:{},init:function(a,c){var d=this,b={};d.url=c;d.editor=a;d._createButtons();a.addCommand("WP_EditImage",function(){var i=a.selection.getNode(),g,h,e,f=a.dom.getAttrib(i,"class");if(f.indexOf("mceItem")!=-1||f.indexOf("wpGallery")!=-1||i.nodeName!="IMG"){return}g=tinymce.DOM.getViewPort();h=680<(g.h-70)?680:g.h-70;e=650");f.dom.insertAfter(h,i);f.selection.select(h.firstChild);if(tinymce.isIE){f.selection.setContent("")}else{f.selection.setContent('
      ');f.selection.setCursorLocation(h,0)}f.dom.events.cancel(j);return false}}});a.onBeforeSetContent.add(function(e,f){f.content=e.wpSetImgCaption(f.content)});a.onPostProcess.add(function(e,f){if(f.get){f.content=e.wpGetImgCaption(f.content)}});a.wpSetImgCaption=function(e){return d._do_shcode(e)};a.wpGetImgCaption=function(e){return d._get_shcode(e)}},_do_shcode:function(a){return a.replace(/(?:

      )?\[(?:wp_)?caption([^\]]+)\]([\s\S]+?)\[\/(?:wp_)?caption\](?:<\/p>)?/g,function(j,i,h){var d,m,k,l,f,g,e=tinymce.trim;d=i.match(/id=['"]([^'"]*)['"] ?/);i=i.replace(d[0],"");m=i.match(/align=['"]([^'"]*)['"] ?/);i=i.replace(m[0],"");k=i.match(/width=['"]([0-9]*)['"] ?/);i=i.replace(k[0],"");h=e(h);g=h.match(/((?:]+>)?]+>(?:<\/a>)?)([\s\S]*)/i);if(g&&g[2]){l=e(g[2]);g=e(g[1])}else{l=e(i).replace(/caption=['"]/,"").replace(/['"]$/,"");g=h}d=(d&&d[1])?d[1]:"";m=(m&&m[1])?m[1]:"alignnone";k=(k&&k[1])?k[1]:"";if(!k||!l){return h}f="mceTemp";if(m=="aligncenter"){f+=" mceIEcenter"}return'

      "})},_get_shcode:function(a){return a.replace(/
      ]*>([\s\S]+?)<\/div>/g,function(d,c){var e=c.replace(/
      ]+)>\s*
      ]+>([\s\S]+?)<\/dt>\s*
      ]+>([\s\S]*?)<\/dd>\s*<\/dl>/gi,function(i,f,l,j){var k,h,g;g=l.match(/width="([0-9]*)"/);g=(g&&g[1])?g[1]:"";if(!g||!j){return l}k=f.match(/id="([^"]*)"/);k=(k&&k[1])?k[1]:"";h=f.match(/class="([^"]*)"/);h=(h&&h[1])?h[1]:"";h=h.match(/align[a-z]+/)||"alignnone";j=j.replace(/\r\n|\r/g,"\n").replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g,function(b){return b.replace(/[\r\n\t]+/," ")});j=j.replace(/\s*\n\s*/g,"
      ");return'[caption id="'+k+'" align="'+h+'" width="'+g+'"]'+l+" "+j+"[/caption]"});if(e.indexOf("[caption")!==0){e=c.replace(/[\s\S]*?((?:
      ]+>)?]+>(?:<\/a>)?)(

      [\s\S]*<\/p>)?[\s\S]*/gi,"

      $1

      $2")}return e})},_createButtons:function(){var b=this,a=tinyMCE.activeEditor,d=tinymce.DOM,e,c;d.remove("wp_editbtns");d.add(document.body,"div",{id:"wp_editbtns",style:"display:none;"});e=d.add("wp_editbtns","img",{src:b.url+"/img/image.png",id:"wp_editimgbtn",width:"24",height:"24",title:a.getLang("wpeditimage.edit_img")});tinymce.dom.Event.add(e,"mousedown",function(g){var f=tinyMCE.activeEditor;f.windowManager.bookmark=f.selection.getBookmark("simple");f.execCommand("WP_EditImage")});c=d.add("wp_editbtns","img",{src:b.url+"/img/delete.png",id:"wp_delimgbtn",width:"24",height:"24",title:a.getLang("wpeditimage.del_img")});tinymce.dom.Event.add(c,"mousedown",function(i){var f=tinyMCE.activeEditor,g=f.selection.getNode(),h;if(g.nodeName=="IMG"&&f.dom.getAttrib(g,"class").indexOf("mceItem")==-1){if((h=f.dom.getParent(g,"div"))&&f.dom.hasClass(h,"mceTemp")){f.dom.remove(h)}else{if((h=f.dom.getParent(g,"A"))&&h.childNodes.length==1){f.dom.remove(h)}else{f.dom.remove(g)}}f.execCommand("mceRepaint");return false}})},getInfo:function(){return{longname:"Edit Image",author:"WordPress",authorurl:"http://wordpress.org",infourl:"",version:"1.0"}}});tinymce.PluginManager.add("wpeditimage",tinymce.plugins.wpEditImage)})(); \ No newline at end of file diff --git a/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin_src.js b/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin_src.js new file mode 100644 index 00000000..c241158d --- /dev/null +++ b/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin_src.js @@ -0,0 +1,281 @@ + +(function() { + tinymce.create('tinymce.plugins.wpEditImage', { + url: '', + editor: {}, + + init: function(ed, url) { + var t = this, mouse = {}; + + t.url = url; + t.editor = ed; + t._createButtons(); + + // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('...'); + ed.addCommand('WP_EditImage', function() { + var el = ed.selection.getNode(), vp, H, W, cls = ed.dom.getAttrib(el, 'class'); + + if ( cls.indexOf('mceItem') != -1 || cls.indexOf('wpGallery') != -1 || el.nodeName != 'IMG' ) + return; + + vp = tinymce.DOM.getViewPort(); + H = 680 < (vp.h - 70) ? 680 : vp.h - 70; + W = 650 < vp.w ? 650 : vp.w; + + ed.windowManager.open({ + file: url + '/editimage.html', + width: W+'px', + height: H+'px', + inline: true + }); + }); + + ed.onInit.add(function(ed) { + ed.dom.events.add(ed.getBody(), 'dragstart', function(e) { + var parent; + + if ( e.target.nodeName == 'IMG' && ( parent = ed.dom.getParent(e.target, 'div.mceTemp') ) ) { + ed.selection.select(parent); + } + }); + }); + + // resize the caption
      when the image is soft-resized by the user (only possible in Firefox and IE) + ed.onMouseUp.add(function(ed, e) { + if ( tinymce.isWebKit || tinymce.isOpera ) + return; + + if ( mouse.x && (e.clientX != mouse.x || e.clientY != mouse.y) ) { + var n = ed.selection.getNode(); + + if ( 'IMG' == n.nodeName ) { + window.setTimeout(function(){ + var DL = ed.dom.getParent(n, 'dl.wp-caption'), width; + + if ( n.width != mouse.img_w || n.height != mouse.img_h ) + n.className = n.className.replace(/size-[^ "']+/, ''); + + if ( DL ) { + width = ed.dom.getAttrib(n, 'width') || n.width; + width = parseInt(width, 10); + ed.dom.setStyle(DL, 'width', 10 + width); + ed.execCommand('mceRepaint'); + } + }, 100); + } + } + mouse = {}; + }); + + // show editimage buttons + ed.onMouseDown.add(function(ed, e) { + var target = e.target; + + if ( target.nodeName != 'IMG' ) { + if ( target.firstChild && target.firstChild.nodeName == 'IMG' && target.childNodes.length == 1 ) + target = target.firstChild; + else + return; + } + + if ( ed.dom.getAttrib(target, 'class').indexOf('mceItem') == -1 ) { + mouse = { + x: e.clientX, + y: e.clientY, + img_w: target.clientWidth, + img_h: target.clientHeight + }; + + ed.plugins.wordpress._showButtons(target, 'wp_editbtns'); + } + }); + + // when pressing Return inside a caption move the caret to a new parapraph under it + ed.onKeyPress.add(function(ed, e) { + var n, DL, DIV, P; + + if ( e.keyCode == 13 ) { + n = ed.selection.getNode(); + DL = ed.dom.getParent(n, 'dl.wp-caption'); + + if ( DL ) + DIV = ed.dom.getParent(DL, 'div.mceTemp'); + + if ( DIV ) { + P = ed.dom.create('p', {}, '
      '); + ed.dom.insertAfter( P, DIV ); + ed.selection.select(P.firstChild); + + if ( tinymce.isIE ) { + ed.selection.setContent(''); + } else { + ed.selection.setContent('
      '); + ed.selection.setCursorLocation(P, 0); + } + + ed.dom.events.cancel(e); + return false; + } + } + }); + + ed.onBeforeSetContent.add(function(ed, o) { + o.content = ed.wpSetImgCaption(o.content); + }); + + ed.onPostProcess.add(function(ed, o) { + if (o.get) + o.content = ed.wpGetImgCaption(o.content); + }); + + ed.wpSetImgCaption = function(content) { + return t._do_shcode(content); + }; + + ed.wpGetImgCaption = function(content) { + return t._get_shcode(content); + }; + }, + + _do_shcode : function(content) { + return content.replace(/(?:

      )?\[(?:wp_)?caption([^\]]+)\]([\s\S]+?)\[\/(?:wp_)?caption\](?:<\/p>)?/g, function(a,b,c){ + var id, cls, w, cap, div_cls, img, trim = tinymce.trim; + + id = b.match(/id=['"]([^'"]*)['"] ?/); + b = b.replace(id[0], ''); + + cls = b.match(/align=['"]([^'"]*)['"] ?/); + b = b.replace(cls[0], ''); + + w = b.match(/width=['"]([0-9]*)['"] ?/); + b = b.replace(w[0], ''); + + c = trim(c); + img = c.match(/((?:]+>)?]+>(?:<\/a>)?)([\s\S]*)/i); + + if ( img && img[2] ) { + cap = trim( img[2] ); + img = trim( img[1] ); + } else { + // old captions shortcode style + cap = trim(b).replace(/caption=['"]/, '').replace(/['"]$/, ''); + img = c; + } + + id = ( id && id[1] ) ? id[1] : ''; + cls = ( cls && cls[1] ) ? cls[1] : 'alignnone'; + w = ( w && w[1] ) ? w[1] : ''; + + if ( !w || !cap ) + return c; + + div_cls = 'mceTemp'; + if ( cls == 'aligncenter' ) + div_cls += ' mceIEcenter'; + + return '

      '; + }); + }, + + _get_shcode : function(content) { + return content.replace(/
      ]*>([\s\S]+?)<\/div>/g, function(a, b){ + var ret = b.replace(/
      ]+)>\s*
      ]+>([\s\S]+?)<\/dt>\s*
      ]+>([\s\S]*?)<\/dd>\s*<\/dl>/gi, function(a,b,c,cap){ + var id, cls, w; + + w = c.match(/width="([0-9]*)"/); + w = ( w && w[1] ) ? w[1] : ''; + + if ( !w || !cap ) + return c; + + id = b.match(/id="([^"]*)"/); + id = ( id && id[1] ) ? id[1] : ''; + + cls = b.match(/class="([^"]*)"/); + cls = ( cls && cls[1] ) ? cls[1] : ''; + cls = cls.match(/align[a-z]+/) || 'alignnone'; + + cap = cap.replace(/\r\n|\r/g, '\n').replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g, function(a){ + // no line breaks inside HTML tags + return a.replace(/[\r\n\t]+/, ' '); + }); + + // convert remaining line breaks to
      + cap = cap.replace(/\s*\n\s*/g, '
      '); + + return '[caption id="'+id+'" align="'+cls+'" width="'+w+'"]'+c+' '+cap+'[/caption]'; + }); + + if ( ret.indexOf('[caption') !== 0 ) { + // the caption html seems brocken, try to find the image that may be wrapped in a link + // and may be followed by

      with the caption text. + ret = b.replace(/[\s\S]*?((?:]+>)?]+>(?:<\/a>)?)(

      [\s\S]*<\/p>)?[\s\S]*/gi, '

      $1

      $2'); + } + + return ret; + }); + }, + + _createButtons : function() { + var t = this, ed = tinyMCE.activeEditor, DOM = tinymce.DOM, editButton, dellButton; + + DOM.remove('wp_editbtns'); + + DOM.add(document.body, 'div', { + id : 'wp_editbtns', + style : 'display:none;' + }); + + editButton = DOM.add('wp_editbtns', 'img', { + src : t.url+'/img/image.png', + id : 'wp_editimgbtn', + width : '24', + height : '24', + title : ed.getLang('wpeditimage.edit_img') + }); + + tinymce.dom.Event.add(editButton, 'mousedown', function(e) { + var ed = tinyMCE.activeEditor; + ed.windowManager.bookmark = ed.selection.getBookmark('simple'); + ed.execCommand("WP_EditImage"); + }); + + dellButton = DOM.add('wp_editbtns', 'img', { + src : t.url+'/img/delete.png', + id : 'wp_delimgbtn', + width : '24', + height : '24', + title : ed.getLang('wpeditimage.del_img') + }); + + tinymce.dom.Event.add(dellButton, 'mousedown', function(e) { + var ed = tinyMCE.activeEditor, el = ed.selection.getNode(), p; + + if ( el.nodeName == 'IMG' && ed.dom.getAttrib(el, 'class').indexOf('mceItem') == -1 ) { + if ( (p = ed.dom.getParent(el, 'div')) && ed.dom.hasClass(p, 'mceTemp') ) + ed.dom.remove(p); + else if ( (p = ed.dom.getParent(el, 'A')) && p.childNodes.length == 1 ) + ed.dom.remove(p); + else + ed.dom.remove(el); + + ed.execCommand('mceRepaint'); + return false; + } + }); + }, + + getInfo : function() { + return { + longname : 'Edit Image', + author : 'WordPress', + authorurl : 'http://wordpress.org', + infourl : '', + version : "1.0" + }; + } + }); + + tinymce.PluginManager.add('wpeditimage', tinymce.plugins.wpEditImage); +})(); diff --git a/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.dev.js b/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.dev.js index 2d7e38e4..18e78117 100644 --- a/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.dev.js +++ b/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.dev.js @@ -3,17 +3,7 @@ var tinymce = null, tinyMCEPopup, tinyMCE, wpImage; tinyMCEPopup = { init: function() { - var t = this, w, li, q, i, it; - - li = ('' + document.location.search).replace(/^\?/, '').split('&'); - q = {}; - for ( i = 0; i < li.length; i++ ) { - it = li[i].split('='); - q[unescape(it[0])] = unescape(it[1]); - } - - if (q.mce_rdomain) - document.domain = q.mce_rdomain; + var t = this, w, ti; // Find window & API w = t.getWin(); @@ -21,6 +11,7 @@ tinyMCEPopup = { tinyMCE = w.tinyMCE; t.editor = tinymce.EditorManager.activeEditor; t.params = t.editor.windowManager.params; + t.features = t.editor.windowManager.features; // Setup local DOM t.dom = t.editor.windowManager.createInstance('tinymce.dom.DOMUtils', document); @@ -28,7 +19,7 @@ tinyMCEPopup = { }, getWin : function() { - return window.dialogArguments || opener || parent || top; + return (!window.frameElement && window.dialogArguments) || opener || parent || top; }, getParam : function(n, dv) { @@ -36,16 +27,16 @@ tinyMCEPopup = { }, close : function() { - var t = this, win = t.getWin(); + var t = this; // To avoid domain relaxing issue in Opera function close() { - win.tb_remove(); - tinymce = tinyMCE = t.editor = t.dom = t.dom.doc = null; // Cleanup + t.editor.windowManager.close(window); + tinymce = tinyMCE = t.editor = t.params = t.dom = t.dom.doc = null; // Cleanup }; if (tinymce.isOpera) - win.setTimeout(close, 0); + t.getWin().setTimeout(close, 0); else close(); }, @@ -59,13 +50,13 @@ tinyMCEPopup = { }, storeSelection : function() { - this.editor.windowManager.bookmark = tinyMCEPopup.editor.selection.getBookmark('simple'); + this.editor.windowManager.bookmark = tinyMCEPopup.editor.selection.getBookmark(1); }, restoreSelection : function() { var t = tinyMCEPopup; - if (tinymce.isIE) + if ( tinymce.isIE ) t.editor.selection.moveToBookmark(t.editor.windowManager.bookmark); } } @@ -74,12 +65,14 @@ tinyMCEPopup.init(); wpImage = { preInit : function() { // import colors stylesheet from parent - var win = tinyMCEPopup.getWin(), styles = win.document.styleSheets, url, i; + var ed = tinyMCEPopup.editor, win = tinyMCEPopup.getWin(), styles = win.document.styleSheets, url, i; for ( i = 0; i < styles.length; i++ ) { url = styles.item(i).href; - if ( url && url.indexOf('colors') != -1 ) - document.write( '' ); + if ( url && url.indexOf('colors') != -1 ) { + document.getElementsByTagName('head')[0].appendChild( ed.dom.create('link', {rel:'stylesheet', href: url}) ); + break; + } } }, @@ -242,7 +235,7 @@ wpImage = { setup : function() { var t = this, c, el, link, fname, f = document.forms[0], ed = tinyMCEPopup.editor, - d = t.I('img_demo'), dom = tinyMCEPopup.dom, DL, caption = '', dlc, pa; + d = t.I('img_demo'), dom = tinyMCEPopup.dom, DL, DD, caption = '', dlc, pa; document.dir = tinyMCEPopup.editor.getParam('directionality',''); @@ -267,15 +260,12 @@ wpImage = { tinymce.trim(c); } - tinymce.each(DL.childNodes, function(e) { - if ( e.nodeName == 'DD' && dom.hasClass(e, 'wp-caption-dd') ) { - caption = e.innerHTML; - return; - } - }); + DD = ed.dom.select('dd.wp-caption-dd', DL); + if ( DD && DD[0] ) + caption = ed.serializer.serialize(DD[0]).replace(/^

      /, '').replace(/<\/p>$/, ''); } - f.img_cap.value = caption; + f.img_cap_text.value = caption; f.img_title.value = ed.dom.getAttrib(el, 'title'); f.img_alt.value = ed.dom.getAttrib(el, 'alt'); f.border.value = ed.dom.getAttrib(el, 'border'); @@ -326,7 +316,9 @@ wpImage = { d.className = t.align = "alignnone"; } - if ( t.width && t.preloadImg.width ) t.showSizeSet(); + if ( t.width && t.preloadImg.width ) + t.showSizeSet(); + document.body.style.display = ''; }, @@ -351,7 +343,7 @@ wpImage = { update : function() { var t = this, f = document.forms[0], ed = tinyMCEPopup.editor, el, b, fixSafari = null, DL, P, A, DIV, do_caption = null, img_class = f.img_classes.value, html, - id, cap_id = '', cap, DT, DD, cap_width, div_cls, lnk = '', pa, aa; + id, cap_id = '', cap, DT, DD, cap_width, div_cls, lnk = '', pa, aa, caption; tinyMCEPopup.restoreSelection(); el = ed.selection.getNode(); @@ -362,7 +354,7 @@ wpImage = { return; } - if ( f.img_cap.value != '' && f.width.value != '' ) { + if ( f.img_cap_text.value != '' && f.width.value != '' ) { do_caption = 1; img_class = img_class.replace( /align[^ "']+\s?/gi, '' ); } @@ -393,16 +385,11 @@ wpImage = { if ( ! f.link_href.value.match(/https?:\/\//i) ) f.link_href.value = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.link_href.value); - if ( tinymce.isWebKit && ed.dom.hasClass(el, 'aligncenter') ) { - ed.dom.removeClass(el, 'aligncenter'); - fixSafari = 1; - } - - tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1}); - if ( fixSafari ) ed.dom.addClass(el, 'aligncenter'); + ed.getDoc().execCommand("unlink", false, null); + tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1}); tinymce.each(ed.dom.select("a"), function(n) { - if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') { + if ( ed.dom.getAttrib(n, 'href') == '#mce_temp_url#' ) { ed.dom.setAttribs(n, { href : f.link_href.value, @@ -429,6 +416,13 @@ wpImage = { if ( do_caption ) { cap_width = 10 + parseInt(f.width.value); div_cls = (t.align == 'aligncenter') ? 'mceTemp mceIEcenter' : 'mceTemp'; + caption = f.img_cap_text.value; + + caption = caption.replace(/\r\n|\r/g, '\n').replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g, function(a){ + return a.replace(/[\r\n\t]+/, ' '); + }); + + caption = caption.replace(/\s*\n\s*/g, '
      '); if ( DL ) { ed.dom.setAttribs(DL, { @@ -440,24 +434,26 @@ wpImage = { ed.dom.setAttrib(DIV, 'class', div_cls); if ( (DT = ed.dom.getParent(el, 'dt')) && (DD = DT.nextSibling) && ed.dom.hasClass(DD, 'wp-caption-dd') ) - ed.dom.setHTML(DD, f.img_cap.value); + ed.dom.setHTML(DD, caption); } else { if ( (id = f.img_classes.value.match( /wp-image-([0-9]{1,6})/ )) && id[1] ) cap_id = 'attachment_'+id[1]; if ( f.link_href.value && (lnk = ed.dom.getParent(el, 'a')) ) { - if ( lnk.childNodes.length == 1 ) + if ( lnk.childNodes.length == 1 ) { html = ed.dom.getOuterHTML(lnk); - else { + } else { html = ed.dom.getOuterHTML(lnk); - html = html.match(/]+>/i); + html = html.match(/
      ]+>/i); html = html+ed.dom.getOuterHTML(el)+''; } - } else html = ed.dom.getOuterHTML(el); + } else { + html = ed.dom.getOuterHTML(el); + } html = '

      '+html+'
      '+f.img_cap.value+'
      '; + 'px">
      '+html+'
      '+caption+'
      '; cap = ed.dom.create('div', {'class': div_cls}, html); @@ -614,3 +610,4 @@ wpImage = { window.onload = function(){wpImage.init();} wpImage.preInit(); + diff --git a/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js b/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js index ef628ed1..eebfb3d5 100644 --- a/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js +++ b/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js @@ -1 +1 @@ -var tinymce=null,tinyMCEPopup,tinyMCE,wpImage;tinyMCEPopup={init:function(){var d=this,b,a,f,c,e;a=(""+document.location.search).replace(/^\?/,"").split("&");f={};for(c=0;c')}}},I:function(a){return document.getElementById(a)},current:"",link:"",link_rel:"",target_value:"",current_size_sel:"s100",width:"",height:"",align:"",img_alt:"",setTabs:function(b){var a=this;if("current"==b.className){return false}a.I("div_advanced").style.display=("tab_advanced"==b.id)?"block":"none";a.I("div_basic").style.display=("tab_basic"==b.id)?"block":"none";a.I("tab_basic").className=a.I("tab_advanced").className="";b.className="current";return false},img_seturl:function(b){var c=this,a=c.I("link_rel").value;if("current"==b){c.I("link_href").value=c.current;c.I("link_rel").value=c.link_rel}else{c.I("link_href").value=c.link;if(a){a=a.replace(/attachment|wp-att-[0-9]+/gi,"");c.I("link_rel").value=tinymce.trim(a)}}},imgAlignCls:function(b){var c=this,a=c.I("img_classes").value;c.I("img_demo").className=c.align=b;a=a.replace(/align[^ "']+/gi,"");a+=(" "+b);a=a.replace(/\s+/g," ").replace(/^\s/,"");if("aligncenter"==b){c.I("hspace").value="";c.updateStyle("hspace")}c.I("img_classes").value=a},showSize:function(e){var c=this,f=c.I("img_demo"),a=c.width,d=c.height,g=e.id||"s100",b;b=parseInt(g.substring(1))/200;f.width=Math.round(a*b);f.height=Math.round(d*b);c.showSizeClear();e.style.borderColor="#A3A3A3";e.style.backgroundColor="#E5E5E5"},showSizeSet:function(){var b=this,d,c,a;if((b.width*1.3)>parseInt(b.preloadImg.width)){d=b.I("s130"),c=b.I("s120"),a=b.I("s110");d.onclick=c.onclick=a.onclick=null;d.onmouseover=c.onmouseover=a.onmouseover=null;d.style.color=c.style.color=a.style.color="#aaa"}},showSizeRem:function(){var a=this,c=a.I("img_demo"),b=document.forms[0];c.width=Math.round(b.width.value*0.5);c.height=Math.round(b.height.value*0.5);a.showSizeClear();a.I(a.current_size_sel).style.borderColor="#A3A3A3";a.I(a.current_size_sel).style.backgroundColor="#E5E5E5";return false},showSizeClear:function(){var b=this.I("img_size").getElementsByTagName("div"),a;for(a=0;a]+>/i);l=l+g.dom.getOuterHTML(e)+""}}else{l=g.dom.getOuterHTML(e)}l='
      '+l+'
      '+v.img_cap.value+"
      ";j=g.dom.create("div",{"class":z},l);if(h){h.parentNode.insertBefore(j,h);if(h.childNodes.length==1){g.dom.remove(h)}else{if(w&&w.childNodes.length==1){g.dom.remove(w)}else{g.dom.remove(e)}}}else{if(c=g.dom.getParent(e,"TD,TH,LI")){c.appendChild(j);if(w&&w.childNodes.length==1){g.dom.remove(w)}else{g.dom.remove(e)}}}}}else{if(n&&r){if(v.link_href.value&&(y=g.dom.getParent(e,"a"))){l=g.dom.getOuterHTML(y)}else{l=g.dom.getOuterHTML(e)}h=g.dom.create("p",{},l);r.parentNode.insertBefore(h,r);g.dom.remove(r)}}if(v.img_classes.value.indexOf("aligncenter")!=-1){if(h&&(!h.style||h.style.textAlign!="center")){g.dom.setStyle(h,"textAlign","center")}}else{if(h&&h.style&&h.style.textAlign=="center"){g.dom.setStyle(h,"textAlign","")}}if(!v.link_href.value&&p){x=g.selection.getBookmark();g.dom.remove(p,1);g.selection.moveToBookmark(x)}tinyMCEPopup.execCommand("mceEndUndoLevel");g.execCommand("mceRepaint");tinyMCEPopup.close()},updateStyle:function(a){var e=tinyMCEPopup.dom,c,d=document.forms[0],b=e.create("img",{style:d.img_style.value});if(tinyMCEPopup.editor.settings.inline_styles){if(a=="align"){e.setStyle(b,"float","");e.setStyle(b,"vertical-align","");c=d.align.value;if(c){if(c=="left"||c=="right"){e.setStyle(b,"float",c)}else{b.style.verticalAlign=c}}}if(a=="border"){e.setStyle(b,"border","");c=d.border.value;if(c||c=="0"){if(c=="0"){b.style.border="0"}else{b.style.border=c+"px solid black"}}}if(a=="hspace"){e.setStyle(b,"marginLeft","");e.setStyle(b,"marginRight","");c=d.hspace.value;if(c){b.style.marginLeft=c+"px";b.style.marginRight=c+"px"}}if(a=="vspace"){e.setStyle(b,"marginTop","");e.setStyle(b,"marginBottom","");c=d.vspace.value;if(c){b.style.marginTop=c+"px";b.style.marginBottom=c+"px"}}d.img_style.value=e.serializeStyle(e.parseStyle(b.style.cssText));this.demoSetStyle()}},checkVal:function(a){if(a.value==""){if(a.id=="img_src"){a.value=this.I("img_demo").src||this.preloadImg.src}}},resetImageData:function(){var a=document.forms[0];a.width.value=a.height.value=""},updateImageData:function(){var d=document.forms[0],b=wpImage,a=d.width.value,c=d.height.value;if(!a&&c){a=d.width.value=b.width=Math.round(b.preloadImg.width/(b.preloadImg.height/c))}else{if(a&&!c){c=d.height.value=b.height=Math.round(b.preloadImg.height/(b.preloadImg.width/a))}}if(!a){d.width.value=b.width=b.preloadImg.width}if(!c){d.height.value=b.height=b.preloadImg.height}b.showSizeSet();b.demoSetSize();if(d.img_style.value){b.demoSetStyle()}},getImageData:function(){var a=wpImage,b=document.forms[0];a.preloadImg=new Image();a.preloadImg.onload=a.updateImageData;a.preloadImg.onerror=a.resetImageData;a.preloadImg.src=tinyMCEPopup.editor.documentBaseURI.toAbsolute(b.img_src.value)}};window.onload=function(){wpImage.init()};wpImage.preInit(); \ No newline at end of file +var tinymce=null,tinyMCEPopup,tinyMCE,wpImage;tinyMCEPopup={init:function(){var b=this,a,c;a=b.getWin();tinymce=a.tinymce;tinyMCE=a.tinyMCE;b.editor=tinymce.EditorManager.activeEditor;b.params=b.editor.windowManager.params;b.features=b.editor.windowManager.features;b.dom=b.editor.windowManager.createInstance("tinymce.dom.DOMUtils",document);b.editor.windowManager.onOpen.dispatch(b.editor.windowManager,window)},getWin:function(){return(!window.frameElement&&window.dialogArguments)||opener||parent||top},getParam:function(b,a){return this.editor.getParam(b,a)},close:function(){var a=this;function b(){a.editor.windowManager.close(window);tinymce=tinyMCE=a.editor=a.params=a.dom=a.dom.doc=null}if(tinymce.isOpera){a.getWin().setTimeout(b,0)}else{b()}},execCommand:function(d,c,e,b){b=b||{};b.skip_focus=1;this.restoreSelection();return this.editor.execCommand(d,c,e,b)},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark(1)},restoreSelection:function(){var a=tinyMCEPopup;if(tinymce.isIE){a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)}}};tinyMCEPopup.init();wpImage={preInit:function(){var a=tinyMCEPopup.editor,e=tinyMCEPopup.getWin(),d=e.document.styleSheets,b,c;for(c=0;cparseInt(b.preloadImg.width)){d=b.I("s130"),c=b.I("s120"),a=b.I("s110");d.onclick=c.onclick=a.onclick=null;d.onmouseover=c.onmouseover=a.onmouseover=null;d.style.color=c.style.color=a.style.color="#aaa"}},showSizeRem:function(){var a=this,c=a.I("img_demo"),b=document.forms[0];c.width=Math.round(b.width.value*0.5);c.height=Math.round(b.height.value*0.5);a.showSizeClear();a.I(a.current_size_sel).style.borderColor="#A3A3A3";a.I(a.current_size_sel).style.backgroundColor="#E5E5E5";return false},showSizeClear:function(){var b=this.I("img_size").getElementsByTagName("div"),a;for(a=0;a/,"").replace(/<\/p>$/,"")}}j.img_cap_text.value=p;j.img_title.value=i.dom.getAttrib(b,"title");j.img_alt.value=i.dom.getAttrib(b,"alt");j.border.value=i.dom.getAttrib(b,"border");j.vspace.value=i.dom.getAttrib(b,"vspace");j.hspace.value=i.dom.getAttrib(b,"hspace");j.align.value=i.dom.getAttrib(b,"align");j.width.value=q.width=i.dom.getAttrib(b,"width");j.height.value=q.height=i.dom.getAttrib(b,"height");j.img_classes.value=l;j.img_style.value=i.dom.getAttrib(b,"style");if(h.getAttrib(b,"hspace")){q.updateStyle("hspace")}if(h.getAttrib(b,"border")){q.updateStyle("border")}if(h.getAttrib(b,"vspace")){q.updateStyle("vspace")}if(n=i.dom.getParent(b,"A")){j.link_href.value=q.current=i.dom.getAttrib(n,"href");j.link_title.value=i.dom.getAttrib(n,"title");j.link_rel.value=q.link_rel=i.dom.getAttrib(n,"rel");j.link_style.value=i.dom.getAttrib(n,"style");q.target_value=i.dom.getAttrib(n,"target");j.link_classes.value=i.dom.getAttrib(n,"class")}j.link_target.checked=(q.target_value&&q.target_value=="_blank")?"checked":"";e=m.substring(m.lastIndexOf("/"));e=e.replace(/-[0-9]{2,4}x[0-9]{2,4}/,"");q.link=m.substring(0,m.lastIndexOf("/"))+e;if(l.indexOf("alignleft")!=-1){q.I("alignleft").checked="checked";k.className=q.align="alignleft"}else{if(l.indexOf("aligncenter")!=-1){q.I("aligncenter").checked="checked";k.className=q.align="aligncenter"}else{if(l.indexOf("alignright")!=-1){q.I("alignright").checked="checked";k.className=q.align="alignright"}else{if(l.indexOf("alignnone")!=-1){q.I("alignnone").checked="checked";k.className=q.align="alignnone"}}}}if(q.width&&q.preloadImg.width){q.showSizeSet()}document.body.style.display=""},remove:function(){var a=tinyMCEPopup.editor,c,b;tinyMCEPopup.restoreSelection();b=a.selection.getNode();if(b.nodeName!="IMG"){return}if((c=a.dom.getParent(b,"div"))&&a.dom.hasClass(c,"mceTemp")){a.dom.remove(c)}else{if((c=a.dom.getParent(b,"A"))&&c.childNodes.length==1){a.dom.remove(c)}else{a.dom.remove(b)}}a.execCommand("mceRepaint");tinyMCEPopup.close();return},update:function(){var m=this,v=document.forms[0],g=tinyMCEPopup.editor,e,y,d=null,n,h,p,r,o=null,k=v.img_classes.value,l,q,u="",j,i,s,a,B,x="",c,z,w;tinyMCEPopup.restoreSelection();e=g.selection.getNode();if(e.nodeName!="IMG"){return}if(v.img_src.value===""){m.remove();return}if(v.img_cap_text.value!=""&&v.width.value!=""){o=1;k=k.replace(/align[^ "']+\s?/gi,"")}p=g.dom.getParent(e,"a");h=g.dom.getParent(e,"p");n=g.dom.getParent(e,"dl");r=g.dom.getParent(e,"div");tinyMCEPopup.execCommand("mceBeginUndoLevel");if(v.width.value!=e.width||v.height.value!=e.height){k=k.replace(/size-[^ "']+/,"")}g.dom.setAttribs(e,{src:v.img_src.value,title:v.img_title.value,alt:v.img_alt.value,width:v.width.value,height:v.height.value,style:v.img_style.value,"class":k});if(v.link_href.value){if(p==null){if(!v.link_href.value.match(/https?:\/\//i)){v.link_href.value=tinyMCEPopup.editor.documentBaseURI.toAbsolute(v.link_href.value)}g.getDoc().execCommand("unlink",false,null);tinyMCEPopup.execCommand("mceInsertLink",false,"#mce_temp_url#",{skip_undo:1});tinymce.each(g.dom.select("a"),function(b){if(g.dom.getAttrib(b,"href")=="#mce_temp_url#"){g.dom.setAttribs(b,{href:v.link_href.value,title:v.link_title.value,rel:v.link_rel.value,target:(v.link_target.checked==true)?"_blank":"","class":v.link_classes.value,style:v.link_style.value})}})}else{g.dom.setAttribs(p,{href:v.link_href.value,title:v.link_title.value,rel:v.link_rel.value,target:(v.link_target.checked==true)?"_blank":"","class":v.link_classes.value,style:v.link_style.value})}}if(o){a=10+parseInt(v.width.value);B=(m.align=="aligncenter")?"mceTemp mceIEcenter":"mceTemp";w=v.img_cap_text.value;w=w.replace(/\r\n|\r/g,"\n").replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g,function(b){return b.replace(/[\r\n\t]+/," ")});w=w.replace(/\s*\n\s*/g,"
      ");if(n){g.dom.setAttribs(n,{"class":"wp-caption "+m.align,style:"width: "+a+"px;"});if(r){g.dom.setAttrib(r,"class",B)}if((i=g.dom.getParent(e,"dt"))&&(s=i.nextSibling)&&g.dom.hasClass(s,"wp-caption-dd")){g.dom.setHTML(s,w)}}else{if((q=v.img_classes.value.match(/wp-image-([0-9]{1,6})/))&&q[1]){u="attachment_"+q[1]}if(v.link_href.value&&(x=g.dom.getParent(e,"a"))){if(x.childNodes.length==1){l=g.dom.getOuterHTML(x)}else{l=g.dom.getOuterHTML(x);l=l.match(/]+>/i);l=l+g.dom.getOuterHTML(e)+""}}else{l=g.dom.getOuterHTML(e)}l='
      '+l+'
      '+w+"
      ";j=g.dom.create("div",{"class":B},l);if(h){h.parentNode.insertBefore(j,h);if(h.childNodes.length==1){g.dom.remove(h)}else{if(x&&x.childNodes.length==1){g.dom.remove(x)}else{g.dom.remove(e)}}}else{if(c=g.dom.getParent(e,"TD,TH,LI")){c.appendChild(j);if(x&&x.childNodes.length==1){g.dom.remove(x)}else{g.dom.remove(e)}}}}}else{if(n&&r){if(v.link_href.value&&(z=g.dom.getParent(e,"a"))){l=g.dom.getOuterHTML(z)}else{l=g.dom.getOuterHTML(e)}h=g.dom.create("p",{},l);r.parentNode.insertBefore(h,r);g.dom.remove(r)}}if(v.img_classes.value.indexOf("aligncenter")!=-1){if(h&&(!h.style||h.style.textAlign!="center")){g.dom.setStyle(h,"textAlign","center")}}else{if(h&&h.style&&h.style.textAlign=="center"){g.dom.setStyle(h,"textAlign","")}}if(!v.link_href.value&&p){y=g.selection.getBookmark();g.dom.remove(p,1);g.selection.moveToBookmark(y)}tinyMCEPopup.execCommand("mceEndUndoLevel");g.execCommand("mceRepaint");tinyMCEPopup.close()},updateStyle:function(a){var e=tinyMCEPopup.dom,c,d=document.forms[0],b=e.create("img",{style:d.img_style.value});if(tinyMCEPopup.editor.settings.inline_styles){if(a=="align"){e.setStyle(b,"float","");e.setStyle(b,"vertical-align","");c=d.align.value;if(c){if(c=="left"||c=="right"){e.setStyle(b,"float",c)}else{b.style.verticalAlign=c}}}if(a=="border"){e.setStyle(b,"border","");c=d.border.value;if(c||c=="0"){if(c=="0"){b.style.border="0"}else{b.style.border=c+"px solid black"}}}if(a=="hspace"){e.setStyle(b,"marginLeft","");e.setStyle(b,"marginRight","");c=d.hspace.value;if(c){b.style.marginLeft=c+"px";b.style.marginRight=c+"px"}}if(a=="vspace"){e.setStyle(b,"marginTop","");e.setStyle(b,"marginBottom","");c=d.vspace.value;if(c){b.style.marginTop=c+"px";b.style.marginBottom=c+"px"}}d.img_style.value=e.serializeStyle(e.parseStyle(b.style.cssText));this.demoSetStyle()}},checkVal:function(a){if(a.value==""){if(a.id=="img_src"){a.value=this.I("img_demo").src||this.preloadImg.src}}},resetImageData:function(){var a=document.forms[0];a.width.value=a.height.value=""},updateImageData:function(){var d=document.forms[0],b=wpImage,a=d.width.value,c=d.height.value;if(!a&&c){a=d.width.value=b.width=Math.round(b.preloadImg.width/(b.preloadImg.height/c))}else{if(a&&!c){c=d.height.value=b.height=Math.round(b.preloadImg.height/(b.preloadImg.width/a))}}if(!a){d.width.value=b.width=b.preloadImg.width}if(!c){d.height.value=b.height=b.preloadImg.height}b.showSizeSet();b.demoSetSize();if(d.img_style.value){b.demoSetStyle()}},getImageData:function(){var a=wpImage,b=document.forms[0];a.preloadImg=new Image();a.preloadImg.onload=a.updateImageData;a.preloadImg.onerror=a.resetImageData;a.preloadImg.src=tinyMCEPopup.editor.documentBaseURI.toAbsolute(b.img_src.value)}};window.onload=function(){wpImage.init()};wpImage.preInit(); \ No newline at end of file diff --git a/wp-includes/js/tinymce/plugins/wpfullscreen/css/wp-fullscreen.css b/wp-includes/js/tinymce/plugins/wpfullscreen/css/wp-fullscreen.css index 267f4674..1bd68c37 100644 --- a/wp-includes/js/tinymce/plugins/wpfullscreen/css/wp-fullscreen.css +++ b/wp-includes/js/tinymce/plugins/wpfullscreen/css/wp-fullscreen.css @@ -1,11 +1,13 @@ /* Distraction Free Writing mode TinyMCE Styles */ - -html, body { + +html, +body { background: transparent; width: auto !important; max-width: none !important; - margin: 0; - padding: 0; + margin: 0 !important; + padding: 0 !important; + min-height: 0 !important; } diff --git a/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin.js b/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin.js index 6c54415f..efc6f3dc 100644 --- a/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin.js +++ b/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create("tinymce.plugins.wpFullscreenPlugin",{init:function(b,d){var e=this,h=0,f={},g=tinymce.DOM,a=false;b.addCommand("wpFullScreenClose",function(){if(b.getParam("wp_fullscreen_is_enabled")){g.win.setTimeout(function(){tinyMCE.remove(b);g.remove("wp_mce_fullscreen_parent");tinyMCE.settings=tinyMCE.oldSettings},10)}});b.addCommand("wpFullScreenSave",function(){var i=tinyMCE.get("wp_mce_fullscreen"),j;i.focus();j=tinyMCE.get(i.getParam("wp_fullscreen_editor_id"));j.setContent(i.getContent({format:"raw"}),{format:"raw"})});b.addCommand("wpFullScreenInit",function(){var k,i,j;b=tinymce.get("content");k=b.getDoc();i=k.body;tinyMCE.oldSettings=tinyMCE.settings;tinymce.each(b.settings,function(l,m){f[m]=l});f.id="wp_mce_fullscreen";f.wp_fullscreen_is_enabled=true;f.wp_fullscreen_editor_id=b.id;f.theme_advanced_resizing=false;f.theme_advanced_statusbar_location="none";f.content_css=f.content_css?f.content_css+","+f.wp_fullscreen_content_css:f.wp_fullscreen_content_css;f.height=tinymce.isIE?i.scrollHeight:i.offsetHeight;tinymce.each(b.getParam("wp_fullscreen_settings"),function(m,l){f[l]=m});j=new tinymce.Editor("wp_mce_fullscreen",f);j.onInit.add(function(l){var n=tinymce.DOM,m=n.select("a.mceButton",n.get("wp-fullscreen-buttons"));if(!b.isHidden()){l.setContent(b.getContent())}else{l.setContent(switchEditors.wpautop(l.getElement().value))}setTimeout(function(){l.onNodeChange.add(function(p,o,q){tinymce.each(m,function(t){var s,r;if(s=n.get("wp_mce_fullscreen_"+t.id.substr(6))){r=s.className;if(r){t.className=r}}})})},1000);l.dom.addClass(l.getBody(),"wp-fullscreen-editor");l.focus()});j.render();if("undefined"!=fullscreen){j.dom.bind(j.dom.doc,"mousemove",function(l){fullscreen.bounder("showToolbar","hideToolbar",2000,l)})}});if("undefined"!=fullscreen){b.addButton("wp_fullscreen",{title:"fullscreen.desc",onclick:function(){fullscreen.on()}})}if(b.getParam("fullscreen_is_enabled")||!b.getParam("wp_fullscreen_is_enabled")){return}function c(){if(a){return}var k=b.getDoc(),j=tinymce.DOM,l,i;if(tinymce.isIE){i=k.body.scrollHeight}else{i=k.documentElement.offsetHeight}l=(i>300)?i:300;if(h!=l){h=l;a=true;setTimeout(function(){a=false},100);j.setStyle(j.get(b.id+"_ifr"),"height",l+"px")}}b.onInit.add(function(j,i){j.onChange.add(c);j.onSetContent.add(c);j.onPaste.add(c);j.onKeyUp.add(c);j.onPostRender.add(c);j.getBody().style.overflowY="hidden"});if(b.getParam("autoresize_on_init",true)){b.onLoadContent.add(function(j,i){setTimeout(function(){c()},1200)})}b.addCommand("wpAutoResize",c)},getInfo:function(){return{longname:"WP Fullscreen",author:"WordPress",authorurl:"http://wordpress.org",infourl:"",version:"1.0"}}});tinymce.PluginManager.add("wpfullscreen",tinymce.plugins.wpFullscreenPlugin)})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.wpFullscreenPlugin",{init:function(a,c){var d=this,g=0,e={},f=tinymce.DOM;a.addCommand("wpFullScreenClose",function(){if(a.getParam("wp_fullscreen_is_enabled")){f.win.setTimeout(function(){tinyMCE.remove(a);f.remove("wp_mce_fullscreen_parent");tinyMCE.settings=tinyMCE.oldSettings},10)}});a.addCommand("wpFullScreenSave",function(){var h=tinyMCE.get("wp_mce_fullscreen"),i;h.focus();i=tinyMCE.get(h.getParam("wp_fullscreen_editor_id"));i.setContent(h.getContent({format:"raw"}),{format:"raw"})});a.addCommand("wpFullScreenInit",function(){var j,h,i;a=tinyMCE.activeEditor;j=a.getDoc();h=j.body;tinyMCE.oldSettings=tinyMCE.settings;tinymce.each(a.settings,function(k,l){e[l]=k});e.id="wp_mce_fullscreen";e.wp_fullscreen_is_enabled=true;e.wp_fullscreen_editor_id=a.id;e.theme_advanced_resizing=false;e.theme_advanced_statusbar_location="none";e.content_css=e.content_css?e.content_css+","+e.wp_fullscreen_content_css:e.wp_fullscreen_content_css;e.height=tinymce.isIE?h.scrollHeight:h.offsetHeight;tinymce.each(a.getParam("wp_fullscreen_settings"),function(m,l){e[l]=m});i=new tinymce.Editor("wp_mce_fullscreen",e);i.onInit.add(function(k){var m=tinymce.DOM,l=m.select("a.mceButton",m.get("wp-fullscreen-buttons"));if(!a.isHidden()){k.setContent(a.getContent())}else{k.setContent(switchEditors.wpautop(k.getElement().value))}setTimeout(function(){k.onNodeChange.add(function(o,n,p){tinymce.each(l,function(s){var r,q;if(r=m.get("wp_mce_fullscreen_"+s.id.substr(6))){q=r.className;if(q){s.className=q}}})})},1000);k.dom.addClass(k.getBody(),"wp-fullscreen-editor");k.focus()});i.render();if("undefined"!=fullscreen){i.dom.bind(i.dom.doc,"mousemove",function(k){fullscreen.bounder("showToolbar","hideToolbar",2000,k)})}});if("undefined"!=fullscreen){a.addButton("wp_fullscreen",{title:"fullscreen.desc",onclick:function(){fullscreen.on()}})}if(a.getParam("fullscreen_is_enabled")||!a.getParam("wp_fullscreen_is_enabled")){return}function b(){var j=a.getDoc(),i=tinymce.DOM,k,h;if(tinymce.isWebKit){h=j.body.offsetHeight}else{h=j.body.scrollHeight}k=(h>300)?h:300;if(g!=k){i.setStyle(i.get(a.id+"_ifr"),"height",k+"px");g=k;a.getWin().scrollTo(0,0)}}a.onInit.add(function(i,h){i.onChange.add(b);i.onSetContent.add(b);i.onPaste.add(b);i.onKeyUp.add(b);i.onPostRender.add(b);i.getBody().style.overflowY="hidden"});if(a.getParam("autoresize_on_init",true)){a.onLoadContent.add(function(i,h){setTimeout(function(){b()},1200)})}a.addCommand("wpAutoResize",b)},getInfo:function(){return{longname:"WP Fullscreen",author:"WordPress",authorurl:"http://wordpress.org",infourl:"",version:"1.0"}}});tinymce.PluginManager.add("wpfullscreen",tinymce.plugins.wpFullscreenPlugin)})(); \ No newline at end of file diff --git a/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin.dev.js b/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js similarity index 94% rename from wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin.dev.js rename to wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js index 6290c112..9d33795f 100644 --- a/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin.dev.js +++ b/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js @@ -8,7 +8,7 @@ tinymce.create('tinymce.plugins.wpFullscreenPlugin', { init : function(ed, url) { - var t = this, oldHeight = 0, s = {}, DOM = tinymce.DOM, resized = false; + var t = this, oldHeight = 0, s = {}, DOM = tinymce.DOM; // Register commands ed.addCommand('wpFullScreenClose', function() { @@ -34,7 +34,7 @@ ed.addCommand('wpFullScreenInit', function() { var d, b, fsed; - ed = tinymce.get('content'); + ed = tinyMCE.activeEditor; d = ed.getDoc(); b = d.body; @@ -112,27 +112,22 @@ * This method gets executed each time the editor needs to resize. */ function resize() { - if ( resized ) - return; - var d = ed.getDoc(), DOM = tinymce.DOM, resizeHeight, myHeight; // Get height differently depending on the browser used - if ( tinymce.isIE ) - myHeight = d.body.scrollHeight; + if ( tinymce.isWebKit ) + myHeight = d.body.offsetHeight; else - myHeight = d.documentElement.offsetHeight; + myHeight = d.body.scrollHeight; // Don't make it smaller than 300px resizeHeight = (myHeight > 300) ? myHeight : 300; // Resize content element if ( oldHeight != resizeHeight ) { - oldHeight = resizeHeight; - resized = true; - setTimeout(function(){ resized = false; }, 100); - DOM.setStyle(DOM.get(ed.id + '_ifr'), 'height', resizeHeight + 'px'); + oldHeight = resizeHeight; + ed.getWin().scrollTo(0,0); } }; diff --git a/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.js b/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.js index 0c2824ac..d48e5a94 100644 --- a/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.js +++ b/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create("tinymce.plugins.wpGallery",{init:function(a,b){var c=this;c.url=b;c._createButtons();a.addCommand("WP_Gallery",function(){var h=a.selection.getNode(),f,e=tinymce.DOM.getViewPort(),g=e.h-80,d=(640'})},_get_gallery:function(b){function a(c,d){d=new RegExp(d+'="([^"]+)"',"g").exec(c);return d?tinymce.DOM.decode(d[1]):""}return b.replace(/(?:]*>)*(]+>)(?:<\/p>)*/g,function(e,d){var c=a(d,"class");if(c.indexOf("wpGallery")!=-1){return"

      ["+tinymce.trim(a(d,"title"))+"]

      "}return e})},_createButtons:function(){var b=this,a=tinyMCE.activeEditor,d=tinymce.DOM,e,c;d.remove("wp_gallerybtns");d.add(document.body,"div",{id:"wp_gallerybtns",style:"display:none;"});e=d.add("wp_gallerybtns","img",{src:b.url+"/img/edit.png",id:"wp_editgallery",width:"24",height:"24",title:a.getLang("wordpress.editgallery")});tinymce.dom.Event.add(e,"mousedown",function(g){var f=tinyMCE.activeEditor;f.windowManager.bookmark=f.selection.getBookmark("simple");f.execCommand("WP_Gallery")});c=d.add("wp_gallerybtns","img",{src:b.url+"/img/delete.png",id:"wp_delgallery",width:"24",height:"24",title:a.getLang("wordpress.delgallery")});tinymce.dom.Event.add(c,"mousedown",function(h){var f=tinyMCE.activeEditor,g=f.selection.getNode();if(g.nodeName=="IMG"&&f.dom.hasClass(g,"wpGallery")){f.dom.remove(g);f.execCommand("mceRepaint");return false}})},getInfo:function(){return{longname:"Gallery Settings",author:"WordPress",authorurl:"http://wordpress.org",infourl:"",version:"1.0"}}});tinymce.PluginManager.add("wpgallery",tinymce.plugins.wpGallery)})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.wpGallery",{init:function(a,b){var c=this;c.url=b;c._createButtons();a.addCommand("WP_Gallery",function(){var h=a.selection.getNode(),f,e=tinymce.DOM.getViewPort(),g=e.h-80,d=(640'})},_get_gallery:function(b){function a(c,d){d=new RegExp(d+'="([^"]+)"',"g").exec(c);return d?tinymce.DOM.decode(d[1]):""}return b.replace(/(?:]*>)*(]+>)(?:<\/p>)*/g,function(e,d){var c=a(d,"class");if(c.indexOf("wpGallery")!=-1){return"

      ["+tinymce.trim(a(d,"title"))+"]

      "}return e})},_createButtons:function(){var b=this,a=tinyMCE.activeEditor,d=tinymce.DOM,e,c;d.remove("wp_gallerybtns");d.add(document.body,"div",{id:"wp_gallerybtns",style:"display:none;"});e=d.add("wp_gallerybtns","img",{src:b.url+"/img/edit.png",id:"wp_editgallery",width:"24",height:"24",title:a.getLang("wordpress.editgallery")});tinymce.dom.Event.add(e,"mousedown",function(g){var f=tinyMCE.activeEditor;f.windowManager.bookmark=f.selection.getBookmark("simple");f.execCommand("WP_Gallery")});c=d.add("wp_gallerybtns","img",{src:b.url+"/img/delete.png",id:"wp_delgallery",width:"24",height:"24",title:a.getLang("wordpress.delgallery")});tinymce.dom.Event.add(c,"mousedown",function(h){var f=tinyMCE.activeEditor,g=f.selection.getNode();if(g.nodeName=="IMG"&&f.dom.hasClass(g,"wpGallery")){f.dom.remove(g);f.execCommand("mceRepaint");return false}})},getInfo:function(){return{longname:"Gallery Settings",author:"WordPress",authorurl:"http://wordpress.org",infourl:"",version:"1.0"}}});tinymce.PluginManager.add("wpgallery",tinymce.plugins.wpGallery)})(); \ No newline at end of file diff --git a/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.dev.js b/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin_src.js similarity index 96% rename from wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.dev.js rename to wp-includes/js/tinymce/plugins/wpgallery/editor_plugin_src.js index 6f571848..9b2d0280 100644 --- a/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.dev.js +++ b/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin_src.js @@ -17,7 +17,7 @@ if ( ed.dom.getAttrib(el, 'class').indexOf('wpGallery') == -1 ) return; post_id = tinymce.DOM.get('post_ID').value; - tb_show('', tinymce.documentBaseURL + '/media-upload.php?post_id='+post_id+'&tab=gallery&TB_iframe=true&width='+W+'&height='+H); + tb_show('', tinymce.documentBaseURL + 'media-upload.php?post_id='+post_id+'&tab=gallery&TB_iframe=true&width='+W+'&height='+H); tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' ); }); diff --git a/wp-includes/js/tinymce/plugins/wplink/editor_plugin.dev.js b/wp-includes/js/tinymce/plugins/wplink/editor_plugin_src.js similarity index 100% rename from wp-includes/js/tinymce/plugins/wplink/editor_plugin.dev.js rename to wp-includes/js/tinymce/plugins/wplink/editor_plugin_src.js diff --git a/wp-includes/js/tinymce/themes/advanced/about.htm b/wp-includes/js/tinymce/themes/advanced/about.htm index d4df984b..d42b1540 100644 --- a/wp-includes/js/tinymce/themes/advanced/about.htm +++ b/wp-includes/js/tinymce/themes/advanced/about.htm @@ -2,9 +2,9 @@ {#advanced_dlg.about_title} - - - + + +
      diff --git a/wp-includes/js/tinymce/themes/advanced/anchor.htm b/wp-includes/js/tinymce/themes/advanced/anchor.htm index 9a78c450..65466210 100644 --- a/wp-includes/js/tinymce/themes/advanced/anchor.htm +++ b/wp-includes/js/tinymce/themes/advanced/anchor.htm @@ -2,8 +2,8 @@ {#advanced_dlg.anchor_title} - - + + diff --git a/wp-includes/js/tinymce/themes/advanced/charmap.htm b/wp-includes/js/tinymce/themes/advanced/charmap.htm index b1afd193..1a0b34bf 100644 --- a/wp-includes/js/tinymce/themes/advanced/charmap.htm +++ b/wp-includes/js/tinymce/themes/advanced/charmap.htm @@ -2,10 +2,10 @@ {#advanced_dlg.charmap_title} - - + + - + @@ -46,6 +46,10 @@
      + + {#advanced_dlg.charmap_usage} + + diff --git a/wp-includes/js/tinymce/themes/advanced/color_picker.htm b/wp-includes/js/tinymce/themes/advanced/color_picker.htm index 5a71c034..08f21720 100644 --- a/wp-includes/js/tinymce/themes/advanced/color_picker.htm +++ b/wp-includes/js/tinymce/themes/advanced/color_picker.htm @@ -2,9 +2,9 @@ {#advanced_dlg.colorpicker_title} - - - + + + diff --git a/wp-includes/js/tinymce/themes/advanced/editor_template.js b/wp-includes/js/tinymce/themes/advanced/editor_template.js index 7f30c18e..d85b4952 100644 --- a/wp-includes/js/tinymce/themes/advanced/editor_template.js +++ b/wp-includes/js/tinymce/themes/advanced/editor_template.js @@ -1 +1 @@ -(function(e){var d=e.DOM,b=e.dom.Event,h=e.extend,f=e.each,a=e.util.Cookie,g,c=e.explode;e.ThemeManager.requireLangPack("advanced");e.create("tinymce.themes.AdvancedTheme",{sizes:[8,10,12,14,18,24,36],controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],justifyfull:["justifyfull_desc","JustifyFull"],bullist:["bullist_desc","InsertUnorderedList"],numlist:["numlist_desc","InsertOrderedList"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],cut:["cut_desc","Cut"],copy:["copy_desc","Copy"],paste:["paste_desc","Paste"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],link:["link_desc","mceLink"],unlink:["unlink_desc","unlink"],image:["image_desc","mceImage"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc","mceCodeEditor"],hr:["hr_desc","InsertHorizontalRule"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","mceForeColor"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","mceBackColor"],charmap:["charmap_desc","mceCharMap"],visualaid:["visualaid_desc","mceToggleVisualAid"],anchor:["anchor_desc","mceInsertAnchor"],newdocument:["newdocument_desc","mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","bullist","numlist","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],init:function(j,k){var l=this,m,i,n;l.editor=j;l.url=k;l.onResolveName=new e.util.Dispatcher(this);j.forcedHighContrastMode=j.settings.detect_highcontrast&&l._isHighContrast();j.settings.skin=j.forcedHighContrastMode?"highcontrast":j.settings.skin;l.settings=m=h({theme_advanced_path:true,theme_advanced_toolbar_location:"bottom",theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"center",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",theme_advanced_font_selector:"span",theme_advanced_show_current_color:0,readonly:j.settings.readonly},j.settings);if(!m.font_size_style_values){m.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(e.is(m.theme_advanced_font_sizes,"string")){m.font_size_style_values=e.explode(m.font_size_style_values);m.font_size_classes=e.explode(m.font_size_classes||"");n={};j.settings.theme_advanced_font_sizes=m.theme_advanced_font_sizes;f(j.getParam("theme_advanced_font_sizes","","hash"),function(q,p){var o;if(p==q&&q>=1&&q<=7){p=q+" ("+l.sizes[q-1]+"pt)";o=m.font_size_classes[q-1];q=m.font_size_style_values[q-1]||(l.sizes[q-1]+"pt")}if(/^\s*\./.test(q)){o=q.replace(/\./g,"")}n[p]=o?{"class":o}:{fontSize:q}});m.theme_advanced_font_sizes=n}if((i=m.theme_advanced_path_location)&&i!="none"){m.theme_advanced_statusbar_location=m.theme_advanced_path_location}if(m.theme_advanced_statusbar_location=="none"){m.theme_advanced_statusbar_location=0}if(j.settings.content_css!==false){j.contentCSS.push(j.baseURI.toAbsolute(k+"/skins/"+j.settings.skin+"/content.css"))}j.onInit.add(function(){if(!j.settings.readonly){j.onNodeChange.add(l._nodeChanged,l);j.onKeyUp.add(l._updateUndoStatus,l);j.onMouseUp.add(l._updateUndoStatus,l);j.dom.bind(j.dom.getRoot(),"dragend",function(){l._updateUndoStatus(j)})}});j.onSetProgressState.add(function(q,o,r){var s,t=q.id,p;if(o){l.progressTimer=setTimeout(function(){s=q.getContainer();s=s.insertBefore(d.create("DIV",{style:"position:relative"}),s.firstChild);p=d.get(q.id+"_tbl");d.add(s,"div",{id:t+"_blocker","class":"mceBlocker",style:{width:p.clientWidth+2,height:p.clientHeight+2}});d.add(s,"div",{id:t+"_progress","class":"mceProgress",style:{left:p.clientWidth/2,top:p.clientHeight/2}})},r||0)}else{d.remove(t+"_blocker");d.remove(t+"_progress");clearTimeout(l.progressTimer)}});d.loadCSS(m.editor_css?j.documentBaseURI.toAbsolute(m.editor_css):k+"/skins/"+j.settings.skin+"/ui.css");if(m.skin_variant){d.loadCSS(k+"/skins/"+j.settings.skin+"/ui_"+m.skin_variant+".css")}},_isHighContrast:function(){var i,j=d.add(d.getRoot(),"div",{style:"background-color: rgb(171,239,86);"});i=(d.getStyle(j,"background-color",true)+"").toLowerCase().replace(/ /g,"");d.remove(j);return i!="rgb(171,239,86)"&&i!="#abef56"},createControl:function(l,i){var j,k;if(k=i.createControl(l)){return k}switch(l){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}if((j=this.controls[l])){return i.createButton(l,{title:"advanced."+j[0],cmd:j[1],ui:j[2],value:j[3]})}},execCommand:function(k,j,l){var i=this["_"+k];if(i){i.call(this,j,l);return true}return false},_importClasses:function(k){var i=this.editor,j=i.controlManager.get("styleselect");if(j.getLength()==0){f(i.dom.getClasses(),function(n,l){var m="style_"+l;i.formatter.register(m,{inline:"span",attributes:{"class":n["class"]},selector:"*"});j.add(n["class"],m)})}},_createStyleSelect:function(m){var k=this,i=k.editor,j=i.controlManager,l;l=j.createListBox("styleselect",{title:"advanced.style_select",onselect:function(o){var p,n=[];f(l.items,function(q){n.push(q.value)});i.focus();i.undoManager.add();p=i.formatter.matchAll(n);if(!o||p[0]==o){if(p[0]){i.formatter.remove(p[0])}}else{i.formatter.apply(o)}i.undoManager.add();i.nodeChanged();return false}});i.onInit.add(function(){var o=0,n=i.getParam("style_formats");if(n){f(n,function(p){var q,r=0;f(p,function(){r++});if(r>1){q=p.name=p.name||"style_"+(o++);i.formatter.register(q,p);l.add(p.title,q)}else{l.add(p.title)}})}else{f(i.getParam("theme_advanced_styles","","hash"),function(r,q){var p;if(r){p="style_"+(o++);i.formatter.register(p,{inline:"span",classes:r,selector:"*"});l.add(k.editor.translate(q),p)}})}});if(l.getLength()==0){l.onPostRender.add(function(o,p){if(!l.NativeListBox){b.add(p.id+"_text","focus",k._importClasses,k);b.add(p.id+"_text","mousedown",k._importClasses,k);b.add(p.id+"_open","focus",k._importClasses,k);b.add(p.id+"_open","mousedown",k._importClasses,k)}else{b.add(p.id,"focus",k._importClasses,k)}})}return l},_createFontSelect:function(){var k,j=this,i=j.editor;k=i.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(l){var m=k.items[k.selectedIndex];if(!l&&m){i.execCommand("FontName",false,m.value);return}i.execCommand("FontName",false,l);k.select(function(n){return l==n});if(m&&m.value==l){k.select(null)}return false}});if(k){f(i.getParam("theme_advanced_fonts",j.settings.theme_advanced_fonts,"hash"),function(m,l){k.add(i.translate(l),m,{style:m.indexOf("dings")==-1?"font-family:"+m:""})})}return k},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(i){var o=n.items[n.selectedIndex];if(!i&&o){o=o.value;if(o["class"]){k.formatter.toggle("fontsize_class",{value:o["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,o.fontSize)}return}if(i["class"]){k.focus();k.undoManager.add();k.formatter.toggle("fontsize_class",{value:i["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,i.fontSize)}n.select(function(p){return i==p});if(o&&(o.value.fontSize==i.fontSize||o.value["class"]==i["class"])){n.select(null)}return false}});if(n){f(m.settings.theme_advanced_font_sizes,function(o,i){var p=o.fontSize;if(p>=1&&p<=7){p=m.sizes[parseInt(p)-1]+"pt"}n.add(i,o,{style:"font-size:"+p,"class":"mceFontSize"+(l++)+(" "+(o["class"]||""))})})}return n},_createBlockFormats:function(){var k,i={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",samp:"advanced.samp"},j=this;k=j.editor.controlManager.createListBox("formatselect",{title:"advanced.block",onselect:function(l){j.editor.execCommand("FormatBlock",false,l);return false}});if(k){f(j.editor.getParam("theme_advanced_blockformats",j.settings.theme_advanced_blockformats,"hash"),function(m,l){k.add(j.editor.translate(l!=m?l:i[m]),m,{"class":"mce_formatPreview mce_"+m})})}return k},_createForeColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_text_colors){l.colors=i}if(k.theme_advanced_default_foreground_color){l.default_color=k.theme_advanced_default_foreground_color}l.title="advanced.forecolor_desc";l.cmd="ForeColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("forecolor",l);return m},_createBackColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_background_colors){l.colors=i}if(k.theme_advanced_default_background_color){l.default_color=k.theme_advanced_default_background_color}l.title="advanced.backcolor_desc";l.cmd="HiliteColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("backcolor",l);return m},renderUI:function(k){var m,l,q,v=this,r=v.editor,w=v.settings,u,j,i;if(r.settings){r.settings.aria_label=w.aria_label+r.getLang("advanced.help_shortcut")}m=j=d.create("span",{role:"application","aria-labelledby":r.id+"_voice",id:r.id+"_parent","class":"mceEditor "+r.settings.skin+"Skin"+(w.skin_variant?" "+r.settings.skin+"Skin"+v._ufirst(w.skin_variant):"")});d.add(m,"span",{"class":"mceVoiceLabel",style:"display:none;",id:r.id+"_voice"},w.aria_label);if(!d.boxModel){m=d.add(m,"div",{"class":"mceOldBoxModel"})}m=u=d.add(m,"table",{role:"presentation",id:r.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});m=q=d.add(m,"tbody");switch((w.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":l=v._rowLayout(w,q,k);break;case"customlayout":l=r.execCallback("theme_advanced_custom_layout",w,q,k,j);break;default:l=v._simpleLayout(w,q,k,j)}m=k.targetNode;i=u.rows;d.addClass(i[0],"mceFirst");d.addClass(i[i.length-1],"mceLast");f(d.select("tr",q),function(o){d.addClass(o.firstChild,"mceFirst");d.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(d.get(w.theme_advanced_toolbar_container)){d.get(w.theme_advanced_toolbar_container).appendChild(j)}else{d.insertAfter(j,m)}b.add(r.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){v._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return b.cancel(n)}});if(!r.getParam("accessibility_focus")){b.add(d.add(j,"a",{href:"#"},""),"focus",function(){tinyMCE.get(r.id).focus()})}if(w.theme_advanced_toolbar_location=="external"){k.deltaHeight=0}v.deltaHeight=k.deltaHeight;k.targetNode=null;r.onKeyDown.add(function(p,n){var s=121,o=122;if(n.altKey){if(n.keyCode===s){window.focus();v.toolbarGroup.focus();return b.cancel(n)}else{if(n.keyCode===o){d.get(p.id+"_path_row").focus();return b.cancel(n)}}}});r.addShortcut("alt+0","","mceShortcuts",v);return{iframeContainer:l,editorContainer:r.id+"_parent",sizeContainer:u,deltaHeight:k.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:e.majorVersion+"."+e.minorVersion}},resizeBy:function(i,j){var k=d.get(this.editor.id+"_ifr");this.resizeTo(k.clientWidth+i,k.clientHeight+j)},resizeTo:function(i,m,k){var j=this.editor,l=this.settings,n=d.get(j.id+"_tbl"),o=d.get(j.id+"_ifr");i=Math.max(l.theme_advanced_resizing_min_width||100,i);m=Math.max(l.theme_advanced_resizing_min_height||100,m);i=Math.min(l.theme_advanced_resizing_max_width||65535,i);m=Math.min(l.theme_advanced_resizing_max_height||65535,m);d.setStyle(n,"height","");d.setStyle(o,"height",m);if(l.theme_advanced_resize_horizontal){d.setStyle(n,"width","");d.setStyle(o,"width",i);if(i"));d.setHTML(l,q.join(""))},_addStatusBar:function(m,j){var k,v=this,p=v.editor,w=v.settings,i,q,u,l;k=d.add(m,"tr");k=l=d.add(k,"td",{"class":"mceStatusbar"});k=d.add(k,"div",{id:p.id+"_path_row",role:"group","aria-labelledby":p.id+"_path_voice"});if(w.theme_advanced_path){d.add(k,"span",{id:p.id+"_path_voice"},p.translate("advanced.path"));d.add(k,"span",{},": ")}else{d.add(k,"span",{}," ")}if(w.theme_advanced_resizing){d.add(l,"a",{id:p.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize",tabIndex:"-1"});if(w.theme_advanced_resizing_use_cookie){p.onPostRender.add(function(){var n=a.getHash("TinyMCE_"+p.id+"_size"),r=d.get(p.id+"_tbl");if(!n){return}v.resizeTo(n.cw,n.ch)})}p.onPostRender.add(function(){b.add(p.id+"_resize","click",function(n){n.preventDefault()});b.add(p.id+"_resize","mousedown",function(D){var t,r,s,o,C,z,A,F,n,E,x;function y(G){G.preventDefault();n=A+(G.screenX-C);E=F+(G.screenY-z);v.resizeTo(n,E)}function B(G){b.remove(d.doc,"mousemove",t);b.remove(p.getDoc(),"mousemove",r);b.remove(d.doc,"mouseup",s);b.remove(p.getDoc(),"mouseup",o);n=A+(G.screenX-C);E=F+(G.screenY-z);v.resizeTo(n,E,true)}D.preventDefault();C=D.screenX;z=D.screenY;x=d.get(v.editor.id+"_ifr");A=n=x.clientWidth;F=E=x.clientHeight;t=b.add(d.doc,"mousemove",y);r=b.add(p.getDoc(),"mousemove",y);s=b.add(d.doc,"mouseup",B);o=b.add(p.getDoc(),"mouseup",B)})})}j.deltaHeight-=21;k=m=null},_updateUndoStatus:function(j){var i=j.controlManager,k=j.undoManager;i.setDisabled("undo",!k.hasUndo()&&!k.typing);i.setDisabled("redo",!k.hasRedo())},_nodeChanged:function(m,r,D,q,E){var y=this,C,F=0,x,G,z=y.settings,w,k,u,B,l,j,i;e.each(y.stateControls,function(n){r.setActive(n,m.queryCommandState(y.controls[n][1]))});function o(p){var s,n=E.parents,t=p;if(typeof(p)=="string"){t=function(v){return v.nodeName==p}}for(s=0;s0){y.statusKeyboardNavigation=new e.ui.KeyboardNavigation({root:m.id+"_path_row",items:d.select("a",C),excludeFromTabOrder:true,onCancel:function(){m.focus()}},d)}}},_sel:function(i){this.editor.execCommand("mceSelectNodeDepth",false,i)},_mceInsertAnchor:function(k,j){var i=this.editor;i.windowManager.open({url:this.url+"/anchor.htm",width:320+parseInt(i.getLang("advanced.anchor_delta_width",0)),height:90+parseInt(i.getLang("advanced.anchor_delta_height",0)),inline:true},{theme_url:this.url})},_mceCharMap:function(){var i=this.editor;i.windowManager.open({url:this.url+"/charmap.htm",width:550+parseInt(i.getLang("advanced.charmap_delta_width",0)),height:250+parseInt(i.getLang("advanced.charmap_delta_height",0)),inline:true},{theme_url:this.url})},_mceHelp:function(){var i=this.editor;i.windowManager.open({url:this.url+"/about.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceShortcuts:function(){var i=this.editor;i.windowManager.open({url:this.url+"/shortcuts.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceColorPicker:function(k,j){var i=this.editor;j=j||{};i.windowManager.open({url:this.url+"/color_picker.htm",width:375+parseInt(i.getLang("advanced.colorpicker_delta_width",0)),height:250+parseInt(i.getLang("advanced.colorpicker_delta_height",0)),close_previous:false,inline:true},{input_color:j.color,func:j.func,theme_url:this.url})},_mceCodeEditor:function(j,k){var i=this.editor;i.windowManager.open({url:this.url+"/source_editor.htm",width:parseInt(i.getParam("theme_advanced_source_editor_width",720)),height:parseInt(i.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url})},_mceImage:function(j,k){var i=this.editor;if(i.dom.getAttrib(i.selection.getNode(),"class").indexOf("mceItem")!=-1){return}i.windowManager.open({url:this.url+"/image.htm",width:355+parseInt(i.getLang("advanced.image_delta_width",0)),height:275+parseInt(i.getLang("advanced.image_delta_height",0)),inline:true},{theme_url:this.url})},_mceLink:function(j,k){var i=this.editor;i.windowManager.open({url:this.url+"/link.htm",width:310+parseInt(i.getLang("advanced.link_delta_width",0)),height:200+parseInt(i.getLang("advanced.link_delta_height",0)),inline:true},{theme_url:this.url})},_mceNewDocument:function(){var i=this.editor;i.windowManager.confirm("advanced.newdocument",function(j){if(j){i.execCommand("mceSetContent",false,"")}})},_mceForeColor:function(){var i=this;this._mceColorPicker(0,{color:i.fgColor,func:function(j){i.fgColor=j;i.editor.execCommand("ForeColor",false,j)}})},_mceBackColor:function(){var i=this;this._mceColorPicker(0,{color:i.bgColor,func:function(j){i.bgColor=j;i.editor.execCommand("HiliteColor",false,j)}})},_ufirst:function(i){return i.substring(0,1).toUpperCase()+i.substring(1)}});e.ThemeManager.add("advanced",e.themes.AdvancedTheme)}(tinymce)); \ No newline at end of file +(function(e){var d=e.DOM,b=e.dom.Event,h=e.extend,f=e.each,a=e.util.Cookie,g,c=e.explode;e.ThemeManager.requireLangPack("advanced");e.create("tinymce.themes.AdvancedTheme",{sizes:[8,10,12,14,18,24,36],controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],justifyfull:["justifyfull_desc","JustifyFull"],bullist:["bullist_desc","InsertUnorderedList"],numlist:["numlist_desc","InsertOrderedList"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],cut:["cut_desc","Cut"],copy:["copy_desc","Copy"],paste:["paste_desc","Paste"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],link:["link_desc","mceLink"],unlink:["unlink_desc","unlink"],image:["image_desc","mceImage"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc","mceCodeEditor"],hr:["hr_desc","InsertHorizontalRule"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","mceForeColor"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","mceBackColor"],charmap:["charmap_desc","mceCharMap"],visualaid:["visualaid_desc","mceToggleVisualAid"],anchor:["anchor_desc","mceInsertAnchor"],newdocument:["newdocument_desc","mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","bullist","numlist","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],init:function(j,k){var l=this,m,i,n;l.editor=j;l.url=k;l.onResolveName=new e.util.Dispatcher(this);j.forcedHighContrastMode=j.settings.detect_highcontrast&&l._isHighContrast();j.settings.skin=j.forcedHighContrastMode?"highcontrast":j.settings.skin;l.settings=m=h({theme_advanced_path:true,theme_advanced_toolbar_location:"bottom",theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"center",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",theme_advanced_font_selector:"span",theme_advanced_show_current_color:0,readonly:j.settings.readonly},j.settings);if(!m.font_size_style_values){m.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(e.is(m.theme_advanced_font_sizes,"string")){m.font_size_style_values=e.explode(m.font_size_style_values);m.font_size_classes=e.explode(m.font_size_classes||"");n={};j.settings.theme_advanced_font_sizes=m.theme_advanced_font_sizes;f(j.getParam("theme_advanced_font_sizes","","hash"),function(q,p){var o;if(p==q&&q>=1&&q<=7){p=q+" ("+l.sizes[q-1]+"pt)";o=m.font_size_classes[q-1];q=m.font_size_style_values[q-1]||(l.sizes[q-1]+"pt")}if(/^\s*\./.test(q)){o=q.replace(/\./g,"")}n[p]=o?{"class":o}:{fontSize:q}});m.theme_advanced_font_sizes=n}if((i=m.theme_advanced_path_location)&&i!="none"){m.theme_advanced_statusbar_location=m.theme_advanced_path_location}if(m.theme_advanced_statusbar_location=="none"){m.theme_advanced_statusbar_location=0}if(j.settings.content_css!==false){j.contentCSS.push(j.baseURI.toAbsolute(k+"/skins/"+j.settings.skin+"/content.css"))}j.onInit.add(function(){if(!j.settings.readonly){j.onNodeChange.add(l._nodeChanged,l);j.onKeyUp.add(l._updateUndoStatus,l);j.onMouseUp.add(l._updateUndoStatus,l);j.dom.bind(j.dom.getRoot(),"dragend",function(){l._updateUndoStatus(j)})}});j.onSetProgressState.add(function(q,o,r){var s,t=q.id,p;if(o){l.progressTimer=setTimeout(function(){s=q.getContainer();s=s.insertBefore(d.create("DIV",{style:"position:relative"}),s.firstChild);p=d.get(q.id+"_tbl");d.add(s,"div",{id:t+"_blocker","class":"mceBlocker",style:{width:p.clientWidth+2,height:p.clientHeight+2}});d.add(s,"div",{id:t+"_progress","class":"mceProgress",style:{left:p.clientWidth/2,top:p.clientHeight/2}})},r||0)}else{d.remove(t+"_blocker");d.remove(t+"_progress");clearTimeout(l.progressTimer)}});d.loadCSS(m.editor_css?j.documentBaseURI.toAbsolute(m.editor_css):k+"/skins/"+j.settings.skin+"/ui.css");if(m.skin_variant){d.loadCSS(k+"/skins/"+j.settings.skin+"/ui_"+m.skin_variant+".css")}},_isHighContrast:function(){var i,j=d.add(d.getRoot(),"div",{style:"background-color: rgb(171,239,86);"});i=(d.getStyle(j,"background-color",true)+"").toLowerCase().replace(/ /g,"");d.remove(j);return i!="rgb(171,239,86)"&&i!="#abef56"},createControl:function(l,i){var j,k;if(k=i.createControl(l)){return k}switch(l){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}if((j=this.controls[l])){return i.createButton(l,{title:"advanced."+j[0],cmd:j[1],ui:j[2],value:j[3]})}},execCommand:function(k,j,l){var i=this["_"+k];if(i){i.call(this,j,l);return true}return false},_importClasses:function(k){var i=this.editor,j=i.controlManager.get("styleselect");if(j.getLength()==0){f(i.dom.getClasses(),function(n,l){var m="style_"+l;i.formatter.register(m,{inline:"span",attributes:{"class":n["class"]},selector:"*"});j.add(n["class"],m)})}},_createStyleSelect:function(m){var k=this,i=k.editor,j=i.controlManager,l;l=j.createListBox("styleselect",{title:"advanced.style_select",onselect:function(o){var p,n=[];f(l.items,function(q){n.push(q.value)});i.focus();i.undoManager.add();p=i.formatter.matchAll(n);if(!o||p[0]==o){if(p[0]){i.formatter.remove(p[0])}}else{i.formatter.apply(o)}i.undoManager.add();i.nodeChanged();return false}});i.onInit.add(function(){var o=0,n=i.getParam("style_formats");if(n){f(n,function(p){var q,r=0;f(p,function(){r++});if(r>1){q=p.name=p.name||"style_"+(o++);i.formatter.register(q,p);l.add(p.title,q)}else{l.add(p.title)}})}else{f(i.getParam("theme_advanced_styles","","hash"),function(r,q){var p;if(r){p="style_"+(o++);i.formatter.register(p,{inline:"span",classes:r,selector:"*"});l.add(k.editor.translate(q),p)}})}});if(l.getLength()==0){l.onPostRender.add(function(o,p){if(!l.NativeListBox){b.add(p.id+"_text","focus",k._importClasses,k);b.add(p.id+"_text","mousedown",k._importClasses,k);b.add(p.id+"_open","focus",k._importClasses,k);b.add(p.id+"_open","mousedown",k._importClasses,k)}else{b.add(p.id,"focus",k._importClasses,k)}})}return l},_createFontSelect:function(){var k,j=this,i=j.editor;k=i.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(l){var m=k.items[k.selectedIndex];if(!l&&m){i.execCommand("FontName",false,m.value);return}i.execCommand("FontName",false,l);k.select(function(n){return l==n});if(m&&m.value==l){k.select(null)}return false}});if(k){f(i.getParam("theme_advanced_fonts",j.settings.theme_advanced_fonts,"hash"),function(m,l){k.add(i.translate(l),m,{style:m.indexOf("dings")==-1?"font-family:"+m:""})})}return k},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(i){var o=n.items[n.selectedIndex];if(!i&&o){o=o.value;if(o["class"]){k.formatter.toggle("fontsize_class",{value:o["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,o.fontSize)}return}if(i["class"]){k.focus();k.undoManager.add();k.formatter.toggle("fontsize_class",{value:i["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,i.fontSize)}n.select(function(p){return i==p});if(o&&(o.value.fontSize==i.fontSize||o.value["class"]&&o.value["class"]==i["class"])){n.select(null)}return false}});if(n){f(m.settings.theme_advanced_font_sizes,function(o,i){var p=o.fontSize;if(p>=1&&p<=7){p=m.sizes[parseInt(p)-1]+"pt"}n.add(i,o,{style:"font-size:"+p,"class":"mceFontSize"+(l++)+(" "+(o["class"]||""))})})}return n},_createBlockFormats:function(){var k,i={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",samp:"advanced.samp"},j=this;k=j.editor.controlManager.createListBox("formatselect",{title:"advanced.block",onselect:function(l){j.editor.execCommand("FormatBlock",false,l);return false}});if(k){f(j.editor.getParam("theme_advanced_blockformats",j.settings.theme_advanced_blockformats,"hash"),function(m,l){k.add(j.editor.translate(l!=m?l:i[m]),m,{"class":"mce_formatPreview mce_"+m})})}return k},_createForeColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_text_colors){l.colors=i}if(k.theme_advanced_default_foreground_color){l.default_color=k.theme_advanced_default_foreground_color}l.title="advanced.forecolor_desc";l.cmd="ForeColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("forecolor",l);return m},_createBackColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_background_colors){l.colors=i}if(k.theme_advanced_default_background_color){l.default_color=k.theme_advanced_default_background_color}l.title="advanced.backcolor_desc";l.cmd="HiliteColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("backcolor",l);return m},renderUI:function(k){var m,l,q,v=this,r=v.editor,w=v.settings,u,j,i;if(r.settings){r.settings.aria_label=w.aria_label+r.getLang("advanced.help_shortcut")}m=j=d.create("span",{role:"application","aria-labelledby":r.id+"_voice",id:r.id+"_parent","class":"mceEditor "+r.settings.skin+"Skin"+(w.skin_variant?" "+r.settings.skin+"Skin"+v._ufirst(w.skin_variant):"")});d.add(m,"span",{"class":"mceVoiceLabel",style:"display:none;",id:r.id+"_voice"},w.aria_label);if(!d.boxModel){m=d.add(m,"div",{"class":"mceOldBoxModel"})}m=u=d.add(m,"table",{role:"presentation",id:r.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});m=q=d.add(m,"tbody");switch((w.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":l=v._rowLayout(w,q,k);break;case"customlayout":l=r.execCallback("theme_advanced_custom_layout",w,q,k,j);break;default:l=v._simpleLayout(w,q,k,j)}m=k.targetNode;i=u.rows;d.addClass(i[0],"mceFirst");d.addClass(i[i.length-1],"mceLast");f(d.select("tr",q),function(o){d.addClass(o.firstChild,"mceFirst");d.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(d.get(w.theme_advanced_toolbar_container)){d.get(w.theme_advanced_toolbar_container).appendChild(j)}else{d.insertAfter(j,m)}b.add(r.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){v._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return b.cancel(n)}});if(!r.getParam("accessibility_focus")){b.add(d.add(j,"a",{href:"#"},""),"focus",function(){tinyMCE.get(r.id).focus()})}if(w.theme_advanced_toolbar_location=="external"){k.deltaHeight=0}v.deltaHeight=k.deltaHeight;k.targetNode=null;r.onKeyDown.add(function(p,n){var s=121,o=122;if(n.altKey){if(n.keyCode===s){if(e.isWebKit){window.focus()}v.toolbarGroup.focus();return b.cancel(n)}else{if(n.keyCode===o){d.get(p.id+"_path_row").focus();return b.cancel(n)}}}});r.addShortcut("alt+0","","mceShortcuts",v);return{iframeContainer:l,editorContainer:r.id+"_parent",sizeContainer:u,deltaHeight:k.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:e.majorVersion+"."+e.minorVersion}},resizeBy:function(i,j){var k=d.get(this.editor.id+"_ifr");this.resizeTo(k.clientWidth+i,k.clientHeight+j)},resizeTo:function(i,m,k){var j=this.editor,l=this.settings,n=d.get(j.id+"_tbl"),o=d.get(j.id+"_ifr");i=Math.max(l.theme_advanced_resizing_min_width||100,i);m=Math.max(l.theme_advanced_resizing_min_height||100,m);i=Math.min(l.theme_advanced_resizing_max_width||65535,i);m=Math.min(l.theme_advanced_resizing_max_height||65535,m);d.setStyle(n,"height","");d.setStyle(o,"height",m);if(l.theme_advanced_resize_horizontal){d.setStyle(n,"width","");d.setStyle(o,"width",i);if(i"));d.setHTML(l,q.join(""))},_addStatusBar:function(m,j){var k,v=this,p=v.editor,w=v.settings,i,q,u,l;k=d.add(m,"tr");k=l=d.add(k,"td",{"class":"mceStatusbar"});k=d.add(k,"div",{id:p.id+"_path_row",role:"group","aria-labelledby":p.id+"_path_voice"});if(w.theme_advanced_path){d.add(k,"span",{id:p.id+"_path_voice"},p.translate("advanced.path"));d.add(k,"span",{},": ")}else{d.add(k,"span",{}," ")}if(w.theme_advanced_resizing){d.add(l,"a",{id:p.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize",tabIndex:"-1"});if(w.theme_advanced_resizing_use_cookie){p.onPostRender.add(function(){var n=a.getHash("TinyMCE_"+p.id+"_size"),r=d.get(p.id+"_tbl");if(!n){return}v.resizeTo(n.cw,n.ch)})}p.onPostRender.add(function(){b.add(p.id+"_resize","click",function(n){n.preventDefault()});b.add(p.id+"_resize","mousedown",function(D){var t,r,s,o,C,z,A,F,n,E,x;function y(G){G.preventDefault();n=A+(G.screenX-C);E=F+(G.screenY-z);v.resizeTo(n,E)}function B(G){b.remove(d.doc,"mousemove",t);b.remove(p.getDoc(),"mousemove",r);b.remove(d.doc,"mouseup",s);b.remove(p.getDoc(),"mouseup",o);n=A+(G.screenX-C);E=F+(G.screenY-z);v.resizeTo(n,E,true)}D.preventDefault();C=D.screenX;z=D.screenY;x=d.get(v.editor.id+"_ifr");A=n=x.clientWidth;F=E=x.clientHeight;t=b.add(d.doc,"mousemove",y);r=b.add(p.getDoc(),"mousemove",y);s=b.add(d.doc,"mouseup",B);o=b.add(p.getDoc(),"mouseup",B)})})}j.deltaHeight-=21;k=m=null},_updateUndoStatus:function(j){var i=j.controlManager,k=j.undoManager;i.setDisabled("undo",!k.hasUndo()&&!k.typing);i.setDisabled("redo",!k.hasRedo())},_nodeChanged:function(m,r,D,q,E){var y=this,C,F=0,x,G,z=y.settings,w,k,u,B,l,j,i;e.each(y.stateControls,function(n){r.setActive(n,m.queryCommandState(y.controls[n][1]))});function o(p){var s,n=E.parents,t=p;if(typeof(p)=="string"){t=function(v){return v.nodeName==p}}for(s=0;s0){y.statusKeyboardNavigation=new e.ui.KeyboardNavigation({root:m.id+"_path_row",items:d.select("a",C),excludeFromTabOrder:true,onCancel:function(){m.focus()}},d)}}},_sel:function(i){this.editor.execCommand("mceSelectNodeDepth",false,i)},_mceInsertAnchor:function(k,j){var i=this.editor;i.windowManager.open({url:this.url+"/anchor.htm",width:320+parseInt(i.getLang("advanced.anchor_delta_width",0)),height:90+parseInt(i.getLang("advanced.anchor_delta_height",0)),inline:true},{theme_url:this.url})},_mceCharMap:function(){var i=this.editor;i.windowManager.open({url:this.url+"/charmap.htm",width:550+parseInt(i.getLang("advanced.charmap_delta_width",0)),height:265+parseInt(i.getLang("advanced.charmap_delta_height",0)),inline:true},{theme_url:this.url})},_mceHelp:function(){var i=this.editor;i.windowManager.open({url:this.url+"/about.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceShortcuts:function(){var i=this.editor;i.windowManager.open({url:this.url+"/shortcuts.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceColorPicker:function(k,j){var i=this.editor;j=j||{};i.windowManager.open({url:this.url+"/color_picker.htm",width:375+parseInt(i.getLang("advanced.colorpicker_delta_width",0)),height:250+parseInt(i.getLang("advanced.colorpicker_delta_height",0)),close_previous:false,inline:true},{input_color:j.color,func:j.func,theme_url:this.url})},_mceCodeEditor:function(j,k){var i=this.editor;i.windowManager.open({url:this.url+"/source_editor.htm",width:parseInt(i.getParam("theme_advanced_source_editor_width",720)),height:parseInt(i.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url})},_mceImage:function(j,k){var i=this.editor;if(i.dom.getAttrib(i.selection.getNode(),"class").indexOf("mceItem")!=-1){return}i.windowManager.open({url:this.url+"/image.htm",width:355+parseInt(i.getLang("advanced.image_delta_width",0)),height:275+parseInt(i.getLang("advanced.image_delta_height",0)),inline:true},{theme_url:this.url})},_mceLink:function(j,k){var i=this.editor;i.windowManager.open({url:this.url+"/link.htm",width:310+parseInt(i.getLang("advanced.link_delta_width",0)),height:200+parseInt(i.getLang("advanced.link_delta_height",0)),inline:true},{theme_url:this.url})},_mceNewDocument:function(){var i=this.editor;i.windowManager.confirm("advanced.newdocument",function(j){if(j){i.execCommand("mceSetContent",false,"")}})},_mceForeColor:function(){var i=this;this._mceColorPicker(0,{color:i.fgColor,func:function(j){i.fgColor=j;i.editor.execCommand("ForeColor",false,j)}})},_mceBackColor:function(){var i=this;this._mceColorPicker(0,{color:i.bgColor,func:function(j){i.bgColor=j;i.editor.execCommand("HiliteColor",false,j)}})},_ufirst:function(i){return i.substring(0,1).toUpperCase()+i.substring(1)}});e.ThemeManager.add("advanced",e.themes.AdvancedTheme)}(tinymce)); \ No newline at end of file diff --git a/wp-includes/js/tinymce/themes/advanced/editor_template_src.js b/wp-includes/js/tinymce/themes/advanced/editor_template_src.js new file mode 100644 index 00000000..00b404a3 --- /dev/null +++ b/wp-includes/js/tinymce/themes/advanced/editor_template_src.js @@ -0,0 +1,1362 @@ +/** + * editor_template_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, each = tinymce.each, Cookie = tinymce.util.Cookie, lastExtID, explode = tinymce.explode; + + // Tell it to load theme specific language pack(s) + tinymce.ThemeManager.requireLangPack('advanced'); + + tinymce.create('tinymce.themes.AdvancedTheme', { + sizes : [8, 10, 12, 14, 18, 24, 36], + + // Control name lookup, format: title, command + controls : { + bold : ['bold_desc', 'Bold'], + italic : ['italic_desc', 'Italic'], + underline : ['underline_desc', 'Underline'], + strikethrough : ['striketrough_desc', 'Strikethrough'], + justifyleft : ['justifyleft_desc', 'JustifyLeft'], + justifycenter : ['justifycenter_desc', 'JustifyCenter'], + justifyright : ['justifyright_desc', 'JustifyRight'], + justifyfull : ['justifyfull_desc', 'JustifyFull'], + bullist : ['bullist_desc', 'InsertUnorderedList'], + numlist : ['numlist_desc', 'InsertOrderedList'], + outdent : ['outdent_desc', 'Outdent'], + indent : ['indent_desc', 'Indent'], + cut : ['cut_desc', 'Cut'], + copy : ['copy_desc', 'Copy'], + paste : ['paste_desc', 'Paste'], + undo : ['undo_desc', 'Undo'], + redo : ['redo_desc', 'Redo'], + link : ['link_desc', 'mceLink'], + unlink : ['unlink_desc', 'unlink'], + image : ['image_desc', 'mceImage'], + cleanup : ['cleanup_desc', 'mceCleanup'], + help : ['help_desc', 'mceHelp'], + code : ['code_desc', 'mceCodeEditor'], + hr : ['hr_desc', 'InsertHorizontalRule'], + removeformat : ['removeformat_desc', 'RemoveFormat'], + sub : ['sub_desc', 'subscript'], + sup : ['sup_desc', 'superscript'], + forecolor : ['forecolor_desc', 'ForeColor'], + forecolorpicker : ['forecolor_desc', 'mceForeColor'], + backcolor : ['backcolor_desc', 'HiliteColor'], + backcolorpicker : ['backcolor_desc', 'mceBackColor'], + charmap : ['charmap_desc', 'mceCharMap'], + visualaid : ['visualaid_desc', 'mceToggleVisualAid'], + anchor : ['anchor_desc', 'mceInsertAnchor'], + newdocument : ['newdocument_desc', 'mceNewDocument'], + blockquote : ['blockquote_desc', 'mceBlockQuote'] + }, + + stateControls : ['bold', 'italic', 'underline', 'strikethrough', 'bullist', 'numlist', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'sub', 'sup', 'blockquote'], + + init : function(ed, url) { + var t = this, s, v, o; + + t.editor = ed; + t.url = url; + t.onResolveName = new tinymce.util.Dispatcher(this); + + ed.forcedHighContrastMode = ed.settings.detect_highcontrast && t._isHighContrast(); + ed.settings.skin = ed.forcedHighContrastMode ? 'highcontrast' : ed.settings.skin; + + // Default settings + t.settings = s = extend({ + theme_advanced_path : true, + theme_advanced_toolbar_location : 'bottom', + theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect", + theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code", + theme_advanced_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,charmap", + theme_advanced_blockformats : "p,address,pre,h1,h2,h3,h4,h5,h6", + theme_advanced_toolbar_align : "center", + theme_advanced_fonts : "Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats", + theme_advanced_more_colors : 1, + theme_advanced_row_height : 23, + theme_advanced_resize_horizontal : 1, + theme_advanced_resizing_use_cookie : 1, + theme_advanced_font_sizes : "1,2,3,4,5,6,7", + theme_advanced_font_selector : "span", + theme_advanced_show_current_color: 0, + readonly : ed.settings.readonly + }, ed.settings); + + // Setup default font_size_style_values + if (!s.font_size_style_values) + s.font_size_style_values = "8pt,10pt,12pt,14pt,18pt,24pt,36pt"; + + if (tinymce.is(s.theme_advanced_font_sizes, 'string')) { + s.font_size_style_values = tinymce.explode(s.font_size_style_values); + s.font_size_classes = tinymce.explode(s.font_size_classes || ''); + + // Parse string value + o = {}; + ed.settings.theme_advanced_font_sizes = s.theme_advanced_font_sizes; + each(ed.getParam('theme_advanced_font_sizes', '', 'hash'), function(v, k) { + var cl; + + if (k == v && v >= 1 && v <= 7) { + k = v + ' (' + t.sizes[v - 1] + 'pt)'; + cl = s.font_size_classes[v - 1]; + v = s.font_size_style_values[v - 1] || (t.sizes[v - 1] + 'pt'); + } + + if (/^\s*\./.test(v)) + cl = v.replace(/\./g, ''); + + o[k] = cl ? {'class' : cl} : {fontSize : v}; + }); + + s.theme_advanced_font_sizes = o; + } + + if ((v = s.theme_advanced_path_location) && v != 'none') + s.theme_advanced_statusbar_location = s.theme_advanced_path_location; + + if (s.theme_advanced_statusbar_location == 'none') + s.theme_advanced_statusbar_location = 0; + + if (ed.settings.content_css !== false) + ed.contentCSS.push(ed.baseURI.toAbsolute(url + "/skins/" + ed.settings.skin + "/content.css")); + + // Init editor + ed.onInit.add(function() { + if (!ed.settings.readonly) { + ed.onNodeChange.add(t._nodeChanged, t); + ed.onKeyUp.add(t._updateUndoStatus, t); + ed.onMouseUp.add(t._updateUndoStatus, t); + ed.dom.bind(ed.dom.getRoot(), 'dragend', function() { + t._updateUndoStatus(ed); + }); + } + }); + + ed.onSetProgressState.add(function(ed, b, ti) { + var co, id = ed.id, tb; + + if (b) { + t.progressTimer = setTimeout(function() { + co = ed.getContainer(); + co = co.insertBefore(DOM.create('DIV', {style : 'position:relative'}), co.firstChild); + tb = DOM.get(ed.id + '_tbl'); + + DOM.add(co, 'div', {id : id + '_blocker', 'class' : 'mceBlocker', style : {width : tb.clientWidth + 2, height : tb.clientHeight + 2}}); + DOM.add(co, 'div', {id : id + '_progress', 'class' : 'mceProgress', style : {left : tb.clientWidth / 2, top : tb.clientHeight / 2}}); + }, ti || 0); + } else { + DOM.remove(id + '_blocker'); + DOM.remove(id + '_progress'); + clearTimeout(t.progressTimer); + } + }); + + DOM.loadCSS(s.editor_css ? ed.documentBaseURI.toAbsolute(s.editor_css) : url + "/skins/" + ed.settings.skin + "/ui.css"); + + if (s.skin_variant) + DOM.loadCSS(url + "/skins/" + ed.settings.skin + "/ui_" + s.skin_variant + ".css"); + }, + + _isHighContrast : function() { + var actualColor, div = DOM.add(DOM.getRoot(), 'div', {'style': 'background-color: rgb(171,239,86);'}); + + actualColor = (DOM.getStyle(div, 'background-color', true) + '').toLowerCase().replace(/ /g, ''); + DOM.remove(div); + + return actualColor != 'rgb(171,239,86)' && actualColor != '#abef56'; + }, + + createControl : function(n, cf) { + var cd, c; + + if (c = cf.createControl(n)) + return c; + + switch (n) { + case "styleselect": + return this._createStyleSelect(); + + case "formatselect": + return this._createBlockFormats(); + + case "fontselect": + return this._createFontSelect(); + + case "fontsizeselect": + return this._createFontSizeSelect(); + + case "forecolor": + return this._createForeColorMenu(); + + case "backcolor": + return this._createBackColorMenu(); + } + + if ((cd = this.controls[n])) + return cf.createButton(n, {title : "advanced." + cd[0], cmd : cd[1], ui : cd[2], value : cd[3]}); + }, + + execCommand : function(cmd, ui, val) { + var f = this['_' + cmd]; + + if (f) { + f.call(this, ui, val); + return true; + } + + return false; + }, + + _importClasses : function(e) { + var ed = this.editor, ctrl = ed.controlManager.get('styleselect'); + + if (ctrl.getLength() == 0) { + each(ed.dom.getClasses(), function(o, idx) { + var name = 'style_' + idx; + + ed.formatter.register(name, { + inline : 'span', + attributes : {'class' : o['class']}, + selector : '*' + }); + + ctrl.add(o['class'], name); + }); + } + }, + + _createStyleSelect : function(n) { + var t = this, ed = t.editor, ctrlMan = ed.controlManager, ctrl; + + // Setup style select box + ctrl = ctrlMan.createListBox('styleselect', { + title : 'advanced.style_select', + onselect : function(name) { + var matches, formatNames = []; + + each(ctrl.items, function(item) { + formatNames.push(item.value); + }); + + ed.focus(); + ed.undoManager.add(); + + // Toggle off the current format + matches = ed.formatter.matchAll(formatNames); + if (!name || matches[0] == name) { + if (matches[0]) + ed.formatter.remove(matches[0]); + } else + ed.formatter.apply(name); + + ed.undoManager.add(); + ed.nodeChanged(); + + return false; // No auto select + } + }); + + // Handle specified format + ed.onInit.add(function() { + var counter = 0, formats = ed.getParam('style_formats'); + + if (formats) { + each(formats, function(fmt) { + var name, keys = 0; + + each(fmt, function() {keys++;}); + + if (keys > 1) { + name = fmt.name = fmt.name || 'style_' + (counter++); + ed.formatter.register(name, fmt); + ctrl.add(fmt.title, name); + } else + ctrl.add(fmt.title); + }); + } else { + each(ed.getParam('theme_advanced_styles', '', 'hash'), function(val, key) { + var name; + + if (val) { + name = 'style_' + (counter++); + + ed.formatter.register(name, { + inline : 'span', + classes : val, + selector : '*' + }); + + ctrl.add(t.editor.translate(key), name); + } + }); + } + }); + + // Auto import classes if the ctrl box is empty + if (ctrl.getLength() == 0) { + ctrl.onPostRender.add(function(ed, n) { + if (!ctrl.NativeListBox) { + Event.add(n.id + '_text', 'focus', t._importClasses, t); + Event.add(n.id + '_text', 'mousedown', t._importClasses, t); + Event.add(n.id + '_open', 'focus', t._importClasses, t); + Event.add(n.id + '_open', 'mousedown', t._importClasses, t); + } else + Event.add(n.id, 'focus', t._importClasses, t); + }); + } + + return ctrl; + }, + + _createFontSelect : function() { + var c, t = this, ed = t.editor; + + c = ed.controlManager.createListBox('fontselect', { + title : 'advanced.fontdefault', + onselect : function(v) { + var cur = c.items[c.selectedIndex]; + + if (!v && cur) { + ed.execCommand('FontName', false, cur.value); + return; + } + + ed.execCommand('FontName', false, v); + + // Fake selection, execCommand will fire a nodeChange and update the selection + c.select(function(sv) { + return v == sv; + }); + + if (cur && cur.value == v) { + c.select(null); + } + + return false; // No auto select + } + }); + + if (c) { + each(ed.getParam('theme_advanced_fonts', t.settings.theme_advanced_fonts, 'hash'), function(v, k) { + c.add(ed.translate(k), v, {style : v.indexOf('dings') == -1 ? 'font-family:' + v : ''}); + }); + } + + return c; + }, + + _createFontSizeSelect : function() { + var t = this, ed = t.editor, c, i = 0, cl = []; + + c = ed.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', onselect : function(v) { + var cur = c.items[c.selectedIndex]; + + if (!v && cur) { + cur = cur.value; + + if (cur['class']) { + ed.formatter.toggle('fontsize_class', {value : cur['class']}); + ed.undoManager.add(); + ed.nodeChanged(); + } else { + ed.execCommand('FontSize', false, cur.fontSize); + } + + return; + } + + if (v['class']) { + ed.focus(); + ed.undoManager.add(); + ed.formatter.toggle('fontsize_class', {value : v['class']}); + ed.undoManager.add(); + ed.nodeChanged(); + } else + ed.execCommand('FontSize', false, v.fontSize); + + // Fake selection, execCommand will fire a nodeChange and update the selection + c.select(function(sv) { + return v == sv; + }); + + if (cur && (cur.value.fontSize == v.fontSize || cur.value['class'] && cur.value['class'] == v['class'])) { + c.select(null); + } + + return false; // No auto select + }}); + + if (c) { + each(t.settings.theme_advanced_font_sizes, function(v, k) { + var fz = v.fontSize; + + if (fz >= 1 && fz <= 7) + fz = t.sizes[parseInt(fz) - 1] + 'pt'; + + c.add(k, v, {'style' : 'font-size:' + fz, 'class' : 'mceFontSize' + (i++) + (' ' + (v['class'] || ''))}); + }); + } + + return c; + }, + + _createBlockFormats : function() { + var c, fmts = { + p : 'advanced.paragraph', + address : 'advanced.address', + pre : 'advanced.pre', + h1 : 'advanced.h1', + h2 : 'advanced.h2', + h3 : 'advanced.h3', + h4 : 'advanced.h4', + h5 : 'advanced.h5', + h6 : 'advanced.h6', + div : 'advanced.div', + blockquote : 'advanced.blockquote', + code : 'advanced.code', + dt : 'advanced.dt', + dd : 'advanced.dd', + samp : 'advanced.samp' + }, t = this; + + c = t.editor.controlManager.createListBox('formatselect', {title : 'advanced.block', onselect : function(v) { + t.editor.execCommand('FormatBlock', false, v); + return false; + }}); + + if (c) { + each(t.editor.getParam('theme_advanced_blockformats', t.settings.theme_advanced_blockformats, 'hash'), function(v, k) { + c.add(t.editor.translate(k != v ? k : fmts[v]), v, {'class' : 'mce_formatPreview mce_' + v}); + }); + } + + return c; + }, + + _createForeColorMenu : function() { + var c, t = this, s = t.settings, o = {}, v; + + if (s.theme_advanced_more_colors) { + o.more_colors_func = function() { + t._mceColorPicker(0, { + color : c.value, + func : function(co) { + c.setColor(co); + } + }); + }; + } + + if (v = s.theme_advanced_text_colors) + o.colors = v; + + if (s.theme_advanced_default_foreground_color) + o.default_color = s.theme_advanced_default_foreground_color; + + o.title = 'advanced.forecolor_desc'; + o.cmd = 'ForeColor'; + o.scope = this; + + c = t.editor.controlManager.createColorSplitButton('forecolor', o); + + return c; + }, + + _createBackColorMenu : function() { + var c, t = this, s = t.settings, o = {}, v; + + if (s.theme_advanced_more_colors) { + o.more_colors_func = function() { + t._mceColorPicker(0, { + color : c.value, + func : function(co) { + c.setColor(co); + } + }); + }; + } + + if (v = s.theme_advanced_background_colors) + o.colors = v; + + if (s.theme_advanced_default_background_color) + o.default_color = s.theme_advanced_default_background_color; + + o.title = 'advanced.backcolor_desc'; + o.cmd = 'HiliteColor'; + o.scope = this; + + c = t.editor.controlManager.createColorSplitButton('backcolor', o); + + return c; + }, + + renderUI : function(o) { + var n, ic, tb, t = this, ed = t.editor, s = t.settings, sc, p, nl; + + if (ed.settings) { + ed.settings.aria_label = s.aria_label + ed.getLang('advanced.help_shortcut'); + } + + // TODO: ACC Should have an aria-describedby attribute which is user-configurable to describe what this field is actually for. + // Maybe actually inherit it from the original textara? + n = p = DOM.create('span', {role : 'application', 'aria-labelledby' : ed.id + '_voice', id : ed.id + '_parent', 'class' : 'mceEditor ' + ed.settings.skin + 'Skin' + (s.skin_variant ? ' ' + ed.settings.skin + 'Skin' + t._ufirst(s.skin_variant) : '')}); + DOM.add(n, 'span', {'class': 'mceVoiceLabel', 'style': 'display:none;', id: ed.id + '_voice'}, s.aria_label); + + if (!DOM.boxModel) + n = DOM.add(n, 'div', {'class' : 'mceOldBoxModel'}); + + n = sc = DOM.add(n, 'table', {role : "presentation", id : ed.id + '_tbl', 'class' : 'mceLayout', cellSpacing : 0, cellPadding : 0}); + n = tb = DOM.add(n, 'tbody'); + + switch ((s.theme_advanced_layout_manager || '').toLowerCase()) { + case "rowlayout": + ic = t._rowLayout(s, tb, o); + break; + + case "customlayout": + ic = ed.execCallback("theme_advanced_custom_layout", s, tb, o, p); + break; + + default: + ic = t._simpleLayout(s, tb, o, p); + } + + n = o.targetNode; + + // Add classes to first and last TRs + nl = sc.rows; + DOM.addClass(nl[0], 'mceFirst'); + DOM.addClass(nl[nl.length - 1], 'mceLast'); + + // Add classes to first and last TDs + each(DOM.select('tr', tb), function(n) { + DOM.addClass(n.firstChild, 'mceFirst'); + DOM.addClass(n.childNodes[n.childNodes.length - 1], 'mceLast'); + }); + + if (DOM.get(s.theme_advanced_toolbar_container)) + DOM.get(s.theme_advanced_toolbar_container).appendChild(p); + else + DOM.insertAfter(p, n); + + Event.add(ed.id + '_path_row', 'click', function(e) { + e = e.target; + + if (e.nodeName == 'A') { + t._sel(e.className.replace(/^.*mcePath_([0-9]+).*$/, '$1')); + + return Event.cancel(e); + } + }); +/* + if (DOM.get(ed.id + '_path_row')) { + Event.add(ed.id + '_tbl', 'mouseover', function(e) { + var re; + + e = e.target; + + if (e.nodeName == 'SPAN' && DOM.hasClass(e.parentNode, 'mceButton')) { + re = DOM.get(ed.id + '_path_row'); + t.lastPath = re.innerHTML; + DOM.setHTML(re, e.parentNode.title); + } + }); + + Event.add(ed.id + '_tbl', 'mouseout', function(e) { + if (t.lastPath) { + DOM.setHTML(ed.id + '_path_row', t.lastPath); + t.lastPath = 0; + } + }); + } +*/ + + if (!ed.getParam('accessibility_focus')) + Event.add(DOM.add(p, 'a', {href : '#'}, ''), 'focus', function() {tinyMCE.get(ed.id).focus();}); + + if (s.theme_advanced_toolbar_location == 'external') + o.deltaHeight = 0; + + t.deltaHeight = o.deltaHeight; + o.targetNode = null; + + ed.onKeyDown.add(function(ed, evt) { + var DOM_VK_F10 = 121, DOM_VK_F11 = 122; + + if (evt.altKey) { + if (evt.keyCode === DOM_VK_F10) { + // Make sure focus is given to toolbar in Safari. + // We can't do this in IE as it prevents giving focus to toolbar when editor is in a frame + if (tinymce.isWebKit) { + window.focus(); + } + t.toolbarGroup.focus(); + return Event.cancel(evt); + } else if (evt.keyCode === DOM_VK_F11) { + DOM.get(ed.id + '_path_row').focus(); + return Event.cancel(evt); + } + } + }); + + // alt+0 is the UK recommended shortcut for accessing the list of access controls. + ed.addShortcut('alt+0', '', 'mceShortcuts', t); + + return { + iframeContainer : ic, + editorContainer : ed.id + '_parent', + sizeContainer : sc, + deltaHeight : o.deltaHeight + }; + }, + + getInfo : function() { + return { + longname : 'Advanced theme', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + version : tinymce.majorVersion + "." + tinymce.minorVersion + } + }, + + resizeBy : function(dw, dh) { + var e = DOM.get(this.editor.id + '_ifr'); + + this.resizeTo(e.clientWidth + dw, e.clientHeight + dh); + }, + + resizeTo : function(w, h, store) { + var ed = this.editor, s = this.settings, e = DOM.get(ed.id + '_tbl'), ifr = DOM.get(ed.id + '_ifr'); + + // Boundery fix box + w = Math.max(s.theme_advanced_resizing_min_width || 100, w); + h = Math.max(s.theme_advanced_resizing_min_height || 100, h); + w = Math.min(s.theme_advanced_resizing_max_width || 0xFFFF, w); + h = Math.min(s.theme_advanced_resizing_max_height || 0xFFFF, h); + + // Resize iframe and container + DOM.setStyle(e, 'height', ''); + DOM.setStyle(ifr, 'height', h); + + if (s.theme_advanced_resize_horizontal) { + DOM.setStyle(e, 'width', ''); + DOM.setStyle(ifr, 'width', w); + + // Make sure that the size is never smaller than the over all ui + if (w < e.clientWidth) { + w = e.clientWidth; + DOM.setStyle(ifr, 'width', e.clientWidth); + } + } + + // Store away the size + if (store && s.theme_advanced_resizing_use_cookie) { + Cookie.setHash("TinyMCE_" + ed.id + "_size", { + cw : w, + ch : h + }); + } + }, + + destroy : function() { + var id = this.editor.id; + + Event.clear(id + '_resize'); + Event.clear(id + '_path_row'); + Event.clear(id + '_external_close'); + }, + + // Internal functions + + _simpleLayout : function(s, tb, o, p) { + var t = this, ed = t.editor, lo = s.theme_advanced_toolbar_location, sl = s.theme_advanced_statusbar_location, n, ic, etb, c; + + if (s.readonly) { + n = DOM.add(tb, 'tr'); + n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'}); + return ic; + } + + // Create toolbar container at top + if (lo == 'top') + t._addToolbars(tb, o); + + // Create external toolbar + if (lo == 'external') { + n = c = DOM.create('div', {style : 'position:relative'}); + n = DOM.add(n, 'div', {id : ed.id + '_external', 'class' : 'mceExternalToolbar'}); + DOM.add(n, 'a', {id : ed.id + '_external_close', href : 'javascript:;', 'class' : 'mceExternalClose'}); + n = DOM.add(n, 'table', {id : ed.id + '_tblext', cellSpacing : 0, cellPadding : 0}); + etb = DOM.add(n, 'tbody'); + + if (p.firstChild.className == 'mceOldBoxModel') + p.firstChild.appendChild(c); + else + p.insertBefore(c, p.firstChild); + + t._addToolbars(etb, o); + + ed.onMouseUp.add(function() { + var e = DOM.get(ed.id + '_external'); + DOM.show(e); + + DOM.hide(lastExtID); + + var f = Event.add(ed.id + '_external_close', 'click', function() { + DOM.hide(ed.id + '_external'); + Event.remove(ed.id + '_external_close', 'click', f); + }); + + DOM.show(e); + DOM.setStyle(e, 'top', 0 - DOM.getRect(ed.id + '_tblext').h - 1); + + // Fixes IE rendering bug + DOM.hide(e); + DOM.show(e); + e.style.filter = ''; + + lastExtID = ed.id + '_external'; + + e = null; + }); + } + + if (sl == 'top') + t._addStatusBar(tb, o); + + // Create iframe container + if (!s.theme_advanced_toolbar_container) { + n = DOM.add(tb, 'tr'); + n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'}); + } + + // Create toolbar container at bottom + if (lo == 'bottom') + t._addToolbars(tb, o); + + if (sl == 'bottom') + t._addStatusBar(tb, o); + + return ic; + }, + + _rowLayout : function(s, tb, o) { + var t = this, ed = t.editor, dc, da, cf = ed.controlManager, n, ic, to, a; + + dc = s.theme_advanced_containers_default_class || ''; + da = s.theme_advanced_containers_default_align || 'center'; + + each(explode(s.theme_advanced_containers || ''), function(c, i) { + var v = s['theme_advanced_container_' + c] || ''; + + switch (c.toLowerCase()) { + case 'mceeditor': + n = DOM.add(tb, 'tr'); + n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'}); + break; + + case 'mceelementpath': + t._addStatusBar(tb, o); + break; + + default: + a = (s['theme_advanced_container_' + c + '_align'] || da).toLowerCase(); + a = 'mce' + t._ufirst(a); + + n = DOM.add(DOM.add(tb, 'tr'), 'td', { + 'class' : 'mceToolbar ' + (s['theme_advanced_container_' + c + '_class'] || dc) + ' ' + a || da + }); + + to = cf.createToolbar("toolbar" + i); + t._addControls(v, to); + DOM.setHTML(n, to.renderHTML()); + o.deltaHeight -= s.theme_advanced_row_height; + } + }); + + return ic; + }, + + _addControls : function(v, tb) { + var t = this, s = t.settings, di, cf = t.editor.controlManager; + + if (s.theme_advanced_disable && !t._disabled) { + di = {}; + + each(explode(s.theme_advanced_disable), function(v) { + di[v] = 1; + }); + + t._disabled = di; + } else + di = t._disabled; + + each(explode(v), function(n) { + var c; + + if (di && di[n]) + return; + + // Compatiblity with 2.x + if (n == 'tablecontrols') { + each(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"], function(n) { + n = t.createControl(n, cf); + + if (n) + tb.add(n); + }); + + return; + } + + c = t.createControl(n, cf); + + if (c) + tb.add(c); + }); + }, + + _addToolbars : function(c, o) { + var t = this, i, tb, ed = t.editor, s = t.settings, v, cf = ed.controlManager, di, n, h = [], a, toolbarGroup; + + toolbarGroup = cf.createToolbarGroup('toolbargroup', { + 'name': ed.getLang('advanced.toolbar'), + 'tab_focus_toolbar':ed.getParam('theme_advanced_tab_focus_toolbar') + }); + + t.toolbarGroup = toolbarGroup; + + a = s.theme_advanced_toolbar_align.toLowerCase(); + a = 'mce' + t._ufirst(a); + + n = DOM.add(DOM.add(c, 'tr', {role: 'presentation'}), 'td', {'class' : 'mceToolbar ' + a, "role":"presentation"}); + + // Create toolbar and add the controls + for (i=1; (v = s['theme_advanced_buttons' + i]); i++) { + tb = cf.createToolbar("toolbar" + i, {'class' : 'mceToolbarRow' + i}); + + if (s['theme_advanced_buttons' + i + '_add']) + v += ',' + s['theme_advanced_buttons' + i + '_add']; + + if (s['theme_advanced_buttons' + i + '_add_before']) + v = s['theme_advanced_buttons' + i + '_add_before'] + ',' + v; + + t._addControls(v, tb); + toolbarGroup.add(tb); + + o.deltaHeight -= s.theme_advanced_row_height; + } + h.push(toolbarGroup.renderHTML()); + h.push(DOM.createHTML('a', {href : '#', accesskey : 'z', title : ed.getLang("advanced.toolbar_focus"), onfocus : 'tinyMCE.getInstanceById(\'' + ed.id + '\').focus();'}, '')); + DOM.setHTML(n, h.join('')); + }, + + _addStatusBar : function(tb, o) { + var n, t = this, ed = t.editor, s = t.settings, r, mf, me, td; + + n = DOM.add(tb, 'tr'); + n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'}); + n = DOM.add(n, 'div', {id : ed.id + '_path_row', 'role': 'group', 'aria-labelledby': ed.id + '_path_voice'}); + if (s.theme_advanced_path) { + DOM.add(n, 'span', {id: ed.id + '_path_voice'}, ed.translate('advanced.path')); + DOM.add(n, 'span', {}, ': '); + } else { + DOM.add(n, 'span', {}, ' '); + } + + + if (s.theme_advanced_resizing) { + DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : "return false;", 'class' : 'mceResize', tabIndex:"-1"}); + + if (s.theme_advanced_resizing_use_cookie) { + ed.onPostRender.add(function() { + var o = Cookie.getHash("TinyMCE_" + ed.id + "_size"), c = DOM.get(ed.id + '_tbl'); + + if (!o) + return; + + t.resizeTo(o.cw, o.ch); + }); + } + + ed.onPostRender.add(function() { + Event.add(ed.id + '_resize', 'click', function(e) { + e.preventDefault(); + }); + + Event.add(ed.id + '_resize', 'mousedown', function(e) { + var mouseMoveHandler1, mouseMoveHandler2, + mouseUpHandler1, mouseUpHandler2, + startX, startY, startWidth, startHeight, width, height, ifrElm; + + function resizeOnMove(e) { + e.preventDefault(); + + width = startWidth + (e.screenX - startX); + height = startHeight + (e.screenY - startY); + + t.resizeTo(width, height); + }; + + function endResize(e) { + // Stop listening + Event.remove(DOM.doc, 'mousemove', mouseMoveHandler1); + Event.remove(ed.getDoc(), 'mousemove', mouseMoveHandler2); + Event.remove(DOM.doc, 'mouseup', mouseUpHandler1); + Event.remove(ed.getDoc(), 'mouseup', mouseUpHandler2); + + width = startWidth + (e.screenX - startX); + height = startHeight + (e.screenY - startY); + t.resizeTo(width, height, true); + }; + + e.preventDefault(); + + // Get the current rect size + startX = e.screenX; + startY = e.screenY; + ifrElm = DOM.get(t.editor.id + '_ifr'); + startWidth = width = ifrElm.clientWidth; + startHeight = height = ifrElm.clientHeight; + + // Register envent handlers + mouseMoveHandler1 = Event.add(DOM.doc, 'mousemove', resizeOnMove); + mouseMoveHandler2 = Event.add(ed.getDoc(), 'mousemove', resizeOnMove); + mouseUpHandler1 = Event.add(DOM.doc, 'mouseup', endResize); + mouseUpHandler2 = Event.add(ed.getDoc(), 'mouseup', endResize); + }); + }); + } + + o.deltaHeight -= 21; + n = tb = null; + }, + + _updateUndoStatus : function(ed) { + var cm = ed.controlManager, um = ed.undoManager; + + cm.setDisabled('undo', !um.hasUndo() && !um.typing); + cm.setDisabled('redo', !um.hasRedo()); + }, + + _nodeChanged : function(ed, cm, n, co, ob) { + var t = this, p, de = 0, v, c, s = t.settings, cl, fz, fn, fc, bc, formatNames, matches; + + tinymce.each(t.stateControls, function(c) { + cm.setActive(c, ed.queryCommandState(t.controls[c][1])); + }); + + function getParent(name) { + var i, parents = ob.parents, func = name; + + if (typeof(name) == 'string') { + func = function(node) { + return node.nodeName == name; + }; + } + + for (i = 0; i < parents.length; i++) { + if (func(parents[i])) + return parents[i]; + } + }; + + cm.setActive('visualaid', ed.hasVisual); + t._updateUndoStatus(ed); + cm.setDisabled('outdent', !ed.queryCommandState('Outdent')); + + p = getParent('A'); + if (c = cm.get('link')) { + if (!p || !p.name) { + c.setDisabled(!p && co); + c.setActive(!!p); + } + } + + if (c = cm.get('unlink')) { + c.setDisabled(!p && co); + c.setActive(!!p && !p.name); + } + + if (c = cm.get('anchor')) { + c.setActive(!co && !!p && p.name); + } + + p = getParent('IMG'); + if (c = cm.get('image')) + c.setActive(!co && !!p && n.className.indexOf('mceItem') == -1); + + if (c = cm.get('styleselect')) { + t._importClasses(); + + formatNames = []; + each(c.items, function(item) { + formatNames.push(item.value); + }); + + matches = ed.formatter.matchAll(formatNames); + c.select(matches[0]); + } + + if (c = cm.get('formatselect')) { + p = getParent(DOM.isBlock); + + if (p) + c.select(p.nodeName.toLowerCase()); + } + + // Find out current fontSize, fontFamily and fontClass + getParent(function(n) { + if (n.nodeName === 'SPAN') { + if (!cl && n.className) + cl = n.className; + } + + if (ed.dom.is(n, s.theme_advanced_font_selector)) { + if (!fz && n.style.fontSize) + fz = n.style.fontSize; + + if (!fn && n.style.fontFamily) + fn = n.style.fontFamily.replace(/[\"\']+/g, '').replace(/^([^,]+).*/, '$1').toLowerCase(); + + if (!fc && n.style.color) + fc = n.style.color; + + if (!bc && n.style.backgroundColor) + bc = n.style.backgroundColor; + } + + return false; + }); + + if (c = cm.get('fontselect')) { + c.select(function(v) { + return v.replace(/^([^,]+).*/, '$1').toLowerCase() == fn; + }); + } + + // Select font size + if (c = cm.get('fontsizeselect')) { + // Use computed style + if (s.theme_advanced_runtime_fontsize && !fz && !cl) + fz = ed.dom.getStyle(n, 'fontSize', true); + + c.select(function(v) { + if (v.fontSize && v.fontSize === fz) + return true; + + if (v['class'] && v['class'] === cl) + return true; + }); + } + + if (s.theme_advanced_show_current_color) { + function updateColor(controlId, color) { + if (c = cm.get(controlId)) { + if (!color) + color = c.settings.default_color; + if (color !== c.value) { + c.displayColor(color); + } + } + } + updateColor('forecolor', fc); + updateColor('backcolor', bc); + } + + if (s.theme_advanced_show_current_color) { + function updateColor(controlId, color) { + if (c = cm.get(controlId)) { + if (!color) + color = c.settings.default_color; + if (color !== c.value) { + c.displayColor(color); + } + } + }; + + updateColor('forecolor', fc); + updateColor('backcolor', bc); + } + + if (s.theme_advanced_path && s.theme_advanced_statusbar_location) { + p = DOM.get(ed.id + '_path') || DOM.add(ed.id + '_path_row', 'span', {id : ed.id + '_path'}); + + if (t.statusKeyboardNavigation) { + t.statusKeyboardNavigation.destroy(); + t.statusKeyboardNavigation = null; + } + + DOM.setHTML(p, ''); + + getParent(function(n) { + var na = n.nodeName.toLowerCase(), u, pi, ti = ''; + + // Ignore non element and bogus/hidden elements + if (n.nodeType != 1 || na === 'br' || n.getAttribute('data-mce-bogus') || DOM.hasClass(n, 'mceItemHidden') || DOM.hasClass(n, 'mceItemRemoved')) + return; + + // Handle prefix + if (tinymce.isIE && n.scopeName !== 'HTML') + na = n.scopeName + ':' + na; + + // Remove internal prefix + na = na.replace(/mce\:/g, ''); + + // Handle node name + switch (na) { + case 'b': + na = 'strong'; + break; + + case 'i': + na = 'em'; + break; + + case 'img': + if (v = DOM.getAttrib(n, 'src')) + ti += 'src: ' + v + ' '; + + break; + + case 'a': + if (v = DOM.getAttrib(n, 'name')) { + ti += 'name: ' + v + ' '; + na += '#' + v; + } + + if (v = DOM.getAttrib(n, 'href')) + ti += 'href: ' + v + ' '; + + break; + + case 'font': + if (v = DOM.getAttrib(n, 'face')) + ti += 'font: ' + v + ' '; + + if (v = DOM.getAttrib(n, 'size')) + ti += 'size: ' + v + ' '; + + if (v = DOM.getAttrib(n, 'color')) + ti += 'color: ' + v + ' '; + + break; + + case 'span': + if (v = DOM.getAttrib(n, 'style')) + ti += 'style: ' + v + ' '; + + break; + } + + if (v = DOM.getAttrib(n, 'id')) + ti += 'id: ' + v + ' '; + + if (v = n.className) { + v = v.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g, '') + + if (v) { + ti += 'class: ' + v + ' '; + + if (DOM.isBlock(n) || na == 'img' || na == 'span') + na += '.' + v; + } + } + + na = na.replace(/(html:)/g, ''); + na = {name : na, node : n, title : ti}; + t.onResolveName.dispatch(t, na); + ti = na.title; + na = na.name; + + //u = "javascript:tinymce.EditorManager.get('" + ed.id + "').theme._sel('" + (de++) + "');"; + pi = DOM.create('a', {'href' : "javascript:;", role: 'button', onmousedown : "return false;", title : ti, 'class' : 'mcePath_' + (de++)}, na); + + if (p.hasChildNodes()) { + p.insertBefore(DOM.create('span', {'aria-hidden': 'true'}, '\u00a0\u00bb '), p.firstChild); + p.insertBefore(pi, p.firstChild); + } else + p.appendChild(pi); + }, ed.getBody()); + + if (DOM.select('a', p).length > 0) { + t.statusKeyboardNavigation = new tinymce.ui.KeyboardNavigation({ + root: ed.id + "_path_row", + items: DOM.select('a', p), + excludeFromTabOrder: true, + onCancel: function() { + ed.focus(); + } + }, DOM); + } + } + }, + + // Commands gets called by execCommand + + _sel : function(v) { + this.editor.execCommand('mceSelectNodeDepth', false, v); + }, + + _mceInsertAnchor : function(ui, v) { + var ed = this.editor; + + ed.windowManager.open({ + url : this.url + '/anchor.htm', + width : 320 + parseInt(ed.getLang('advanced.anchor_delta_width', 0)), + height : 90 + parseInt(ed.getLang('advanced.anchor_delta_height', 0)), + inline : true + }, { + theme_url : this.url + }); + }, + + _mceCharMap : function() { + var ed = this.editor; + + ed.windowManager.open({ + url : this.url + '/charmap.htm', + width : 550 + parseInt(ed.getLang('advanced.charmap_delta_width', 0)), + height : 265 + parseInt(ed.getLang('advanced.charmap_delta_height', 0)), + inline : true + }, { + theme_url : this.url + }); + }, + + _mceHelp : function() { + var ed = this.editor; + + ed.windowManager.open({ + url : this.url + '/about.htm', + width : 480, + height : 380, + inline : true + }, { + theme_url : this.url + }); + }, + + _mceShortcuts : function() { + var ed = this.editor; + ed.windowManager.open({ + url: this.url + '/shortcuts.htm', + width: 480, + height: 380, + inline: true + }, { + theme_url: this.url + }); + }, + + _mceColorPicker : function(u, v) { + var ed = this.editor; + + v = v || {}; + + ed.windowManager.open({ + url : this.url + '/color_picker.htm', + width : 375 + parseInt(ed.getLang('advanced.colorpicker_delta_width', 0)), + height : 250 + parseInt(ed.getLang('advanced.colorpicker_delta_height', 0)), + close_previous : false, + inline : true + }, { + input_color : v.color, + func : v.func, + theme_url : this.url + }); + }, + + _mceCodeEditor : function(ui, val) { + var ed = this.editor; + + ed.windowManager.open({ + url : this.url + '/source_editor.htm', + width : parseInt(ed.getParam("theme_advanced_source_editor_width", 720)), + height : parseInt(ed.getParam("theme_advanced_source_editor_height", 580)), + inline : true, + resizable : true, + maximizable : true + }, { + theme_url : this.url + }); + }, + + _mceImage : function(ui, val) { + var ed = this.editor; + + // Internal image object like a flash placeholder + if (ed.dom.getAttrib(ed.selection.getNode(), 'class').indexOf('mceItem') != -1) + return; + + ed.windowManager.open({ + url : this.url + '/image.htm', + width : 355 + parseInt(ed.getLang('advanced.image_delta_width', 0)), + height : 275 + parseInt(ed.getLang('advanced.image_delta_height', 0)), + inline : true + }, { + theme_url : this.url + }); + }, + + _mceLink : function(ui, val) { + var ed = this.editor; + + ed.windowManager.open({ + url : this.url + '/link.htm', + width : 310 + parseInt(ed.getLang('advanced.link_delta_width', 0)), + height : 200 + parseInt(ed.getLang('advanced.link_delta_height', 0)), + inline : true + }, { + theme_url : this.url + }); + }, + + _mceNewDocument : function() { + var ed = this.editor; + + ed.windowManager.confirm('advanced.newdocument', function(s) { + if (s) + ed.execCommand('mceSetContent', false, ''); + }); + }, + + _mceForeColor : function() { + var t = this; + + this._mceColorPicker(0, { + color: t.fgColor, + func : function(co) { + t.fgColor = co; + t.editor.execCommand('ForeColor', false, co); + } + }); + }, + + _mceBackColor : function() { + var t = this; + + this._mceColorPicker(0, { + color: t.bgColor, + func : function(co) { + t.bgColor = co; + t.editor.execCommand('HiliteColor', false, co); + } + }); + }, + + _ufirst : function(s) { + return s.substring(0, 1).toUpperCase() + s.substring(1); + } + }); + + tinymce.ThemeManager.add('advanced', tinymce.themes.AdvancedTheme); +}(tinymce)); diff --git a/wp-includes/js/tinymce/themes/advanced/image.htm b/wp-includes/js/tinymce/themes/advanced/image.htm index 038ab97f..bb0ba653 100644 --- a/wp-includes/js/tinymce/themes/advanced/image.htm +++ b/wp-includes/js/tinymce/themes/advanced/image.htm @@ -2,10 +2,10 @@ {#advanced_dlg.image_title} - - - - + + + + diff --git a/wp-includes/js/tinymce/themes/advanced/js/anchor.js b/wp-includes/js/tinymce/themes/advanced/js/anchor.js index 7b556351..b6c5b695 100644 --- a/wp-includes/js/tinymce/themes/advanced/js/anchor.js +++ b/wp-includes/js/tinymce/themes/advanced/js/anchor.js @@ -30,9 +30,10 @@ var AnchorDialog = { ed.selection.collapse(1); elm = ed.dom.getParent(ed.selection.getNode(), 'A'); - if (elm) + if (elm) { + elm.setAttribute('name', name); elm.name = name; - else + } else ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', {name : name, 'class' : 'mceItemAnchor'}, '')); tinyMCEPopup.close(); diff --git a/wp-includes/js/tinymce/themes/advanced/js/charmap.js b/wp-includes/js/tinymce/themes/advanced/js/charmap.js index 78bc080e..cbb4172b 100644 --- a/wp-includes/js/tinymce/themes/advanced/js/charmap.js +++ b/wp-includes/js/tinymce/themes/advanced/js/charmap.js @@ -281,13 +281,21 @@ tinyMCEPopup.onInit.add(function() { function addKeyboardNavigation(){ var tableElm, cells, settings; - cells = tinyMCEPopup.dom.select(".charmaplink", "charmapgroup"); + cells = tinyMCEPopup.dom.select("a.charmaplink", "charmapgroup"); settings ={ root: "charmapgroup", items: cells }; - + cells[0].tabindex=0; + tinyMCEPopup.dom.addClass(cells[0], "mceFocus"); + if (tinymce.isGecko) { + cells[0].focus(); + } else { + setTimeout(function(){ + cells[0].focus(); + }, 100); + } tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', settings, tinyMCEPopup.dom); } @@ -306,7 +314,7 @@ function renderCharMapHTML() { previewCharFn = 'previewChar(\'' + charmap[i][1].substring(1,charmap[i][1].length) + '\',\'' + charmap[i][0].substring(1,charmap[i][0].length) + '\',\'' + charmap[i][3] + '\');'; html += '' + '' - + '' + + '' + charmap[i][1] + ''; if ((cols+1) % charsPerRow == 0) diff --git a/wp-includes/js/tinymce/themes/advanced/js/color_picker.js b/wp-includes/js/tinymce/themes/advanced/js/color_picker.js index cdf8c4c0..3cbf32c4 100644 --- a/wp-includes/js/tinymce/themes/advanced/js/color_picker.js +++ b/wp-includes/js/tinymce/themes/advanced/js/color_picker.js @@ -1,6 +1,6 @@ tinyMCEPopup.requireLangPack(); -var detail = 50, strhex = "0123456789ABCDEF", i, isMouseDown = false, isMouseOver = false; +var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false; var colors = [ "#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033", @@ -266,10 +266,10 @@ function dechex(n) { } function computeColor(e) { - var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB; + var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB, pos = tinyMCEPopup.dom.getPos(e.target); - x = e.offsetX ? e.offsetX : (e.target ? e.clientX - e.target.x : 0); - y = e.offsetY ? e.offsetY : (e.target ? e.clientY - e.target.y : 0); + x = e.offsetX ? e.offsetX : (e.target ? e.clientX - pos.x : 0); + y = e.offsetY ? e.offsetY : (e.target ? e.clientY - pos.y : 0); partWidth = document.getElementById('colors').width / 6; partDetail = detail / 2; diff --git a/wp-includes/js/tinymce/themes/advanced/link.htm b/wp-includes/js/tinymce/themes/advanced/link.htm index fc5fa845..008e8ad3 100644 --- a/wp-includes/js/tinymce/themes/advanced/link.htm +++ b/wp-includes/js/tinymce/themes/advanced/link.htm @@ -2,11 +2,11 @@ {#advanced_dlg.link_title} - - - - - + + + + + diff --git a/wp-includes/js/tinymce/themes/advanced/shortcuts.htm b/wp-includes/js/tinymce/themes/advanced/shortcuts.htm index e1908905..81cefe57 100644 --- a/wp-includes/js/tinymce/themes/advanced/shortcuts.htm +++ b/wp-includes/js/tinymce/themes/advanced/shortcuts.htm @@ -2,7 +2,7 @@ {#advanced_dlg.accessibility_help} - + diff --git a/wp-includes/js/tinymce/themes/advanced/skins/default/content.css b/wp-includes/js/tinymce/themes/advanced/skins/default/content.css index b9adf6f0..4d63ca98 100644 --- a/wp-includes/js/tinymce/themes/advanced/skins/default/content.css +++ b/wp-includes/js/tinymce/themes/advanced/skins/default/content.css @@ -13,7 +13,7 @@ a.mceItemAnchor {display:inline-block; -webkit-user-select:all; -webkit-user-mod span.mceItemNbsp {background: #DDD} td.mceSelected, th.mceSelected {background-color:#3399ff !important} img {border:0;} -table {cursor:default} +table, img, hr, .mceItemAnchor {cursor:default} table td, table th {cursor:text} ins {border-bottom:1px solid green; text-decoration: none; color:green} del {color:red; text-decoration:line-through} @@ -45,5 +45,6 @@ font[face=mceinline] {font-family:inherit !important} .mceItemRealMedia {background-image:url(../../img/realmedia.gif)} .mceItemVideo {background-image:url(../../img/video.gif)} .mceItemAudio {background-image:url(../../img/video.gif)} +.mceItemEmbeddedAudio {background-image:url(../../img/video.gif)} .mceItemIframe {background-image:url(../../img/iframe.gif)} .mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;} diff --git a/wp-includes/js/tinymce/themes/advanced/skins/highcontrast/content.css b/wp-includes/js/tinymce/themes/advanced/skins/highcontrast/content.css index 46007b04..ee3d369d 100644 --- a/wp-includes/js/tinymce/themes/advanced/skins/highcontrast/content.css +++ b/wp-includes/js/tinymce/themes/advanced/skins/highcontrast/content.css @@ -11,7 +11,7 @@ a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !impo span.mceItemNbsp {background: #DDD} td.mceSelected, th.mceSelected {background-color:#3399ff !important} img {border:0;} -table {cursor:default} +table, img, hr, .mceItemAnchor {cursor:default} table td, table th {cursor:text} ins {border-bottom:1px solid green; text-decoration: none; color:green} del {color:red; text-decoration:line-through} diff --git a/wp-includes/js/tinymce/themes/advanced/skins/o2k7/content.css b/wp-includes/js/tinymce/themes/advanced/skins/o2k7/content.css index 47a39255..631fa0ec 100644 --- a/wp-includes/js/tinymce/themes/advanced/skins/o2k7/content.css +++ b/wp-includes/js/tinymce/themes/advanced/skins/o2k7/content.css @@ -12,7 +12,7 @@ a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !impo span.mceItemNbsp {background: #DDD} td.mceSelected, th.mceSelected {background-color:#3399ff !important} img {border:0;} -table {cursor:default} +table, img, hr, .mceItemAnchor {cursor:default} table td, table th {cursor:text} ins {border-bottom:1px solid green; text-decoration: none; color:green} del {color:red; text-decoration:line-through} diff --git a/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css index 065a0045..23fef64c 100644 --- a/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css +++ b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css @@ -1,8 +1,4 @@ -body { - font: 13px/19px Georgia, "Times New Roman", "Bitstream Charter", Times, serif; - margin: 10px; - color: #000; -} + body.mceForceColors {background:#FFF; color:#000;} body.mceBrowserDefaults {background:transparent; color:inherit; font-size:inherit; font-family:inherit;} td {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;} @@ -17,7 +13,7 @@ a.mceItemAnchor {display:inline-block; -webkit-user-select:all; -webkit-user-mod span.mceItemNbsp {background: #DDD} td.mceSelected, th.mceSelected {background-color:#3399ff !important} img {border:0;} -table {cursor:default} +table, img, hr, .mceItemAnchor {cursor:default} table td, table th {cursor:text} ins {border-bottom:1px solid green; text-decoration: none; color:green} del {color:red; text-decoration:line-through} @@ -41,6 +37,24 @@ font[face=mceinline] {font-family:inherit !important} .mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;} /* WordPress styles */ +body { + font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; + font-size: 13px; + line-height: 19px; + color: #333; + margin: 10px; + min-height: 100%; +} + +br[data-mce-bogus] { + line-height: 1em; + margin-top: -1em; +} + +br[data-mce-bogus]:only-child { + line-height: inherit; + margin-top: inherit; +} .aligncenter, dl.aligncenter { @@ -75,6 +89,7 @@ dl.aligncenter { margin: 0; padding: 0; border: 0 none; + -webkit-user-drag: none; } .wp-caption-dd { @@ -94,3 +109,36 @@ td { margin: 8px; } +/* Styles for the WordPress plugins */ +img.mceWPnextpage, +img.mceWPmore { + border: 0; + border-top: 1px dotted #cccccc; + display: block; + width: 95%; + height: 12px; + margin: 15px auto 0; +} + +img.mceWPmore { + background: transparent url("img/more_bug.gif") no-repeat right top; +} + +img.mceWPnextpage { + background: transparent url("img/page_bug.gif") no-repeat right top; +} + +img.wpGallery { + border: 1px dashed #888; + background: #f2f8ff url("img/gallery.png") no-repeat scroll center center; + width: 99%; + height: 250px; +} + +img.wp-oembed { + border: 1px dashed #888; + background: #f7f5f2 url("img/embedded.png") no-repeat scroll center center; + width: 300px; + height: 250px; +} + diff --git a/wp-includes/js/tinymce/plugins/wordpress/img/embedded.png b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/embedded.png similarity index 100% rename from wp-includes/js/tinymce/plugins/wordpress/img/embedded.png rename to wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/embedded.png diff --git a/wp-includes/js/tinymce/plugins/wpgallery/img/gallery.png b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/gallery.png similarity index 100% rename from wp-includes/js/tinymce/plugins/wpgallery/img/gallery.png rename to wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/gallery.png diff --git a/wp-includes/js/tinymce/plugins/wordpress/img/more_bug.gif b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/more_bug.gif similarity index 100% rename from wp-includes/js/tinymce/plugins/wordpress/img/more_bug.gif rename to wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/more_bug.gif diff --git a/wp-includes/js/tinymce/plugins/wordpress/img/page_bug.gif b/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/page_bug.gif similarity index 100% rename from wp-includes/js/tinymce/plugins/wordpress/img/page_bug.gif rename to wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/page_bug.gif diff --git a/wp-includes/js/tinymce/themes/advanced/source_editor.htm b/wp-includes/js/tinymce/themes/advanced/source_editor.htm index 1116ff43..a2d3f1ae 100644 --- a/wp-includes/js/tinymce/themes/advanced/source_editor.htm +++ b/wp-includes/js/tinymce/themes/advanced/source_editor.htm @@ -1,8 +1,8 @@ {#advanced_dlg.code_title} - - + + @@ -18,11 +18,11 @@
      - +
      - +
      diff --git a/wp-includes/js/tinymce/tiny_mce.js b/wp-includes/js/tinymce/tiny_mce.js index 808f9ee4..38069d19 100644 --- a/wp-includes/js/tinymce/tiny_mce.js +++ b/wp-includes/js/tinymce/tiny_mce.js @@ -1 +1 @@ -(function(d){var a=/^\s*|\s*$/g,e,c="B".replace(/A(.)|B/,"$1")==="$1";var b={majorVersion:"3",minorVersion:"4.5",releaseDate:"2011-09-06",_init:function(){var s=this,q=document,o=navigator,g=o.userAgent,m,f,l,k,j,r;s.isOpera=d.opera&&opera.buildNumber;s.isWebKit=/WebKit/.test(g);s.isIE=!s.isWebKit&&!s.isOpera&&(/MSIE/gi).test(g)&&(/Explorer/gi).test(o.appName);s.isIE6=s.isIE&&/MSIE [56]/.test(g);s.isIE7=s.isIE&&/MSIE [7]/.test(g);s.isIE8=s.isIE&&/MSIE [8]/.test(g);s.isIE9=s.isIE&&/MSIE [9]/.test(g);s.isGecko=!s.isWebKit&&/Gecko/.test(g);s.isMac=g.indexOf("Mac")!=-1;s.isAir=/adobeair/i.test(g);s.isIDevice=/(iPad|iPhone)/.test(g);s.isIOS5=s.isIDevice&&g.match(/AppleWebKit\/(\d*)/)[1]>=534;if(d.tinyMCEPreInit){s.suffix=tinyMCEPreInit.suffix;s.baseURL=tinyMCEPreInit.base;s.query=tinyMCEPreInit.query;return}s.suffix="";f=q.getElementsByTagName("base");for(m=0;m=c.length){for(e=0,b=g.length;e=c.length||g[e]!=c[e]){f=e+1;break}}}if(g.length=g.length||g[e]!=c[e]){f=e+1;break}}}if(f==1){return h}for(e=0,b=g.length-(f-1);e=0;c--){if(f[c].length==0||f[c]=="."){continue}if(f[c]==".."){b++;continue}if(b>0){b--;continue}h.push(f[c])}c=e.length-b;if(c<=0){g=h.reverse().join("/")}else{g=e.slice(0,c).join("/")+"/"+h.reverse().join("/")}if(g.indexOf("/")!==0){g="/"+g}if(d&&g.lastIndexOf("/")!==g.length-1){g+=d}return g},getURI:function(d){var c,b=this;if(!b.source||d){c="";if(!d){if(b.protocol){c+=b.protocol+"://"}if(b.userInfo){c+=b.userInfo+"@"}if(b.host){c+=b.host}if(b.port){c+=":"+b.port}}if(b.path){c+=b.path}if(b.query){c+="?"+b.query}if(b.anchor){c+="#"+b.anchor}b.source=c}return b.source}})})();(function(){var a=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(d){var b=this.get(d),c;if(b){a(b.split("&"),function(e){e=e.split("=");c=c||{};c[unescape(e[0])]=unescape(e[1])})}return c},setHash:function(j,b,g,f,i,c){var h="";a(b,function(e,d){h+=(!h?"":"&")+escape(d)+"="+escape(e)});this.set(j,h,g,f,i,c)},get:function(i){var h=document.cookie,g,f=i+"=",d;if(!h){return}d=h.indexOf("; "+f);if(d==-1){d=h.indexOf(f);if(d!=0){return null}}else{d+=2}g=h.indexOf(";",d);if(g==-1){g=h.length}return unescape(h.substring(d+f.length,g))},set:function(i,b,g,f,h,c){document.cookie=i+"="+escape(b)+((g)?"; expires="+g.toGMTString():"")+((f)?"; path="+escape(f):"")+((h)?"; domain="+h:"")+((c)?"; secure":"")},remove:function(e,b){var c=new Date();c.setTime(c.getTime()-1000);this.set(e,"",c,b,c)}})})();(function(){function serialize(o,quote){var i,v,t;quote=quote||'"';if(o==null){return"null"}t=typeof o;if(t=="string"){v="\bb\tt\nn\ff\rr\"\"''\\\\";return quote+o.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(a,b){if(quote==='"'&&a==="'"){return a}i=v.indexOf(b);if(i+1){return"\\"+v.charAt(i+1)}a=b.charCodeAt().toString(16);return"\\u"+"0000".substring(a.length)+a})+quote}if(t=="object"){if(o.hasOwnProperty&&o instanceof Array){for(i=0,v="[";i0?",":"")+serialize(o[i],quote)}return v+"]"}v="{";for(i in o){v+=typeof o[i]!="function"?(v.length>1?","+quote:quote)+i+quote+":"+serialize(o[i],quote):""}return v+"}"}return""+o}tinymce.util.JSON={serialize:serialize,parse:function(s){try{return eval("("+s+")")}catch(ex){}}}})();tinymce.create("static tinymce.util.XHR",{send:function(g){var a,e,b=window,h=0;g.scope=g.scope||this;g.success_scope=g.success_scope||g.scope;g.error_scope=g.error_scope||g.scope;g.async=g.async===false?false:true;g.data=g.data||"";function d(i){a=0;try{a=new ActiveXObject(i)}catch(c){}return a}a=b.XMLHttpRequest?new XMLHttpRequest():d("Microsoft.XMLHTTP")||d("Msxml2.XMLHTTP");if(a){if(a.overrideMimeType){a.overrideMimeType(g.content_type)}a.open(g.type||(g.data?"POST":"GET"),g.url,g.async);if(g.content_type){a.setRequestHeader("Content-Type",g.content_type)}a.setRequestHeader("X-Requested-With","XMLHttpRequest");a.send(g.data);function f(){if(!g.async||a.readyState==4||h++>10000){if(g.success&&h<10000&&a.status==200){g.success.call(g.success_scope,""+a.responseText,a,g)}else{if(g.error){g.error.call(g.error_scope,h>10000?"TIMED_OUT":"GENERAL",a,g)}}a=null}else{b.setTimeout(f,10)}}if(!g.async){return f()}e=b.setTimeout(f,10)}}});(function(){var c=tinymce.extend,b=tinymce.util.JSON,a=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(d){this.settings=c({},d);this.count=0},send:function(f){var e=f.error,d=f.success;f=c(this.settings,f);f.success=function(h,g){h=b.parse(h);if(typeof(h)=="undefined"){h={error:"JSON Parse error."}}if(h.error){e.call(f.error_scope||f.scope,h.error,g)}else{d.call(f.success_scope||f.scope,h.result)}};f.error=function(h,g){if(e){e.call(f.error_scope||f.scope,h,g)}};f.data=b.serialize({id:f.id||"c"+(this.count++),method:f.method,params:f.params});f.content_type="application/json";a.send(f)},"static":{sendRPC:function(d){return new tinymce.util.JSONRequest().send(d)}}})}());(function(a){a.VK={DELETE:46,BACKSPACE:8}})(tinymce);(function(d){var f=d.VK,e=f.BACKSPACE,c=f.DELETE;function b(g){var i=g.dom,h=g.selection;g.onKeyDown.add(function(k,o){var j,p,m,n,l;l=o.keyCode==c;if(l||o.keyCode==e){o.preventDefault();j=h.getRng();p=i.getParent(j.startContainer,i.isBlock);if(l){p=i.getNext(p,i.isBlock)}if(p){m=p.firstChild;if(m&&m.nodeName==="SPAN"){n=m.cloneNode(false)}}k.getDoc().execCommand(l?"ForwardDelete":"Delete",false,null);p=i.getParent(j.startContainer,i.isBlock);d.each(i.select("span.Apple-style-span,font.Apple-style-span",p),function(r){var q=i.createRng();q.setStartBefore(r);q.setEndBefore(r);if(n){i.replace(n.cloneNode(false),r,true)}else{i.remove(r,true)}h.setRng(q)})}})}function a(g){g.onKeyUp.add(function(h,j){var i=j.keyCode;if(i==c||i==e){if(h.dom.isEmpty(h.getBody())){h.setContent("",{format:"raw"});h.nodeChanged();return}}})}d.create("tinymce.util.Quirks",{Quirks:function(g){if(d.isWebKit){b(g);a(g)}if(d.isIE){a(g)}}})})(tinymce);(function(j){var a,g,d,k=/[&<>\"\u007E-\uD7FF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,b=/[<>&\u007E-\uD7FF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=/[<>&\"\']/g,c=/&(#x|#)?([\w]+);/g,i={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"};g={'"':""","'":"'","<":"<",">":">","&":"&"};d={"<":"<",">":">","&":"&",""":'"',"'":"'"};function h(l){var m;m=document.createElement("div");m.innerHTML=l;return m.textContent||m.innerText||l}function e(m,p){var n,o,l,q={};if(m){m=m.split(",");p=p||10;for(n=0;n1){return"&#"+(((n.charCodeAt(0)-55296)*1024)+(n.charCodeAt(1)-56320)+65536)+";"}return g[n]||"&#"+n.charCodeAt(0)+";"})},encodeNamed:function(n,l,m){m=m||a;return n.replace(l?k:b,function(o){return g[o]||m[o]||o})},getEncodeFunc:function(l,o){var p=j.html.Entities;o=e(o)||a;function m(r,q){return r.replace(q?k:b,function(s){return g[s]||o[s]||"&#"+s.charCodeAt(0)+";"||s})}function n(r,q){return p.encodeNamed(r,q,o)}l=j.makeMap(l.replace(/\+/g,","));if(l.named&&l.numeric){return m}if(l.named){if(o){return n}return p.encodeNamed}if(l.numeric){return p.encodeNumeric}return p.encodeRaw},decode:function(l){return l.replace(c,function(n,m,o){if(m){o=parseInt(o,m.length===2?16:10);if(o>65535){o-=65536;return String.fromCharCode(55296+(o>>10),56320+(o&1023))}else{return i[o]||String.fromCharCode(o)}}return d[n]||a[n]||h(n)})}}})(tinymce);tinymce.html.Styles=function(d,f){var k=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,h=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,b=/\s*([^:]+):\s*([^;]+);?/g,l=/\s+$/,m=/rgb/,e,g,a={},j;d=d||{};j="\\\" \\' \\; \\: ; : \uFEFF".split(" ");for(g=0;g1?r:"0"+r}return"#"+o(q)+o(p)+o(i)}return{toHex:function(i){return i.replace(k,c)},parse:function(r){var y={},p,n,v,q,u=d.url_converter,x=d.url_converter_scope||this;function o(C,F){var E,B,A,D;E=y[C+"-top"+F];if(!E){return}B=y[C+"-right"+F];if(E!=B){return}A=y[C+"-bottom"+F];if(B!=A){return}D=y[C+"-left"+F];if(A!=D){return}y[C+F]=D;delete y[C+"-top"+F];delete y[C+"-right"+F];delete y[C+"-bottom"+F];delete y[C+"-left"+F]}function t(B){var C=y[B],A;if(!C||C.indexOf(" ")<0){return}C=C.split(" ");A=C.length;while(A--){if(C[A]!==C[0]){return false}}y[B]=C[0];return true}function z(C,B,A,D){if(!t(B)){return}if(!t(A)){return}if(!t(D)){return}y[C]=y[B]+" "+y[A]+" "+y[D];delete y[B];delete y[A];delete y[D]}function s(A){q=true;return a[A]}function i(B,A){if(q){B=B.replace(/\uFEFF[0-9]/g,function(C){return a[C]})}if(!A){B=B.replace(/\\([\'\";:])/g,"$1")}return B}if(r){r=r.replace(/\\[\"\';:\uFEFF]/g,s).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(A){return A.replace(/[;:]/g,s)});while(p=b.exec(r)){n=p[1].replace(l,"").toLowerCase();v=p[2].replace(l,"");if(n&&v.length>0){if(n==="font-weight"&&v==="700"){v="bold"}else{if(n==="color"||n==="background-color"){v=v.toLowerCase()}}v=v.replace(k,c);v=v.replace(h,function(B,A,E,D,F,C){F=F||C;if(F){F=i(F);return"'"+F.replace(/\'/g,"\\'")+"'"}A=i(A||E||D);if(u){A=u.call(x,A,"style")}return"url('"+A.replace(/\'/g,"\\'")+"')"});y[n]=q?i(v,true):v}b.lastIndex=p.index+p[0].length}o("border","");o("border","-width");o("border","-color");o("border","-style");o("padding","");o("margin","");z("border","border-width","border-style","border-color");if(y.border==="medium none"){delete y.border}}return y},serialize:function(p,r){var o="",n,q;function i(t){var x,u,s,v;x=f.styles[t];if(x){for(u=0,s=x.length;u0){o+=(o.length>0?" ":"")+t+": "+v+";"}}}}if(r&&f&&f.styles){i("*");i(r)}else{for(n in p){q=p[n];if(q!==e&&q.length>0){o+=(o.length>0?" ":"")+n+": "+q+";"}}}return o}}};(function(m){var h={},j,l,g,f,c={},b,e,d=m.makeMap,k=m.each;function i(o,n){return o.split(n||",")}function a(r,q){var o,p={};function n(s){return s.replace(/[A-Z]+/g,function(t){return n(r[t])})}for(o in r){if(r.hasOwnProperty(o)){r[o]=n(r[o])}}n(q).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,function(v,t,s,u){s=i(s,"|");p[t]={attributes:d(s),attributesOrder:s,children:d(u,"|",{"#comment":{}})}});return p}l="h1,h2,h3,h4,h5,h6,hr,p,div,address,pre,form,table,tbody,thead,tfoot,th,tr,td,li,ol,ul,caption,blockquote,center,dl,dt,dd,dir,fieldset,noscript,menu,isindex,samp,header,footer,article,section,hgroup";l=d(l,",",d(l.toUpperCase()));h=a({Z:"H|K|N|O|P",Y:"X|form|R|Q",ZG:"E|span|width|align|char|charoff|valign",X:"p|T|div|U|W|isindex|fieldset|table",ZF:"E|align|char|charoff|valign",W:"pre|hr|blockquote|address|center|noframes",ZE:"abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height",ZD:"[E][S]",U:"ul|ol|dl|menu|dir",ZC:"p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q",T:"h1|h2|h3|h4|h5|h6",ZB:"X|S|Q",S:"R|P",ZA:"a|G|J|M|O|P",R:"a|H|K|N|O",Q:"noscript|P",P:"ins|del|script",O:"input|select|textarea|label|button",N:"M|L",M:"em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym",L:"sub|sup",K:"J|I",J:"tt|i|b|u|s|strike",I:"big|small|font|basefont",H:"G|F",G:"br|span|bdo",F:"object|applet|img|map|iframe",E:"A|B|C",D:"accesskey|tabindex|onfocus|onblur",C:"onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"lang|xml:lang|dir",A:"id|class|style|title"},"script[id|charset|type|language|src|defer|xml:space][]style[B|id|type|media|title|xml:space][]object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]param[id|name|value|valuetype|type][]p[E|align][#|S]a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]br[A|clear][]span[E][#|S]bdo[A|C|B][#|S]applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]h1[E|align][#|S]img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]map[B|C|A|name][X|form|Q|area]h2[E|align][#|S]iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]h3[E|align][#|S]tt[E][#|S]i[E][#|S]b[E][#|S]u[E][#|S]s[E][#|S]strike[E][#|S]big[E][#|S]small[E][#|S]font[A|B|size|color|face][#|S]basefont[id|size|color|face][]em[E][#|S]strong[E][#|S]dfn[E][#|S]code[E][#|S]q[E|cite][#|S]samp[E][#|S]kbd[E][#|S]var[E][#|S]cite[E][#|S]abbr[E][#|S]acronym[E][#|S]sub[E][#|S]sup[E][#|S]input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]optgroup[E|disabled|label][option]option[E|selected|disabled|label|value][]textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]label[E|for|accesskey|onfocus|onblur][#|S]button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]h4[E|align][#|S]ins[E|cite|datetime][#|Y]h5[E|align][#|S]del[E|cite|datetime][#|Y]h6[E|align][#|S]div[E|align][#|Y]ul[E|type|compact][li]li[E|type|value][#|Y]ol[E|type|compact|start][li]dl[E|compact][dt|dd]dt[E][#|S]dd[E][#|Y]menu[E|compact][li]dir[E|compact][li]pre[E|width|xml:space][#|ZA]hr[E|align|noshade|size|width][]blockquote[E|cite][#|Y]address[E][#|S|p]center[E][#|Y]noframes[E][#|Y]isindex[A|B|prompt][]fieldset[E][#|legend|Y]legend[E|accesskey|align][#|S]table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]caption[E|align][#|S]col[ZG][]colgroup[ZG][col]thead[ZF][tr]tr[ZF|bgcolor][th|td]th[E|ZE][#|Y]form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]noscript[E][#|Y]td[E|ZE][#|Y]tfoot[ZF][tr]tbody[ZF][tr]area[E|D|shape|coords|href|nohref|alt|target][]base[id|href|target][]body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]");j=d("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected,autoplay,loop,controls");g=d("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,source");f=m.extend(d("td,th,iframe,video,audio,object"),g);b=d("pre,script,style,textarea");e=d("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");m.html.Schema=function(r){var A=this,n={},o={},y=[],q,p;r=r||{};if(r.verify_html===false){r.valid_elements="*[*]"}if(r.valid_styles){q={};k(r.valid_styles,function(C,B){q[B]=m.explode(C)})}p=r.whitespace_elements?d(r.whitespace_elements):b;function z(B){return new RegExp("^"+B.replace(/([?+*])/g,".$1")+"$")}function t(I){var H,D,W,S,X,C,F,R,U,N,V,Z,L,G,T,B,P,E,Y,aa,M,Q,K=/^([#+-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,O=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,J=/[*?+]/;if(I){I=i(I);if(n["@"]){P=n["@"].attributes;E=n["@"].attributesOrder}for(H=0,D=I.length;H=0){for(T=z.length-1;T>=U;T--){S=z[T];if(S.valid){n.end(S.name)}}z.length=U}}l=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([^\\s\\/<>]+)\\s*((?:[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*)>))","g");C=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:\\.|[^\"])*)\")|(?:\'((?:\\.|[^\'])*)\')|([^>\s]+)))?/g;J={script:/<\/script[^>]*>/gi,style:/<\/style[^>]*>/gi,noscript:/<\/noscript[^>]*>/gi};L=e.getShortEndedElements();I=e.getSelfClosingElements();G=e.getBoolAttrs();u=c.validate;r=c.remove_internals;x=c.fix_self_closing;p=a.isIE;o=/^:/;while(g=l.exec(D)){if(F0&&z[z.length-1].name===H){t(H)}if(!u||(m=e.getElementRule(H))){k=true;if(u){O=m.attributes;E=m.attributePatterns}if(Q=g[8]){y=Q.indexOf("data-mce-type")!==-1;if(y&&r){k=false}M=[];M.map={};Q.replace(C,function(T,S,X,W,V){var Y,U;S=S.toLowerCase();X=S in G?S:j(X||W||V||"");if(u&&!y&&S.indexOf("data-")!==0){Y=O[S];if(!Y&&E){U=E.length;while(U--){Y=E[U];if(Y.pattern.test(S)){break}}if(U===-1){Y=null}}if(!Y){return}if(Y.validValues&&!(X in Y.validValues)){return}}M.map[S]=X;M.push({name:S,value:X})})}else{M=[];M.map={}}if(u&&!y){R=m.attributesRequired;K=m.attributesDefault;f=m.attributesForced;if(f){P=f.length;while(P--){s=f[P];q=s.name;h=s.value;if(h==="{$uid}"){h="mce_"+v++}M.map[q]=h;M.push({name:q,value:h})}}if(K){P=K.length;while(P--){s=K[P];q=s.name;if(!(q in M.map)){h=s.value;if(h==="{$uid}"){h="mce_"+v++}M.map[q]=h;M.push({name:q,value:h})}}}if(R){P=R.length;while(P--){if(R[P] in M.map){break}}if(P===-1){k=false}}if(M.map["data-mce-bogus"]){k=false}}if(k){n.start(H,M,N)}}else{k=false}if(A=J[H]){A.lastIndex=F=g.index+g[0].length;if(g=A.exec(D)){if(k){B=D.substr(F,g.index-F)}F=g.index+g[0].length}else{B=D.substr(F);F=D.length}if(k&&B.length>0){n.text(B,true)}if(k){n.end(H)}l.lastIndex=F;continue}if(!N){if(!Q||Q.indexOf("/")!=Q.length-1){z.push({name:H,valid:k})}else{if(k){n.end(H)}}}}else{if(H=g[1]){n.comment(H)}else{if(H=g[2]){n.cdata(H)}else{if(H=g[3]){n.doctype(H)}else{if(H=g[4]){n.pi(H,g[5])}}}}}}F=g.index+g[0].length}if(F=0;P--){H=z[P];if(H.valid){n.end(H.name)}}}}})(tinymce);(function(d){var c=/^[ \t\r\n]*$/,e={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};function a(k,l,j){var i,h,f=j?"lastChild":"firstChild",g=j?"prev":"next";if(k[f]){return k[f]}if(k!==l){i=k[g];if(i){return i}for(h=k.parent;h&&h!==l;h=h.parent){i=h[g];if(i){return i}}}}function b(f,g){this.name=f;this.type=g;if(g===1){this.attributes=[];this.attributes.map={}}}d.extend(b.prototype,{replace:function(g){var f=this;if(g.parent){g.remove()}f.insert(g,f);f.remove();return f},attr:function(h,l){var f=this,g,j,k;if(typeof h!=="string"){for(j in h){f.attr(j,h[j])}return f}if(g=f.attributes){if(l!==k){if(l===null){if(h in g.map){delete g.map[h];j=g.length;while(j--){if(g[j].name===h){g=g.splice(j,1);return f}}}return f}if(h in g.map){j=g.length;while(j--){if(g[j].name===h){g[j].value=l;break}}}else{g.push({name:h,value:l})}g.map[h]=l;return f}else{return g.map[h]}}},clone:function(){var g=this,n=new b(g.name,g.type),h,f,m,j,k;if(m=g.attributes){k=[];k.map={};for(h=0,f=m.length;h1){v.reverse();z=n=f.filterNode(v[0].clone());for(t=0;t0){N.value=l;N=N.prev}else{L=N.prev;N.remove();N=L}}}n=new b.html.SaxParser({validate:y,fix_self_closing:!y,cdata:function(l){A.append(I("#cdata",4)).value=l},text:function(M,l){var L;if(!s[A.name]){M=M.replace(k," ");if(A.lastChild&&o[A.lastChild.name]){M=M.replace(D,"")}}if(M.length!==0){L=I("#text",3);L.raw=!!l;A.append(L).value=M}},comment:function(l){A.append(I("#comment",8)).value=l},pi:function(l,L){A.append(I(l,7)).value=L;G(A)},doctype:function(L){var l;l=A.append(I("#doctype",10));l.value=L;G(A)},start:function(l,T,M){var R,O,N,L,P,U,S,Q;N=y?h.getElementRule(l):{};if(N){R=I(N.outputName||l,1);R.attributes=T;R.shortEnded=M;A.append(R);Q=p[A.name];if(Q&&p[R.name]&&!Q[R.name]){J.push(R)}O=d.length;while(O--){P=d[O].name;if(P in T.map){E=c[P];if(E){E.push(R)}else{c[P]=[R]}}}if(o[l]){G(R)}if(!M){A=R}}},end:function(l){var P,M,O,L,N;M=y?h.getElementRule(l):{};if(M){if(o[l]){if(!s[A.name]){for(P=A.firstChild;P&&P.type===3;){O=P.value.replace(D,"");if(O.length>0){P.value=O;P=P.next}else{L=P.next;P.remove();P=L}}for(P=A.lastChild;P&&P.type===3;){O=P.value.replace(t,"");if(O.length>0){P.value=O;P=P.prev}else{L=P.prev;P.remove();P=L}}}P=A.prev;if(P&&P.type===3){O=P.value.replace(D,"");if(O.length>0){P.value=O}else{P.remove()}}}if(M.removeEmpty||M.paddEmpty){if(A.isEmpty(u)){if(M.paddEmpty){A.empty().append(new a("#text","3")).value="\u00a0"}else{if(!A.attributes.map.name){N=A.parent;A.empty().remove();A=N;return}}}}A=A.parent}}},h);H=A=new a(m.context||g.root_name,11);n.parse(v);if(y&&J.length){if(!m.context){j(J)}else{m.invalid=true}}if(q&&H.name=="body"){F()}if(!m.invalid){for(K in i){E=e[K];z=i[K];x=z.length;while(x--){if(!z[x].parent){z.splice(x,1)}}for(C=0,B=E.length;C0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}c.push("<",m);if(k){for(n=0,j=k.length;n0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}},end:function(h){var i;c.push("");if(a&&d[h]&&c.length>0){i=c[c.length-1];if(i.length>0&&i!=="\n"){c.push("\n")}}},text:function(i,h){if(i.length>0){c[c.length]=h?i:f(i)}},cdata:function(h){c.push("")},comment:function(h){c.push("")},pi:function(h,i){if(i){c.push("")}else{c.push("")}if(a){c.push("\n")}},doctype:function(h){c.push("",a?"\n":"")},reset:function(){c.length=0},getContent:function(){return c.join("").replace(/\n$/,"")}}};(function(a){a.html.Serializer=function(c,d){var b=this,e=new a.html.Writer(c);c=c||{};c.validate="validate" in c?c.validate:true;b.schema=d=d||new a.html.Schema();b.writer=e;b.serialize=function(h){var g,i;i=c.validate;g={3:function(k,j){e.text(k.value,k.raw)},8:function(j){e.comment(j.value)},7:function(j){e.pi(j.name,j.value)},10:function(j){e.doctype(j.value)},4:function(j){e.cdata(j.value)},11:function(j){if((j=j.firstChild)){do{f(j)}while(j=j.next)}}};e.reset();function f(k){var t=g[k.type],j,o,s,r,p,u,n,m,q;if(!t){j=k.name;o=k.shortEnded;s=k.attributes;if(i&&s&&s.length>1){u=[];u.map={};q=d.getElementRule(k.name);for(n=0,m=q.attributesOrder.length;n=8;l.boxModel=!h.isIE||o.compatMode=="CSS1Compat"||l.stdMode;l.hasOuterHTML="outerHTML" in o.createElement("a");l.settings=m=h.extend({keep_values:false,hex_colors:1},m);l.schema=m.schema;l.styles=new h.html.Styles({url_converter:m.url_converter,url_converter_scope:m.url_converter_scope},m.schema);if(h.isIE6){try{o.execCommand("BackgroundImageCache",false,true)}catch(n){l.cssFlicker=true}}if(b&&m.schema){("abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video").replace(/\w+/g,function(p){o.createElement(p)});for(k in m.schema.getCustomElements()){o.createElement(k)}}h.addUnload(l.destroy,l)},getRoot:function(){var j=this,k=j.settings;return(k&&j.get(k.root_element))||j.doc.body},getViewPort:function(k){var l,j;k=!k?this.win:k;l=k.document;j=this.boxModel?l.documentElement:l.body;return{x:k.pageXOffset||j.scrollLeft,y:k.pageYOffset||j.scrollTop,w:k.innerWidth||j.clientWidth,h:k.innerHeight||j.clientHeight}},getRect:function(m){var l,j=this,k;m=j.get(m);l=j.getPos(m);k=j.getSize(m);return{x:l.x,y:l.y,w:k.w,h:k.h}},getSize:function(m){var k=this,j,l;m=k.get(m);j=k.getStyle(m,"width");l=k.getStyle(m,"height");if(j.indexOf("px")===-1){j=0}if(l.indexOf("px")===-1){l=0}return{w:parseInt(j)||m.offsetWidth||m.clientWidth,h:parseInt(l)||m.offsetHeight||m.clientHeight}},getParent:function(l,k,j){return this.getParents(l,k,j,false)},getParents:function(u,p,l,s){var k=this,j,m=k.settings,q=[];u=k.get(u);s=s===undefined;if(m.strict_root){l=l||k.getRoot()}if(e(p,"string")){j=p;if(p==="*"){p=function(o){return o.nodeType==1}}else{p=function(o){return k.is(o,j)}}}while(u){if(u==l||!u.nodeType||u.nodeType===9){break}if(!p||p(u)){if(s){q.push(u)}else{return u}}u=u.parentNode}return s?q:null},get:function(j){var k;if(j&&this.doc&&typeof(j)=="string"){k=j;j=this.doc.getElementById(j);if(j&&j.id!==k){return this.doc.getElementsByName(k)[1]}}return j},getNext:function(k,j){return this._findSib(k,j,"nextSibling")},getPrev:function(k,j){return this._findSib(k,j,"previousSibling")},select:function(l,k){var j=this;return h.dom.Sizzle(l,j.get(k)||j.get(j.settings.root_element)||j.doc,[])},is:function(l,j){var k;if(l.length===undefined){if(j==="*"){return l.nodeType==1}if(a.test(j)){j=j.toLowerCase().split(/,/);l=l.nodeName.toLowerCase();for(k=j.length-1;k>=0;k--){if(j[k]==l){return true}}return false}}return h.dom.Sizzle.matches(j,l.nodeType?[l]:l).length>0},add:function(m,q,j,l,o){var k=this;return this.run(m,function(s){var r,n;r=e(q,"string")?k.doc.createElement(q):q;k.setAttribs(r,j);if(l){if(l.nodeType){r.appendChild(l)}else{k.setHTML(r,l)}}return !o?s.appendChild(r):r})},create:function(l,j,k){return this.add(this.doc.createElement(l),l,j,k,1)},createHTML:function(r,j,p){var q="",m=this,l;q+="<"+r;for(l in j){if(j.hasOwnProperty(l)){q+=" "+l+'="'+m.encode(j[l])+'"'}}if(typeof(p)!="undefined"){return q+">"+p+""}return q+" />"},remove:function(j,k){return this.run(j,function(m){var n,l=m.parentNode;if(!l){return null}if(k){while(n=m.firstChild){if(!h.isIE||n.nodeType!==3||n.nodeValue){l.insertBefore(n,m)}else{m.removeChild(n)}}}return l.removeChild(m)})},setStyle:function(m,j,k){var l=this;return l.run(m,function(p){var o,n;o=p.style;j=j.replace(/-(\D)/g,function(r,q){return q.toUpperCase()});if(l.pixelStyles.test(j)&&(h.is(k,"number")||/^[\-0-9\.]+$/.test(k))){k+="px"}switch(j){case"opacity":if(b){o.filter=k===""?"":"alpha(opacity="+(k*100)+")";if(!m.currentStyle||!m.currentStyle.hasLayout){o.display="inline-block"}}o[j]=o["-moz-opacity"]=o["-khtml-opacity"]=k||"";break;case"float":b?o.styleFloat=k:o.cssFloat=k;break;default:o[j]=k||""}if(l.settings.update_styles){l.setAttrib(p,"data-mce-style")}})},getStyle:function(m,j,l){m=this.get(m);if(!m){return}if(this.doc.defaultView&&l){j=j.replace(/[A-Z]/g,function(n){return"-"+n});try{return this.doc.defaultView.getComputedStyle(m,null).getPropertyValue(j)}catch(k){return null}}j=j.replace(/-(\D)/g,function(o,n){return n.toUpperCase()});if(j=="float"){j=b?"styleFloat":"cssFloat"}if(m.currentStyle&&l){return m.currentStyle[j]}return m.style?m.style[j]:undefined},setStyles:function(m,n){var k=this,l=k.settings,j;j=l.update_styles;l.update_styles=0;f(n,function(o,p){k.setStyle(m,p,o)});l.update_styles=j;if(l.update_styles){k.setAttrib(m,l.cssText)}},removeAllAttribs:function(j){return this.run(j,function(m){var l,k=m.attributes;for(l=k.length-1;l>=0;l--){m.removeAttributeNode(k.item(l))}})},setAttrib:function(l,m,j){var k=this;if(!l||!m){return}if(k.settings.strict){m=m.toLowerCase()}return this.run(l,function(o){var n=k.settings;switch(m){case"style":if(!e(j,"string")){f(j,function(p,q){k.setStyle(o,q,p)});return}if(n.keep_values){if(j&&!k._isRes(j)){o.setAttribute("data-mce-style",j,2)}else{o.removeAttribute("data-mce-style",2)}}o.style.cssText=j;break;case"class":o.className=j||"";break;case"src":case"href":if(n.keep_values){if(n.url_converter){j=n.url_converter.call(n.url_converter_scope||k,j,m,o)}k.setAttrib(o,"data-mce-"+m,j,2)}break;case"shape":o.setAttribute("data-mce-style",j);break}if(e(j)&&j!==null&&j.length!==0){o.setAttribute(m,""+j,2)}else{o.removeAttribute(m,2)}})},setAttribs:function(k,l){var j=this;return this.run(k,function(m){f(l,function(o,p){j.setAttrib(m,p,o)})})},getAttrib:function(o,p,l){var j,k=this,m;o=k.get(o);if(!o||o.nodeType!==1){return l===m?false:l}if(!e(l)){l=""}if(/^(src|href|style|coords|shape)$/.test(p)){j=o.getAttribute("data-mce-"+p);if(j){return j}}if(b&&k.props[p]){j=o[k.props[p]];j=j&&j.nodeValue?j.nodeValue:j}if(!j){j=o.getAttribute(p,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(p)){if(o[k.props[p]]===true&&j===""){return p}return j?p:""}if(o.nodeName==="FORM"&&o.getAttributeNode(p)){return o.getAttributeNode(p).nodeValue}if(p==="style"){j=j||o.style.cssText;if(j){j=k.serializeStyle(k.parseStyle(j),o.nodeName);if(k.settings.keep_values&&!k._isRes(j)){o.setAttribute("data-mce-style",j)}}}if(d&&p==="class"&&j){j=j.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(b){switch(p){case"rowspan":case"colspan":if(j===1){j=""}break;case"size":if(j==="+0"||j===20||j===0){j=""}break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":if(j===0){j=""}break;case"hspace":if(j===-1){j=""}break;case"maxlength":case"tabindex":if(j===32768||j===2147483647||j==="32768"){j=""}break;case"multiple":case"compact":case"noshade":case"nowrap":if(j===65535){return p}return l;case"shape":j=j.toLowerCase();break;default:if(p.indexOf("on")===0&&j){j=h._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+j)}}}return(j!==m&&j!==null&&j!=="")?""+j:l},getPos:function(s,m){var k=this,j=0,q=0,o,p=k.doc,l;s=k.get(s);m=m||p.body;if(s){if(s.getBoundingClientRect){s=s.getBoundingClientRect();o=k.boxModel?p.documentElement:p.body;j=s.left+(p.documentElement.scrollLeft||p.body.scrollLeft)-o.clientTop;q=s.top+(p.documentElement.scrollTop||p.body.scrollTop)-o.clientLeft;return{x:j,y:q}}l=s;while(l&&l!=m&&l.nodeType){j+=l.offsetLeft||0;q+=l.offsetTop||0;l=l.offsetParent}l=s.parentNode;while(l&&l!=m&&l.nodeType){j-=l.scrollLeft||0;q-=l.scrollTop||0;l=l.parentNode}}return{x:j,y:q}},parseStyle:function(j){return this.styles.parse(j)},serializeStyle:function(k,j){return this.styles.serialize(k,j)},loadCSS:function(j){var l=this,m=l.doc,k;if(!j){j=""}k=l.select("head")[0];f(j.split(","),function(n){var o;if(l.files[n]){return}l.files[n]=true;o=l.create("link",{rel:"stylesheet",href:h._addVer(n)});if(b&&m.documentMode&&m.recalc){o.onload=function(){if(m.recalc){m.recalc()}o.onload=null}}k.appendChild(o)})},addClass:function(j,k){return this.run(j,function(l){var m;if(!k){return 0}if(this.hasClass(l,k)){return l.className}m=this.removeClass(l,k);return l.className=(m!=""?(m+" "):"")+k})},removeClass:function(l,m){var j=this,k;return j.run(l,function(o){var n;if(j.hasClass(o,m)){if(!k){k=new RegExp("(^|\\s+)"+m+"(\\s+|$)","g")}n=o.className.replace(k," ");n=h.trim(n!=" "?n:"");o.className=n;if(!n){o.removeAttribute("class");o.removeAttribute("className")}return n}return o.className})},hasClass:function(k,j){k=this.get(k);if(!k||!j){return false}return(" "+k.className+" ").indexOf(" "+j+" ")!==-1},show:function(j){return this.setStyle(j,"display","block")},hide:function(j){return this.setStyle(j,"display","none")},isHidden:function(j){j=this.get(j);return !j||j.style.display=="none"||this.getStyle(j,"display")=="none"},uniqueId:function(j){return(!j?"mce_":j)+(this.counter++)},setHTML:function(l,k){var j=this;return j.run(l,function(n){if(b){while(n.firstChild){n.removeChild(n.firstChild)}try{n.innerHTML="
      "+k;n.removeChild(n.firstChild)}catch(m){n=j.create("div");n.innerHTML="
      "+k;f(n.childNodes,function(p,o){if(o){n.appendChild(p)}})}}else{n.innerHTML=k}return k})},getOuterHTML:function(l){var k,j=this;l=j.get(l);if(!l){return null}if(l.nodeType===1&&j.hasOuterHTML){return l.outerHTML}k=(l.ownerDocument||j.doc).createElement("body");k.appendChild(l.cloneNode(true));return k.innerHTML},setOuterHTML:function(m,k,n){var j=this;function l(p,o,r){var s,q;q=r.createElement("body");q.innerHTML=o;s=q.lastChild;while(s){j.insertAfter(s.cloneNode(true),p);s=s.previousSibling}j.remove(p)}return this.run(m,function(p){p=j.get(p);if(p.nodeType==1){n=n||p.ownerDocument||j.doc;if(b){try{if(b&&p.nodeType==1){p.outerHTML=k}else{l(p,k,n)}}catch(o){l(p,k,n)}}else{l(p,k,n)}}})},decode:c.decode,encode:c.encodeAllRaw,insertAfter:function(j,k){k=this.get(k);return this.run(j,function(m){var l,n;l=k.parentNode;n=k.nextSibling;if(n){l.insertBefore(m,n)}else{l.appendChild(m)}return m})},isBlock:function(k){var j=k.nodeType;if(j){return !!(j===1&&g[k.nodeName])}return !!g[k]},replace:function(p,m,j){var l=this;if(e(m,"array")){p=p.cloneNode(true)}return l.run(m,function(k){if(j){f(h.grep(k.childNodes),function(n){p.appendChild(n)})}return k.parentNode.replaceChild(p,k)})},rename:function(m,j){var l=this,k;if(m.nodeName!=j.toUpperCase()){k=l.create(j);f(l.getAttribs(m),function(n){l.setAttrib(k,n.nodeName,l.getAttrib(m,n.nodeName))});l.replace(k,m,1)}return k||m},findCommonAncestor:function(l,j){var m=l,k;while(m){k=j;while(k&&m!=k){k=k.parentNode}if(m==k){break}m=m.parentNode}if(!m&&l.ownerDocument){return l.ownerDocument.documentElement}return m},toHex:function(j){var l=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(j);function k(m){m=parseInt(m).toString(16);return m.length>1?m:"0"+m}if(l){j="#"+k(l[1])+k(l[2])+k(l[3]);return j}return j},getClasses:function(){var n=this,j=[],m,o={},p=n.settings.class_filter,l;if(n.classes){return n.classes}function q(r){f(r.imports,function(s){q(s)});f(r.cssRules||r.rules,function(s){switch(s.type||1){case 1:if(s.selectorText){f(s.selectorText.split(","),function(t){t=t.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(t)||!/\.[\w\-]+$/.test(t)){return}l=t;t=h._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",t);if(p&&!(t=p(t,l))){return}if(!o[t]){j.push({"class":t});o[t]=1}})}break;case 3:q(s.styleSheet);break}})}try{f(n.doc.styleSheets,q)}catch(k){}if(j.length>0){n.classes=j}return j},run:function(m,l,k){var j=this,n;if(j.doc&&typeof(m)==="string"){m=j.get(m)}if(!m){return false}k=k||this;if(!m.nodeType&&(m.length||m.length===0)){n=[];f(m,function(p,o){if(p){if(typeof(p)=="string"){p=j.doc.getElementById(p)}n.push(l.call(k,p,o))}});return n}return l.call(k,m)},getAttribs:function(k){var j;k=this.get(k);if(!k){return[]}if(b){j=[];if(k.nodeName=="OBJECT"){return k.attributes}if(k.nodeName==="OPTION"&&this.getAttrib(k,"selected")){j.push({specified:1,nodeName:"selected"})}k.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(l){j.push({specified:1,nodeName:l})});return j}return k.attributes},isEmpty:function(m,k){var r=this,o,n,q,j,l,p;m=m.firstChild;if(m){j=new h.dom.TreeWalker(m);k=k||r.schema?r.schema.getNonEmptyElements():null;do{q=m.nodeType;if(q===1){if(m.getAttribute("data-mce-bogus")){continue}l=m.nodeName.toLowerCase();if(k&&k[l]){p=m.parentNode;if(l==="br"&&r.isBlock(p)&&p.firstChild===m&&p.lastChild===m){continue}return false}n=r.getAttribs(m);o=m.attributes.length;while(o--){l=m.attributes[o].nodeName;if(l==="name"||l==="data-mce-bookmark"){return false}}}if((q===3&&!i.test(m.nodeValue))){return false}}while(m=j.next())}return true},destroy:function(k){var j=this;if(j.events){j.events.destroy()}j.win=j.doc=j.root=j.events=null;if(!k){h.removeUnload(j.destroy)}},createRng:function(){var j=this.doc;return j.createRange?j.createRange():new h.dom.Range(this)},nodeIndex:function(n,o){var j=0,l,m,k;if(n){for(l=n.nodeType,n=n.previousSibling,m=n;n;n=n.previousSibling){k=n.nodeType;if(o&&k==3){if(k==l||!n.nodeValue.length){continue}}j++;l=k}}return j},split:function(n,m,q){var s=this,j=s.createRng(),o,l,p;function k(v){var t,r=v.childNodes,u=v.nodeType;if(u==1&&v.getAttribute("data-mce-type")=="bookmark"){return}for(t=r.length-1;t>=0;t--){k(r[t])}if(u!=9){if(u==3&&v.nodeValue.length>0){if(!s.isBlock(v.parentNode)||h.trim(v.nodeValue).length>0){return}}else{if(u==1){r=v.childNodes;if(r.length==1&&r[0]&&r[0].nodeType==1&&r[0].getAttribute("data-mce-type")=="bookmark"){v.parentNode.insertBefore(r[0],v)}if(r.length||/^(br|hr|input|img)$/i.test(v.nodeName)){return}}}s.remove(v)}return v}if(n&&m){j.setStart(n.parentNode,s.nodeIndex(n));j.setEnd(m.parentNode,s.nodeIndex(m));o=j.extractContents();j=s.createRng();j.setStart(m.parentNode,s.nodeIndex(m)+1);j.setEnd(n.parentNode,s.nodeIndex(n)+1);l=j.extractContents();p=n.parentNode;p.insertBefore(k(o),n);if(q){p.replaceChild(q,m)}else{p.insertBefore(m,n)}p.insertBefore(k(l),n);s.remove(n);return q||m}},bind:function(n,j,m,l){var k=this;if(!k.events){k.events=new h.dom.EventUtils()}return k.events.add(n,j,m,l||this)},unbind:function(m,j,l){var k=this;if(!k.events){k.events=new h.dom.EventUtils()}return k.events.remove(m,j,l)},_findSib:function(m,j,k){var l=this,n=j;if(m){if(e(n,"string")){n=function(o){return l.is(o,j)}}for(m=m[k];m;m=m[k]){if(n(m)){return m}}}return null},_isRes:function(j){return/^(top|left|bottom|right|width|height)/i.test(j)||/;\s*(top|left|bottom|right|width|height)/i.test(j)}});h.DOM=new h.dom.DOMUtils(document,{process_html:0})})(tinymce);(function(a){function b(c){var N=this,e=c.doc,S=0,E=1,j=2,D=true,R=false,U="startOffset",h="startContainer",P="endContainer",z="endOffset",k=tinymce.extend,n=c.nodeIndex;k(N,{startContainer:e,startOffset:0,endContainer:e,endOffset:0,collapsed:D,commonAncestorContainer:e,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:q,setEnd:s,setStartBefore:g,setStartAfter:I,setEndBefore:J,setEndAfter:u,collapse:A,selectNode:x,selectNodeContents:F,compareBoundaryPoints:v,deleteContents:p,extractContents:H,cloneContents:d,insertNode:C,surroundContents:M,cloneRange:K});function q(V,t){B(D,V,t)}function s(V,t){B(R,V,t)}function g(t){q(t.parentNode,n(t))}function I(t){q(t.parentNode,n(t)+1)}function J(t){s(t.parentNode,n(t))}function u(t){s(t.parentNode,n(t)+1)}function A(t){if(t){N[P]=N[h];N[z]=N[U]}else{N[h]=N[P];N[U]=N[z]}N.collapsed=D}function x(t){g(t);u(t)}function F(t){q(t,0);s(t,t.nodeType===1?t.childNodes.length:t.nodeValue.length)}function v(Y,t){var ab=N[h],W=N[U],aa=N[P],V=N[z],Z=t.startContainer,ad=t.startOffset,X=t.endContainer,ac=t.endOffset;if(Y===0){return G(ab,W,Z,ad)}if(Y===1){return G(aa,V,Z,ad)}if(Y===2){return G(aa,V,X,ac)}if(Y===3){return G(ab,W,X,ac)}}function p(){m(j)}function H(){return m(S)}function d(){return m(E)}function C(Y){var V=this[h],t=this[U],X,W;if((V.nodeType===3||V.nodeType===4)&&V.nodeValue){if(!t){V.parentNode.insertBefore(Y,V)}else{if(t>=V.nodeValue.length){c.insertAfter(Y,V)}else{X=V.splitText(t);V.parentNode.insertBefore(Y,X)}}}else{if(V.childNodes.length>0){W=V.childNodes[t]}if(W){V.insertBefore(Y,W)}else{V.appendChild(Y)}}}function M(V){var t=N.extractContents();N.insertNode(V);V.appendChild(t);N.selectNode(V)}function K(){return k(new b(c),{startContainer:N[h],startOffset:N[U],endContainer:N[P],endOffset:N[z],collapsed:N.collapsed,commonAncestorContainer:N.commonAncestorContainer})}function O(t,V){var W;if(t.nodeType==3){return t}if(V<0){return t}W=t.firstChild;while(W&&V>0){--V;W=W.nextSibling}if(W){return W}return t}function l(){return(N[h]==N[P]&&N[U]==N[z])}function G(X,Z,V,Y){var aa,W,t,ab,ad,ac;if(X==V){if(Z==Y){return 0}if(Z0){N.collapse(V)}}else{N.collapse(V)}N.collapsed=l();N.commonAncestorContainer=c.findCommonAncestor(N[h],N[P])}function m(ab){var aa,X=0,ad=0,V,Z,W,Y,t,ac;if(N[h]==N[P]){return f(ab)}for(aa=N[P],V=aa.parentNode;V;aa=V,V=V.parentNode){if(V==N[h]){return r(aa,ab)}++X}for(aa=N[h],V=aa.parentNode;V;aa=V,V=V.parentNode){if(V==N[P]){return T(aa,ab)}++ad}Z=ad-X;W=N[h];while(Z>0){W=W.parentNode;Z--}Y=N[P];while(Z<0){Y=Y.parentNode;Z++}for(t=W.parentNode,ac=Y.parentNode;t!=ac;t=t.parentNode,ac=ac.parentNode){W=t;Y=ac}return o(W,Y,ab)}function f(Z){var ab,Y,X,aa,t,W,V;if(Z!=j){ab=e.createDocumentFragment()}if(N[U]==N[z]){return ab}if(N[h].nodeType==3){Y=N[h].nodeValue;X=Y.substring(N[U],N[z]);if(Z!=E){N[h].deleteData(N[U],N[z]-N[U]);N.collapse(D)}if(Z==j){return}ab.appendChild(e.createTextNode(X));return ab}aa=O(N[h],N[U]);t=N[z]-N[U];while(t>0){W=aa.nextSibling;V=y(aa,Z);if(ab){ab.appendChild(V)}--t;aa=W}if(Z!=E){N.collapse(D)}return ab}function r(ab,Y){var aa,Z,V,t,X,W;if(Y!=j){aa=e.createDocumentFragment()}Z=i(ab,Y);if(aa){aa.appendChild(Z)}V=n(ab);t=V-N[U];if(t<=0){if(Y!=E){N.setEndBefore(ab);N.collapse(R)}return aa}Z=ab.previousSibling;while(t>0){X=Z.previousSibling;W=y(Z,Y);if(aa){aa.insertBefore(W,aa.firstChild)}--t;Z=X}if(Y!=E){N.setEndBefore(ab);N.collapse(R)}return aa}function T(Z,Y){var ab,V,aa,t,X,W;if(Y!=j){ab=e.createDocumentFragment()}aa=Q(Z,Y);if(ab){ab.appendChild(aa)}V=n(Z);++V;t=N[z]-V;aa=Z.nextSibling;while(t>0){X=aa.nextSibling;W=y(aa,Y);if(ab){ab.appendChild(W)}--t;aa=X}if(Y!=E){N.setStartAfter(Z);N.collapse(D)}return ab}function o(Z,t,ac){var W,ae,Y,aa,ab,V,ad,X;if(ac!=j){ae=e.createDocumentFragment()}W=Q(Z,ac);if(ae){ae.appendChild(W)}Y=Z.parentNode;aa=n(Z);ab=n(t);++aa;V=ab-aa;ad=Z.nextSibling;while(V>0){X=ad.nextSibling;W=y(ad,ac);if(ae){ae.appendChild(W)}ad=X;--V}W=i(t,ac);if(ae){ae.appendChild(W)}if(ac!=E){N.setStartAfter(Z);N.collapse(D)}return ae}function i(aa,ab){var W=O(N[P],N[z]-1),ac,Z,Y,t,V,X=W!=N[P];if(W==aa){return L(W,X,R,ab)}ac=W.parentNode;Z=L(ac,R,R,ab);while(ac){while(W){Y=W.previousSibling;t=L(W,X,R,ab);if(ab!=j){Z.insertBefore(t,Z.firstChild)}X=D;W=Y}if(ac==aa){return Z}W=ac.previousSibling;ac=ac.parentNode;V=L(ac,R,R,ab);if(ab!=j){V.appendChild(Z)}Z=V}}function Q(aa,ab){var X=O(N[h],N[U]),Y=X!=N[h],ac,Z,W,t,V;if(X==aa){return L(X,Y,D,ab)}ac=X.parentNode;Z=L(ac,R,D,ab);while(ac){while(X){W=X.nextSibling;t=L(X,Y,D,ab);if(ab!=j){Z.appendChild(t)}Y=D;X=W}if(ac==aa){return Z}X=ac.nextSibling;ac=ac.parentNode;V=L(ac,R,D,ab);if(ab!=j){V.appendChild(Z)}Z=V}}function L(t,Y,ab,ac){var X,W,Z,V,aa;if(Y){return y(t,ac)}if(t.nodeType==3){X=t.nodeValue;if(ab){V=N[U];W=X.substring(V);Z=X.substring(0,V)}else{V=N[z];W=X.substring(0,V);Z=X.substring(V)}if(ac!=E){t.nodeValue=Z}if(ac==j){return}aa=t.cloneNode(R);aa.nodeValue=W;return aa}if(ac==j){return}return t.cloneNode(R)}function y(V,t){if(t!=j){return t==E?V.cloneNode(D):V}V.parentNode.removeChild(V)}}a.Range=b})(tinymce.dom);(function(){function a(d){var b=this,h=d.dom,c=true,f=false;function e(i,j){var k,t=0,q,n,m,l,o,r,p=-1,s;k=i.duplicate();k.collapse(j);s=k.parentElement();if(s.ownerDocument!==d.dom.doc){return}while(s.contentEditable==="false"){s=s.parentNode}if(!s.hasChildNodes()){return{node:s,inside:1}}m=s.children;q=m.length-1;while(t<=q){r=Math.floor((t+q)/2);l=m[r];k.moveToElementText(l);p=k.compareEndPoints(j?"StartToStart":"EndToEnd",i);if(p>0){q=r-1}else{if(p<0){t=r+1}else{return{node:l}}}}if(p<0){if(!l){k.moveToElementText(s);k.collapse(true);l=s;n=true}else{k.collapse(false)}k.setEndPoint(j?"EndToStart":"EndToEnd",i);if(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)>0){k=i.duplicate();k.collapse(j);o=-1;while(s==k.parentElement()){if(k.move("character",-1)==0){break}o++}}o=o||k.text.replace("\r\n"," ").length}else{k.collapse(true);k.setEndPoint(j?"StartToStart":"StartToEnd",i);o=k.text.replace("\r\n"," ").length}return{node:l,position:p,offset:o,inside:n}}function g(){var i=d.getRng(),r=h.createRng(),l,k,p,q,m,j;l=i.item?i.item(0):i.parentElement();if(l.ownerDocument!=h.doc){return r}k=d.isCollapsed();if(i.item){r.setStart(l.parentNode,h.nodeIndex(l));r.setEnd(r.startContainer,r.startOffset+1);return r}function o(A){var u=e(i,A),s,y,z=0,x,v,t;s=u.node;y=u.offset;if(u.inside&&!s.hasChildNodes()){r[A?"setStart":"setEnd"](s,0);return}if(y===v){r[A?"setStartBefore":"setEndAfter"](s);return}if(u.position<0){x=u.inside?s.firstChild:s.nextSibling;if(!x){r[A?"setStartAfter":"setEndAfter"](s);return}if(!y){if(x.nodeType==3){r[A?"setStart":"setEnd"](x,0)}else{r[A?"setStartBefore":"setEndBefore"](x)}return}while(x){t=x.nodeValue;z+=t.length;if(z>=y){s=x;z-=y;z=t.length-z;break}x=x.nextSibling}}else{x=s.previousSibling;if(!x){return r[A?"setStartBefore":"setEndBefore"](s)}if(!y){if(s.nodeType==3){r[A?"setStart":"setEnd"](x,s.nodeValue.length)}else{r[A?"setStartAfter":"setEndAfter"](x)}return}while(x){z+=x.nodeValue.length;if(z>=y){s=x;z-=y;break}x=x.previousSibling}}r[A?"setStart":"setEnd"](s,z)}try{o(true);if(!k){o()}}catch(n){if(n.number==-2147024809){m=b.getBookmark(2);p=i.duplicate();p.collapse(true);l=p.parentElement();if(!k){p=i.duplicate();p.collapse(false);q=p.parentElement();q.innerHTML=q.innerHTML}l.innerHTML=l.innerHTML;b.moveToBookmark(m);i=d.getRng();o(true);if(!k){o()}}else{throw n}}return r}this.getBookmark=function(m){var j=d.getRng(),o,i,l={};function n(u){var u,t,p,s,r,q=[];t=u.parentNode;p=h.getRoot().parentNode;while(t!=p){s=t.children;r=s.length;while(r--){if(u===s[r]){q.push(r);break}}u=t;t=t.parentNode}return q}function k(q){var p;p=e(j,q);if(p){return{position:p.position,offset:p.offset,indexes:n(p.node),inside:p.inside}}}if(m===2){if(!j.item){l.start=k(true);if(!d.isCollapsed()){l.end=k()}}else{l.start={ctrl:true,indexes:n(j.item(0))}}}return l};this.moveToBookmark=function(k){var j,i=h.doc.body;function m(o){var r,q,n,p;r=h.getRoot();for(q=o.length-1;q>=0;q--){p=r.children;n=o[q];if(n<=p.length-1){r=p[n]}}return r}function l(r){var n=k[r?"start":"end"],q,p,o;if(n){q=n.position>0;p=i.createTextRange();p.moveToElementText(m(n.indexes));offset=n.offset;if(offset!==o){p.collapse(n.inside||q);p.moveStart("character",q?-offset:offset)}else{p.collapse(r)}j.setEndPoint(r?"StartToStart":"EndToStart",p);if(r){j.collapse(true)}}}if(k.start){if(k.start.ctrl){j=i.createControlRange();j.addElement(m(k.start.indexes));j.select()}else{j=i.createTextRange();l(true);l();j.select()}}};this.addRange=function(i){var n,l,k,p,s,q,r=d.dom.doc,m=r.body;function j(z){var u,y,t,x,v;t=h.create("a");u=z?k:s;y=z?p:q;x=n.duplicate();if(u==r||u==r.documentElement){u=m;y=0}if(u.nodeType==3){u.parentNode.insertBefore(t,u);x.moveToElementText(t);x.moveStart("character",y);h.remove(t);n.setEndPoint(z?"StartToStart":"EndToEnd",x)}else{v=u.childNodes;if(v.length){if(y>=v.length){h.insertAfter(t,v[v.length-1])}else{u.insertBefore(t,v[y])}x.moveToElementText(t)}else{t=r.createTextNode("\uFEFF");u.appendChild(t);x.moveToElementText(t.parentNode);x.collapse(c)}n.setEndPoint(z?"StartToStart":"EndToEnd",x);h.remove(t)}}k=i.startContainer;p=i.startOffset;s=i.endContainer;q=i.endOffset;n=m.createTextRange();if(k==s&&k.nodeType==1&&p==q-1){if(p==q-1){try{l=m.createControlRange();l.addElement(k.childNodes[p]);l.select();return}catch(o){}}}j(true);j();n.select()};this.getRangeAt=g}tinymce.dom.TridentSelection=a})();(function(){var p=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,j=0,d=Object.prototype.toString,o=false,i=true;[0,0].sort(function(){i=false;return 0});var b=function(v,e,z,A){z=z||[];e=e||document;var C=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!v||typeof v!=="string"){return z}var x=[],s,E,H,r,u=true,t=b.isXML(e),B=v,D,G,F,y;do{p.exec("");s=p.exec(B);if(s){B=s[3];x.push(s[1]);if(s[2]){r=s[3];break}}}while(s);if(x.length>1&&k.exec(v)){if(x.length===2&&f.relative[x[0]]){E=h(x[0]+x[1],e)}else{E=f.relative[x[0]]?[e]:b(x.shift(),e);while(x.length){v=x.shift();if(f.relative[v]){v+=x.shift()}E=h(v,E)}}}else{if(!A&&x.length>1&&e.nodeType===9&&!t&&f.match.ID.test(x[0])&&!f.match.ID.test(x[x.length-1])){D=b.find(x.shift(),e,t);e=D.expr?b.filter(D.expr,D.set)[0]:D.set[0]}if(e){D=A?{expr:x.pop(),set:a(A)}:b.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&e.parentNode?e.parentNode:e,t);E=D.expr?b.filter(D.expr,D.set):D.set;if(x.length>0){H=a(E)}else{u=false}while(x.length){G=x.pop();F=G;if(!f.relative[G]){G=""}else{F=x.pop()}if(F==null){F=e}f.relative[G](H,F,t)}}else{H=x=[]}}if(!H){H=E}if(!H){b.error(G||v)}if(d.call(H)==="[object Array]"){if(!u){z.push.apply(z,H)}else{if(e&&e.nodeType===1){for(y=0;H[y]!=null;y++){if(H[y]&&(H[y]===true||H[y].nodeType===1&&b.contains(e,H[y]))){z.push(E[y])}}}else{for(y=0;H[y]!=null;y++){if(H[y]&&H[y].nodeType===1){z.push(E[y])}}}}}else{a(H,z)}if(r){b(r,C,z,A);b.uniqueSort(z)}return z};b.uniqueSort=function(r){if(c){o=i;r.sort(c);if(o){for(var e=1;e":function(x,r){var u=typeof r==="string",v,s=0,e=x.length;if(u&&!/\W/.test(r)){r=r.toLowerCase();for(;s=0)){if(!s){e.push(v)}}else{if(s){r[u]=false}}}}return false},ID:function(e){return e[1].replace(/\\/g,"")},TAG:function(r,e){return r[1].toLowerCase()},CHILD:function(e){if(e[1]==="nth"){var r=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(r[1]+(r[2]||1))-0;e[3]=r[3]-0}e[0]=j++;return e},ATTR:function(u,r,s,e,v,x){var t=u[1].replace(/\\/g,"");if(!x&&f.attrMap[t]){u[1]=f.attrMap[t]}if(u[2]==="~="){u[4]=" "+u[4]+" "}return u},PSEUDO:function(u,r,s,e,v){if(u[1]==="not"){if((p.exec(u[3])||"").length>1||/^\w/.test(u[3])){u[3]=b(u[3],null,null,r)}else{var t=b.filter(u[3],r,s,true^v);if(!s){e.push.apply(e,t)}return false}}else{if(f.match.POS.test(u[0])||f.match.CHILD.test(u[0])){return true}}return u},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){e.parentNode.selectedIndex;return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(s,r,e){return !!b(e[3],s).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(e){return"text"===e.type},radio:function(e){return"radio"===e.type},checkbox:function(e){return"checkbox"===e.type},file:function(e){return"file"===e.type},password:function(e){return"password"===e.type},submit:function(e){return"submit"===e.type},image:function(e){return"image"===e.type},reset:function(e){return"reset"===e.type},button:function(e){return"button"===e.type||e.nodeName.toLowerCase()==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)}},setFilters:{first:function(r,e){return e===0},last:function(s,r,e,t){return r===t.length-1},even:function(r,e){return e%2===0},odd:function(r,e){return e%2===1},lt:function(s,r,e){return re[3]-0},nth:function(s,r,e){return e[3]-0===r},eq:function(s,r,e){return e[3]-0===r}},filter:{PSEUDO:function(s,y,x,z){var e=y[1],r=f.filters[e];if(r){return r(s,x,y,z)}else{if(e==="contains"){return(s.textContent||s.innerText||b.getText([s])||"").indexOf(y[3])>=0}else{if(e==="not"){var t=y[3];for(var v=0,u=t.length;v=0)}}},ID:function(r,e){return r.nodeType===1&&r.getAttribute("id")===e},TAG:function(r,e){return(e==="*"&&r.nodeType===1)||r.nodeName.toLowerCase()===e},CLASS:function(r,e){return(" "+(r.className||r.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(v,t){var s=t[1],e=f.attrHandle[s]?f.attrHandle[s](v):v[s]!=null?v[s]:v.getAttribute(s),x=e+"",u=t[2],r=t[4];return e==null?u==="!=":u==="="?x===r:u==="*="?x.indexOf(r)>=0:u==="~="?(" "+x+" ").indexOf(r)>=0:!r?x&&e!==false:u==="!="?x!==r:u==="^="?x.indexOf(r)===0:u==="$="?x.substr(x.length-r.length)===r:u==="|="?x===r||x.substr(0,r.length+1)===r+"-":false},POS:function(u,r,s,v){var e=r[2],t=f.setFilters[e];if(t){return t(u,s,r,v)}}}};var k=f.match.POS,g=function(r,e){return"\\"+(e-0+1)};for(var m in f.match){f.match[m]=new RegExp(f.match[m].source+(/(?![^\[]*\])(?![^\(]*\))/.source));f.leftMatch[m]=new RegExp(/(^(?:.|\r|\n)*?)/.source+f.match[m].source.replace(/\\(\d+)/g,g))}var a=function(r,e){r=Array.prototype.slice.call(r,0);if(e){e.push.apply(e,r);return e}return r};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType}catch(l){a=function(u,t){var r=t||[],s=0;if(d.call(u)==="[object Array]"){Array.prototype.push.apply(r,u)}else{if(typeof u.length==="number"){for(var e=u.length;s";var e=document.documentElement;e.insertBefore(r,e.firstChild);if(document.getElementById(s)){f.find.ID=function(u,v,x){if(typeof v.getElementById!=="undefined"&&!x){var t=v.getElementById(u[1]);return t?t.id===u[1]||typeof t.getAttributeNode!=="undefined"&&t.getAttributeNode("id").nodeValue===u[1]?[t]:undefined:[]}};f.filter.ID=function(v,t){var u=typeof v.getAttributeNode!=="undefined"&&v.getAttributeNode("id");return v.nodeType===1&&u&&u.nodeValue===t}}e.removeChild(r);e=r=null})();(function(){var e=document.createElement("div");e.appendChild(document.createComment(""));if(e.getElementsByTagName("*").length>0){f.find.TAG=function(r,v){var u=v.getElementsByTagName(r[1]);if(r[1]==="*"){var t=[];for(var s=0;u[s];s++){if(u[s].nodeType===1){t.push(u[s])}}u=t}return u}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){f.attrHandle.href=function(r){return r.getAttribute("href",2)}}e=null})();if(document.querySelectorAll){(function(){var e=b,s=document.createElement("div");s.innerHTML="

      ";if(s.querySelectorAll&&s.querySelectorAll(".TEST").length===0){return}b=function(x,v,t,u){v=v||document;if(!u&&v.nodeType===9&&!b.isXML(v)){try{return a(v.querySelectorAll(x),t)}catch(y){}}return e(x,v,t,u)};for(var r in e){b[r]=e[r]}s=null})()}(function(){var e=document.createElement("div");e.innerHTML="
      ";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}f.order.splice(1,0,"CLASS");f.find.CLASS=function(r,s,t){if(typeof s.getElementsByClassName!=="undefined"&&!t){return s.getElementsByClassName(r[1])}};e=null})();function n(r,x,v,A,y,z){for(var t=0,s=A.length;t0){u=e;break}}}e=e[r]}A[t]=u}}}b.contains=document.compareDocumentPosition?function(r,e){return !!(r.compareDocumentPosition(e)&16)}:function(r,e){return r!==e&&(r.contains?r.contains(e):true)};b.isXML=function(e){var r=(e?e.ownerDocument||e:0).documentElement;return r?r.nodeName!=="HTML":false};var h=function(e,y){var t=[],u="",v,s=y.nodeType?[y]:y;while((v=f.match.PSEUDO.exec(e))){u+=v[0];e=e.replace(f.match.PSEUDO,"")}e=f.relative[e]?e+"*":e;for(var x=0,r=s.length;x=0;h--){k=g[h];if(k.obj===l){j._remove(k.obj,k.name,k.cfunc);k.obj=k.cfunc=null;g.splice(h,1)}}}},cancel:function(g){if(!g){return false}this.stop(g);return this.prevent(g)},stop:function(g){if(g.stopPropagation){g.stopPropagation()}else{g.cancelBubble=true}return false},prevent:function(g){if(g.preventDefault){g.preventDefault()}else{g.returnValue=false}return false},destroy:function(){var g=this;f(g.events,function(j,h){g._remove(j.obj,j.name,j.cfunc);j.obj=j.cfunc=null});g.events=[];g=null},_add:function(h,i,g){if(h.attachEvent){h.attachEvent("on"+i,g)}else{if(h.addEventListener){h.addEventListener(i,g,false)}else{h["on"+i]=g}}},_remove:function(i,j,h){if(i){try{if(i.detachEvent){i.detachEvent("on"+j,h)}else{if(i.removeEventListener){i.removeEventListener(j,h,false)}else{i["on"+j]=null}}}catch(g){}}},_pageInit:function(h){var g=this;if(g.domLoaded){return}g.domLoaded=true;f(g.inits,function(i){i()});g.inits=[]},_wait:function(i){var g=this,h=i.document;if(i.tinyMCE_GZ&&tinyMCE_GZ.loaded){g.domLoaded=1;return}if(h.attachEvent){h.attachEvent("onreadystatechange",function(){if(h.readyState==="complete"){h.detachEvent("onreadystatechange",arguments.callee);g._pageInit(i)}});if(h.documentElement.doScroll&&i==i.top){(function(){if(g.domLoaded){return}try{h.documentElement.doScroll("left")}catch(j){setTimeout(arguments.callee,0);return}g._pageInit(i)})()}}else{if(h.addEventListener){g._add(i,"DOMContentLoaded",function(){g._pageInit(i)})}}g._add(i,"load",function(){g._pageInit(i)})},_stoppers:{preventDefault:function(){this.returnValue=false},stopPropagation:function(){this.cancelBubble=true}}});a=d.dom.Event=new d.dom.EventUtils();a._wait(window);d.addUnload(function(){a.destroy()})})(tinymce);(function(a){a.dom.Element=function(f,d){var b=this,e,c;b.settings=d=d||{};b.id=f;b.dom=e=d.dom||a.DOM;if(!a.isIE){c=e.get(b.id)}a.each(("getPos,getRect,getParent,add,setStyle,getStyle,setStyles,setAttrib,setAttribs,getAttrib,addClass,removeClass,hasClass,getOuterHTML,setOuterHTML,remove,show,hide,isHidden,setHTML,get").split(/,/),function(g){b[g]=function(){var h=[f],j;for(j=0;j"+(h.item?h.item(0).outerHTML:h.htmlText);l.removeChild(l.firstChild)}else{l.innerHTML=h.toString()}}if(/^\s/.test(l.innerHTML)){i=" "}if(/\s+$/.test(l.innerHTML)){k=" "}g.getInner=true;g.content=f.isCollapsed()?"":i+f.serializer.serialize(l,g)+k;f.onGetContent.dispatch(f,g);return g.content},setContent:function(g,i){var n=this,f=n.getRng(),j,k=n.win.document,m,l;i=i||{format:"html"};i.set=true;g=i.content=g;if(!i.no_events){n.onBeforeSetContent.dispatch(n,i)}g=i.content;if(f.insertNode){g+='_';if(f.startContainer==k&&f.endContainer==k){k.body.innerHTML=g}else{f.deleteContents();if(k.body.childNodes.length==0){k.body.innerHTML=g}else{if(f.createContextualFragment){f.insertNode(f.createContextualFragment(g))}else{m=k.createDocumentFragment();l=k.createElement("div");m.appendChild(l);l.outerHTML=g;f.insertNode(m)}}}j=n.dom.get("__caret");f=k.createRange();f.setStartBefore(j);f.setEndBefore(j);n.setRng(f);n.dom.remove("__caret");try{n.setRng(f)}catch(h){}}else{if(f.item){k.execCommand("Delete",false,null);f=n.getRng()}if(/^\s+/.test(g)){f.pasteHTML('_'+g);n.dom.remove("__mce_tmp")}else{f.pasteHTML(g)}}if(!i.no_events){n.onSetContent.dispatch(n,i)}},getStart:function(){var g=this.getRng(),h,f,j,i;if(g.duplicate||g.item){if(g.item){return g.item(0)}j=g.duplicate();j.collapse(1);h=j.parentElement();f=i=g.parentElement();while(i=i.parentNode){if(i==h){h=f;break}}return h}else{h=g.startContainer;if(h.nodeType==1&&h.hasChildNodes()){h=h.childNodes[Math.min(h.childNodes.length-1,g.startOffset)]}if(h&&h.nodeType==3){return h.parentNode}return h}},getEnd:function(){var g=this,h=g.getRng(),i,f;if(h.duplicate||h.item){if(h.item){return h.item(0)}h=h.duplicate();h.collapse(0);i=h.parentElement();if(i&&i.nodeName=="BODY"){return i.lastChild||i}return i}else{i=h.endContainer;f=h.endOffset;if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[f>0?f-1:f]}if(i&&i.nodeType==3){return i.parentNode}return i}},getBookmark:function(r,s){var v=this,m=v.dom,g,j,i,n,h,o,p,l="\uFEFF",u;function f(x,y){var t=0;d(m.select(x),function(A,z){if(A==y){t=z}});return t}if(r==2){function k(){var x=v.getRng(true),t=m.getRoot(),y={};function z(C,H){var B=C[H?"startContainer":"endContainer"],G=C[H?"startOffset":"endOffset"],A=[],D,F,E=0;if(B.nodeType==3){if(s){for(D=B.previousSibling;D&&D.nodeType==3;D=D.previousSibling){G+=D.nodeValue.length}}A.push(G)}else{F=B.childNodes;if(G>=F.length&&F.length){E=1;G=Math.max(0,F.length-1)}A.push(v.dom.nodeIndex(F[G],s)+E)}for(;B&&B!=t;B=B.parentNode){A.push(v.dom.nodeIndex(B,s))}return A}y.start=z(x,true);if(!v.isCollapsed()){y.end=z(x)}return y}if(v.tridentSel){return v.tridentSel.getBookmark(r)}return k()}if(r){return{rng:v.getRng()}}g=v.getRng();i=m.uniqueId();n=tinyMCE.activeEditor.selection.isCollapsed();u="overflow:hidden;line-height:0px";if(g.duplicate||g.item){if(!g.item){j=g.duplicate();try{g.collapse();g.pasteHTML(''+l+"");if(!n){j.collapse(false);g.moveToElementText(j.parentElement());if(g.compareEndPoints("StartToEnd",j)==0){j.move("character",-1)}j.pasteHTML(''+l+"")}}catch(q){return null}}else{o=g.item(0);h=o.nodeName;return{name:h,index:f(h,o)}}}else{o=v.getNode();h=o.nodeName;if(h=="IMG"){return{name:h,index:f(h,o)}}j=g.cloneRange();if(!n){j.collapse(false);j.insertNode(m.create("span",{"data-mce-type":"bookmark",id:i+"_end",style:u},l))}g.collapse(true);g.insertNode(m.create("span",{"data-mce-type":"bookmark",id:i+"_start",style:u},l))}v.moveToBookmark({id:i,keep:1});return{id:i}},moveToBookmark:function(n){var r=this,l=r.dom,i,h,f,q,j,s,o,p;if(n){if(n.start){f=l.createRng();q=l.getRoot();function g(z){var t=n[z?"start":"end"],v,x,y,u;if(t){y=t[0];for(x=q,v=t.length-1;v>=1;v--){u=x.childNodes;if(t[v]>u.length-1){return}x=u[t[v]]}if(x.nodeType===3){y=Math.min(t[0],x.nodeValue.length)}if(x.nodeType===1){y=Math.min(t[0],x.childNodes.length)}if(z){f.setStart(x,y)}else{f.setEnd(x,y)}}return true}if(r.tridentSel){return r.tridentSel.moveToBookmark(n)}if(g(true)&&g()){r.setRng(f)}}else{if(n.id){function k(A){var u=l.get(n.id+"_"+A),z,t,x,y,v=n.keep;if(u){z=u.parentNode;if(A=="start"){if(!v){t=l.nodeIndex(u)}else{z=u.firstChild;t=1}j=s=z;o=p=t}else{if(!v){t=l.nodeIndex(u)}else{z=u.firstChild;t=1}s=z;p=t}if(!v){y=u.previousSibling;x=u.nextSibling;d(c.grep(u.childNodes),function(B){if(B.nodeType==3){B.nodeValue=B.nodeValue.replace(/\uFEFF/g,"")}});while(u=l.get(n.id+"_"+A)){l.remove(u,1)}if(y&&x&&y.nodeType==x.nodeType&&y.nodeType==3&&!c.isOpera){t=y.nodeValue.length;y.appendData(x.nodeValue);l.remove(x);if(A=="start"){j=s=y;o=p=t}else{s=y;p=t}}}}}function m(t){if(l.isBlock(t)&&!t.innerHTML){t.innerHTML=!a?'
      ':" "}return t}k("start");k("end");if(j){f=l.createRng();f.setStart(m(j),o);f.setEnd(m(s),p);r.setRng(f)}}else{if(n.name){r.select(l.select(n.name)[n.index])}else{if(n.rng){r.setRng(n.rng)}}}}}},select:function(k,j){var i=this,l=i.dom,g=l.createRng(),f;if(k){f=l.nodeIndex(k);g.setStart(k.parentNode,f);g.setEnd(k.parentNode,f+1);if(j){function h(m,o){var n=new c.dom.TreeWalker(m,m);do{if(m.nodeType==3&&c.trim(m.nodeValue).length!=0){if(o){g.setStart(m,0)}else{g.setEnd(m,m.nodeValue.length)}return}if(m.nodeName=="BR"){if(o){g.setStartBefore(m)}else{g.setEndBefore(m)}return}}while(m=(o?n.next():n.prev()))}h(k,1);h(k)}i.setRng(g)}return k},isCollapsed:function(){var f=this,h=f.getRng(),g=f.getSel();if(!h||h.item){return false}if(h.compareEndPoints){return h.compareEndPoints("StartToEnd",h)===0}return !g||h.collapsed},collapse:function(f){var h=this,g=h.getRng(),i;if(g.item){i=g.item(0);g=h.win.document.body.createTextRange();g.moveToElementText(i)}g.collapse(!!f);h.setRng(g)},getSel:function(){var g=this,f=this.win;return f.getSelection?f.getSelection():f.document.selection},getRng:function(l){var g=this,h,i,k,j=g.win.document;if(l&&g.tridentSel){return g.tridentSel.getRangeAt(0)}try{if(h=g.getSel()){i=h.rangeCount>0?h.getRangeAt(0):(h.createRange?h.createRange():j.createRange())}}catch(f){}if(c.isIE&&i&&i.setStart&&j.selection.createRange().item){k=j.selection.createRange().item(0);i=j.createRange();i.setStartBefore(k);i.setEndAfter(k)}if(!i){i=j.createRange?j.createRange():j.body.createTextRange()}if(g.selectedRange&&g.explicitRange){if(i.compareBoundaryPoints(i.START_TO_START,g.selectedRange)===0&&i.compareBoundaryPoints(i.END_TO_END,g.selectedRange)===0){i=g.explicitRange}else{g.selectedRange=null;g.explicitRange=null}}return i},setRng:function(i){var h,g=this;if(!g.tridentSel){h=g.getSel();if(h){g.explicitRange=i;try{h.removeAllRanges()}catch(f){}h.addRange(i);g.selectedRange=h.getRangeAt(0)}}else{if(i.cloneRange){g.tridentSel.addRange(i);return}try{i.select()}catch(f){}}},setNode:function(g){var f=this;f.setContent(f.dom.getOuterHTML(g));return g},getNode:function(){var h=this,g=h.getRng(),i=h.getSel(),l,k=g.startContainer,f=g.endContainer;if(!g){return h.dom.getRoot()}if(g.setStart){l=g.commonAncestorContainer;if(!g.collapsed){if(g.startContainer==g.endContainer){if(g.endOffset-g.startOffset<2){if(g.startContainer.hasChildNodes()){l=g.startContainer.childNodes[g.startOffset]}}}if(k.nodeType===3&&f.nodeType===3){function j(p,m){var o=p;while(p&&p.nodeType===3&&p.length===0){p=m?p.nextSibling:p.previousSibling}return p||o}if(k.length===g.startOffset){k=j(k.nextSibling,true)}else{k=k.parentNode}if(g.endOffset===0){f=j(f.previousSibling,false)}else{f=f.parentNode}if(k&&k===f){return k}}}if(l&&l.nodeType==3){return l.parentNode}return l}return g.item?g.item(0):g.parentElement()},getSelectedBlocks:function(g,f){var i=this,j=i.dom,m,h,l,k=[];m=j.getParent(g||i.getStart(),j.isBlock);h=j.getParent(f||i.getEnd(),j.isBlock);if(m){k.push(m)}if(m&&h&&m!=h){l=m;while((l=l.nextSibling)&&l!=h){if(j.isBlock(l)){k.push(l)}}}if(h&&m!=h){k.push(h)}return k},normalize:function(){var g=this,f,i;if(c.isIE){return}function h(p){var k,o,n,m=g.dom,j=m.getRoot(),l;k=f[(p?"start":"end")+"Container"];o=f[(p?"start":"end")+"Offset"];if(k.nodeType===9){k=k.body;o=0}if(k===j){if(k.hasChildNodes()){k=k.childNodes[Math.min(!p&&o>0?o-1:o,k.childNodes.length-1)];o=0;if(k.hasChildNodes()){l=k;n=new c.dom.TreeWalker(k,j);do{if(l.nodeType===3){o=p?0:l.nodeValue.length-1;k=l;break}if(l.nodeName==="BR"){o=m.nodeIndex(l);k=l.parentNode;break}}while(l=(p?n.next():n.prev()));i=true}}}if(i){f["set"+(p?"Start":"End")](k,o)}}f=g.getRng();h(true);if(f.collapsed){h()}if(i){g.setRng(f)}},destroy:function(g){var f=this;f.win=null;if(!g){c.removeUnload(f.destroy)}},_fixIESelection:function(){var g=this.dom,m=g.doc,h=m.body,j,n,f;m.documentElement.unselectable=true;function i(o,r){var p=h.createTextRange();try{p.moveToPoint(o,r)}catch(q){p=null}return p}function l(p){var o;if(p.button){o=i(p.x,p.y);if(o){if(o.compareEndPoints("StartToStart",n)>0){o.setEndPoint("StartToStart",n)}else{o.setEndPoint("EndToEnd",n)}o.select()}}else{k()}}function k(){var o=m.selection.createRange();if(n&&!o.item&&o.compareEndPoints("StartToEnd",o)===0){n.select()}g.unbind(m,"mouseup",k);g.unbind(m,"mousemove",l);n=j=0}g.bind(m,["mousedown","contextmenu"],function(o){if(o.target.nodeName==="HTML"){if(j){k()}f=m.documentElement;if(f.scrollHeight>f.clientHeight){return}j=1;n=i(o.x,o.y);if(n){g.bind(m,"mouseup",k);g.bind(m,"mousemove",l);g.win.focus();n.select()}}})}})})(tinymce);(function(a){a.dom.Serializer=function(e,i,f){var h,b,d=a.isIE,g=a.each,c;if(!e.apply_source_formatting){e.indent=false}e.remove_trailing_brs=true;i=i||a.DOM;f=f||new a.html.Schema(e);e.entity_encoding=e.entity_encoding||"named";h=new a.util.Dispatcher(self);b=new a.util.Dispatcher(self);c=new a.html.DomParser(e,f);c.addAttributeFilter("src,href,style",function(k,j){var o=k.length,l,q,n="data-mce-"+j,p=e.url_converter,r=e.url_converter_scope,m;while(o--){l=k[o];q=l.attributes.map[n];if(q!==m){l.attr(j,q.length>0?q:null);l.attr(n,null)}else{q=l.attributes.map[j];if(j==="style"){q=i.serializeStyle(i.parseStyle(q),l.name)}else{if(p){q=p.call(r,q,j,l.name)}}l.attr(j,q.length>0?q:null)}}});c.addAttributeFilter("class",function(j,k){var l=j.length,m,n;while(l--){m=j[l];n=m.attr("class").replace(/\s*mce(Item\w+|Selected)\s*/g,"");m.attr("class",n.length>0?n:null)}});c.addAttributeFilter("data-mce-type",function(j,l,k){var m=j.length,n;while(m--){n=j[m];if(n.attributes.map["data-mce-type"]==="bookmark"&&!k.cleanup){n.remove()}}});c.addNodeFilter("script,style",function(k,l){var m=k.length,n,o;function j(p){return p.replace(/()/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(\/\/\s*|\]\]>|-->|\]\]-->)\s*$/g,"")}while(m--){n=k[m];o=n.firstChild?n.firstChild.value:"";if(l==="script"){n.attr("type",(n.attr("type")||"text/javascript").replace(/^mce\-/,""));if(o.length>0){n.firstChild.value="// "}}else{if(o.length>0){n.firstChild.value=""}}}});c.addNodeFilter("#comment",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.value.indexOf("[CDATA[")===0){m.name="#cdata";m.type=4;m.value=m.value.replace(/^\[CDATA\[|\]\]$/g,"")}else{if(m.value.indexOf("mce:protected ")===0){m.name="#text";m.type=3;m.raw=true;m.value=unescape(m.value).substr(14)}}}});c.addNodeFilter("xml:namespace,input",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.type===7){m.remove()}else{if(m.type===1){if(k==="input"&&!("type" in m.attributes.map)){m.attr("type","text")}}}}});if(e.fix_list_elements){c.addNodeFilter("ul,ol",function(k,l){var m=k.length,n,j;while(m--){n=k[m];j=n.parent;if(j.name==="ul"||j.name==="ol"){if(n.prev&&n.prev.name==="li"){n.prev.append(n)}}}})}c.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style",function(j,k){var l=j.length;while(l--){j[l].attr(k,null)}});return{schema:f,addNodeFilter:c.addNodeFilter,addAttributeFilter:c.addAttributeFilter,onPreProcess:h,onPostProcess:b,serialize:function(o,m){var l,p,k,j,n;if(d&&i.select("script,style,select,map").length>0){n=o.innerHTML;o=o.cloneNode(false);i.setHTML(o,n)}else{o=o.cloneNode(true)}l=o.ownerDocument.implementation;if(l.createHTMLDocument){p=l.createHTMLDocument("");g(o.nodeName=="BODY"?o.childNodes:[o],function(q){p.body.appendChild(p.importNode(q,true))});if(o.nodeName!="BODY"){o=p.body.firstChild}else{o=p.body}k=i.doc;i.doc=p}m=m||{};m.format=m.format||"html";if(!m.no_events){m.node=o;h.dispatch(self,m)}j=new a.html.Serializer(e,f);m.content=j.serialize(c.parse(m.getInner?o.innerHTML:a.trim(i.getOuterHTML(o),m),m));if(!m.cleanup){m.content=m.content.replace(/\uFEFF/g,"")}if(!m.no_events){b.dispatch(self,m)}if(k){i.doc=k}m.node=null;return m.content},addRules:function(j){f.addValidElements(j)},setRules:function(j){f.setValidElements(j)}}}})(tinymce);(function(a){a.dom.ScriptLoader=function(h){var c=0,k=1,i=2,l={},j=[],f={},d=[],g=0,e;function b(m,v){var x=this,q=a.DOM,s,o,r,n;function p(){q.remove(n);if(s){s.onreadystatechange=s.onload=s=null}v()}function u(){if(typeof(console)!=="undefined"&&console.log){console.log("Failed to load: "+m)}}n=q.uniqueId();if(a.isIE6){o=new a.util.URI(m);r=location;if(o.host==r.hostname&&o.port==r.port&&(o.protocol+":")==r.protocol&&o.protocol.toLowerCase()!="file"){a.util.XHR.send({url:a._addVer(o.getURI()),success:function(y){var t=q.create("script",{type:"text/javascript"});t.text=y;document.getElementsByTagName("head")[0].appendChild(t);q.remove(t);p()},error:u});return}}s=q.create("script",{id:n,type:"text/javascript",src:a._addVer(m)});if(!a.isIE){s.onload=p}s.onerror=u;if(!a.isOpera){s.onreadystatechange=function(){var t=s.readyState;if(t=="complete"||t=="loaded"){p()}}}(document.getElementsByTagName("head")[0]||document.body).appendChild(s)}this.isDone=function(m){return l[m]==i};this.markDone=function(m){l[m]=i};this.add=this.load=function(m,q,n){var o,p=l[m];if(p==e){j.push(m);l[m]=c}if(q){if(!f[m]){f[m]=[]}f[m].push({func:q,scope:n||this})}};this.loadQueue=function(n,m){this.loadScripts(j,n,m)};this.loadScripts=function(m,q,p){var o;function n(r){a.each(f[r],function(s){s.func.call(s.scope)});f[r]=e}d.push({func:q,scope:p||this});o=function(){var r=a.grep(m);m.length=0;a.each(r,function(s){if(l[s]==i){n(s);return}if(l[s]!=k){l[s]=k;g++;b(s,function(){l[s]=i;g--;n(s);o()})}});if(!g){a.each(d,function(s){s.func.call(s.scope)});d.length=0}};o()}};a.ScriptLoader=new a.dom.ScriptLoader()})(tinymce);tinymce.dom.TreeWalker=function(a,c){var b=a;function d(i,f,e,j){var h,g;if(i){if(!j&&i[f]){return i[f]}if(i!=c){h=i[e];if(h){return h}for(g=i.parentNode;g&&g!=c;g=g.parentNode){h=g[e];if(h){return h}}}}}this.current=function(){return b};this.next=function(e){return(b=d(b,"firstChild","nextSibling",e))};this.prev=function(e){return(b=d(b,"lastChild","previousSibling",e))}};(function(a){a.dom.RangeUtils=function(c){var b="\uFEFF";this.walk=function(d,r){var h=d.startContainer,k=d.startOffset,s=d.endContainer,l=d.endOffset,i,f,n,g,q,p,e;e=c.select("td.mceSelected,th.mceSelected");if(e.length>0){a.each(e,function(t){r([t])});return}function o(v,u,t){var x=[];for(;v&&v!=t;v=v[u]){x.push(v)}return x}function m(u,t){do{if(u.parentNode==t){return u}u=u.parentNode}while(u)}function j(v,u,x){var t=x?"nextSibling":"previousSibling";for(g=v,q=g.parentNode;g&&g!=u;g=q){q=g.parentNode;p=o(g==v?g:g[t],t);if(p.length){if(!x){p.reverse()}r(p)}}}if(h.nodeType==1&&h.hasChildNodes()){h=h.childNodes[k]}if(s.nodeType==1&&s.hasChildNodes()){s=s.childNodes[Math.min(l-1,s.childNodes.length-1)]}i=c.findCommonAncestor(h,s);if(h==s){return r([h])}for(g=h;g;g=g.parentNode){if(g==s){return j(h,i,true)}if(g==i){break}}for(g=s;g;g=g.parentNode){if(g==h){return j(s,i)}if(g==i){break}}f=m(h,i)||h;n=m(s,i)||s;j(h,f,true);p=o(f==h?f:f.nextSibling,"nextSibling",n==s?n.nextSibling:n);if(p.length){r(p)}j(s,n)}};a.dom.RangeUtils.compareRanges=function(c,b){if(c&&b){if(c.item||c.duplicate){if(c.item&&b.item&&c.item(0)===b.item(0)){return true}if(c.isEqual&&b.isEqual&&b.isEqual(c)){return true}}else{return c.startContainer==b.startContainer&&c.startOffset==b.startOffset}}return false}})(tinymce);(function(b){var a=b.dom.Event,c=b.each;b.create("tinymce.ui.KeyboardNavigation",{KeyboardNavigation:function(e,f){var p=this,m=e.root,l=e.items,n=e.enableUpDown,i=e.enableLeftRight||!e.enableUpDown,k=e.excludeFromTabOrder,j,h,o,d,g;f=f||b.DOM;j=function(q){g=q.target.id};h=function(q){f.setAttrib(q.target.id,"tabindex","-1")};d=function(q){var r=f.get(g);f.setAttrib(r,"tabindex","0");r.focus()};p.focus=function(){f.get(g).focus()};p.destroy=function(){c(l,function(q){f.unbind(f.get(q.id),"focus",j);f.unbind(f.get(q.id),"blur",h)});f.unbind(f.get(m),"focus",d);f.unbind(f.get(m),"keydown",o);l=f=m=p.focus=j=h=o=d=null;p.destroy=function(){}};p.moveFocus=function(u,r){var q=-1,t=p.controls,s;if(!g){return}c(l,function(x,v){if(x.id===g){q=v;return false}});q+=u;if(q<0){q=l.length-1}else{if(q>=l.length){q=0}}s=l[q];f.setAttrib(g,"tabindex","-1");f.setAttrib(s.id,"tabindex","0");f.get(s.id).focus();if(e.actOnFocus){e.onAction(s.id)}if(r){a.cancel(r)}};o=function(y){var u=37,t=39,x=38,z=40,q=27,s=14,r=13,v=32;switch(y.keyCode){case u:if(i){p.moveFocus(-1)}break;case t:if(i){p.moveFocus(1)}break;case x:if(n){p.moveFocus(-1)}break;case z:if(n){p.moveFocus(1)}break;case q:if(e.onCancel){e.onCancel();a.cancel(y)}break;case s:case r:case v:if(e.onAction){e.onAction(g);a.cancel(y)}break}};c(l,function(s,q){var r;if(!s.id){s.id=f.uniqueId("_mce_item_")}if(k){f.bind(s.id,"blur",h);r="-1"}else{r=(q===0?"0":"-1")}f.setAttrib(s.id,"tabindex",r);f.bind(f.get(s.id),"focus",j)});if(l[0]){g=l[0].id}f.setAttrib(m,"tabindex","-1");f.bind(f.get(m),"focus",d);f.bind(f.get(m),"keydown",o)}})})(tinymce);(function(c){var b=c.DOM,a=c.is;c.create("tinymce.ui.Control",{Control:function(f,e,d){this.id=f;this.settings=e=e||{};this.rendered=false;this.onRender=new c.util.Dispatcher(this);this.classPrefix="";this.scope=e.scope||this;this.disabled=0;this.active=0;this.editor=d},setAriaProperty:function(f,e){var d=b.get(this.id+"_aria")||b.get(this.id);if(d){b.setAttrib(d,"aria-"+f,!!e)}},focus:function(){b.get(this.id).focus()},setDisabled:function(d){if(d!=this.disabled){this.setAriaProperty("disabled",d);this.setState("Disabled",d);this.setState("Enabled",!d);this.disabled=d}},isDisabled:function(){return this.disabled},setActive:function(d){if(d!=this.active){this.setState("Active",d);this.active=d;this.setAriaProperty("pressed",d)}},isActive:function(){return this.active},setState:function(f,d){var e=b.get(this.id);f=this.classPrefix+f;if(d){b.addClass(e,f)}else{b.removeClass(e,f)}},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(d){b.setHTML(d,this.renderHTML())},postRender:function(){var e=this,d;if(a(e.disabled)){d=e.disabled;e.disabled=-1;e.setDisabled(d)}if(a(e.active)){d=e.active;e.active=-1;e.setActive(d)}},remove:function(){b.remove(this.id);this.destroy()},destroy:function(){c.dom.Event.clear(this.id)}})})(tinymce);tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(c,b,a){this.parent(c,b,a);this.controls=[];this.lookup={}},add:function(a){this.lookup[a.id]=a;this.controls.push(a);return a},get:function(a){return this.lookup[a]}});tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(b,a){this.parent(b,a);this.classPrefix="mceSeparator";this.setDisabled(true)},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix,role:"separator","aria-orientation":"vertical",tabindex:"-1"})}});(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(g,f){this.parent(g,f);this.classPrefix="mceMenuItem"},setSelected:function(f){this.setState("Selected",f);this.setAriaProperty("checked",!!f);this.selected=f},isSelected:function(){return this.selected},postRender:function(){var f=this;f.parent();if(c(f.selected)){f.setSelected(f.selected)}}})})(tinymce);(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(h,g){var f=this;f.parent(h,g);f.items={};f.collapsed=false;f.menuCount=0;f.onAddItem=new d.util.Dispatcher(this)},expand:function(g){var f=this;if(g){a(f,function(h){if(h.expand){h.expand()}},"items",f)}f.collapsed=false},collapse:function(g){var f=this;if(g){a(f,function(h){if(h.collapse){h.collapse()}},"items",f)}f.collapsed=true},isCollapsed:function(){return this.collapsed},add:function(f){if(!f.settings){f=new d.ui.MenuItem(f.id||b.uniqueId(),f)}this.onAddItem.dispatch(this,f);return this.items[f.id]=f},addSeparator:function(){return this.add({separator:true})},addMenu:function(f){if(!f.collapse){f=this.createMenu(f)}this.menuCount++;return this.add(f)},hasMenus:function(){return this.menuCount!==0},remove:function(f){delete this.items[f.id]},removeAll:function(){var f=this;a(f,function(g){if(g.removeAll){g.removeAll()}else{g.remove()}g.destroy()},"items",f);f.items={}},createMenu:function(g){var f=new d.ui.Menu(g.id||b.uniqueId(),g);f.onAddItem.add(this.onAddItem.dispatch,this.onAddItem);return f}})})(tinymce);(function(e){var d=e.is,c=e.DOM,f=e.each,a=e.dom.Event,b=e.dom.Element;e.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(h,g){g=g||{};g.container=g.container||c.doc.body;g.offset_x=g.offset_x||0;g.offset_y=g.offset_y||0;g.vp_offset_x=g.vp_offset_x||0;g.vp_offset_y=g.vp_offset_y||0;if(d(g.icons)&&!g.icons){g["class"]+=" mceNoIcons"}this.parent(h,g);this.onShowMenu=new e.util.Dispatcher(this);this.onHideMenu=new e.util.Dispatcher(this);this.classPrefix="mceMenu"},createMenu:function(j){var h=this,i=h.settings,g;j.container=j.container||i.container;j.parent=h;j.constrain=j.constrain||i.constrain;j["class"]=j["class"]||i["class"];j.vp_offset_x=j.vp_offset_x||i.vp_offset_x;j.vp_offset_y=j.vp_offset_y||i.vp_offset_y;j.keyboard_focus=i.keyboard_focus;g=new e.ui.DropMenu(j.id||c.uniqueId(),j);g.onAddItem.add(h.onAddItem.dispatch,h.onAddItem);return g},focus:function(){var g=this;if(g.keyboardNav){g.keyboardNav.focus()}},update:function(){var i=this,j=i.settings,g=c.get("menu_"+i.id+"_tbl"),l=c.get("menu_"+i.id+"_co"),h,k;h=j.max_width?Math.min(g.clientWidth,j.max_width):g.clientWidth;k=j.max_height?Math.min(g.clientHeight,j.max_height):g.clientHeight;if(!c.boxModel){i.element.setStyles({width:h+2,height:k+2})}else{i.element.setStyles({width:h,height:k})}if(j.max_width){c.setStyle(l,"width",h)}if(j.max_height){c.setStyle(l,"height",k);if(g.clientHeightv){p=r?r-u:Math.max(0,(v-A.vp_offset_x)-u)}if((n+A.vp_offset_y+l)>q){n=Math.max(0,(q-A.vp_offset_y)-l)}}c.setStyles(o,{left:p,top:n});z.element.update();z.isMenuVisible=1;z.mouseClickFunc=a.add(o,"click",function(s){var h;s=s.target;if(s&&(s=c.getParent(s,"tr"))&&!c.hasClass(s,m+"ItemSub")){h=z.items[s.id];if(h.isDisabled()){return}k=z;while(k){if(k.hideMenu){k.hideMenu()}k=k.settings.parent}if(h.settings.onclick){h.settings.onclick(s)}return a.cancel(s)}});if(z.hasMenus()){z.mouseOverFunc=a.add(o,"mouseover",function(x){var h,t,s;x=x.target;if(x&&(x=c.getParent(x,"tr"))){h=z.items[x.id];if(z.lastMenu){z.lastMenu.collapse(1)}if(h.isDisabled()){return}if(x&&c.hasClass(x,m+"ItemSub")){t=c.getRect(x);h.showMenu((t.x+t.w-i),t.y-i,t.x);z.lastMenu=h;c.addClass(c.get(h.id).firstChild,m+"ItemActive")}}})}a.add(o,"keydown",z._keyHandler,z);z.onShowMenu.dispatch(z);if(A.keyboard_focus){z._setupKeyboardNav()}},hideMenu:function(j){var g=this,i=c.get("menu_"+g.id),h;if(!g.isMenuVisible){return}if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(i,"mouseover",g.mouseOverFunc);a.remove(i,"click",g.mouseClickFunc);a.remove(i,"keydown",g._keyHandler);c.hide(i);g.isMenuVisible=0;if(!j){g.collapse(1)}if(g.element){g.element.hide()}if(h=c.get(g.id)){c.removeClass(h.firstChild,g.classPrefix+"ItemActive")}g.onHideMenu.dispatch(g)},add:function(i){var g=this,h;i=g.parent(i);if(g.isRendered&&(h=c.get("menu_"+g.id))){g._add(c.select("tbody",h)[0],i)}return i},collapse:function(g){this.parent(g);this.hideMenu(1)},remove:function(g){c.remove(g.id);this.destroy();return this.parent(g)},destroy:function(){var g=this,h=c.get("menu_"+g.id);if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(h,"mouseover",g.mouseOverFunc);a.remove(c.select("a",h),"focus",g.mouseOverFunc);a.remove(h,"click",g.mouseClickFunc);a.remove(h,"keydown",g._keyHandler);if(g.element){g.element.remove()}c.remove(h)},renderNode:function(){var i=this,j=i.settings,l,h,k,g;g=c.create("div",{role:"listbox",id:"menu_"+i.id,"class":j["class"],style:"position:absolute;left:0;top:0;z-index:200000;outline:0"});if(i.settings.parent){c.setAttrib(g,"aria-parent","menu_"+i.settings.parent.id)}k=c.add(g,"div",{role:"presentation",id:"menu_"+i.id+"_co","class":i.classPrefix+(j["class"]?" "+j["class"]:"")});i.element=new b("menu_"+i.id,{blocker:1,container:j.container});if(j.menu_line){c.add(k,"span",{"class":i.classPrefix+"Line"})}l=c.add(k,"table",{role:"presentation",id:"menu_"+i.id+"_tbl",border:0,cellPadding:0,cellSpacing:0});h=c.add(l,"tbody");f(i.items,function(m){i._add(h,m)});i.rendered=true;return g},_setupKeyboardNav:function(){var i,h,g=this;i=c.select("#menu_"+g.id)[0];h=c.select("a[role=option]","menu_"+g.id);h.splice(0,0,i);g.keyboardNav=new e.ui.KeyboardNavigation({root:"menu_"+g.id,items:h,onCancel:function(){g.hideMenu()},enableUpDown:true});i.focus()},_keyHandler:function(g){var h=this,i;switch(g.keyCode){case 37:if(h.settings.parent){h.hideMenu();h.settings.parent.focus();a.cancel(g)}break;case 39:if(h.mouseOverFunc){h.mouseOverFunc(g)}break}},_add:function(j,h){var i,q=h.settings,p,l,k,m=this.classPrefix,g;if(q.separator){l=c.add(j,"tr",{id:h.id,"class":m+"ItemSeparator"});c.add(l,"td",{"class":m+"ItemSeparator"});if(i=l.previousSibling){c.addClass(i,"mceLast")}return}i=l=c.add(j,"tr",{id:h.id,"class":m+"Item "+m+"ItemEnabled"});i=k=c.add(i,q.titleItem?"th":"td");i=p=c.add(i,"a",{id:h.id+"_aria",role:q.titleItem?"presentation":"option",href:"javascript:;",onclick:"return false;",onmousedown:"return false;"});if(q.parent){c.setAttrib(p,"aria-haspopup","true");c.setAttrib(p,"aria-owns","menu_"+h.id)}c.addClass(k,q["class"]);g=c.add(i,"span",{"class":"mceIcon"+(q.icon?" mce_"+q.icon:"")});if(q.icon_src){c.add(g,"img",{src:q.icon_src})}i=c.add(i,q.element||"span",{"class":"mceText",title:h.settings.title},h.settings.title);if(h.settings.style){c.setAttrib(i,"style",h.settings.style)}if(j.childNodes.length==1){c.addClass(l,"mceFirst")}if((i=l.previousSibling)&&c.hasClass(i,m+"ItemSeparator")){c.addClass(l,"mceFirst")}if(h.collapse){c.addClass(l,m+"ItemSub")}if(i=l.previousSibling){c.removeClass(i,"mceLast")}c.addClass(l,"mceLast")}})})(tinymce);(function(b){var a=b.DOM;b.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(e,d,c){this.parent(e,d,c);this.classPrefix="mceButton"},renderHTML:function(){var f=this.classPrefix,e=this.settings,d,c;c=a.encode(e.label||"");d='';if(e.image&&!(this.editor&&this.editor.forcedHighContrastMode)){d+=''+a.encode(e.title)+''+c}else{d+=''+(c?''+c+"":"")}d+='";d+="";return d},postRender:function(){var c=this,d=c.settings;b.dom.Event.add(c.id,"click",function(f){if(!c.isDisabled()){return d.onclick.call(d.scope,f)}})}})})(tinymce);(function(d){var c=d.DOM,b=d.dom.Event,e=d.each,a=d.util.Dispatcher;d.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(i,h,f){var g=this;g.parent(i,h,f);g.items=[];g.onChange=new a(g);g.onPostRender=new a(g);g.onAdd=new a(g);g.onRenderMenu=new d.util.Dispatcher(this);g.classPrefix="mceListBox"},select:function(h){var g=this,j,i;if(h==undefined){return g.selectByIndex(-1)}if(h&&h.call){i=h}else{i=function(f){return f==h}}if(h!=g.selectedValue){e(g.items,function(k,f){if(i(k.value)){j=1;g.selectByIndex(f);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(f){var g=this,h,i;if(f!=g.selectedIndex){h=c.get(g.id+"_text");i=g.items[f];if(i){g.selectedValue=i.value;g.selectedIndex=f;c.setHTML(h,c.encode(i.title));c.removeClass(h,"mceTitle");c.setAttrib(g.id,"aria-valuenow",i.title)}else{c.setHTML(h,c.encode(g.settings.title));c.addClass(h,"mceTitle");g.selectedValue=g.selectedIndex=null;c.setAttrib(g.id,"aria-valuenow",g.settings.title)}h=0}},add:function(i,f,h){var g=this;h=h||{};h=d.extend(h,{title:i,value:f});g.items.push(h);g.onAdd.dispatch(g,h)},getLength:function(){return this.items.length},renderHTML:function(){var i="",f=this,g=f.settings,j=f.classPrefix;i='';i+="";i+="";i+="";return i},showMenu:function(){var g=this,i,h=c.get(this.id),f;if(g.isDisabled()||g.items.length==0){return}if(g.menu&&g.menu.isMenuVisible){return g.hideMenu()}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}i=c.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.keyboard_focus=!d.isOpera;if(g.oldID){f.items[g.oldID].setSelected(0)}e(g.items,function(j){if(j.value===g.selectedValue){f.items[j.id].setSelected(1);g.oldID=j.id}});f.showMenu(0,h.clientHeight);b.add(c.doc,"mousedown",g.hideMenu,g);c.addClass(g.id,g.classPrefix+"Selected")},hideMenu:function(g){var f=this;if(f.menu&&f.menu.isMenuVisible){c.removeClass(f.id,f.classPrefix+"Selected");if(g&&g.type=="mousedown"&&(g.target.id==f.id+"_text"||g.target.id==f.id+"_open")){return}if(!g||!c.getParent(g.target,".mceMenu")){c.removeClass(f.id,f.classPrefix+"Selected");b.remove(c.doc,"mousedown",f.hideMenu,f);f.menu.hideMenu()}}},renderMenu:function(){var g=this,f;f=g.settings.control_manager.createDropMenu(g.id+"_menu",{menu_line:1,"class":g.classPrefix+"Menu mceNoIcons",max_width:150,max_height:150});f.onHideMenu.add(function(){g.hideMenu();g.focus()});f.add({title:g.settings.title,"class":"mceMenuItemTitle",onclick:function(){if(g.settings.onselect("")!==false){g.select("")}}});e(g.items,function(h){if(h.value===undefined){f.add({title:h.title,"class":"mceMenuItemTitle",onclick:function(){if(g.settings.onselect("")!==false){g.select("")}}})}else{h.id=c.uniqueId();h.onclick=function(){if(g.settings.onselect(h.value)!==false){g.select(h.value)}};f.add(h)}});g.onRenderMenu.dispatch(g,f);g.menu=f},postRender:function(){var f=this,g=f.classPrefix;b.add(f.id,"click",f.showMenu,f);b.add(f.id,"keydown",function(h){if(h.keyCode==32){f.showMenu(h);b.cancel(h)}});b.add(f.id,"focus",function(){if(!f._focused){f.keyDownHandler=b.add(f.id,"keydown",function(h){if(h.keyCode==40){f.showMenu();b.cancel(h)}});f.keyPressHandler=b.add(f.id,"keypress",function(i){var h;if(i.keyCode==13){h=f.selectedValue;f.selectedValue=null;b.cancel(i);f.settings.onselect(h)}})}f._focused=1});b.add(f.id,"blur",function(){b.remove(f.id,"keydown",f.keyDownHandler);b.remove(f.id,"keypress",f.keyPressHandler);f._focused=0});if(d.isIE6||!c.boxModel){b.add(f.id,"mouseover",function(){if(!c.hasClass(f.id,g+"Disabled")){c.addClass(f.id,g+"Hover")}});b.add(f.id,"mouseout",function(){if(!c.hasClass(f.id,g+"Disabled")){c.removeClass(f.id,g+"Hover")}})}f.onPostRender.dispatch(f,c.get(f.id))},destroy:function(){this.parent();b.clear(this.id+"_text");b.clear(this.id+"_open")}})})(tinymce);(function(d){var c=d.DOM,b=d.dom.Event,e=d.each,a=d.util.Dispatcher;d.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(g,f){this.parent(g,f);this.classPrefix="mceNativeListBox"},setDisabled:function(f){c.get(this.id).disabled=f;this.setAriaProperty("disabled",f)},isDisabled:function(){return c.get(this.id).disabled},select:function(h){var g=this,j,i;if(h==undefined){return g.selectByIndex(-1)}if(h&&h.call){i=h}else{i=function(f){return f==h}}if(h!=g.selectedValue){e(g.items,function(k,f){if(i(k.value)){j=1;g.selectByIndex(f);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(f){c.get(this.id).selectedIndex=f+1;this.selectedValue=this.items[f]?this.items[f].value:null},add:function(j,g,f){var i,h=this;f=f||{};f.value=g;if(h.isRendered()){c.add(c.get(this.id),"option",f,j)}i={title:j,value:g,attribs:f};h.items.push(i);h.onAdd.dispatch(h,i)},getLength:function(){return this.items.length},renderHTML:function(){var g,f=this;g=c.createHTML("option",{value:""},"-- "+f.settings.title+" --");e(f.items,function(h){g+=c.createHTML("option",{value:h.value},h.title)});g=c.createHTML("select",{id:f.id,"class":"mceNativeListBox","aria-labelledby":f.id+"_aria"},g);g+=c.createHTML("span",{id:f.id+"_aria",style:"display: none"},f.settings.title);return g},postRender:function(){var g=this,h,i=true;g.rendered=true;function f(k){var j=g.items[k.target.selectedIndex-1];if(j&&(j=j.value)){g.onChange.dispatch(g,j);if(g.settings.onselect){g.settings.onselect(j)}}}b.add(g.id,"change",f);b.add(g.id,"keydown",function(k){var j;b.remove(g.id,"change",h);i=false;j=b.add(g.id,"blur",function(){if(i){return}i=true;b.add(g.id,"change",f);b.remove(g.id,"blur",j)});if(d.isWebKit&&(k.keyCode==37||k.keyCode==39)){return b.prevent(k)}if(k.keyCode==13||k.keyCode==32){f(k);return b.cancel(k)}});g.onPostRender.dispatch(g,c.get(g.id))}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(g,f,e){this.parent(g,f,e);this.onRenderMenu=new c.util.Dispatcher(this);f.menu_container=f.menu_container||b.doc.body},showMenu:function(){var g=this,j,i,h=b.get(g.id),f;if(g.isDisabled()){return}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}if(g.isMenuVisible){return g.hideMenu()}j=b.getPos(g.settings.menu_container);i=b.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.vp_offset_x=i.x;f.settings.vp_offset_y=i.y;f.settings.keyboard_focus=g._focused;f.showMenu(0,h.clientHeight);a.add(b.doc,"mousedown",g.hideMenu,g);g.setState("Selected",1);g.isMenuVisible=1},renderMenu:function(){var f=this,e;e=f.settings.control_manager.createDropMenu(f.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:f.settings.icons});e.onHideMenu.add(function(){f.hideMenu();f.focus()});f.onRenderMenu.dispatch(f,e);f.menu=e},hideMenu:function(g){var f=this;if(g&&g.type=="mousedown"&&b.getParent(g.target,function(h){return h.id===f.id||h.id===f.id+"_open"})){return}if(!g||!b.getParent(g.target,".mceMenu")){f.setState("Selected",0);a.remove(b.doc,"mousedown",f.hideMenu,f);if(f.menu){f.menu.hideMenu()}}f.isMenuVisible=0},postRender:function(){var e=this,f=e.settings;a.add(e.id,"click",function(){if(!e.isDisabled()){if(f.onclick){f.onclick(e.value)}e.showMenu()}})}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(g,f,e){this.parent(g,f,e);this.classPrefix="mceSplitButton"},renderHTML:function(){var i,f=this,g=f.settings,e;i="";if(g.image){e=b.createHTML("img ",{src:g.image,role:"presentation","class":"mceAction "+g["class"]})}else{e=b.createHTML("span",{"class":"mceAction "+g["class"]},"")}e+=b.createHTML("span",{"class":"mceVoiceLabel mceIconOnly",id:f.id+"_voice",style:"display:none;"},g.title);i+=""+b.createHTML("a",{role:"button",id:f.id+"_action",tabindex:"-1",href:"javascript:;","class":"mceAction "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"";e=b.createHTML("span",{"class":"mceOpen "+g["class"]},'');i+=""+b.createHTML("a",{role:"button",id:f.id+"_open",tabindex:"-1",href:"javascript:;","class":"mceOpen "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"";i+="";i=b.createHTML("table",{id:f.id,role:"presentation",tabindex:"0","class":"mceSplitButton mceSplitButtonEnabled "+g["class"],cellpadding:"0",cellspacing:"0",title:g.title},i);return b.createHTML("span",{role:"button","aria-labelledby":f.id+"_voice","aria-haspopup":"true"},i)},postRender:function(){var e=this,g=e.settings,f;if(g.onclick){f=function(h){if(!e.isDisabled()){g.onclick(e.value);a.cancel(h)}};a.add(e.id+"_action","click",f);a.add(e.id,["click","keydown"],function(h){var k=32,m=14,i=13,j=38,l=40;if((h.keyCode===32||h.keyCode===13||h.keyCode===14)&&!h.altKey&&!h.ctrlKey&&!h.metaKey){f();a.cancel(h)}else{if(h.type==="click"||h.keyCode===l){e.showMenu();a.cancel(h)}}})}a.add(e.id+"_open","click",function(h){e.showMenu();a.cancel(h)});a.add([e.id,e.id+"_open"],"focus",function(){e._focused=1});a.add([e.id,e.id+"_open"],"blur",function(){e._focused=0});if(c.isIE6||!b.boxModel){a.add(e.id,"mouseover",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.addClass(e.id,"mceSplitButtonHover")}});a.add(e.id,"mouseout",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.removeClass(e.id,"mceSplitButtonHover")}})}},destroy:function(){this.parent();a.clear(this.id+"_action");a.clear(this.id+"_open");a.clear(this.id)}})})(tinymce);(function(d){var c=d.DOM,a=d.dom.Event,b=d.is,e=d.each;d.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(i,h,f){var g=this;g.parent(i,h,f);g.settings=h=d.extend({colors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",grid_width:8,default_color:"#888888"},g.settings);g.onShowMenu=new d.util.Dispatcher(g);g.onHideMenu=new d.util.Dispatcher(g);g.value=h.default_color},showMenu:function(){var f=this,g,j,i,h;if(f.isDisabled()){return}if(!f.isMenuRendered){f.renderMenu();f.isMenuRendered=true}if(f.isMenuVisible){return f.hideMenu()}i=c.get(f.id);c.show(f.id+"_menu");c.addClass(i,"mceSplitButtonSelected");h=c.getPos(i);c.setStyles(f.id+"_menu",{left:h.x,top:h.y+i.clientHeight,zIndex:200000});i=0;a.add(c.doc,"mousedown",f.hideMenu,f);f.onShowMenu.dispatch(f);if(f._focused){f._keyHandler=a.add(f.id+"_menu","keydown",function(k){if(k.keyCode==27){f.hideMenu()}});c.select("a",f.id+"_menu")[0].focus()}f.isMenuVisible=1},hideMenu:function(g){var f=this;if(f.isMenuVisible){if(g&&g.type=="mousedown"&&c.getParent(g.target,function(h){return h.id===f.id+"_open"})){return}if(!g||!c.getParent(g.target,".mceSplitButtonMenu")){c.removeClass(f.id,"mceSplitButtonSelected");a.remove(c.doc,"mousedown",f.hideMenu,f);a.remove(f.id+"_menu","keydown",f._keyHandler);c.hide(f.id+"_menu")}f.isMenuVisible=0;f.onHideMenu.dispatch()}},renderMenu:function(){var p=this,h,k=0,q=p.settings,g,j,l,o,f;o=c.add(q.menu_container,"div",{role:"listbox",id:p.id+"_menu","class":q.menu_class+" "+q["class"],style:"position:absolute;left:0;top:-1000px;"});h=c.add(o,"div",{"class":q["class"]+" mceSplitButtonMenu"});c.add(h,"span",{"class":"mceMenuLine"});g=c.add(h,"table",{role:"presentation","class":"mceColorSplitMenu"});j=c.add(g,"tbody");k=0;e(b(q.colors,"array")?q.colors:q.colors.split(","),function(i){i=i.replace(/^#/,"");if(!k--){l=c.add(j,"tr");k=q.grid_width-1}g=c.add(l,"td");g=c.add(g,"a",{role:"option",href:"javascript:;",style:{backgroundColor:"#"+i},title:p.editor.getLang("colors."+i,i),"data-mce-color":"#"+i});if(p.editor.forcedHighContrastMode){g=c.add(g,"canvas",{width:16,height:16,"aria-hidden":"true"});if(g.getContext&&(f=g.getContext("2d"))){f.fillStyle="#"+i;f.fillRect(0,0,16,16)}else{c.remove(g)}}});if(q.more_colors_func){g=c.add(j,"tr");g=c.add(g,"td",{colspan:q.grid_width,"class":"mceMoreColors"});g=c.add(g,"a",{role:"option",id:p.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},q.more_colors_title);a.add(g,"click",function(i){q.more_colors_func.call(q.more_colors_scope||this);return a.cancel(i)})}c.addClass(h,"mceColorSplitMenu");new d.ui.KeyboardNavigation({root:p.id+"_menu",items:c.select("a",p.id+"_menu"),onCancel:function(){p.hideMenu();p.focus()}});a.add(p.id+"_menu","mousedown",function(i){return a.cancel(i)});a.add(p.id+"_menu","click",function(i){var m;i=c.getParent(i.target,"a",j);if(i&&i.nodeName.toLowerCase()=="a"&&(m=i.getAttribute("data-mce-color"))){p.setColor(m)}return a.cancel(i)});return o},setColor:function(f){this.displayColor(f);this.hideMenu();this.settings.onselect(f)},displayColor:function(g){var f=this;c.setStyle(f.id+"_preview","backgroundColor",g);f.value=g},postRender:function(){var f=this,g=f.id;f.parent();c.add(g+"_action","div",{id:g+"_preview","class":"mceColorPreview"});c.setStyle(f.id+"_preview","backgroundColor",f.value)},destroy:function(){this.parent();a.clear(this.id+"_menu");a.clear(this.id+"_more");c.remove(this.id+"_menu")}})})(tinymce);(function(b){var d=b.DOM,c=b.each,a=b.dom.Event;b.create("tinymce.ui.ToolbarGroup:tinymce.ui.Container",{renderHTML:function(){var f=this,i=[],e=f.controls,j=b.each,g=f.settings;i.push('
      ');i.push("");i.push('");j(e,function(h){i.push(h.renderHTML())});i.push("");i.push("
      ");return i.join("")},focus:function(){this.keyNav.focus()},postRender:function(){var f=this,e=[];c(f.controls,function(g){c(g.controls,function(h){if(h.id){e.push(h)}})});f.keyNav=new b.ui.KeyboardNavigation({root:f.id,items:e,onCancel:function(){f.editor.focus()},excludeFromTabOrder:!f.settings.tab_focus_toolbar})},destroy:function(){var e=this;e.parent();e.keyNav.destroy();a.clear(e.id)}})})(tinymce);(function(a){var c=a.DOM,b=a.each;a.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var m=this,f="",j,k,n=m.settings,e,d,g,l;l=m.controls;for(e=0;e"))}if(d&&k.ListBox){if(d.Button||d.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarEnd"},c.createHTML("span",null,""))}}if(c.stdMode){f+=''+k.renderHTML()+""}else{f+=""+k.renderHTML()+""}if(g&&k.ListBox){if(g.Button||g.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarStart"},c.createHTML("span",null,""))}}}j="mceToolbarEnd";if(k.Button){j+=" mceToolbarEndButton"}else{if(k.SplitButton){j+=" mceToolbarEndSplitButton"}else{if(k.ListBox){j+=" mceToolbarEndListBox"}}}f+=c.createHTML("td",{"class":j},c.createHTML("span",null,""));return c.createHTML("table",{id:m.id,"class":"mceToolbar"+(n["class"]?" "+n["class"]:""),cellpadding:"0",cellspacing:"0",align:m.settings.align||"",role:"presentation",tabindex:"-1"},""+f+"")}})})(tinymce);(function(b){var a=b.util.Dispatcher,c=b.each;b.create("tinymce.AddOnManager",{AddOnManager:function(){var d=this;d.items=[];d.urls={};d.lookup={};d.onAdd=new a(d)},get:function(d){if(this.lookup[d]){return this.lookup[d].instance}else{return undefined}},dependencies:function(e){var d;if(this.lookup[e]){d=this.lookup[e].dependencies}return d||[]},requireLangPack:function(e){var d=b.settings;if(d&&d.language&&d.language_load!==false){b.ScriptLoader.add(this.urls[e]+"/langs/"+d.language+".js")}},add:function(f,e,d){this.items.push(e);this.lookup[f]={instance:e,dependencies:d};this.onAdd.dispatch(this,f,e);return e},createUrl:function(d,e){if(typeof e==="object"){return e}else{return{prefix:d.prefix,resource:e,suffix:d.suffix}}},addComponents:function(f,d){var e=this.urls[f];b.each(d,function(g){b.ScriptLoader.add(e+"/"+g)})},load:function(j,f,d,h){var g=this,e=f;function i(){var k=g.dependencies(j);b.each(k,function(m){var l=g.createUrl(f,m);g.load(l.resource,l,undefined,undefined)});if(d){if(h){d.call(h)}else{d.call(b.ScriptLoader)}}}if(g.urls[j]){return}if(typeof f==="object"){e=f.prefix+f.resource+f.suffix}if(e.indexOf("/")!=0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}g.urls[j]=e.substring(0,e.lastIndexOf("/"));if(g.lookup[j]){i()}else{b.ScriptLoader.add(e,i,h)}}});b.PluginManager=new b.AddOnManager();b.ThemeManager=new b.AddOnManager()}(tinymce));(function(j){var g=j.each,d=j.extend,k=j.DOM,i=j.dom.Event,f=j.ThemeManager,b=j.PluginManager,e=j.explode,h=j.util.Dispatcher,a,c=0;j.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(j.documentBaseURL)){j.documentBaseURL+="/"}j.baseURL=new j.util.URI(j.documentBaseURL).toAbsolute(j.baseURL);j.baseURI=new j.util.URI(j.baseURL);j.onBeforeUnload=new h(j);i.add(window,"beforeunload",function(l){j.onBeforeUnload.dispatch(j,l)});j.onAddEditor=new h(j);j.onRemoveEditor=new h(j);j.EditorManager=d(j,{editors:[],i18n:{},activeEditor:null,init:function(q){var n=this,p,l=j.ScriptLoader,u,o=[],m;function r(x,y,t){var v=x[y];if(!v){return}if(j.is(v,"string")){t=v.replace(/\.\w+$/,"");t=t?j.resolve(t):0;v=j.resolve(v)}return v.apply(t||this,Array.prototype.slice.call(arguments,2))}q=d({theme:"simple",language:"en"},q);n.settings=q;i.add(document,"init",function(){var s,v;r(q,"onpageload");switch(q.mode){case"exact":s=q.elements||"";if(s.length>0){g(e(s),function(x){if(k.get(x)){m=new j.Editor(x,q);o.push(m);m.render(1)}else{g(document.forms,function(y){g(y.elements,function(z){if(z.name===x){x="mce_editor_"+c++;k.setAttrib(z,"id",x);m=new j.Editor(x,q);o.push(m);m.render(1)}})})}})}break;case"textareas":case"specific_textareas":function t(y,x){return x.constructor===RegExp?x.test(y.className):k.hasClass(y,x)}g(k.select("textarea"),function(x){if(q.editor_deselector&&t(x,q.editor_deselector)){return}if(!q.editor_selector||t(x,q.editor_selector)){u=k.get(x.name);if(!x.id&&!u){x.id=x.name}if(!x.id||n.get(x.id)){x.id=k.uniqueId()}m=new j.Editor(x.id,q);o.push(m);m.render(1)}});break}if(q.oninit){s=v=0;g(o,function(x){v++;if(!x.initialized){x.onInit.add(function(){s++;if(s==v){r(q,"oninit")}})}else{s++}if(s==v){r(q,"oninit")}})}})},get:function(l){if(l===a){return this.editors}return this.editors[l]},getInstanceById:function(l){return this.get(l)},add:function(m){var l=this,n=l.editors;n[m.id]=m;n.push(m);l._setActive(m);l.onAddEditor.dispatch(l,m);return m},remove:function(n){var m=this,l,o=m.editors;if(!o[n.id]){return null}delete o[n.id];for(l=0;l':"",visual_table_class:"mceItemTable",visual:1,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",apply_source_formatting:1,directionality:"ltr",forced_root_block:"p",hidden_input:1,padd_empty_editor:1,render_ui:1,init_theme:1,force_p_newlines:1,indentation:"30px",keep_styles:1,fix_table_elements:1,inline_styles:1,convert_fonts_to_spans:true,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr",validate:true,entity_encoding:"named",url_converter:p.convertURL,url_converter_scope:p,ie7_compat:true},q);p.documentBaseURI=new m.util.URI(q.document_base_url||m.documentBaseURL,{base_uri:tinyMCE.baseURI});p.baseURI=m.baseURI;p.contentCSS=[];p.execCallback("setup",p)},render:function(r){var u=this,v=u.settings,x=u.id,p=m.ScriptLoader;if(!j.domLoaded){j.add(document,"init",function(){u.render()});return}tinyMCE.settings=v;if(!u.getElement()){return}if(m.isIDevice&&!m.isIOS5){return}if(!/TEXTAREA|INPUT/i.test(u.getElement().nodeName)&&v.hidden_input&&n.getParent(x,"form")){n.insertAfter(n.create("input",{type:"hidden",name:x}),x)}if(m.WindowManager){u.windowManager=new m.WindowManager(u)}if(v.encoding=="xml"){u.onGetContent.add(function(s,t){if(t.save){t.content=n.encode(t.content)}})}if(v.add_form_submit_trigger){u.onSubmit.addToTop(function(){if(u.initialized){u.save();u.isNotDirty=1}})}if(v.add_unload_trigger){u._beforeUnload=tinyMCE.onBeforeUnload.add(function(){if(u.initialized&&!u.destroyed&&!u.isHidden()){u.save({format:"raw",no_events:true})}})}m.addUnload(u.destroy,u);if(v.submit_patch){u.onBeforeRenderUI.add(function(){var s=u.getElement().form;if(!s){return}if(s._mceOldSubmit){return}if(!s.submit.nodeType&&!s.submit.length){u.formElement=s;s._mceOldSubmit=s.submit;s.submit=function(){m.triggerSave();u.isNotDirty=1;return u.formElement._mceOldSubmit(u.formElement)}}s=null})}function q(){if(v.language&&v.language_load!==false){p.add(m.baseURL+"/langs/"+v.language+".js")}if(v.theme&&v.theme.charAt(0)!="-"&&!h.urls[v.theme]){h.load(v.theme,"themes/"+v.theme+"/editor_template"+m.suffix+".js")}i(g(v.plugins),function(t){if(t&&!c.urls[t]){if(t.charAt(0)=="-"){t=t.substr(1,t.length);var s=c.dependencies(t);i(s,function(z){var y={prefix:"plugins/",resource:z,suffix:"/editor_plugin"+m.suffix+".js"};var z=c.createUrl(y,z);c.load(z.resource,z)})}else{if(t=="safari"){return}c.load(t,{prefix:"plugins/",resource:t,suffix:"/editor_plugin"+m.suffix+".js"})}}});p.loadQueue(function(){if(!u.removed){u.init()}})}q()},init:function(){var r,H=this,I=H.settings,E,A,D=H.getElement(),q,p,F,y,C,G,z,v=[];m.add(H);I.aria_label=I.aria_label||n.getAttrib(D,"aria-label",H.getLang("aria.rich_text_area"));if(I.theme){I.theme=I.theme.replace(/-/,"");q=h.get(I.theme);H.theme=new q();if(H.theme.init&&I.init_theme){H.theme.init(H,h.urls[I.theme]||m.documentBaseURL.replace(/\/$/,""))}}function B(J){var K=c.get(J),t=c.urls[J]||m.documentBaseURL.replace(/\/$/,""),s;if(K&&m.inArray(v,J)===-1){i(c.dependencies(J),function(u){B(u)});s=new K(H,t);H.plugins[J]=s;if(s.init){s.init(H,t);v.push(J)}}}i(g(I.plugins.replace(/\-/g,"")),B);if(I.popup_css!==false){if(I.popup_css){I.popup_css=H.documentBaseURI.toAbsolute(I.popup_css)}else{I.popup_css=H.baseURI.toAbsolute("themes/"+I.theme+"/skins/"+I.skin+"/dialog.css")}}if(I.popup_css_add){I.popup_css+=","+H.documentBaseURI.toAbsolute(I.popup_css_add)}H.controlManager=new m.ControlManager(H);if(I.custom_undo_redo){H.onBeforeExecCommand.add(function(t,J,u,K,s){if(J!="Undo"&&J!="Redo"&&J!="mceRepaint"&&(!s||!s.skip_undo)){H.undoManager.beforeChange()}});H.onExecCommand.add(function(t,J,u,K,s){if(J!="Undo"&&J!="Redo"&&J!="mceRepaint"&&(!s||!s.skip_undo)){H.undoManager.add()}})}H.onExecCommand.add(function(s,t){if(!/^(FontName|FontSize)$/.test(t)){H.nodeChanged()}});if(a){function x(s,t){if(!t||!t.initial){H.execCommand("mceRepaint")}}H.onUndo.add(x);H.onRedo.add(x);H.onSetContent.add(x)}H.onBeforeRenderUI.dispatch(H,H.controlManager);if(I.render_ui){E=I.width||D.style.width||D.offsetWidth;A=I.height||D.style.height||D.offsetHeight;H.orgDisplay=D.style.display;G=/^[0-9\.]+(|px)$/i;if(G.test(""+E)){E=Math.max(parseInt(E)+(q.deltaWidth||0),100)}if(G.test(""+A)){A=Math.max(parseInt(A)+(q.deltaHeight||0),100)}q=H.theme.renderUI({targetNode:D,width:E,height:A,deltaWidth:I.delta_width,deltaHeight:I.delta_height});H.editorContainer=q.editorContainer}if(document.domain&&location.hostname!=document.domain){m.relaxedDomain=document.domain}n.setStyles(q.sizeContainer||q.editorContainer,{width:E,height:A});if(I.content_css){m.each(g(I.content_css),function(s){H.contentCSS.push(H.documentBaseURI.toAbsolute(s))})}A=(q.iframeHeight||A)+(typeof(A)=="number"?(q.deltaHeight||0):"");if(A<100){A=100}H.iframeHTML=I.doctype+'';if(I.document_base_url!=m.documentBaseURL){H.iframeHTML+=''}if(I.ie7_compat){H.iframeHTML+=''}else{H.iframeHTML+=''}H.iframeHTML+='';y=I.body_id||"tinymce";if(y.indexOf("=")!=-1){y=H.getParam("body_id","","hash");y=y[H.id]||y}C=I.body_class||"";if(C.indexOf("=")!=-1){C=H.getParam("body_class","","hash");C=C[H.id]||""}H.iframeHTML+='
      ';if(m.relaxedDomain&&(b||(m.isOpera&&parseFloat(opera.version())<11))){F='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+H.id+'");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()'}r=n.add(q.iframeContainer,"iframe",{id:H.id+"_ifr",src:F||'javascript:""',frameBorder:"0",allowTransparency:"true",title:I.aria_label,style:{width:"100%",height:A,display:"block"}});H.contentAreaContainer=q.iframeContainer;n.get(q.editorContainer).style.display=H.orgDisplay;n.get(H.id).style.display="none";n.setAttrib(H.id,"aria-hidden",true);if(!m.relaxedDomain||!F){H.setupIframe()}D=r=q=null},setupIframe:function(){var q=this,v=q.settings,x=n.get(q.id),y=q.getDoc(),u,p;if(!b||!m.relaxedDomain){if(a&&!Range.prototype.getClientRects){q.onMouseDown.add(function(t,z){if(z.target.nodeName==="HTML"){var s=q.getBody();s.blur();setTimeout(function(){s.focus()},0)}})}y.open();y.write(q.iframeHTML);y.close();if(m.relaxedDomain){y.domain=m.relaxedDomain}}p=q.getBody();p.disabled=true;if(!v.readonly){p.contentEditable=true}p.disabled=false;q.schema=new m.html.Schema(v);q.dom=new m.dom.DOMUtils(q.getDoc(),{keep_values:true,url_converter:q.convertURL,url_converter_scope:q,hex_colors:v.force_hex_style_colors,class_filter:v.class_filter,update_styles:1,fix_ie_paragraphs:1,schema:q.schema});q.parser=new m.html.DomParser(v,q.schema);if(!q.settings.allow_html_in_named_anchor){q.parser.addAttributeFilter("name",function(s,t){var A=s.length,C,z,B,D;while(A--){D=s[A];if(D.name==="a"&&D.firstChild){B=D.parent;C=D.lastChild;do{z=C.prev;B.insert(C,D);C=z}while(C)}}})}q.parser.addAttributeFilter("src,href,style",function(s,t){var z=s.length,B,D=q.dom,C,A;while(z--){B=s[z];C=B.attr(t);A="data-mce-"+t;if(!B.attributes.map[A]){if(t==="style"){B.attr(A,D.serializeStyle(D.parseStyle(C),B.name))}else{B.attr(A,q.convertURL(C,t,B.name))}}}});q.parser.addNodeFilter("script",function(s,t){var z=s.length;while(z--){s[z].attr("type","mce-text/javascript")}});q.parser.addNodeFilter("#cdata",function(s,t){var z=s.length,A;while(z--){A=s[z];A.type=8;A.name="#comment";A.value="[CDATA["+A.value+"]]"}});q.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(t,z){var A=t.length,B,s=q.schema.getNonEmptyElements();while(A--){B=t[A];if(B.isEmpty(s)){B.empty().append(new m.html.Node("br",1)).shortEnded=true}}});q.serializer=new m.dom.Serializer(v,q.dom,q.schema);q.selection=new m.dom.Selection(q.dom,q.getWin(),q.serializer);q.formatter=new m.Formatter(this);q.formatter.register({alignleft:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"}},{selector:"img,table",collapsed:false,styles:{"float":"left"}}],aligncenter:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"}},{selector:"img",collapsed:false,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:false,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"right"}},{selector:"img,table",collapsed:false,styles:{"float":"right"}}],alignfull:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"justify"}}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:true},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:true},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},wrap_links:false},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},wrap_links:false},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},link:{inline:"a",selector:"a",remove:"all",split:true,deep:true,onmatch:function(s){return true},onformat:function(z,s,t){i(t,function(B,A){q.dom.setAttrib(z,A,B)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike",remove:"all",split:true,expand:false,block_expand:true,deep:true},{selector:"span",attributes:["style","class"],remove:"empty",split:true,expand:false,deep:true},{selector:"*",attributes:["style","class"],split:false,expand:false,deep:true}]});i("p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp".split(/\s/),function(s){q.formatter.register(s,{block:s,remove:"all"})});q.formatter.register(q.settings.formats);q.undoManager=new m.UndoManager(q);q.undoManager.onAdd.add(function(t,s){if(t.hasUndo()){return q.onChange.dispatch(q,s,t)}});q.undoManager.onUndo.add(function(t,s){return q.onUndo.dispatch(q,s,t)});q.undoManager.onRedo.add(function(t,s){return q.onRedo.dispatch(q,s,t)});q.forceBlocks=new m.ForceBlocks(q,{forced_root_block:v.forced_root_block});q.editorCommands=new m.EditorCommands(q);q.serializer.onPreProcess.add(function(s,t){return q.onPreProcess.dispatch(q,t,s)});q.serializer.onPostProcess.add(function(s,t){return q.onPostProcess.dispatch(q,t,s)});q.onPreInit.dispatch(q);if(!v.gecko_spellcheck){q.getBody().spellcheck=0}if(!v.readonly){q._addEvents()}q.controlManager.onPostRender.dispatch(q,q.controlManager);q.onPostRender.dispatch(q);q.quirks=new m.util.Quirks(this);if(v.directionality){q.getBody().dir=v.directionality}if(v.nowrap){q.getBody().style.whiteSpace="nowrap"}if(v.handle_node_change_callback){q.onNodeChange.add(function(t,s,z){q.execCallback("handle_node_change_callback",q.id,z,-1,-1,true,q.selection.isCollapsed())})}if(v.save_callback){q.onSaveContent.add(function(s,z){var t=q.execCallback("save_callback",q.id,z.content,q.getBody());if(t){z.content=t}})}if(v.onchange_callback){q.onChange.add(function(t,s){q.execCallback("onchange_callback",q,s)})}if(v.protect){q.onBeforeSetContent.add(function(s,t){if(v.protect){i(v.protect,function(z){t.content=t.content.replace(z,function(A){return""})})}})}if(v.convert_newlines_to_brs){q.onBeforeSetContent.add(function(s,t){if(t.initial){t.content=t.content.replace(/\r?\n/g,"
      ")}})}if(v.preformatted){q.onPostProcess.add(function(s,t){t.content=t.content.replace(/^\s*/,"");t.content=t.content.replace(/<\/pre>\s*$/,"");if(t.set){t.content='
      '+t.content+"
      "}})}if(v.verify_css_classes){q.serializer.attribValueFilter=function(B,z){var A,t;if(B=="class"){if(!q.classesRE){t=q.dom.getClasses();if(t.length>0){A="";i(t,function(s){A+=(A?"|":"")+s["class"]});q.classesRE=new RegExp("("+A+")","gi")}}return !q.classesRE||/(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(z)||q.classesRE.test(z)?z:""}return z}}if(v.cleanup_callback){q.onBeforeSetContent.add(function(s,t){t.content=q.execCallback("cleanup_callback","insert_to_editor",t.content,t)});q.onPreProcess.add(function(s,t){if(t.set){q.execCallback("cleanup_callback","insert_to_editor_dom",t.node,t)}if(t.get){q.execCallback("cleanup_callback","get_from_editor_dom",t.node,t)}});q.onPostProcess.add(function(s,t){if(t.set){t.content=q.execCallback("cleanup_callback","insert_to_editor",t.content,t)}if(t.get){t.content=q.execCallback("cleanup_callback","get_from_editor",t.content,t)}})}if(v.save_callback){q.onGetContent.add(function(s,t){if(t.save){t.content=q.execCallback("save_callback",q.id,t.content,q.getBody())}})}if(v.handle_event_callback){q.onEvent.add(function(s,t,z){if(q.execCallback("handle_event_callback",t,s,z)===false){j.cancel(t)}})}q.onSetContent.add(function(){q.addVisual(q.getBody())});if(v.padd_empty_editor){q.onPostProcess.add(function(s,t){t.content=t.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
      [\r\n]*)$/,"")})}if(a){function r(s,t){i(s.dom.select("a"),function(A){var z=A.parentNode;if(s.dom.isBlock(z)&&z.lastChild===A){s.dom.add(z,"br",{"data-mce-bogus":1})}})}q.onExecCommand.add(function(s,t){if(t==="CreateLink"){r(s)}});q.onSetContent.add(q.selection.onSetContent.add(r))}q.load({initial:true,format:"html"});q.startContent=q.getContent({format:"raw"});q.undoManager.add();q.initialized=true;q.onInit.dispatch(q);q.execCallback("setupcontent_callback",q.id,q.getBody(),q.getDoc());q.execCallback("init_instance_callback",q);q.focus(true);q.nodeChanged({initial:1});i(q.contentCSS,function(s){q.dom.loadCSS(s)});if(v.auto_focus){setTimeout(function(){var s=m.get(v.auto_focus);s.selection.select(s.getBody(),1);s.selection.collapse(1);s.getBody().focus();s.getWin().focus()},100)}x=null},focus:function(u){var y,q=this,s=q.selection,x=q.settings.content_editable,r,p,v=q.getDoc();if(!u){r=s.getRng();if(r.item){p=r.item(0)}q._refreshContentEditable();s.normalize();if(!x){q.getWin().focus()}if(m.isGecko){q.getBody().focus()}if(p&&p.ownerDocument==v){r=v.body.createControlRange();r.addElement(p);r.select()}}if(m.activeEditor!=q){if((y=m.activeEditor)!=null){y.onDeactivate.dispatch(y,q)}q.onActivate.dispatch(q,y)}m._setActive(q)},execCallback:function(u){var p=this,r=p.settings[u],q;if(!r){return}if(p.callbackLookup&&(q=p.callbackLookup[u])){r=q.func;q=q.scope}if(d(r,"string")){q=r.replace(/\.\w+$/,"");q=q?m.resolve(q):0;r=m.resolve(r);p.callbackLookup=p.callbackLookup||{};p.callbackLookup[u]={func:r,scope:q}}return r.apply(q||p,Array.prototype.slice.call(arguments,1))},translate:function(p){var r=this.settings.language||"en",q=m.i18n;if(!p){return""}return q[r+"."+p]||p.replace(/{\#([^}]+)\}/g,function(t,s){return q[r+"."+s]||"{#"+s+"}"})},getLang:function(q,p){return m.i18n[(this.settings.language||"en")+"."+q]||(d(p)?p:"{#"+q+"}")},getParam:function(u,r,p){var s=m.trim,q=d(this.settings[u])?this.settings[u]:r,t;if(p==="hash"){t={};if(d(q,"string")){i(q.indexOf("=")>0?q.split(/[;,](?![^=;,]*(?:[;,]|$))/):q.split(","),function(x){x=x.split("=");if(x.length>1){t[s(x[0])]=s(x[1])}else{t[s(x[0])]=s(x)}})}else{t=q}return t}return q},nodeChanged:function(r){var p=this,q=p.selection,u=q.getStart()||p.getBody();if(p.initialized){r=r||{};u=b&&u.ownerDocument!=p.getDoc()?p.getBody():u;r.parents=[];p.dom.getParent(u,function(s){if(s.nodeName=="BODY"){return true}r.parents.push(s)});p.onNodeChange.dispatch(p,r?r.controlManager||p.controlManager:p.controlManager,u,q.isCollapsed(),r)}},addButton:function(r,q){var p=this;p.buttons=p.buttons||{};p.buttons[r]=q},addCommand:function(p,r,q){this.execCommands[p]={func:r,scope:q||this}},addQueryStateHandler:function(p,r,q){this.queryStateCommands[p]={func:r,scope:q||this}},addQueryValueHandler:function(p,r,q){this.queryValueCommands[p]={func:r,scope:q||this}},addShortcut:function(r,u,p,s){var q=this,v;if(!q.settings.custom_shortcuts){return false}q.shortcuts=q.shortcuts||{};if(d(p,"string")){v=p;p=function(){q.execCommand(v,false,null)}}if(d(p,"object")){v=p;p=function(){q.execCommand(v[0],v[1],v[2])}}i(g(r),function(t){var x={func:p,scope:s||this,desc:u,alt:false,ctrl:false,shift:false};i(g(t,"+"),function(y){switch(y){case"alt":case"ctrl":case"shift":x[y]=true;break;default:x.charCode=y.charCodeAt(0);x.keyCode=y.toUpperCase().charCodeAt(0)}});q.shortcuts[(x.ctrl?"ctrl":"")+","+(x.alt?"alt":"")+","+(x.shift?"shift":"")+","+x.keyCode]=x});return true},execCommand:function(x,v,z,p){var r=this,u=0,y,q;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(x)&&(!p||!p.skip_focus)){r.focus()}y={};r.onBeforeExecCommand.dispatch(r,x,v,z,y);if(y.terminate){return false}if(r.execCallback("execcommand_callback",r.id,r.selection.getNode(),x,v,z)){r.onExecCommand.dispatch(r,x,v,z,p);return true}if(y=r.execCommands[x]){q=y.func.call(y.scope,v,z);if(q!==true){r.onExecCommand.dispatch(r,x,v,z,p);return q}}i(r.plugins,function(s){if(s.execCommand&&s.execCommand(x,v,z)){r.onExecCommand.dispatch(r,x,v,z,p);u=1;return false}});if(u){return true}if(r.theme&&r.theme.execCommand&&r.theme.execCommand(x,v,z)){r.onExecCommand.dispatch(r,x,v,z,p);return true}if(r.editorCommands.execCommand(x,v,z)){r.onExecCommand.dispatch(r,x,v,z,p);return true}r.getDoc().execCommand(x,v,z);r.onExecCommand.dispatch(r,x,v,z,p)},queryCommandState:function(u){var q=this,v,r;if(q._isHidden()){return}if(v=q.queryStateCommands[u]){r=v.func.call(v.scope);if(r!==true){return r}}v=q.editorCommands.queryCommandState(u);if(v!==-1){return v}try{return this.getDoc().queryCommandState(u)}catch(p){}},queryCommandValue:function(v){var q=this,u,r;if(q._isHidden()){return}if(u=q.queryValueCommands[v]){r=u.func.call(u.scope);if(r!==true){return r}}u=q.editorCommands.queryCommandValue(v);if(d(u)){return u}try{return this.getDoc().queryCommandValue(v)}catch(p){}},show:function(){var p=this;n.show(p.getContainer());n.hide(p.id);p.load()},hide:function(){var p=this,q=p.getDoc();if(b&&q){q.execCommand("SelectAll")}p.save();n.hide(p.getContainer());n.setStyle(p.id,"display",p.orgDisplay)},isHidden:function(){return !n.isHidden(this.id)},setProgressState:function(p,q,r){this.onSetProgressState.dispatch(this,p,q,r);return p},load:function(s){var p=this,r=p.getElement(),q;if(r){s=s||{};s.load=true;q=p.setContent(d(r.value)?r.value:r.innerHTML,s);s.element=r;if(!s.no_events){p.onLoadContent.dispatch(p,s)}s.element=r=null;return q}},save:function(u){var p=this,s=p.getElement(),q,r;if(!s||!p.initialized){return}u=u||{};u.save=true;if(!u.no_events){p.undoManager.typing=false;p.undoManager.add()}u.element=s;q=u.content=p.getContent(u);if(!u.no_events){p.onSaveContent.dispatch(p,u)}q=u.content;if(!/TEXTAREA|INPUT/i.test(s.nodeName)){s.innerHTML=q;if(r=n.getParent(p.id,"form")){i(r.elements,function(t){if(t.name==p.id){t.value=q;return false}})}}else{s.value=q}u.element=s=null;return q},setContent:function(u,s){var r=this,q,p=r.getBody(),t;s=s||{};s.format=s.format||"html";s.set=true;s.content=u;if(!s.no_events){r.onBeforeSetContent.dispatch(r,s)}u=s.content;if(!m.isIE&&(u.length===0||/^\s+$/.test(u))){t=r.settings.forced_root_block;if(t){u="<"+t+'>
      "}else{u='
      '}p.innerHTML=u;r.selection.select(p,true);r.selection.collapse(true);return}if(s.format!=="raw"){u=new m.html.Serializer({},r.schema).serialize(r.parser.parse(u))}s.content=m.trim(u);r.dom.setHTML(p,s.content);if(!s.no_events){r.onSetContent.dispatch(r,s)}r.selection.normalize();return s.content},getContent:function(q){var p=this,r;q=q||{};q.format=q.format||"html";q.get=true;if(!q.no_events){p.onBeforeGetContent.dispatch(p,q)}if(q.format=="raw"){r=p.getBody().innerHTML}else{r=p.serializer.serialize(p.getBody(),q)}q.content=m.trim(r);if(!q.no_events){p.onGetContent.dispatch(p,q)}return q.content},isDirty:function(){var p=this;return m.trim(p.startContent)!=m.trim(p.getContent({format:"raw",no_events:1}))&&!p.isNotDirty},getContainer:function(){var p=this;if(!p.container){p.container=n.get(p.editorContainer||p.id+"_parent")}return p.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return n.get(this.settings.content_element||this.id)},getWin:function(){var p=this,q;if(!p.contentWindow){q=n.get(p.id+"_ifr");if(q){p.contentWindow=q.contentWindow}}return p.contentWindow},getDoc:function(){var q=this,p;if(!q.contentDocument){p=q.getWin();if(p){q.contentDocument=p.document}}return q.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(p,x,v){var q=this,r=q.settings;if(r.urlconverter_callback){return q.execCallback("urlconverter_callback",p,v,true,x)}if(!r.convert_urls||(v&&v.nodeName=="LINK")||p.indexOf("file:")===0){return p}if(r.relative_urls){return q.documentBaseURI.toRelative(p)}p=q.documentBaseURI.toAbsolute(p,r.remove_script_host);return p},addVisual:function(r){var p=this,q=p.settings;r=r||p.getBody();if(!d(p.hasVisual)){p.hasVisual=q.visual}i(p.dom.select("table,a",r),function(t){var s;switch(t.nodeName){case"TABLE":s=p.dom.getAttrib(t,"border");if(!s||s=="0"){if(p.hasVisual){p.dom.addClass(t,q.visual_table_class)}else{p.dom.removeClass(t,q.visual_table_class)}}return;case"A":s=p.dom.getAttrib(t,"name");if(s){if(p.hasVisual){p.dom.addClass(t,"mceItemAnchor")}else{p.dom.removeClass(t,"mceItemAnchor")}}return}});p.onVisualAid.dispatch(p,r,p.hasVisual)},remove:function(){var p=this,q=p.getContainer();p.removed=1;p.hide();p.execCallback("remove_instance_callback",p);p.onRemove.dispatch(p);p.onExecCommand.listeners=[];m.remove(p);n.remove(q)},destroy:function(q){var p=this;if(p.destroyed){return}if(!q){m.removeUnload(p.destroy);tinyMCE.onBeforeUnload.remove(p._beforeUnload);if(p.theme&&p.theme.destroy){p.theme.destroy()}p.controlManager.destroy();p.selection.destroy();p.dom.destroy();if(!p.settings.content_editable){j.clear(p.getWin());j.clear(p.getDoc())}j.clear(p.getBody());j.clear(p.formElement)}if(p.formElement){p.formElement.submit=p.formElement._mceOldSubmit;p.formElement._mceOldSubmit=null}p.contentAreaContainer=p.formElement=p.container=p.settings.content_element=p.bodyElement=p.contentDocument=p.contentWindow=null;if(p.selection){p.selection=p.selection.win=p.selection.dom=p.selection.dom.doc=null}p.destroyed=1},_addEvents:function(){var B=this,r,C=B.settings,q=B.dom,x={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};function p(t,D){var s=t.type;if(B.removed){return}if(B.onEvent.dispatch(B,t,D)!==false){B[x[t.fakeType||t.type]].dispatch(B,t,D)}}i(x,function(t,s){switch(s){case"contextmenu":q.bind(B.getDoc(),s,p);break;case"paste":q.bind(B.getBody(),s,function(D){p(D)});break;case"submit":case"reset":q.bind(B.getElement().form||n.getParent(B.id,"form"),s,p);break;default:q.bind(C.content_editable?B.getBody():B.getDoc(),s,p)}});q.bind(C.content_editable?B.getBody():(a?B.getDoc():B.getWin()),"focus",function(s){B.focus(true)});if(m.isGecko){q.bind(B.getDoc(),"DOMNodeInserted",function(t){var s;t=t.target;if(t.nodeType===1&&t.nodeName==="IMG"&&(s=t.getAttribute("data-mce-src"))){t.src=B.documentBaseURI.toAbsolute(s)}})}if(a){function u(){var E=this,G=E.getDoc(),F=E.settings;if(a&&!F.readonly){E._refreshContentEditable();try{G.execCommand("styleWithCSS",0,false)}catch(D){if(!E._isHidden()){try{G.execCommand("useCSS",0,true)}catch(D){}}}if(!F.table_inline_editing){try{G.execCommand("enableInlineTableEditing",false,false)}catch(D){}}if(!F.object_resizing){try{G.execCommand("enableObjectResizing",false,false)}catch(D){}}}}B.onBeforeExecCommand.add(u);B.onMouseDown.add(u)}B.onClick.add(function(s,t){t=t.target;if(m.isWebKit&&t.nodeName=="IMG"){B.selection.getSel().setBaseAndExtent(t,0,t,1)}if(t.nodeName=="A"&&q.hasClass(t,"mceItemAnchor")){B.selection.select(t)}B.nodeChanged()});B.onMouseUp.add(B.nodeChanged);B.onKeyUp.add(function(s,t){var D=t.keyCode;if((D>=33&&D<=36)||(D>=37&&D<=40)||D==13||D==45||D==46||D==8||(m.isMac&&(D==91||D==93))||t.ctrlKey){B.nodeChanged()}});B.onKeyDown.add(function(t,D){if(D.keyCode!=8){return}var F=t.selection.getRng().startContainer;var E=t.selection.getRng().startOffset;while(F&&F.nodeType&&F.nodeType!=1&&F.parentNode){F=F.parentNode}if(F&&F.parentNode&&F.parentNode.tagName==="BLOCKQUOTE"&&F.parentNode.firstChild==F&&E==0){t.formatter.toggle("blockquote",null,F.parentNode);var s=t.selection.getRng();s.setStart(F,0);s.setEnd(F,0);t.selection.setRng(s);t.selection.collapse(false)}});B.onReset.add(function(){B.setContent(B.startContent,{format:"raw"})});if(C.custom_shortcuts){if(C.custom_undo_redo_keyboard_shortcuts){B.addShortcut("ctrl+z",B.getLang("undo_desc"),"Undo");B.addShortcut("ctrl+y",B.getLang("redo_desc"),"Redo")}B.addShortcut("ctrl+b",B.getLang("bold_desc"),"Bold");B.addShortcut("ctrl+i",B.getLang("italic_desc"),"Italic");B.addShortcut("ctrl+u",B.getLang("underline_desc"),"Underline");for(r=1;r<=6;r++){B.addShortcut("ctrl+"+r,"",["FormatBlock",false,"h"+r])}B.addShortcut("ctrl+7","",["FormatBlock",false,"p"]);B.addShortcut("ctrl+8","",["FormatBlock",false,"div"]);B.addShortcut("ctrl+9","",["FormatBlock",false,"address"]);function v(t){var s=null;if(!t.altKey&&!t.ctrlKey&&!t.metaKey){return s}i(B.shortcuts,function(D){if(m.isMac&&D.ctrl!=t.metaKey){return}else{if(!m.isMac&&D.ctrl!=t.ctrlKey){return}}if(D.alt!=t.altKey){return}if(D.shift!=t.shiftKey){return}if(t.keyCode==D.keyCode||(t.charCode&&t.charCode==D.charCode)){s=D;return false}});return s}B.onKeyUp.add(function(s,t){var D=v(t);if(D){return j.cancel(t)}});B.onKeyPress.add(function(s,t){var D=v(t);if(D){return j.cancel(t)}});B.onKeyDown.add(function(s,t){var D=v(t);if(D){D.func.call(D.scope);return j.cancel(t)}})}if(m.isIE){q.bind(B.getDoc(),"controlselect",function(D){var t=B.resizeInfo,s;D=D.target;if(D.nodeName!=="IMG"){return}if(t){q.unbind(t.node,t.ev,t.cb)}if(!q.hasClass(D,"mceItemNoResize")){ev="resizeend";s=q.bind(D,ev,function(F){var E;F=F.target;if(E=q.getStyle(F,"width")){q.setAttrib(F,"width",E.replace(/[^0-9%]+/g,""));q.setStyle(F,"width","")}if(E=q.getStyle(F,"height")){q.setAttrib(F,"height",E.replace(/[^0-9%]+/g,""));q.setStyle(F,"height","")}})}else{ev="resizestart";s=q.bind(D,"resizestart",j.cancel,j)}t=B.resizeInfo={node:D,ev:ev,cb:s}})}if(m.isOpera){B.onClick.add(function(s,t){j.prevent(t)})}if(C.custom_undo_redo){function y(){B.undoManager.typing=false;B.undoManager.add()}q.bind(B.getDoc(),"focusout",function(s){if(!B.removed&&B.undoManager.typing){y()}});B.dom.bind(B.dom.getRoot(),"dragend",function(s){y()});B.onKeyUp.add(function(s,D){var t=D.keyCode;if((t>=33&&t<=36)||(t>=37&&t<=40)||t==13||t==45||D.ctrlKey){y()}});B.onKeyDown.add(function(s,E){var D=E.keyCode,t;if(D==8){t=B.getDoc().selection;if(t&&t.createRange&&t.createRange().item){B.undoManager.beforeChange();s.dom.remove(t.createRange().item(0));y();return j.cancel(E)}}if((D>=33&&D<=36)||(D>=37&&D<=40)||D==13||D==45){if(m.isIE&&D==13){B.undoManager.beforeChange()}if(B.undoManager.typing){y()}return}if((D<16||D>20)&&D!=224&&D!=91&&!B.undoManager.typing){B.undoManager.beforeChange();B.undoManager.typing=true;B.undoManager.add()}});B.onMouseDown.add(function(){if(B.undoManager.typing){y()}})}if(m.isWebKit){q.bind(B.getDoc(),"selectionchange",function(){if(B.selectionTimer){clearTimeout(B.selectionTimer);B.selectionTimer=0}B.selectionTimer=window.setTimeout(function(){B.nodeChanged()},50)})}if(m.isGecko){function A(){var s=B.dom.getAttribs(B.selection.getStart().cloneNode(false));return function(){var t=B.selection.getStart();if(t!==B.getBody()){B.dom.removeAllAttribs(t);i(s,function(D){t.setAttributeNode(D.cloneNode(true))})}}}function z(){var t=B.selection;return !t.isCollapsed()&&t.getStart()!=t.getEnd()}B.onKeyPress.add(function(s,D){var t;if((D.keyCode==8||D.keyCode==46)&&z()){t=A();B.getDoc().execCommand("delete",false,null);t();return j.cancel(D)}});B.dom.bind(B.getDoc(),"cut",function(t){var s;if(z()){s=A();B.onKeyUp.addToTop(j.cancel,j);setTimeout(function(){s();B.onKeyUp.remove(j.cancel,j)},0)}})}},_refreshContentEditable:function(){var q=this,p,r;if(q._isHidden()){p=q.getBody();r=p.parentNode;r.removeChild(p);r.appendChild(p);p.focus()}},_isHidden:function(){var p;if(!a){return 0}p=this.selection.getSel();return(!p||!p.rangeCount||p.rangeCount==0)}})})(tinymce);(function(c){var d=c.each,e,a=true,b=false;c.EditorCommands=function(n){var m=n.dom,p=n.selection,j={state:{},exec:{},value:{}},k=n.settings,q=n.formatter,o;function r(z,y,x){var v;z=z.toLowerCase();if(v=j.exec[z]){v(z,y,x);return a}return b}function l(x){var v;x=x.toLowerCase();if(v=j.state[x]){return v(x)}return -1}function h(x){var v;x=x.toLowerCase();if(v=j.value[x]){return v(x)}return b}function u(v,x){x=x||"exec";d(v,function(z,y){d(y.toLowerCase().split(","),function(A){j[x][A]=z})})}c.extend(this,{execCommand:r,queryCommandState:l,queryCommandValue:h,addCommands:u});function f(y,x,v){if(x===e){x=b}if(v===e){v=null}return n.getDoc().execCommand(y,x,v)}function t(v){return q.match(v)}function s(v,x){q.toggle(v,x?{value:x}:e)}function i(v){o=p.getBookmark(v)}function g(){p.moveToBookmark(o)}u({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){n.undoManager.add()},"Cut,Copy,Paste":function(z){var y=n.getDoc(),v;try{f(z)}catch(x){v=a}if(v||!y.queryCommandSupported(z)){if(c.isGecko){n.windowManager.confirm(n.getLang("clipboard_msg"),function(A){if(A){open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}})}else{n.windowManager.alert(n.getLang("clipboard_no_support"))}}},unlink:function(v){if(p.isCollapsed()){p.select(p.getNode())}f(v);p.collapse(b)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(v){var x=v.substring(7);d("left,center,right,full".split(","),function(y){if(x!=y){q.remove("align"+y)}});s("align"+x);r("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(y){var v,x;f(y);v=m.getParent(p.getNode(),"ol,ul");if(v){x=v.parentNode;if(/^(H[1-6]|P|ADDRESS|PRE)$/.test(x.nodeName)){i();m.split(x,v);g()}}},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){s(v)},"ForeColor,HiliteColor,FontName":function(y,x,v){s(y,v)},FontSize:function(z,y,x){var v,A;if(x>=1&&x<=7){A=c.explode(k.font_size_style_values);v=c.explode(k.font_size_classes);if(v){x=v[x-1]||x}else{x=A[x-1]||x}}s(z,x)},RemoveFormat:function(v){q.remove(v)},mceBlockQuote:function(v){s("blockquote")},FormatBlock:function(y,x,v){return s(v||"p")},mceCleanup:function(){var v=p.getBookmark();n.setContent(n.getContent({cleanup:a}),{cleanup:a});p.moveToBookmark(v)},mceRemoveNode:function(z,y,x){var v=x||p.getNode();if(v!=n.getBody()){i();n.dom.remove(v,a);g()}},mceSelectNodeDepth:function(z,y,x){var v=0;m.getParent(p.getNode(),function(A){if(A.nodeType==1&&v++==x){p.select(A);return b}},n.getBody())},mceSelectNode:function(y,x,v){p.select(v)},mceInsertContent:function(B,I,K){var y,J,E,z,F,G,D,C,L,x,A,M,v,H;y=n.parser;J=new c.html.Serializer({},n.schema);v='\uFEFF';G={content:K,format:"html"};p.onBeforeSetContent.dispatch(p,G);K=G.content;if(K.indexOf("{$caret}")==-1){K+="{$caret}"}K=K.replace(/\{\$caret\}/,v);if(!p.isCollapsed()){n.getDoc().execCommand("Delete",false,null)}E=p.getNode();G={context:E.nodeName.toLowerCase()};F=y.parse(K,G);A=F.lastChild;if(A.attr("id")=="mce_marker"){D=A;for(A=A.prev;A;A=A.walk(true)){if(A.type==3||!m.isBlock(A.name)){A.parent.insert(D,A,A.name==="br");break}}}if(!G.invalid){K=J.serialize(F);A=E.firstChild;M=E.lastChild;if(!A||(A===M&&A.nodeName==="BR")){m.setHTML(E,K)}else{p.setContent(K)}}else{p.setContent(v);E=n.selection.getNode();z=n.getBody();if(E.nodeType==9){E=A=z}else{A=E}while(A!==z){E=A;A=A.parentNode}K=E==z?z.innerHTML:m.getOuterHTML(E);K=J.serialize(y.parse(K.replace(//i,function(){return J.serialize(F)})));if(E==z){m.setHTML(z,K)}else{m.setOuterHTML(E,K)}}D=m.get("mce_marker");C=m.getRect(D);L=m.getViewPort(n.getWin());if((C.y+C.h>L.y+L.h||C.yL.x+L.w||C.x")},mceToggleVisualAid:function(){n.hasVisual=!n.hasVisual;n.addVisual()},mceReplaceContent:function(y,x,v){n.execCommand("mceInsertContent",false,v.replace(/\{\$selection\}/g,p.getContent({format:"text"})))},mceInsertLink:function(z,y,x){var v;if(typeof(x)=="string"){x={href:x}}v=m.getParent(p.getNode(),"a");x.href=x.href.replace(" ","%20");if(!v||!x.href){q.remove("link")}if(x.href){q.apply("link",x,v)}},selectAll:function(){var x=m.getRoot(),v=m.createRng();v.setStart(x,0);v.setEnd(x,x.childNodes.length);n.selection.setRng(v)}});u({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(v){return t("align"+v.substring(7))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){return t(v)},mceBlockQuote:function(){return t("blockquote")},Outdent:function(){var v;if(k.inline_styles){if((v=m.getParent(p.getStart(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}if((v=m.getParent(p.getEnd(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}}return l("InsertUnorderedList")||l("InsertOrderedList")||(!k.inline_styles&&!!m.getParent(p.getNode(),"BLOCKQUOTE"))},"InsertUnorderedList,InsertOrderedList":function(v){return m.getParent(p.getNode(),v=="insertunorderedlist"?"UL":"OL")}},"state");u({"FontSize,FontName":function(y){var x=0,v;if(v=m.getParent(p.getNode(),"span")){if(y=="fontsize"){x=v.style.fontSize}else{x=v.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()}}return x}},"value");if(k.custom_undo_redo){u({Undo:function(){n.undoManager.undo()},Redo:function(){n.undoManager.redo()}})}}})(tinymce);(function(b){var a=b.util.Dispatcher;b.UndoManager=function(f){var d,e=0,h=[],c;function g(){return b.trim(f.getContent({format:"raw",no_events:1}))}return d={typing:false,onAdd:new a(d),onUndo:new a(d),onRedo:new a(d),beforeChange:function(){c=f.selection.getBookmark(2,true)},add:function(m){var j,k=f.settings,l;m=m||{};m.content=g();l=h[e];if(l&&l.content==m.content){return null}if(h[e]){h[e].beforeBookmark=c}if(k.custom_undo_redo_levels){if(h.length>k.custom_undo_redo_levels){for(j=0;j0){k=h[--e];f.setContent(k.content,{format:"raw"});f.selection.moveToBookmark(k.beforeBookmark);d.onUndo.dispatch(d,k)}return k},redo:function(){var i;if(e0||this.typing},hasRedo:function(){return e');q.replace(p,m);o.select(p,1)}return g}return d}l.create("tinymce.ForceBlocks",{ForceBlocks:function(m){var n=this,o=m.settings,p;n.editor=m;n.dom=m.dom;p=(o.forced_root_block||"p").toLowerCase();o.element=p.toUpperCase();m.onPreInit.add(n.setup,n)},setup:function(){var n=this,m=n.editor,p=m.settings,u=m.dom,o=m.selection,q=m.schema.getBlockElements();if(p.forced_root_block){function v(){var y=o.getStart(),t=m.getBody(),s,z,D,F,E,x,A,B=-16777215;if(!y||y.nodeType!==1){return}while(y!=t){if(q[y.nodeName]){return}y=y.parentNode}s=o.getRng();if(s.setStart){z=s.startContainer;D=s.startOffset;F=s.endContainer;E=s.endOffset}else{if(s.item){s=m.getDoc().body.createTextRange();s.moveToElementText(s.item(0))}tmpRng=s.duplicate();tmpRng.collapse(true);D=tmpRng.move("character",B)*-1;if(!tmpRng.collapsed){tmpRng=s.duplicate();tmpRng.collapse(false);E=(tmpRng.move("character",B)*-1)-D}}for(y=t.firstChild;y;y){if(y.nodeType===3||(y.nodeType==1&&!q[y.nodeName])){if(!x){x=u.create(p.forced_root_block);y.parentNode.insertBefore(x,y)}A=y;y=y.nextSibling;x.appendChild(A)}else{x=null;y=y.nextSibling}}if(s.setStart){s.setStart(z,D);s.setEnd(F,E);o.setRng(s)}else{try{s=m.getDoc().body.createTextRange();s.moveToElementText(t);s.collapse(true);s.moveStart("character",D);if(E>0){s.moveEnd("character",E)}s.select()}catch(C){}}m.nodeChanged()}m.onKeyUp.add(v);m.onClick.add(v)}if(p.force_br_newlines){if(c){m.onKeyPress.add(function(s,t){var x;if(t.keyCode==13&&o.getNode().nodeName!="LI"){o.setContent('
      ',{format:"raw"});x=u.get("__");x.removeAttribute("id");o.select(x);o.collapse();return j.cancel(t)}})}}if(p.force_p_newlines){if(!c){m.onKeyPress.add(function(s,t){if(t.keyCode==13&&!t.shiftKey&&!n.insertPara(t)){j.cancel(t)}})}else{l.addUnload(function(){n._previousFormats=0});m.onKeyPress.add(function(s,t){n._previousFormats=0;if(t.keyCode==13&&!t.shiftKey&&s.selection.isCollapsed()&&p.keep_styles){n._previousFormats=k(s.selection.getStart())}});m.onKeyUp.add(function(t,y){if(y.keyCode==13&&!y.shiftKey){var x=t.selection.getStart(),s=n._previousFormats;if(!x.hasChildNodes()&&s){x=u.getParent(x,u.isBlock);if(x&&x.nodeName!="LI"){x.innerHTML="";if(n._previousFormats){x.appendChild(s.wrapper);s.inner.innerHTML="\uFEFF"}else{x.innerHTML="\uFEFF"}o.select(x,1);o.collapse(true);t.getDoc().execCommand("Delete",false,null);n._previousFormats=0}}}})}if(a){m.onKeyDown.add(function(s,t){if((t.keyCode==8||t.keyCode==46)&&!t.shiftKey){n.backspaceDelete(t,t.keyCode==8)}})}}if(l.isWebKit){function r(t){var s=o.getRng(),x,A=u.create("div",null," "),z,y=u.getViewPort(t.getWin()).h;s.insertNode(x=u.create("br"));s.setStartAfter(x);s.setEndAfter(x);o.setRng(s);if(o.getSel().focusNode==x.previousSibling){o.select(u.insertAfter(u.doc.createTextNode("\u00a0"),x));o.collapse(d)}u.insertAfter(A,x);z=u.getPos(A).y;u.remove(A);if(z>y){t.getWin().scrollTo(0,z)}}m.onKeyPress.add(function(s,t){if(t.keyCode==13&&(t.shiftKey||(p.force_br_newlines&&!u.getParent(o.getNode(),"h1,h2,h3,h4,h5,h6,ol,ul")))){r(s);j.cancel(t)}})}if(c){if(p.element!="P"){m.onKeyPress.add(function(s,t){n.lastElm=o.getNode().nodeName});m.onKeyUp.add(function(t,x){var z,y=o.getNode(),s=t.getBody();if(s.childNodes.length===1&&y.nodeName=="P"){y=u.rename(y,p.element);o.select(y);o.collapse();t.nodeChanged()}else{if(x.keyCode==13&&!x.shiftKey&&n.lastElm!="P"){z=u.getParent(y,"p");if(z){u.rename(z,p.element);t.nodeChanged()}}}})}}},getParentBlock:function(o){var m=this.dom;return m.getParent(o,m.isBlock)},insertPara:function(Q){var E=this,v=E.editor,M=v.dom,R=v.getDoc(),V=v.settings,F=v.selection.getSel(),G=F.getRangeAt(0),U=R.body;var J,K,H,O,N,q,o,u,z,m,C,T,p,x,I,L=M.getViewPort(v.getWin()),B,D,A;v.undoManager.beforeChange();J=R.createRange();J.setStart(F.anchorNode,F.anchorOffset);J.collapse(d);K=R.createRange();K.setStart(F.focusNode,F.focusOffset);K.collapse(d);H=J.compareBoundaryPoints(J.START_TO_END,K)<0;O=H?F.anchorNode:F.focusNode;N=H?F.anchorOffset:F.focusOffset;q=H?F.focusNode:F.anchorNode;o=H?F.focusOffset:F.anchorOffset;if(O===q&&/^(TD|TH)$/.test(O.nodeName)){if(O.firstChild.nodeName=="BR"){M.remove(O.firstChild)}if(O.childNodes.length==0){v.dom.add(O,V.element,null,"
      ");T=v.dom.add(O,V.element,null,"
      ")}else{I=O.innerHTML;O.innerHTML="";v.dom.add(O,V.element,null,I);T=v.dom.add(O,V.element,null,"
      ")}G=R.createRange();G.selectNodeContents(T);G.collapse(1);v.selection.setRng(G);return g}if(O==U&&q==U&&U.firstChild&&v.dom.isBlock(U.firstChild)){O=q=O.firstChild;N=o=0;J=R.createRange();J.setStart(O,0);K=R.createRange();K.setStart(q,0)}if(!R.body.hasChildNodes()){R.body.appendChild(M.create("br"))}O=O.nodeName=="HTML"?R.body:O;O=O.nodeName=="BODY"?O.firstChild:O;q=q.nodeName=="HTML"?R.body:q;q=q.nodeName=="BODY"?q.firstChild:q;u=E.getParentBlock(O);z=E.getParentBlock(q);m=u?u.nodeName:V.element;if(I=E.dom.getParent(u,"li,pre")){if(I.nodeName=="LI"){return e(v.selection,E.dom,I)}return d}if(u&&(u.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(M.getStyle(u,"position",1)))){m=V.element;u=null}if(z&&(z.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(M.getStyle(u,"position",1)))){m=V.element;z=null}if(/(TD|TABLE|TH|CAPTION)/.test(m)||(u&&m=="DIV"&&/left|right/gi.test(M.getStyle(u,"float",1)))){m=V.element;u=z=null}C=(u&&u.nodeName==m)?u.cloneNode(0):v.dom.create(m);T=(z&&z.nodeName==m)?z.cloneNode(0):v.dom.create(m);T.removeAttribute("id");if(/^(H[1-6])$/.test(m)&&f(G,u)){T=v.dom.create(V.element)}I=p=O;do{if(I==U||I.nodeType==9||E.dom.isBlock(I)||/(TD|TABLE|TH|CAPTION)/.test(I.nodeName)){break}p=I}while((I=I.previousSibling?I.previousSibling:I.parentNode));I=x=q;do{if(I==U||I.nodeType==9||E.dom.isBlock(I)||/(TD|TABLE|TH|CAPTION)/.test(I.nodeName)){break}x=I}while((I=I.nextSibling?I.nextSibling:I.parentNode));if(p.nodeName==m){J.setStart(p,0)}else{J.setStartBefore(p)}J.setEnd(O,N);C.appendChild(J.cloneContents()||R.createTextNode(""));try{K.setEndAfter(x)}catch(P){}K.setStart(q,o);T.appendChild(K.cloneContents()||R.createTextNode(""));G=R.createRange();if(!p.previousSibling&&p.parentNode.nodeName==m){G.setStartBefore(p.parentNode)}else{if(J.startContainer.nodeName==m&&J.startOffset==0){G.setStartBefore(J.startContainer)}else{G.setStart(J.startContainer,J.startOffset)}}if(!x.nextSibling&&x.parentNode.nodeName==m){G.setEndAfter(x.parentNode)}else{G.setEnd(K.endContainer,K.endOffset)}G.deleteContents();if(b){v.getWin().scrollTo(0,L.y)}if(C.firstChild&&C.firstChild.nodeName==m){C.innerHTML=C.firstChild.innerHTML}if(T.firstChild&&T.firstChild.nodeName==m){T.innerHTML=T.firstChild.innerHTML}function S(y,s){var r=[],X,W,t;y.innerHTML="";if(V.keep_styles){W=s;do{if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(W.nodeName)){X=W.cloneNode(g);M.setAttrib(X,"id","");r.push(X)}}while(W=W.parentNode)}if(r.length>0){for(t=r.length-1,X=y;t>=0;t--){X=X.appendChild(r[t])}r[0].innerHTML=b?"\u00a0":"
      ";return r[0]}else{y.innerHTML=b?"\u00a0":"
      "}}if(M.isEmpty(C)){S(C,O)}if(M.isEmpty(T)){A=S(T,q)}if(b&&parseFloat(opera.version())<9.5){G.insertNode(C);G.insertNode(T)}else{G.insertNode(T);G.insertNode(C)}T.normalize();C.normalize();v.selection.select(T,true);v.selection.collapse(true);B=v.dom.getPos(T).y;if(BL.y+L.h){v.getWin().scrollTo(0,B1||ac==au){return ac}}}var am=V.selection.getRng();var aq=am.startContainer;var al=am.endContainer;if(aq!=al&&am.endOffset==0){var ap=an(aq,al);var ao=ap.nodeType==3?ap.length:ap.childNodes.length;am.setEnd(ap,ao)}return am}function Y(ao,au,ar,aq,am){var al=[],an=-1,at,aw=-1,ap=-1,av;O(ao.childNodes,function(ay,ax){if(ay.nodeName==="UL"||ay.nodeName==="OL"){an=ax;at=ay;return false}});O(ao.childNodes,function(ay,ax){if(ay.nodeName==="SPAN"&&c.getAttrib(ay,"data-mce-type")=="bookmark"){if(ay.id==au.id+"_start"){aw=ax}else{if(ay.id==au.id+"_end"){ap=ax}}}});if(an<=0||(awan)){O(a.grep(ao.childNodes),am);return 0}else{av=ar.cloneNode(S);O(a.grep(ao.childNodes),function(ay,ax){if((awan&&ax>an)){al.push(ay);ay.parentNode.removeChild(ay)}});if(awan){ao.insertBefore(av,at.nextSibling)}}aq.push(av);O(al,function(ax){av.appendChild(ax)});return av}}function aj(am,ao){var al=[],ap,an;ap=ai.inline||ai.block;an=c.create(ap);W(an);K.walk(am,function(aq){var ar;function at(au){var ax=au.nodeName.toLowerCase(),aw=au.parentNode.nodeName.toLowerCase(),av;if(g(ax,"br")){ar=0;if(ai.block){c.remove(au)}return}if(ai.wrapper&&x(au,Z,ah)){ar=0;return}if(ai.block&&!ai.wrapper&&G(ax)){au=c.rename(au,ap);W(au);al.push(au);ar=0;return}if(ai.selector){O(ad,function(ay){if("collapsed" in ay&&ay.collapsed!==ae){return}if(c.is(au,ay.selector)&&!b(au)){W(au,ay);av=true}});if(!ai.inline||av){ar=0;return}}if(d(ap,ax)&&d(aw,ap)&&!(au.nodeType===3&&au.nodeValue.length===1&&au.nodeValue.charCodeAt(0)===65279)){if(!ar){ar=an.cloneNode(S);au.parentNode.insertBefore(ar,au);al.push(ar)}ar.appendChild(au)}else{if(ax=="li"&&ao){ar=Y(au,ao,an,al,at)}else{ar=0;O(a.grep(au.childNodes),at);ar=0}}}O(aq,at)});if(ai.wrap_links===false){O(al,function(aq){function ar(aw){var av,au,at;if(aw.nodeName==="A"){au=an.cloneNode(S);al.push(au);at=a.grep(aw.childNodes);for(av=0;av1||!F(at))&&aq===0){c.remove(at,1);return}if(ai.inline||ai.wrapper){if(!ai.exact&&aq===1){at=ar(at)}O(ad,function(av){O(c.select(av.inline,at),function(ax){var aw;if(av.wrap_links===false){aw=ax.parentNode;do{if(aw.nodeName==="A"){return}}while(aw=aw.parentNode)}U(av,ah,ax,av.exact?ax:null)})});if(x(at.parentNode,Z,ah)){c.remove(at,1);at=0;return B}if(ai.merge_with_parents){c.getParent(at.parentNode,function(av){if(x(av,Z,ah)){c.remove(at,1);at=0;return B}})}if(at&&ai.merge_siblings!==false){at=u(C(at),at);at=u(at,C(at,B))}}})}if(ai){if(ac){X=c.createRng();X.setStartBefore(ac);X.setEndAfter(ac);aj(o(X,ad))}else{if(!ae||!ai.inline||c.select("td.mceSelected,th.mceSelected").length){var ak=V.selection.getNode();V.selection.setRng(ab());ag=q.getBookmark();aj(o(q.getRng(B),ad),ag);if(ai.styles&&(ai.styles.color||ai.styles.textDecoration)){a.walk(ak,I,"childNodes");I(ak)}q.moveToBookmark(ag);q.setRng(aa(q.getRng(B)));V.nodeChanged()}else{Q("apply",Z,ah)}}}}function A(Y,ah,ab){var ac=R(Y),aj=ac[0],ag,af,X;function aa(am){var al=am.startContainer,ar=am.startOffset,aq,ap,an,ao;if(al.nodeType==3&&ar>=al.nodeValue.length-1){al=al.parentNode;ar=s(al)+1}if(al.nodeType==1){an=al.childNodes;al=an[Math.min(ar,an.length-1)];aq=new t(al);if(ar>an.length-1){aq.next()}for(ap=aq.current();ap;ap=aq.next()){if(ap.nodeType==3&&!f(ap)){ao=c.create("a",null,E);ap.parentNode.insertBefore(ao,ap);am.setStart(ap,0);q.setRng(am);c.remove(ao);return}}}}function Z(ao){var an,am,al;an=a.grep(ao.childNodes);for(am=0,al=ac.length;am=0;Z--){if(P.apply[Z].name==Y){return true}}for(Z=P.remove.length-1;Z>=0;Z--){if(P.remove[Z].name==Y){return false}}return W(q.getNode())}aa=q.getNode();if(W(aa)){return B}X=q.getStart();if(X!=aa){if(W(X)){return B}}return S}function v(ad,ac){var aa,ab=[],Z={},Y,X,W;if(q.isCollapsed()){for(X=0;X=0;Y--){W=ad[X];if(P.remove[Y].name==W){Z[W]=true;break}}}for(Y=P.apply.length-1;Y>=0;Y--){for(X=0;X=0;X--){W=ac[X].selector;if(!W){return B}for(ab=Y.length-1;ab>=0;ab--){if(c.is(Y[ab],W)){return B}}}}return S}a.extend(this,{get:R,register:k,apply:T,remove:A,toggle:D,match:j,matchAll:v,matchNode:x,canApply:y});function h(W,X){if(g(W,X.inline)){return B}if(g(W,X.block)){return B}if(X.selector){return c.is(W,X.selector)}}function g(X,W){X=X||"";W=W||"";X=""+(X.nodeName||X);W=""+(W.nodeName||W);return X.toLowerCase()==W.toLowerCase()}function L(X,W){var Y=c.getStyle(X,W);if(W=="color"||W=="backgroundColor"){Y=c.toHex(Y)}if(W=="fontWeight"&&Y==700){Y="bold"}return""+Y}function r(W,X){if(typeof(W)!="string"){W=W(X)}else{if(X){W=W.replace(/%(\w+)/g,function(Z,Y){return X[Y]||Z})}}return W}function f(W){return W&&W.nodeType===3&&/^([\s\r\n]+|)$/.test(W.nodeValue)}function N(Y,X,W){var Z=c.create(X,W);Y.parentNode.insertBefore(Z,Y);Z.appendChild(Y);return Z}function o(W,ag,Z){var Y=W.startContainer,ad=W.startOffset,aj=W.endContainer,ae=W.endOffset,ai,af,ac;function ah(am,an,ak,al){var ao,ap;al=al||c.getRoot();for(;;){ao=am.parentNode;if(ao==al||(!ag[0].block_expand&&F(ao))){return am}for(ai=ao[an];ai&&ai!=am;ai=ai[ak]){if(ai.nodeType==1&&!H(ai)){return am}if(ai.nodeType==3&&!f(ai)){return am}}am=am.parentNode}return am}function ab(ak,al){if(al===p){al=ak.nodeType===3?ak.length:ak.childNodes.length}while(ak&&ak.hasChildNodes()){ak=ak.childNodes[al];if(ak){al=ak.nodeType===3?ak.length:ak.childNodes.length}}return{node:ak,offset:al}}if(Y.nodeType==1&&Y.hasChildNodes()){af=Y.childNodes.length-1;Y=Y.childNodes[ad>af?af:ad];if(Y.nodeType==3){ad=0}}if(aj.nodeType==1&&aj.hasChildNodes()){af=aj.childNodes.length-1;aj=aj.childNodes[ae>af?af:ae-1];if(aj.nodeType==3){ae=aj.nodeValue.length}}if(H(Y.parentNode)){Y=Y.parentNode}if(H(Y)){Y=Y.nextSibling||Y}if(H(aj.parentNode)){ae=c.nodeIndex(aj);aj=aj.parentNode}if(H(aj)&&aj.previousSibling){aj=aj.previousSibling;ae=aj.length}if(ag[0].inline){ac=ab(aj,ae);if(ac.node){while(ac.node&&ac.offset===0&&ac.node.previousSibling){ac=ab(ac.node.previousSibling)}if(ac.node&&ac.offset>0&&ac.node.nodeType===3&&ac.node.nodeValue.charAt(ac.offset-1)===" "){if(ac.offset>1){aj=ac.node;aj.splitText(ac.offset-1)}else{if(ac.node.previousSibling){aj=ac.node.previousSibling}}}}}if(ag[0].inline||ag[0].block_expand){Y=ah(Y,"firstChild","nextSibling");aj=ah(aj,"lastChild","previousSibling")}if(ag[0].selector&&ag[0].expand!==S&&!ag[0].inline){function aa(al,ak){var am,an,ap,ao;if(al.nodeType==3&&al.nodeValue.length==0&&al[ak]){al=al[ak]}am=m(al);for(an=0;anY?Y:Z]}return W}function Q(ad,Y,ac){var aa,X=P[ad],ae=P[ad=="apply"?"remove":"apply"];function af(){return P.apply.length||P.remove.length}function ab(){P.apply=[];P.remove=[]}function ag(ah){O(P.apply.reverse(),function(ai){T(ai.name,ai.vars,ah);if(ai.name==="forecolor"&&ai.vars.value){I(ah.parentNode)}});O(P.remove.reverse(),function(ai){A(ai.name,ai.vars,ah)});c.remove(ah,1);ab()}for(aa=X.length-1;aa>=0;aa--){if(X[aa].name==Y){return}}X.push({name:Y,vars:ac});for(aa=ae.length-1;aa>=0;aa--){if(ae[aa].name==Y){ae.splice(aa,1)}}if(af()){V.getDoc().execCommand("FontName",false,"mceinline");P.lastRng=q.getRng();O(c.select("font,span"),function(ai){var ah;if(b(ai)){ah=q.getBookmark();ag(ai);q.moveToBookmark(ah);V.nodeChanged()}});if(!P.isListening&&af()){P.isListening=true;function W(ai,aj){var ah=c.createRng();ag(ai);ah.setStart(aj,aj.nodeValue.length);ah.setEnd(aj,aj.nodeValue.length);q.setRng(ah);V.nodeChanged()}var Z=false;O("onKeyDown,onKeyUp,onKeyPress,onMouseUp".split(","),function(ah){V[ah].addToTop(function(ai,al){if(al.keyCode==13&&!al.shiftKey){Z=true;return}if(af()&&!a.dom.RangeUtils.compareRanges(P.lastRng,q.getRng())){var aj=false;O(c.select("font,span"),function(ao){var ap,an;if(b(ao)){aj=true;ap=ao.firstChild;while(ap&&ap.nodeType!=3){ap=ap.firstChild}if(ap){W(ao,ap)}else{c.remove(ao)}}});if(Z&&!aj){var ak=q.getNode();var am=ak;while(am&&am.nodeType!=3){am=am.firstChild}if(am){ak=am.parentNode;while(!F(ak)){ak=ak.parentNode}W(ak,am)}}if(al.type=="keyup"||al.type=="mouseup"){ab();Z=false}}})})}}}}})(tinymce);tinymce.onAddEditor.add(function(e,a){var d,h,g,c=a.settings;if(c.inline_styles){h=e.explode(c.font_size_style_values);function b(j,i){e.each(i,function(l,k){if(l){g.setStyle(j,k,l)}});g.rename(j,"span")}d={font:function(j,i){b(i,{backgroundColor:i.style.backgroundColor,color:i.color,fontFamily:i.face,fontSize:h[parseInt(i.size)-1]})},u:function(j,i){b(i,{textDecoration:"underline"})},strike:function(j,i){b(i,{textDecoration:"line-through"})}};function f(i,j){g=i.dom;if(c.convert_fonts_to_spans){e.each(g.select("font,u,strike",j.node),function(k){d[k.nodeName.toLowerCase()](a.dom,k)})}}a.onPreProcess.add(f);a.onSetContent.add(f);a.onInit.add(function(){a.selection.onSetContent.add(f)})}}); \ No newline at end of file +(function(d){var a=/^\s*|\s*$/g,e,c="B".replace(/A(.)|B/,"$1")==="$1";var b={majorVersion:"3",minorVersion:"4.9",releaseDate:"2012-02-23",_init:function(){var s=this,q=document,o=navigator,g=o.userAgent,m,f,l,k,j,r;s.isOpera=d.opera&&opera.buildNumber;s.isWebKit=/WebKit/.test(g);s.isIE=!s.isWebKit&&!s.isOpera&&(/MSIE/gi).test(g)&&(/Explorer/gi).test(o.appName);s.isIE6=s.isIE&&/MSIE [56]/.test(g);s.isIE7=s.isIE&&/MSIE [7]/.test(g);s.isIE8=s.isIE&&/MSIE [8]/.test(g);s.isIE9=s.isIE&&/MSIE [9]/.test(g);s.isGecko=!s.isWebKit&&/Gecko/.test(g);s.isMac=g.indexOf("Mac")!=-1;s.isAir=/adobeair/i.test(g);s.isIDevice=/(iPad|iPhone)/.test(g);s.isIOS5=s.isIDevice&&g.match(/AppleWebKit\/(\d*)/)[1]>=534;if(d.tinyMCEPreInit){s.suffix=tinyMCEPreInit.suffix;s.baseURL=tinyMCEPreInit.base;s.query=tinyMCEPreInit.query;return}s.suffix="";f=q.getElementsByTagName("base");for(m=0;m0?d:[g.scope]);if(f===false){break}}return f}});(function(){var a=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(e,g){var f=this,i,d,c,h;e=tinymce.trim(e);g=f.settings=g||{};if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e)){f.source=e;return}if(e.indexOf("/")===0&&e.indexOf("//")!==0){e=(g.base_uri?g.base_uri.protocol||"http":"http")+"://mce_host"+e}if(!/^[\w-]*:?\/\//.test(e)){h=g.base_uri?g.base_uri.path:new tinymce.util.URI(location.href).directory;e=((g.base_uri&&g.base_uri.protocol)||"http")+"://mce_host"+f.toAbsPath(h,e)}e=e.replace(/@@/g,"(mce_at)");e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);a(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(b,j){var k=e[j];if(k){k=k.replace(/\(mce_at\)/g,"@@")}f[b]=k});if(c=g.base_uri){if(!f.protocol){f.protocol=c.protocol}if(!f.userInfo){f.userInfo=c.userInfo}if(!f.port&&f.host=="mce_host"){f.port=c.port}if(!f.host||f.host=="mce_host"){f.host=c.host}f.source=""}},setPath:function(c){var b=this;c=/^(.*?)\/?(\w+)?$/.exec(c);b.path=c[0];b.directory=c[1];b.file=c[2];b.source="";b.getURI()},toRelative:function(b){var c=this,d;if(b==="./"){return b}b=new tinymce.util.URI(b,{base_uri:c});if((b.host!="mce_host"&&c.host!=b.host&&b.host)||c.port!=b.port||c.protocol!=b.protocol){return b.getURI()}d=c.toRelPath(c.path,b.path);if(b.query){d+="?"+b.query}if(b.anchor){d+="#"+b.anchor}return d},toAbsolute:function(b,c){var b=new tinymce.util.URI(b,{base_uri:this});return b.getURI(this.host==b.host&&this.protocol==b.protocol?c:0)},toRelPath:function(g,h){var c,f=0,d="",e,b;g=g.substring(0,g.lastIndexOf("/"));g=g.split("/");c=h.split("/");if(g.length>=c.length){for(e=0,b=g.length;e=c.length||g[e]!=c[e]){f=e+1;break}}}if(g.length=g.length||g[e]!=c[e]){f=e+1;break}}}if(f==1){return h}for(e=0,b=g.length-(f-1);e=0;c--){if(f[c].length==0||f[c]=="."){continue}if(f[c]==".."){b++;continue}if(b>0){b--;continue}h.push(f[c])}c=e.length-b;if(c<=0){g=h.reverse().join("/")}else{g=e.slice(0,c).join("/")+"/"+h.reverse().join("/")}if(g.indexOf("/")!==0){g="/"+g}if(d&&g.lastIndexOf("/")!==g.length-1){g+=d}return g},getURI:function(d){var c,b=this;if(!b.source||d){c="";if(!d){if(b.protocol){c+=b.protocol+"://"}if(b.userInfo){c+=b.userInfo+"@"}if(b.host){c+=b.host}if(b.port){c+=":"+b.port}}if(b.path){c+=b.path}if(b.query){c+="?"+b.query}if(b.anchor){c+="#"+b.anchor}b.source=c}return b.source}})})();(function(){var a=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(d){var b=this.get(d),c;if(b){a(b.split("&"),function(e){e=e.split("=");c=c||{};c[unescape(e[0])]=unescape(e[1])})}return c},setHash:function(j,b,g,f,i,c){var h="";a(b,function(e,d){h+=(!h?"":"&")+escape(d)+"="+escape(e)});this.set(j,h,g,f,i,c)},get:function(i){var h=document.cookie,g,f=i+"=",d;if(!h){return}d=h.indexOf("; "+f);if(d==-1){d=h.indexOf(f);if(d!=0){return null}}else{d+=2}g=h.indexOf(";",d);if(g==-1){g=h.length}return unescape(h.substring(d+f.length,g))},set:function(i,b,g,f,h,c){document.cookie=i+"="+escape(b)+((g)?"; expires="+g.toGMTString():"")+((f)?"; path="+escape(f):"")+((h)?"; domain="+h:"")+((c)?"; secure":"")},remove:function(e,b){var c=new Date();c.setTime(c.getTime()-1000);this.set(e,"",c,b,c)}})})();(function(){function serialize(o,quote){var i,v,t;quote=quote||'"';if(o==null){return"null"}t=typeof o;if(t=="string"){v="\bb\tt\nn\ff\rr\"\"''\\\\";return quote+o.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(a,b){if(quote==='"'&&a==="'"){return a}i=v.indexOf(b);if(i+1){return"\\"+v.charAt(i+1)}a=b.charCodeAt().toString(16);return"\\u"+"0000".substring(a.length)+a})+quote}if(t=="object"){if(o.hasOwnProperty&&o instanceof Array){for(i=0,v="[";i0?",":"")+serialize(o[i],quote)}return v+"]"}v="{";for(i in o){if(o.hasOwnProperty(i)){v+=typeof o[i]!="function"?(v.length>1?","+quote:quote)+i+quote+":"+serialize(o[i],quote):""}}return v+"}"}return""+o}tinymce.util.JSON={serialize:serialize,parse:function(s){try{return eval("("+s+")")}catch(ex){}}}})();tinymce.create("static tinymce.util.XHR",{send:function(g){var a,e,b=window,h=0;g.scope=g.scope||this;g.success_scope=g.success_scope||g.scope;g.error_scope=g.error_scope||g.scope;g.async=g.async===false?false:true;g.data=g.data||"";function d(i){a=0;try{a=new ActiveXObject(i)}catch(c){}return a}a=b.XMLHttpRequest?new XMLHttpRequest():d("Microsoft.XMLHTTP")||d("Msxml2.XMLHTTP");if(a){if(a.overrideMimeType){a.overrideMimeType(g.content_type)}a.open(g.type||(g.data?"POST":"GET"),g.url,g.async);if(g.content_type){a.setRequestHeader("Content-Type",g.content_type)}a.setRequestHeader("X-Requested-With","XMLHttpRequest");a.send(g.data);function f(){if(!g.async||a.readyState==4||h++>10000){if(g.success&&h<10000&&a.status==200){g.success.call(g.success_scope,""+a.responseText,a,g)}else{if(g.error){g.error.call(g.error_scope,h>10000?"TIMED_OUT":"GENERAL",a,g)}}a=null}else{b.setTimeout(f,10)}}if(!g.async){return f()}e=b.setTimeout(f,10)}}});(function(){var c=tinymce.extend,b=tinymce.util.JSON,a=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(d){this.settings=c({},d);this.count=0},send:function(f){var e=f.error,d=f.success;f=c(this.settings,f);f.success=function(h,g){h=b.parse(h);if(typeof(h)=="undefined"){h={error:"JSON Parse error."}}if(h.error){e.call(f.error_scope||f.scope,h.error,g)}else{d.call(f.success_scope||f.scope,h.result)}};f.error=function(h,g){if(e){e.call(f.error_scope||f.scope,h,g)}};f.data=b.serialize({id:f.id||"c"+(this.count++),method:f.method,params:f.params});f.content_type="application/json";a.send(f)},"static":{sendRPC:function(d){return new tinymce.util.JSONRequest().send(d)}}})}());(function(a){a.VK={DELETE:46,BACKSPACE:8,ENTER:13,TAB:9,SPACEBAR:32,UP:38,DOWN:40,modifierPressed:function(b){return b.shiftKey||b.ctrlKey||b.altKey}}})(tinymce);(function(l){var j=l.VK,k=j.BACKSPACE,h=j.DELETE;function c(n){var p=n.dom,o=n.selection;n.onKeyDown.add(function(r,v){var q,x,t,u,s;s=v.keyCode==h;if((s||v.keyCode==k)&&!j.modifierPressed(v)){v.preventDefault();q=o.getRng();x=p.getParent(q.startContainer,p.isBlock);if(s){x=p.getNext(x,p.isBlock)}if(x){t=x.firstChild;while(t&&t.nodeType==3&&t.nodeValue.length==0){t=t.nextSibling}if(t&&t.nodeName==="SPAN"){u=t.cloneNode(false)}}r.getDoc().execCommand(s?"ForwardDelete":"Delete",false,null);x=p.getParent(q.startContainer,p.isBlock);l.each(p.select("span.Apple-style-span,font.Apple-style-span",x),function(y){var z=o.getBookmark();if(u){p.replace(u.cloneNode(false),y,true)}else{p.remove(y,true)}o.moveToBookmark(z)})}})}function d(n){function o(r){var q=n.dom.create("body");var s=r.cloneContents();q.appendChild(s);return n.selection.serializer.serialize(q,{format:"html"})}function p(q){var s=o(q);var t=n.dom.createRng();t.selectNode(n.getBody());var r=o(t);return s===r}n.onKeyDown.addToTop(function(r,t){var s=t.keyCode;if(s==h||s==k){var q=r.selection.getRng(true);if(!q.collapsed&&p(q)){r.setContent("",{format:"raw"});r.nodeChanged();t.preventDefault()}}})}function b(n){n.dom.bind(n.getDoc(),"focusin",function(){n.selection.setRng(n.selection.getRng())})}function e(n){n.onKeyDown.add(function(o,r){if(r.keyCode===k){if(o.selection.isCollapsed()&&o.selection.getRng(true).startOffset===0){var q=o.selection.getNode();var p=q.previousSibling;if(p&&p.nodeName&&p.nodeName.toLowerCase()==="hr"){o.dom.remove(p);l.dom.Event.cancel(r)}}}})}function g(n){if(!Range.prototype.getClientRects){n.onMouseDown.add(function(p,q){if(q.target.nodeName==="HTML"){var o=p.getBody();o.blur();setTimeout(function(){o.focus()},0)}})}}function f(n){n.onClick.add(function(o,p){p=p.target;if(/^(IMG|HR)$/.test(p.nodeName)){o.selection.getSel().setBaseAndExtent(p,0,p,1)}if(p.nodeName=="A"&&o.dom.hasClass(p,"mceItemAnchor")){o.selection.select(p)}o.nodeChanged()})}function i(n){n.onKeyDown.add(function(o,p){function q(r){var s=r.selection.getNode();var t="h1,h2,h3,h4,h5,h6";return r.dom.is(s,t)||r.dom.getParent(s,t)!==null}if(p.keyCode===j.ENTER&&!j.modifierPressed(p)&&q(o)){setTimeout(function(){var r=o.selection.getNode();if(o.dom.is(r,"p")){o.dom.setAttrib(r,"style",null);o.execCommand("mceCleanup")}},0)}})}function m(n){var p,o;n.dom.bind(n.getDoc(),"selectionchange",function(){if(o){clearTimeout(o);o=0}o=window.setTimeout(function(){var q=n.selection.getRng();if(!p||!l.dom.RangeUtils.compareRanges(q,p)){n.nodeChanged();p=q}},50)})}function a(n){document.body.setAttribute("role","application")}l.create("tinymce.util.Quirks",{Quirks:function(n){if(l.isWebKit){c(n);d(n);b(n);f(n);if(l.isIDevice){m(n)}}if(l.isIE){e(n);d(n);a(n);i(n)}if(l.isGecko){e(n);g(n)}}})})(tinymce);(function(j){var a,g,d,k=/[&<>\"\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,b=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=/[<>&\"\']/g,c=/&(#x|#)?([\w]+);/g,i={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"};g={'"':""","'":"'","<":"<",">":">","&":"&"};d={"<":"<",">":">","&":"&",""":'"',"'":"'"};function h(l){var m;m=document.createElement("div");m.innerHTML=l;return m.textContent||m.innerText||l}function e(m,p){var n,o,l,q={};if(m){m=m.split(",");p=p||10;for(n=0;n1){return"&#"+(((n.charCodeAt(0)-55296)*1024)+(n.charCodeAt(1)-56320)+65536)+";"}return g[n]||"&#"+n.charCodeAt(0)+";"})},encodeNamed:function(n,l,m){m=m||a;return n.replace(l?k:b,function(o){return g[o]||m[o]||o})},getEncodeFunc:function(l,o){var p=j.html.Entities;o=e(o)||a;function m(r,q){return r.replace(q?k:b,function(s){return g[s]||o[s]||"&#"+s.charCodeAt(0)+";"||s})}function n(r,q){return p.encodeNamed(r,q,o)}l=j.makeMap(l.replace(/\+/g,","));if(l.named&&l.numeric){return m}if(l.named){if(o){return n}return p.encodeNamed}if(l.numeric){return p.encodeNumeric}return p.encodeRaw},decode:function(l){return l.replace(c,function(n,m,o){if(m){o=parseInt(o,m.length===2?16:10);if(o>65535){o-=65536;return String.fromCharCode(55296+(o>>10),56320+(o&1023))}else{return i[o]||String.fromCharCode(o)}}return d[n]||a[n]||h(n)})}}})(tinymce);tinymce.html.Styles=function(d,f){var k=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,h=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,b=/\s*([^:]+):\s*([^;]+);?/g,l=/\s+$/,m=/rgb/,e,g,a={},j;d=d||{};j="\\\" \\' \\; \\: ; : \uFEFF".split(" ");for(g=0;g1?r:"0"+r}return"#"+o(q)+o(p)+o(i)}return{toHex:function(i){return i.replace(k,c)},parse:function(r){var y={},p,n,v,q,u=d.url_converter,x=d.url_converter_scope||this;function o(C,F){var E,B,A,D;E=y[C+"-top"+F];if(!E){return}B=y[C+"-right"+F];if(E!=B){return}A=y[C+"-bottom"+F];if(B!=A){return}D=y[C+"-left"+F];if(A!=D){return}y[C+F]=D;delete y[C+"-top"+F];delete y[C+"-right"+F];delete y[C+"-bottom"+F];delete y[C+"-left"+F]}function t(B){var C=y[B],A;if(!C||C.indexOf(" ")<0){return}C=C.split(" ");A=C.length;while(A--){if(C[A]!==C[0]){return false}}y[B]=C[0];return true}function z(C,B,A,D){if(!t(B)){return}if(!t(A)){return}if(!t(D)){return}y[C]=y[B]+" "+y[A]+" "+y[D];delete y[B];delete y[A];delete y[D]}function s(A){q=true;return a[A]}function i(B,A){if(q){B=B.replace(/\uFEFF[0-9]/g,function(C){return a[C]})}if(!A){B=B.replace(/\\([\'\";:])/g,"$1")}return B}if(r){r=r.replace(/\\[\"\';:\uFEFF]/g,s).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(A){return A.replace(/[;:]/g,s)});while(p=b.exec(r)){n=p[1].replace(l,"").toLowerCase();v=p[2].replace(l,"");if(n&&v.length>0){if(n==="font-weight"&&v==="700"){v="bold"}else{if(n==="color"||n==="background-color"){v=v.toLowerCase()}}v=v.replace(k,c);v=v.replace(h,function(B,A,E,D,F,C){F=F||C;if(F){F=i(F);return"'"+F.replace(/\'/g,"\\'")+"'"}A=i(A||E||D);if(u){A=u.call(x,A,"style")}return"url('"+A.replace(/\'/g,"\\'")+"')"});y[n]=q?i(v,true):v}b.lastIndex=p.index+p[0].length}o("border","");o("border","-width");o("border","-color");o("border","-style");o("padding","");o("margin","");z("border","border-width","border-style","border-color");if(y.border==="medium none"){delete y.border}}return y},serialize:function(p,r){var o="",n,q;function i(t){var x,u,s,v;x=f.styles[t];if(x){for(u=0,s=x.length;u0){o+=(o.length>0?" ":"")+t+": "+v+";"}}}}if(r&&f&&f.styles){i("*");i(r)}else{for(n in p){q=p[n];if(q!==e&&q.length>0){o+=(o.length>0?" ":"")+n+": "+q+";"}}}return o}}};(function(m){var h={},j,l,g,f,c={},b,e,d=m.makeMap,k=m.each;function i(o,n){return o.split(n||",")}function a(r,q){var o,p={};function n(s){return s.replace(/[A-Z]+/g,function(t){return n(r[t])})}for(o in r){if(r.hasOwnProperty(o)){r[o]=n(r[o])}}n(q).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,function(v,t,s,u){s=i(s,"|");p[t]={attributes:d(s),attributesOrder:s,children:d(u,"|",{"#comment":{}})}});return p}l="h1,h2,h3,h4,h5,h6,hr,p,div,address,pre,form,table,tbody,thead,tfoot,th,tr,td,li,ol,ul,caption,blockquote,center,dl,dt,dd,dir,fieldset,noscript,menu,isindex,samp,header,footer,article,section,hgroup,aside,audio,canvas,figcaption,figure,nav,output,video";l=d(l,",",d(l.toUpperCase()));h=a({Z:"H|K|N|O|P",Y:"X|form|R|Q",ZG:"E|span|width|align|char|charoff|valign",X:"p|T|div|U|W|isindex|fieldset|table",ZF:"E|align|char|charoff|valign",W:"pre|hr|blockquote|address|center|noframes",ZE:"abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height",ZD:"[E][S]",U:"ul|ol|dl|menu|dir",ZC:"p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q",T:"h1|h2|h3|h4|h5|h6",ZB:"X|S|Q",S:"R|P",ZA:"a|G|J|M|O|P",R:"a|H|K|N|O",Q:"noscript|P",P:"ins|del|script",O:"input|select|textarea|label|button",N:"M|L",M:"em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym",L:"sub|sup",K:"J|I",J:"tt|i|b|u|s|strike",I:"big|small|font|basefont",H:"G|F",G:"br|span|bdo",F:"object|applet|img|map|iframe",E:"A|B|C",D:"accesskey|tabindex|onfocus|onblur",C:"onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"lang|xml:lang|dir",A:"id|class|style|title"},"script[id|charset|type|language|src|defer|xml:space][]style[B|id|type|media|title|xml:space][]object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]param[id|name|value|valuetype|type][]p[E|align][#|S]a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]br[A|clear][]span[E][#|S]bdo[A|C|B][#|S]applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]h1[E|align][#|S]img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]map[B|C|A|name][X|form|Q|area]h2[E|align][#|S]iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]h3[E|align][#|S]tt[E][#|S]i[E][#|S]b[E][#|S]u[E][#|S]s[E][#|S]strike[E][#|S]big[E][#|S]small[E][#|S]font[A|B|size|color|face][#|S]basefont[id|size|color|face][]em[E][#|S]strong[E][#|S]dfn[E][#|S]code[E][#|S]q[E|cite][#|S]samp[E][#|S]kbd[E][#|S]var[E][#|S]cite[E][#|S]abbr[E][#|S]acronym[E][#|S]sub[E][#|S]sup[E][#|S]input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]optgroup[E|disabled|label][option]option[E|selected|disabled|label|value][]textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]label[E|for|accesskey|onfocus|onblur][#|S]button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]h4[E|align][#|S]ins[E|cite|datetime][#|Y]h5[E|align][#|S]del[E|cite|datetime][#|Y]h6[E|align][#|S]div[E|align][#|Y]ul[E|type|compact][li]li[E|type|value][#|Y]ol[E|type|compact|start][li]dl[E|compact][dt|dd]dt[E][#|S]dd[E][#|Y]menu[E|compact][li]dir[E|compact][li]pre[E|width|xml:space][#|ZA]hr[E|align|noshade|size|width][]blockquote[E|cite][#|Y]address[E][#|S|p]center[E][#|Y]noframes[E][#|Y]isindex[A|B|prompt][]fieldset[E][#|legend|Y]legend[E|accesskey|align][#|S]table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]caption[E|align][#|S]col[ZG][]colgroup[ZG][col]thead[ZF][tr]tr[ZF|bgcolor][th|td]th[E|ZE][#|Y]form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]noscript[E][#|Y]td[E|ZE][#|Y]tfoot[ZF][tr]tbody[ZF][tr]area[E|D|shape|coords|href|nohref|alt|target][]base[id|href|target][]body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]");j=d("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected,autoplay,loop,controls");g=d("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,source");f=m.extend(d("td,th,iframe,video,audio,object"),g);b=d("pre,script,style,textarea");e=d("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");m.html.Schema=function(r){var A=this,n={},o={},y=[],q,p;r=r||{};if(r.verify_html===false){r.valid_elements="*[*]"}if(r.valid_styles){q={};k(r.valid_styles,function(C,B){q[B]=m.explode(C)})}p=r.whitespace_elements?d(r.whitespace_elements):b;function z(B){return new RegExp("^"+B.replace(/([?+*])/g,".$1")+"$")}function t(I){var H,D,W,S,X,C,F,R,U,N,V,Z,L,G,T,B,P,E,Y,aa,M,Q,K=/^([#+-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,O=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,J=/[*?+]/;if(I){I=i(I);if(n["@"]){P=n["@"].attributes;E=n["@"].attributesOrder}for(H=0,D=I.length;H=0){for(T=z.length-1;T>=U;T--){S=z[T];if(S.valid){n.end(S.name)}}z.length=U}}l=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([^\\s\\/<>]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/)>))","g");C=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:\\.|[^\"])*)\")|(?:\'((?:\\.|[^\'])*)\')|([^>\s]+)))?/g;J={script:/<\/script[^>]*>/gi,style:/<\/style[^>]*>/gi,noscript:/<\/noscript[^>]*>/gi};L=e.getShortEndedElements();I=e.getSelfClosingElements();G=e.getBoolAttrs();u=c.validate;r=c.remove_internals;x=c.fix_self_closing;p=a.isIE;o=/^:/;while(g=l.exec(D)){if(F0&&z[z.length-1].name===H){t(H)}if(!u||(m=e.getElementRule(H))){k=true;if(u){O=m.attributes;E=m.attributePatterns}if(Q=g[8]){y=Q.indexOf("data-mce-type")!==-1;if(y&&r){k=false}M=[];M.map={};Q.replace(C,function(T,S,X,W,V){var Y,U;S=S.toLowerCase();X=S in G?S:j(X||W||V||"");if(u&&!y&&S.indexOf("data-")!==0){Y=O[S];if(!Y&&E){U=E.length;while(U--){Y=E[U];if(Y.pattern.test(S)){break}}if(U===-1){Y=null}}if(!Y){return}if(Y.validValues&&!(X in Y.validValues)){return}}M.map[S]=X;M.push({name:S,value:X})})}else{M=[];M.map={}}if(u&&!y){R=m.attributesRequired;K=m.attributesDefault;f=m.attributesForced;if(f){P=f.length;while(P--){s=f[P];q=s.name;h=s.value;if(h==="{$uid}"){h="mce_"+v++}M.map[q]=h;M.push({name:q,value:h})}}if(K){P=K.length;while(P--){s=K[P];q=s.name;if(!(q in M.map)){h=s.value;if(h==="{$uid}"){h="mce_"+v++}M.map[q]=h;M.push({name:q,value:h})}}}if(R){P=R.length;while(P--){if(R[P] in M.map){break}}if(P===-1){k=false}}if(M.map["data-mce-bogus"]){k=false}}if(k){n.start(H,M,N)}}else{k=false}if(A=J[H]){A.lastIndex=F=g.index+g[0].length;if(g=A.exec(D)){if(k){B=D.substr(F,g.index-F)}F=g.index+g[0].length}else{B=D.substr(F);F=D.length}if(k&&B.length>0){n.text(B,true)}if(k){n.end(H)}l.lastIndex=F;continue}if(!N){if(!Q||Q.indexOf("/")!=Q.length-1){z.push({name:H,valid:k})}else{if(k){n.end(H)}}}}else{if(H=g[1]){n.comment(H)}else{if(H=g[2]){n.cdata(H)}else{if(H=g[3]){n.doctype(H)}else{if(H=g[4]){n.pi(H,g[5])}}}}}}F=g.index+g[0].length}if(F=0;P--){H=z[P];if(H.valid){n.end(H.name)}}}}})(tinymce);(function(d){var c=/^[ \t\r\n]*$/,e={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};function a(k,l,j){var i,h,f=j?"lastChild":"firstChild",g=j?"prev":"next";if(k[f]){return k[f]}if(k!==l){i=k[g];if(i){return i}for(h=k.parent;h&&h!==l;h=h.parent){i=h[g];if(i){return i}}}}function b(f,g){this.name=f;this.type=g;if(g===1){this.attributes=[];this.attributes.map={}}}d.extend(b.prototype,{replace:function(g){var f=this;if(g.parent){g.remove()}f.insert(g,f);f.remove();return f},attr:function(h,l){var f=this,g,j,k;if(typeof h!=="string"){for(j in h){f.attr(j,h[j])}return f}if(g=f.attributes){if(l!==k){if(l===null){if(h in g.map){delete g.map[h];j=g.length;while(j--){if(g[j].name===h){g=g.splice(j,1);return f}}}return f}if(h in g.map){j=g.length;while(j--){if(g[j].name===h){g[j].value=l;break}}}else{g.push({name:h,value:l})}g.map[h]=l;return f}else{return g.map[h]}}},clone:function(){var g=this,n=new b(g.name,g.type),h,f,m,j,k;if(m=g.attributes){k=[];k.map={};for(h=0,f=m.length;h1){v.reverse();z=n=f.filterNode(v[0].clone());for(t=0;t0){N.value=l;N=N.prev}else{L=N.prev;N.remove();N=L}}}n=new b.html.SaxParser({validate:y,fix_self_closing:!y,cdata:function(l){A.append(I("#cdata",4)).value=l},text:function(M,l){var L;if(!s[A.name]){M=M.replace(k," ");if(A.lastChild&&o[A.lastChild.name]){M=M.replace(D,"")}}if(M.length!==0){L=I("#text",3);L.raw=!!l;A.append(L).value=M}},comment:function(l){A.append(I("#comment",8)).value=l},pi:function(l,L){A.append(I(l,7)).value=L;G(A)},doctype:function(L){var l;l=A.append(I("#doctype",10));l.value=L;G(A)},start:function(l,T,M){var R,O,N,L,P,U,S,Q;N=y?h.getElementRule(l):{};if(N){R=I(N.outputName||l,1);R.attributes=T;R.shortEnded=M;A.append(R);Q=p[A.name];if(Q&&p[R.name]&&!Q[R.name]){J.push(R)}O=d.length;while(O--){P=d[O].name;if(P in T.map){E=c[P];if(E){E.push(R)}else{c[P]=[R]}}}if(o[l]){G(R)}if(!M){A=R}}},end:function(l){var P,M,O,L,N;M=y?h.getElementRule(l):{};if(M){if(o[l]){if(!s[A.name]){for(P=A.firstChild;P&&P.type===3;){O=P.value.replace(D,"");if(O.length>0){P.value=O;P=P.next}else{L=P.next;P.remove();P=L}}for(P=A.lastChild;P&&P.type===3;){O=P.value.replace(t,"");if(O.length>0){P.value=O;P=P.prev}else{L=P.prev;P.remove();P=L}}}P=A.prev;if(P&&P.type===3){O=P.value.replace(D,"");if(O.length>0){P.value=O}else{P.remove()}}}if(M.removeEmpty||M.paddEmpty){if(A.isEmpty(u)){if(M.paddEmpty){A.empty().append(new a("#text","3")).value="\u00a0"}else{if(!A.attributes.map.name){N=A.parent;A.empty().remove();A=N;return}}}}A=A.parent}}},h);H=A=new a(m.context||g.root_name,11);n.parse(v);if(y&&J.length){if(!m.context){j(J)}else{m.invalid=true}}if(q&&H.name=="body"){F()}if(!m.invalid){for(K in i){E=e[K];z=i[K];x=z.length;while(x--){if(!z[x].parent){z.splice(x,1)}}for(C=0,B=E.length;C0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}c.push("<",m);if(k){for(n=0,j=k.length;n0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}},end:function(h){var i;c.push("");if(a&&d[h]&&c.length>0){i=c[c.length-1];if(i.length>0&&i!=="\n"){c.push("\n")}}},text:function(i,h){if(i.length>0){c[c.length]=h?i:f(i)}},cdata:function(h){c.push("")},comment:function(h){c.push("")},pi:function(h,i){if(i){c.push("")}else{c.push("")}if(a){c.push("\n")}},doctype:function(h){c.push("",a?"\n":"")},reset:function(){c.length=0},getContent:function(){return c.join("").replace(/\n$/,"")}}};(function(a){a.html.Serializer=function(c,d){var b=this,e=new a.html.Writer(c);c=c||{};c.validate="validate" in c?c.validate:true;b.schema=d=d||new a.html.Schema();b.writer=e;b.serialize=function(h){var g,i;i=c.validate;g={3:function(k,j){e.text(k.value,k.raw)},8:function(j){e.comment(j.value)},7:function(j){e.pi(j.name,j.value)},10:function(j){e.doctype(j.value)},4:function(j){e.cdata(j.value)},11:function(j){if((j=j.firstChild)){do{f(j)}while(j=j.next)}}};e.reset();function f(k){var t=g[k.type],j,o,s,r,p,u,n,m,q;if(!t){j=k.name;o=k.shortEnded;s=k.attributes;if(i&&s&&s.length>1){u=[];u.map={};q=d.getElementRule(k.name);for(n=0,m=q.attributesOrder.length;n=8;l.boxModel=!h.isIE||o.compatMode=="CSS1Compat"||l.stdMode;l.hasOuterHTML="outerHTML" in o.createElement("a");l.settings=m=h.extend({keep_values:false,hex_colors:1},m);l.schema=m.schema;l.styles=new h.html.Styles({url_converter:m.url_converter,url_converter_scope:m.url_converter_scope},m.schema);if(h.isIE6){try{o.execCommand("BackgroundImageCache",false,true)}catch(n){l.cssFlicker=true}}if(b&&m.schema){("abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video").replace(/\w+/g,function(p){o.createElement(p)});for(k in m.schema.getCustomElements()){o.createElement(k)}}h.addUnload(l.destroy,l)},getRoot:function(){var j=this,k=j.settings;return(k&&j.get(k.root_element))||j.doc.body},getViewPort:function(k){var l,j;k=!k?this.win:k;l=k.document;j=this.boxModel?l.documentElement:l.body;return{x:k.pageXOffset||j.scrollLeft,y:k.pageYOffset||j.scrollTop,w:k.innerWidth||j.clientWidth,h:k.innerHeight||j.clientHeight}},getRect:function(m){var l,j=this,k;m=j.get(m);l=j.getPos(m);k=j.getSize(m);return{x:l.x,y:l.y,w:k.w,h:k.h}},getSize:function(m){var k=this,j,l;m=k.get(m);j=k.getStyle(m,"width");l=k.getStyle(m,"height");if(j.indexOf("px")===-1){j=0}if(l.indexOf("px")===-1){l=0}return{w:parseInt(j)||m.offsetWidth||m.clientWidth,h:parseInt(l)||m.offsetHeight||m.clientHeight}},getParent:function(l,k,j){return this.getParents(l,k,j,false)},getParents:function(u,p,l,s){var k=this,j,m=k.settings,q=[];u=k.get(u);s=s===undefined;if(m.strict_root){l=l||k.getRoot()}if(e(p,"string")){j=p;if(p==="*"){p=function(o){return o.nodeType==1}}else{p=function(o){return k.is(o,j)}}}while(u){if(u==l||!u.nodeType||u.nodeType===9){break}if(!p||p(u)){if(s){q.push(u)}else{return u}}u=u.parentNode}return s?q:null},get:function(j){var k;if(j&&this.doc&&typeof(j)=="string"){k=j;j=this.doc.getElementById(j);if(j&&j.id!==k){return this.doc.getElementsByName(k)[1]}}return j},getNext:function(k,j){return this._findSib(k,j,"nextSibling")},getPrev:function(k,j){return this._findSib(k,j,"previousSibling")},select:function(l,k){var j=this;return h.dom.Sizzle(l,j.get(k)||j.get(j.settings.root_element)||j.doc,[])},is:function(l,j){var k;if(l.length===undefined){if(j==="*"){return l.nodeType==1}if(a.test(j)){j=j.toLowerCase().split(/,/);l=l.nodeName.toLowerCase();for(k=j.length-1;k>=0;k--){if(j[k]==l){return true}}return false}}return h.dom.Sizzle.matches(j,l.nodeType?[l]:l).length>0},add:function(m,q,j,l,o){var k=this;return this.run(m,function(s){var r,n;r=e(q,"string")?k.doc.createElement(q):q;k.setAttribs(r,j);if(l){if(l.nodeType){r.appendChild(l)}else{k.setHTML(r,l)}}return !o?s.appendChild(r):r})},create:function(l,j,k){return this.add(this.doc.createElement(l),l,j,k,1)},createHTML:function(r,j,p){var q="",m=this,l;q+="<"+r;for(l in j){if(j.hasOwnProperty(l)){q+=" "+l+'="'+m.encode(j[l])+'"'}}if(typeof(p)!="undefined"){return q+">"+p+""}return q+" />"},remove:function(j,k){return this.run(j,function(m){var n,l=m.parentNode;if(!l){return null}if(k){while(n=m.firstChild){if(!h.isIE||n.nodeType!==3||n.nodeValue){l.insertBefore(n,m)}else{m.removeChild(n)}}}return l.removeChild(m)})},setStyle:function(m,j,k){var l=this;return l.run(m,function(p){var o,n;o=p.style;j=j.replace(/-(\D)/g,function(r,q){return q.toUpperCase()});if(l.pixelStyles.test(j)&&(h.is(k,"number")||/^[\-0-9\.]+$/.test(k))){k+="px"}switch(j){case"opacity":if(b){o.filter=k===""?"":"alpha(opacity="+(k*100)+")";if(!m.currentStyle||!m.currentStyle.hasLayout){o.display="inline-block"}}o[j]=o["-moz-opacity"]=o["-khtml-opacity"]=k||"";break;case"float":b?o.styleFloat=k:o.cssFloat=k;break;default:o[j]=k||""}if(l.settings.update_styles){l.setAttrib(p,"data-mce-style")}})},getStyle:function(m,j,l){m=this.get(m);if(!m){return}if(this.doc.defaultView&&l){j=j.replace(/[A-Z]/g,function(n){return"-"+n});try{return this.doc.defaultView.getComputedStyle(m,null).getPropertyValue(j)}catch(k){return null}}j=j.replace(/-(\D)/g,function(o,n){return n.toUpperCase()});if(j=="float"){j=b?"styleFloat":"cssFloat"}if(m.currentStyle&&l){return m.currentStyle[j]}return m.style?m.style[j]:undefined},setStyles:function(m,n){var k=this,l=k.settings,j;j=l.update_styles;l.update_styles=0;f(n,function(o,p){k.setStyle(m,p,o)});l.update_styles=j;if(l.update_styles){k.setAttrib(m,l.cssText)}},removeAllAttribs:function(j){return this.run(j,function(m){var l,k=m.attributes;for(l=k.length-1;l>=0;l--){m.removeAttributeNode(k.item(l))}})},setAttrib:function(l,m,j){var k=this;if(!l||!m){return}if(k.settings.strict){m=m.toLowerCase()}return this.run(l,function(q){var p=k.settings;var n=q.getAttribute(m);if(j!==null){switch(m){case"style":if(!e(j,"string")){f(j,function(r,s){k.setStyle(q,s,r)});return}if(p.keep_values){if(j&&!k._isRes(j)){q.setAttribute("data-mce-style",j,2)}else{q.removeAttribute("data-mce-style",2)}}q.style.cssText=j;break;case"class":q.className=j||"";break;case"src":case"href":if(p.keep_values){if(p.url_converter){j=p.url_converter.call(p.url_converter_scope||k,j,m,q)}k.setAttrib(q,"data-mce-"+m,j,2)}break;case"shape":q.setAttribute("data-mce-style",j);break}}if(e(j)&&j!==null&&j.length!==0){q.setAttribute(m,""+j,2)}else{q.removeAttribute(m,2)}if(tinyMCE.activeEditor&&n!=j){var o=tinyMCE.activeEditor;o.onSetAttrib.dispatch(o,q,m,j)}})},setAttribs:function(k,l){var j=this;return this.run(k,function(m){f(l,function(o,p){j.setAttrib(m,p,o)})})},getAttrib:function(o,p,l){var j,k=this,m;o=k.get(o);if(!o||o.nodeType!==1){return l===m?false:l}if(!e(l)){l=""}if(/^(src|href|style|coords|shape)$/.test(p)){j=o.getAttribute("data-mce-"+p);if(j){return j}}if(b&&k.props[p]){j=o[k.props[p]];j=j&&j.nodeValue?j.nodeValue:j}if(!j){j=o.getAttribute(p,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(p)){if(o[k.props[p]]===true&&j===""){return p}return j?p:""}if(o.nodeName==="FORM"&&o.getAttributeNode(p)){return o.getAttributeNode(p).nodeValue}if(p==="style"){j=j||o.style.cssText;if(j){j=k.serializeStyle(k.parseStyle(j),o.nodeName);if(k.settings.keep_values&&!k._isRes(j)){o.setAttribute("data-mce-style",j)}}}if(d&&p==="class"&&j){j=j.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(b){switch(p){case"rowspan":case"colspan":if(j===1){j=""}break;case"size":if(j==="+0"||j===20||j===0){j=""}break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":if(j===0){j=""}break;case"hspace":if(j===-1){j=""}break;case"maxlength":case"tabindex":if(j===32768||j===2147483647||j==="32768"){j=""}break;case"multiple":case"compact":case"noshade":case"nowrap":if(j===65535){return p}return l;case"shape":j=j.toLowerCase();break;default:if(p.indexOf("on")===0&&j){j=h._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+j)}}}return(j!==m&&j!==null&&j!=="")?""+j:l},getPos:function(s,m){var k=this,j=0,q=0,o,p=k.doc,l;s=k.get(s);m=m||p.body;if(s){if(s.getBoundingClientRect){s=s.getBoundingClientRect();o=k.boxModel?p.documentElement:p.body;j=s.left+(p.documentElement.scrollLeft||p.body.scrollLeft)-o.clientTop;q=s.top+(p.documentElement.scrollTop||p.body.scrollTop)-o.clientLeft;return{x:j,y:q}}l=s;while(l&&l!=m&&l.nodeType){j+=l.offsetLeft||0;q+=l.offsetTop||0;l=l.offsetParent}l=s.parentNode;while(l&&l!=m&&l.nodeType){j-=l.scrollLeft||0;q-=l.scrollTop||0;l=l.parentNode}}return{x:j,y:q}},parseStyle:function(j){return this.styles.parse(j)},serializeStyle:function(k,j){return this.styles.serialize(k,j)},loadCSS:function(j){var l=this,m=l.doc,k;if(!j){j=""}k=l.select("head")[0];f(j.split(","),function(n){var o;if(l.files[n]){return}l.files[n]=true;o=l.create("link",{rel:"stylesheet",href:h._addVer(n)});if(b&&m.documentMode&&m.recalc){o.onload=function(){if(m.recalc){m.recalc()}o.onload=null}}k.appendChild(o)})},addClass:function(j,k){return this.run(j,function(l){var m;if(!k){return 0}if(this.hasClass(l,k)){return l.className}m=this.removeClass(l,k);return l.className=(m!=""?(m+" "):"")+k})},removeClass:function(l,m){var j=this,k;return j.run(l,function(o){var n;if(j.hasClass(o,m)){if(!k){k=new RegExp("(^|\\s+)"+m+"(\\s+|$)","g")}n=o.className.replace(k," ");n=h.trim(n!=" "?n:"");o.className=n;if(!n){o.removeAttribute("class");o.removeAttribute("className")}return n}return o.className})},hasClass:function(k,j){k=this.get(k);if(!k||!j){return false}return(" "+k.className+" ").indexOf(" "+j+" ")!==-1},show:function(j){return this.setStyle(j,"display","block")},hide:function(j){return this.setStyle(j,"display","none")},isHidden:function(j){j=this.get(j);return !j||j.style.display=="none"||this.getStyle(j,"display")=="none"},uniqueId:function(j){return(!j?"mce_":j)+(this.counter++)},setHTML:function(l,k){var j=this;return j.run(l,function(n){if(b){while(n.firstChild){n.removeChild(n.firstChild)}try{n.innerHTML="
      "+k;n.removeChild(n.firstChild)}catch(m){n=j.create("div");n.innerHTML="
      "+k;f(n.childNodes,function(p,o){if(o){n.appendChild(p)}})}}else{n.innerHTML=k}return k})},getOuterHTML:function(l){var k,j=this;l=j.get(l);if(!l){return null}if(l.nodeType===1&&j.hasOuterHTML){return l.outerHTML}k=(l.ownerDocument||j.doc).createElement("body");k.appendChild(l.cloneNode(true));return k.innerHTML},setOuterHTML:function(m,k,n){var j=this;function l(p,o,r){var s,q;q=r.createElement("body");q.innerHTML=o;s=q.lastChild;while(s){j.insertAfter(s.cloneNode(true),p);s=s.previousSibling}j.remove(p)}return this.run(m,function(p){p=j.get(p);if(p.nodeType==1){n=n||p.ownerDocument||j.doc;if(b){try{if(b&&p.nodeType==1){p.outerHTML=k}else{l(p,k,n)}}catch(o){l(p,k,n)}}else{l(p,k,n)}}})},decode:c.decode,encode:c.encodeAllRaw,insertAfter:function(j,k){k=this.get(k);return this.run(j,function(m){var l,n;l=k.parentNode;n=k.nextSibling;if(n){l.insertBefore(m,n)}else{l.appendChild(m)}return m})},isBlock:function(k){var j=k.nodeType;if(j){return !!(j===1&&g[k.nodeName])}return !!g[k]},replace:function(p,m,j){var l=this;if(e(m,"array")){p=p.cloneNode(true)}return l.run(m,function(k){if(j){f(h.grep(k.childNodes),function(n){p.appendChild(n)})}return k.parentNode.replaceChild(p,k)})},rename:function(m,j){var l=this,k;if(m.nodeName!=j.toUpperCase()){k=l.create(j);f(l.getAttribs(m),function(n){l.setAttrib(k,n.nodeName,l.getAttrib(m,n.nodeName))});l.replace(k,m,1)}return k||m},findCommonAncestor:function(l,j){var m=l,k;while(m){k=j;while(k&&m!=k){k=k.parentNode}if(m==k){break}m=m.parentNode}if(!m&&l.ownerDocument){return l.ownerDocument.documentElement}return m},toHex:function(j){var l=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(j);function k(m){m=parseInt(m).toString(16);return m.length>1?m:"0"+m}if(l){j="#"+k(l[1])+k(l[2])+k(l[3]);return j}return j},getClasses:function(){var n=this,j=[],m,o={},p=n.settings.class_filter,l;if(n.classes){return n.classes}function q(r){f(r.imports,function(s){q(s)});f(r.cssRules||r.rules,function(s){switch(s.type||1){case 1:if(s.selectorText){f(s.selectorText.split(","),function(t){t=t.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(t)||!/\.[\w\-]+$/.test(t)){return}l=t;t=h._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",t);if(p&&!(t=p(t,l))){return}if(!o[t]){j.push({"class":t});o[t]=1}})}break;case 3:q(s.styleSheet);break}})}try{f(n.doc.styleSheets,q)}catch(k){}if(j.length>0){n.classes=j}return j},run:function(m,l,k){var j=this,n;if(j.doc&&typeof(m)==="string"){m=j.get(m)}if(!m){return false}k=k||this;if(!m.nodeType&&(m.length||m.length===0)){n=[];f(m,function(p,o){if(p){if(typeof(p)=="string"){p=j.doc.getElementById(p)}n.push(l.call(k,p,o))}});return n}return l.call(k,m)},getAttribs:function(k){var j;k=this.get(k);if(!k){return[]}if(b){j=[];if(k.nodeName=="OBJECT"){return k.attributes}if(k.nodeName==="OPTION"&&this.getAttrib(k,"selected")){j.push({specified:1,nodeName:"selected"})}k.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(l){j.push({specified:1,nodeName:l})});return j}return k.attributes},isEmpty:function(m,k){var r=this,o,n,q,j,l,p;m=m.firstChild;if(m){j=new h.dom.TreeWalker(m);k=k||r.schema?r.schema.getNonEmptyElements():null;do{q=m.nodeType;if(q===1){if(m.getAttribute("data-mce-bogus")){continue}l=m.nodeName.toLowerCase();if(k&&k[l]){p=m.parentNode;if(l==="br"&&r.isBlock(p)&&p.firstChild===m&&p.lastChild===m){continue}return false}n=r.getAttribs(m);o=m.attributes.length;while(o--){l=m.attributes[o].nodeName;if(l==="name"||l==="data-mce-bookmark"){return false}}}if(q==8){return false}if((q===3&&!i.test(m.nodeValue))){return false}}while(m=j.next())}return true},destroy:function(k){var j=this;if(j.events){j.events.destroy()}j.win=j.doc=j.root=j.events=null;if(!k){h.removeUnload(j.destroy)}},createRng:function(){var j=this.doc;return j.createRange?j.createRange():new h.dom.Range(this)},nodeIndex:function(n,o){var j=0,l,m,k;if(n){for(l=n.nodeType,n=n.previousSibling,m=n;n;n=n.previousSibling){k=n.nodeType;if(o&&k==3){if(k==l||!n.nodeValue.length){continue}}j++;l=k}}return j},split:function(n,m,q){var s=this,j=s.createRng(),o,l,p;function k(x){var u,t=x.childNodes,v=x.nodeType;function y(B){var A=B.previousSibling&&B.previousSibling.nodeName=="SPAN";var z=B.nextSibling&&B.nextSibling.nodeName=="SPAN";return A&&z}if(v==1&&x.getAttribute("data-mce-type")=="bookmark"){return}for(u=t.length-1;u>=0;u--){k(t[u])}if(v!=9){if(v==3&&x.nodeValue.length>0){var r=h.trim(x.nodeValue).length;if(!s.isBlock(x.parentNode)||r>0||r==0&&y(x)){return}}else{if(v==1){t=x.childNodes;if(t.length==1&&t[0]&&t[0].nodeType==1&&t[0].getAttribute("data-mce-type")=="bookmark"){x.parentNode.insertBefore(t[0],x)}if(t.length||/^(br|hr|input|img)$/i.test(x.nodeName)){return}}}s.remove(x)}return x}if(n&&m){j.setStart(n.parentNode,s.nodeIndex(n));j.setEnd(m.parentNode,s.nodeIndex(m));o=j.extractContents();j=s.createRng();j.setStart(m.parentNode,s.nodeIndex(m)+1);j.setEnd(n.parentNode,s.nodeIndex(n)+1);l=j.extractContents();p=n.parentNode;p.insertBefore(k(o),n);if(q){p.replaceChild(q,m)}else{p.insertBefore(m,n)}p.insertBefore(k(l),n);s.remove(n);return q||m}},bind:function(n,j,m,l){var k=this;if(!k.events){k.events=new h.dom.EventUtils()}return k.events.add(n,j,m,l||this)},unbind:function(m,j,l){var k=this;if(!k.events){k.events=new h.dom.EventUtils()}return k.events.remove(m,j,l)},_findSib:function(m,j,k){var l=this,n=j;if(m){if(e(n,"string")){n=function(o){return l.is(o,j)}}for(m=m[k];m;m=m[k]){if(n(m)){return m}}}return null},_isRes:function(j){return/^(top|left|bottom|right|width|height)/i.test(j)||/;\s*(top|left|bottom|right|width|height)/i.test(j)}});h.DOM=new h.dom.DOMUtils(document,{process_html:0})})(tinymce);(function(a){function b(c){var N=this,e=c.doc,S=0,E=1,j=2,D=true,R=false,U="startOffset",h="startContainer",P="endContainer",z="endOffset",k=tinymce.extend,n=c.nodeIndex;k(N,{startContainer:e,startOffset:0,endContainer:e,endOffset:0,collapsed:D,commonAncestorContainer:e,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:q,setEnd:s,setStartBefore:g,setStartAfter:I,setEndBefore:J,setEndAfter:u,collapse:A,selectNode:x,selectNodeContents:F,compareBoundaryPoints:v,deleteContents:p,extractContents:H,cloneContents:d,insertNode:C,surroundContents:M,cloneRange:K});function q(V,t){B(D,V,t)}function s(V,t){B(R,V,t)}function g(t){q(t.parentNode,n(t))}function I(t){q(t.parentNode,n(t)+1)}function J(t){s(t.parentNode,n(t))}function u(t){s(t.parentNode,n(t)+1)}function A(t){if(t){N[P]=N[h];N[z]=N[U]}else{N[h]=N[P];N[U]=N[z]}N.collapsed=D}function x(t){g(t);u(t)}function F(t){q(t,0);s(t,t.nodeType===1?t.childNodes.length:t.nodeValue.length)}function v(Y,t){var ab=N[h],W=N[U],aa=N[P],V=N[z],Z=t.startContainer,ad=t.startOffset,X=t.endContainer,ac=t.endOffset;if(Y===0){return G(ab,W,Z,ad)}if(Y===1){return G(aa,V,Z,ad)}if(Y===2){return G(aa,V,X,ac)}if(Y===3){return G(ab,W,X,ac)}}function p(){m(j)}function H(){return m(S)}function d(){return m(E)}function C(Y){var V=this[h],t=this[U],X,W;if((V.nodeType===3||V.nodeType===4)&&V.nodeValue){if(!t){V.parentNode.insertBefore(Y,V)}else{if(t>=V.nodeValue.length){c.insertAfter(Y,V)}else{X=V.splitText(t);V.parentNode.insertBefore(Y,X)}}}else{if(V.childNodes.length>0){W=V.childNodes[t]}if(W){V.insertBefore(Y,W)}else{V.appendChild(Y)}}}function M(V){var t=N.extractContents();N.insertNode(V);V.appendChild(t);N.selectNode(V)}function K(){return k(new b(c),{startContainer:N[h],startOffset:N[U],endContainer:N[P],endOffset:N[z],collapsed:N.collapsed,commonAncestorContainer:N.commonAncestorContainer})}function O(t,V){var W;if(t.nodeType==3){return t}if(V<0){return t}W=t.firstChild;while(W&&V>0){--V;W=W.nextSibling}if(W){return W}return t}function l(){return(N[h]==N[P]&&N[U]==N[z])}function G(X,Z,V,Y){var aa,W,t,ab,ad,ac;if(X==V){if(Z==Y){return 0}if(Z0){N.collapse(V)}}else{N.collapse(V)}N.collapsed=l();N.commonAncestorContainer=c.findCommonAncestor(N[h],N[P])}function m(ab){var aa,X=0,ad=0,V,Z,W,Y,t,ac;if(N[h]==N[P]){return f(ab)}for(aa=N[P],V=aa.parentNode;V;aa=V,V=V.parentNode){if(V==N[h]){return r(aa,ab)}++X}for(aa=N[h],V=aa.parentNode;V;aa=V,V=V.parentNode){if(V==N[P]){return T(aa,ab)}++ad}Z=ad-X;W=N[h];while(Z>0){W=W.parentNode;Z--}Y=N[P];while(Z<0){Y=Y.parentNode;Z++}for(t=W.parentNode,ac=Y.parentNode;t!=ac;t=t.parentNode,ac=ac.parentNode){W=t;Y=ac}return o(W,Y,ab)}function f(Z){var ab,Y,X,aa,t,W,V;if(Z!=j){ab=e.createDocumentFragment()}if(N[U]==N[z]){return ab}if(N[h].nodeType==3){Y=N[h].nodeValue;X=Y.substring(N[U],N[z]);if(Z!=E){N[h].deleteData(N[U],N[z]-N[U]);N.collapse(D)}if(Z==j){return}ab.appendChild(e.createTextNode(X));return ab}aa=O(N[h],N[U]);t=N[z]-N[U];while(t>0){W=aa.nextSibling;V=y(aa,Z);if(ab){ab.appendChild(V)}--t;aa=W}if(Z!=E){N.collapse(D)}return ab}function r(ab,Y){var aa,Z,V,t,X,W;if(Y!=j){aa=e.createDocumentFragment()}Z=i(ab,Y);if(aa){aa.appendChild(Z)}V=n(ab);t=V-N[U];if(t<=0){if(Y!=E){N.setEndBefore(ab);N.collapse(R)}return aa}Z=ab.previousSibling;while(t>0){X=Z.previousSibling;W=y(Z,Y);if(aa){aa.insertBefore(W,aa.firstChild)}--t;Z=X}if(Y!=E){N.setEndBefore(ab);N.collapse(R)}return aa}function T(Z,Y){var ab,V,aa,t,X,W;if(Y!=j){ab=e.createDocumentFragment()}aa=Q(Z,Y);if(ab){ab.appendChild(aa)}V=n(Z);++V;t=N[z]-V;aa=Z.nextSibling;while(t>0){X=aa.nextSibling;W=y(aa,Y);if(ab){ab.appendChild(W)}--t;aa=X}if(Y!=E){N.setStartAfter(Z);N.collapse(D)}return ab}function o(Z,t,ac){var W,ae,Y,aa,ab,V,ad,X;if(ac!=j){ae=e.createDocumentFragment()}W=Q(Z,ac);if(ae){ae.appendChild(W)}Y=Z.parentNode;aa=n(Z);ab=n(t);++aa;V=ab-aa;ad=Z.nextSibling;while(V>0){X=ad.nextSibling;W=y(ad,ac);if(ae){ae.appendChild(W)}ad=X;--V}W=i(t,ac);if(ae){ae.appendChild(W)}if(ac!=E){N.setStartAfter(Z);N.collapse(D)}return ae}function i(aa,ab){var W=O(N[P],N[z]-1),ac,Z,Y,t,V,X=W!=N[P];if(W==aa){return L(W,X,R,ab)}ac=W.parentNode;Z=L(ac,R,R,ab);while(ac){while(W){Y=W.previousSibling;t=L(W,X,R,ab);if(ab!=j){Z.insertBefore(t,Z.firstChild)}X=D;W=Y}if(ac==aa){return Z}W=ac.previousSibling;ac=ac.parentNode;V=L(ac,R,R,ab);if(ab!=j){V.appendChild(Z)}Z=V}}function Q(aa,ab){var X=O(N[h],N[U]),Y=X!=N[h],ac,Z,W,t,V;if(X==aa){return L(X,Y,D,ab)}ac=X.parentNode;Z=L(ac,R,D,ab);while(ac){while(X){W=X.nextSibling;t=L(X,Y,D,ab);if(ab!=j){Z.appendChild(t)}Y=D;X=W}if(ac==aa){return Z}X=ac.nextSibling;ac=ac.parentNode;V=L(ac,R,D,ab);if(ab!=j){V.appendChild(Z)}Z=V}}function L(t,Y,ab,ac){var X,W,Z,V,aa;if(Y){return y(t,ac)}if(t.nodeType==3){X=t.nodeValue;if(ab){V=N[U];W=X.substring(V);Z=X.substring(0,V)}else{V=N[z];W=X.substring(0,V);Z=X.substring(V)}if(ac!=E){t.nodeValue=Z}if(ac==j){return}aa=t.cloneNode(R);aa.nodeValue=W;return aa}if(ac==j){return}return t.cloneNode(R)}function y(V,t){if(t!=j){return t==E?V.cloneNode(D):V}V.parentNode.removeChild(V)}}a.Range=b})(tinymce.dom);(function(){function a(d){var b=this,h=d.dom,c=true,f=false;function e(i,j){var k,t=0,q,n,m,l,o,r,p=-1,s;k=i.duplicate();k.collapse(j);s=k.parentElement();if(s.ownerDocument!==d.dom.doc){return}while(s.contentEditable==="false"){s=s.parentNode}if(!s.hasChildNodes()){return{node:s,inside:1}}m=s.children;q=m.length-1;while(t<=q){r=Math.floor((t+q)/2);l=m[r];k.moveToElementText(l);p=k.compareEndPoints(j?"StartToStart":"EndToEnd",i);if(p>0){q=r-1}else{if(p<0){t=r+1}else{return{node:l}}}}if(p<0){if(!l){k.moveToElementText(s);k.collapse(true);l=s;n=true}else{k.collapse(false)}k.setEndPoint(j?"EndToStart":"EndToEnd",i);if(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)>0){k=i.duplicate();k.collapse(j);o=-1;while(s==k.parentElement()){if(k.move("character",-1)==0){break}o++}}o=o||k.text.replace("\r\n"," ").length}else{k.collapse(true);k.setEndPoint(j?"StartToStart":"StartToEnd",i);o=k.text.replace("\r\n"," ").length}return{node:l,position:p,offset:o,inside:n}}function g(){var i=d.getRng(),r=h.createRng(),l,k,p,q,m,j;l=i.item?i.item(0):i.parentElement();if(l.ownerDocument!=h.doc){return r}k=d.isCollapsed();if(i.item){r.setStart(l.parentNode,h.nodeIndex(l));r.setEnd(r.startContainer,r.startOffset+1);return r}function o(A){var u=e(i,A),s,y,z=0,x,v,t;s=u.node;y=u.offset;if(u.inside&&!s.hasChildNodes()){r[A?"setStart":"setEnd"](s,0);return}if(y===v){r[A?"setStartBefore":"setEndAfter"](s);return}if(u.position<0){x=u.inside?s.firstChild:s.nextSibling;if(!x){r[A?"setStartAfter":"setEndAfter"](s);return}if(!y){if(x.nodeType==3){r[A?"setStart":"setEnd"](x,0)}else{r[A?"setStartBefore":"setEndBefore"](x)}return}while(x){t=x.nodeValue;z+=t.length;if(z>=y){s=x;z-=y;z=t.length-z;break}x=x.nextSibling}}else{x=s.previousSibling;if(!x){return r[A?"setStartBefore":"setEndBefore"](s)}if(!y){if(s.nodeType==3){r[A?"setStart":"setEnd"](x,s.nodeValue.length)}else{r[A?"setStartAfter":"setEndAfter"](x)}return}while(x){z+=x.nodeValue.length;if(z>=y){s=x;z-=y;break}x=x.previousSibling}}r[A?"setStart":"setEnd"](s,z)}try{o(true);if(!k){o()}}catch(n){if(n.number==-2147024809){m=b.getBookmark(2);p=i.duplicate();p.collapse(true);l=p.parentElement();if(!k){p=i.duplicate();p.collapse(false);q=p.parentElement();q.innerHTML=q.innerHTML}l.innerHTML=l.innerHTML;b.moveToBookmark(m);i=d.getRng();o(true);if(!k){o()}}else{throw n}}return r}this.getBookmark=function(m){var j=d.getRng(),o,i,l={};function n(u){var u,t,p,s,r,q=[];t=u.parentNode;p=h.getRoot().parentNode;while(t!=p&&t.nodeType!==9){s=t.children;r=s.length;while(r--){if(u===s[r]){q.push(r);break}}u=t;t=t.parentNode}return q}function k(q){var p;p=e(j,q);if(p){return{position:p.position,offset:p.offset,indexes:n(p.node),inside:p.inside}}}if(m===2){if(!j.item){l.start=k(true);if(!d.isCollapsed()){l.end=k()}}else{l.start={ctrl:true,indexes:n(j.item(0))}}}return l};this.moveToBookmark=function(k){var j,i=h.doc.body;function m(o){var r,q,n,p;r=h.getRoot();for(q=o.length-1;q>=0;q--){p=r.children;n=o[q];if(n<=p.length-1){r=p[n]}}return r}function l(r){var n=k[r?"start":"end"],q,p,o;if(n){q=n.position>0;p=i.createTextRange();p.moveToElementText(m(n.indexes));offset=n.offset;if(offset!==o){p.collapse(n.inside||q);p.moveStart("character",q?-offset:offset)}else{p.collapse(r)}j.setEndPoint(r?"StartToStart":"EndToStart",p);if(r){j.collapse(true)}}}if(k.start){if(k.start.ctrl){j=i.createControlRange();j.addElement(m(k.start.indexes));j.select()}else{j=i.createTextRange();l(true);l();j.select()}}};this.addRange=function(i){var n,l,k,p,s,q,r=d.dom.doc,m=r.body;function j(z){var u,y,t,x,v;t=h.create("a");u=z?k:s;y=z?p:q;x=n.duplicate();if(u==r||u==r.documentElement){u=m;y=0}if(u.nodeType==3){u.parentNode.insertBefore(t,u);x.moveToElementText(t);x.moveStart("character",y);h.remove(t);n.setEndPoint(z?"StartToStart":"EndToEnd",x)}else{v=u.childNodes;if(v.length){if(y>=v.length){h.insertAfter(t,v[v.length-1])}else{u.insertBefore(t,v[y])}x.moveToElementText(t)}else{t=r.createTextNode("\uFEFF");u.appendChild(t);x.moveToElementText(t.parentNode);x.collapse(c)}n.setEndPoint(z?"StartToStart":"EndToEnd",x);h.remove(t)}}k=i.startContainer;p=i.startOffset;s=i.endContainer;q=i.endOffset;n=m.createTextRange();if(k==s&&k.nodeType==1&&p==q-1){if(p==q-1){try{l=m.createControlRange();l.addElement(k.childNodes[p]);l.select();return}catch(o){}}}j(true);j();n.select()};this.getRangeAt=g}tinymce.dom.TridentSelection=a})();(function(){var p=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,j=0,d=Object.prototype.toString,o=false,i=true;[0,0].sort(function(){i=false;return 0});var b=function(v,e,z,A){z=z||[];e=e||document;var C=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!v||typeof v!=="string"){return z}var x=[],s,E,H,r,u=true,t=b.isXML(e),B=v,D,G,F,y;do{p.exec("");s=p.exec(B);if(s){B=s[3];x.push(s[1]);if(s[2]){r=s[3];break}}}while(s);if(x.length>1&&k.exec(v)){if(x.length===2&&f.relative[x[0]]){E=h(x[0]+x[1],e)}else{E=f.relative[x[0]]?[e]:b(x.shift(),e);while(x.length){v=x.shift();if(f.relative[v]){v+=x.shift()}E=h(v,E)}}}else{if(!A&&x.length>1&&e.nodeType===9&&!t&&f.match.ID.test(x[0])&&!f.match.ID.test(x[x.length-1])){D=b.find(x.shift(),e,t);e=D.expr?b.filter(D.expr,D.set)[0]:D.set[0]}if(e){D=A?{expr:x.pop(),set:a(A)}:b.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&e.parentNode?e.parentNode:e,t);E=D.expr?b.filter(D.expr,D.set):D.set;if(x.length>0){H=a(E)}else{u=false}while(x.length){G=x.pop();F=G;if(!f.relative[G]){G=""}else{F=x.pop()}if(F==null){F=e}f.relative[G](H,F,t)}}else{H=x=[]}}if(!H){H=E}if(!H){b.error(G||v)}if(d.call(H)==="[object Array]"){if(!u){z.push.apply(z,H)}else{if(e&&e.nodeType===1){for(y=0;H[y]!=null;y++){if(H[y]&&(H[y]===true||H[y].nodeType===1&&b.contains(e,H[y]))){z.push(E[y])}}}else{for(y=0;H[y]!=null;y++){if(H[y]&&H[y].nodeType===1){z.push(E[y])}}}}}else{a(H,z)}if(r){b(r,C,z,A);b.uniqueSort(z)}return z};b.uniqueSort=function(r){if(c){o=i;r.sort(c);if(o){for(var e=1;e":function(x,r){var u=typeof r==="string",v,s=0,e=x.length;if(u&&!/\W/.test(r)){r=r.toLowerCase();for(;s=0)){if(!s){e.push(v)}}else{if(s){r[u]=false}}}}return false},ID:function(e){return e[1].replace(/\\/g,"")},TAG:function(r,e){return r[1].toLowerCase()},CHILD:function(e){if(e[1]==="nth"){var r=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(r[1]+(r[2]||1))-0;e[3]=r[3]-0}e[0]=j++;return e},ATTR:function(u,r,s,e,v,x){var t=u[1].replace(/\\/g,"");if(!x&&f.attrMap[t]){u[1]=f.attrMap[t]}if(u[2]==="~="){u[4]=" "+u[4]+" "}return u},PSEUDO:function(u,r,s,e,v){if(u[1]==="not"){if((p.exec(u[3])||"").length>1||/^\w/.test(u[3])){u[3]=b(u[3],null,null,r)}else{var t=b.filter(u[3],r,s,true^v);if(!s){e.push.apply(e,t)}return false}}else{if(f.match.POS.test(u[0])||f.match.CHILD.test(u[0])){return true}}return u},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){e.parentNode.selectedIndex;return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(s,r,e){return !!b(e[3],s).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(e){return"text"===e.type},radio:function(e){return"radio"===e.type},checkbox:function(e){return"checkbox"===e.type},file:function(e){return"file"===e.type},password:function(e){return"password"===e.type},submit:function(e){return"submit"===e.type},image:function(e){return"image"===e.type},reset:function(e){return"reset"===e.type},button:function(e){return"button"===e.type||e.nodeName.toLowerCase()==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)}},setFilters:{first:function(r,e){return e===0},last:function(s,r,e,t){return r===t.length-1},even:function(r,e){return e%2===0},odd:function(r,e){return e%2===1},lt:function(s,r,e){return re[3]-0},nth:function(s,r,e){return e[3]-0===r},eq:function(s,r,e){return e[3]-0===r}},filter:{PSEUDO:function(s,y,x,z){var e=y[1],r=f.filters[e];if(r){return r(s,x,y,z)}else{if(e==="contains"){return(s.textContent||s.innerText||b.getText([s])||"").indexOf(y[3])>=0}else{if(e==="not"){var t=y[3];for(var v=0,u=t.length;v=0)}}},ID:function(r,e){return r.nodeType===1&&r.getAttribute("id")===e},TAG:function(r,e){return(e==="*"&&r.nodeType===1)||r.nodeName.toLowerCase()===e},CLASS:function(r,e){return(" "+(r.className||r.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(v,t){var s=t[1],e=f.attrHandle[s]?f.attrHandle[s](v):v[s]!=null?v[s]:v.getAttribute(s),x=e+"",u=t[2],r=t[4];return e==null?u==="!=":u==="="?x===r:u==="*="?x.indexOf(r)>=0:u==="~="?(" "+x+" ").indexOf(r)>=0:!r?x&&e!==false:u==="!="?x!==r:u==="^="?x.indexOf(r)===0:u==="$="?x.substr(x.length-r.length)===r:u==="|="?x===r||x.substr(0,r.length+1)===r+"-":false},POS:function(u,r,s,v){var e=r[2],t=f.setFilters[e];if(t){return t(u,s,r,v)}}}};var k=f.match.POS,g=function(r,e){return"\\"+(e-0+1)};for(var m in f.match){f.match[m]=new RegExp(f.match[m].source+(/(?![^\[]*\])(?![^\(]*\))/.source));f.leftMatch[m]=new RegExp(/(^(?:.|\r|\n)*?)/.source+f.match[m].source.replace(/\\(\d+)/g,g))}var a=function(r,e){r=Array.prototype.slice.call(r,0);if(e){e.push.apply(e,r);return e}return r};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType}catch(l){a=function(u,t){var r=t||[],s=0;if(d.call(u)==="[object Array]"){Array.prototype.push.apply(r,u)}else{if(typeof u.length==="number"){for(var e=u.length;s";var e=document.documentElement;e.insertBefore(r,e.firstChild);if(document.getElementById(s)){f.find.ID=function(u,v,x){if(typeof v.getElementById!=="undefined"&&!x){var t=v.getElementById(u[1]);return t?t.id===u[1]||typeof t.getAttributeNode!=="undefined"&&t.getAttributeNode("id").nodeValue===u[1]?[t]:undefined:[]}};f.filter.ID=function(v,t){var u=typeof v.getAttributeNode!=="undefined"&&v.getAttributeNode("id");return v.nodeType===1&&u&&u.nodeValue===t}}e.removeChild(r);e=r=null})();(function(){var e=document.createElement("div");e.appendChild(document.createComment(""));if(e.getElementsByTagName("*").length>0){f.find.TAG=function(r,v){var u=v.getElementsByTagName(r[1]);if(r[1]==="*"){var t=[];for(var s=0;u[s];s++){if(u[s].nodeType===1){t.push(u[s])}}u=t}return u}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){f.attrHandle.href=function(r){return r.getAttribute("href",2)}}e=null})();if(document.querySelectorAll){(function(){var e=b,s=document.createElement("div");s.innerHTML="

      ";if(s.querySelectorAll&&s.querySelectorAll(".TEST").length===0){return}b=function(x,v,t,u){v=v||document;if(!u&&v.nodeType===9&&!b.isXML(v)){try{return a(v.querySelectorAll(x),t)}catch(y){}}return e(x,v,t,u)};for(var r in e){b[r]=e[r]}s=null})()}(function(){var e=document.createElement("div");e.innerHTML="
      ";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}f.order.splice(1,0,"CLASS");f.find.CLASS=function(r,s,t){if(typeof s.getElementsByClassName!=="undefined"&&!t){return s.getElementsByClassName(r[1])}};e=null})();function n(r,x,v,A,y,z){for(var t=0,s=A.length;t0){u=e;break}}}e=e[r]}A[t]=u}}}b.contains=document.compareDocumentPosition?function(r,e){return !!(r.compareDocumentPosition(e)&16)}:function(r,e){return r!==e&&(r.contains?r.contains(e):true)};b.isXML=function(e){var r=(e?e.ownerDocument||e:0).documentElement;return r?r.nodeName!=="HTML":false};var h=function(e,y){var t=[],u="",v,s=y.nodeType?[y]:y;while((v=f.match.PSEUDO.exec(e))){u+=v[0];e=e.replace(f.match.PSEUDO,"")}e=f.relative[e]?e+"*":e;for(var x=0,r=s.length;x=0;h--){k=g[h];if(k.obj===l){j._remove(k.obj,k.name,k.cfunc);k.obj=k.cfunc=null;g.splice(h,1)}}}},cancel:function(g){if(!g){return false}this.stop(g);return this.prevent(g)},stop:function(g){if(g.stopPropagation){g.stopPropagation()}else{g.cancelBubble=true}return false},prevent:function(g){if(g.preventDefault){g.preventDefault()}else{g.returnValue=false}return false},destroy:function(){var g=this;f(g.events,function(j,h){g._remove(j.obj,j.name,j.cfunc);j.obj=j.cfunc=null});g.events=[];g=null},_add:function(h,i,g){if(h.attachEvent){h.attachEvent("on"+i,g)}else{if(h.addEventListener){h.addEventListener(i,g,false)}else{h["on"+i]=g}}},_remove:function(i,j,h){if(i){try{if(i.detachEvent){i.detachEvent("on"+j,h)}else{if(i.removeEventListener){i.removeEventListener(j,h,false)}else{i["on"+j]=null}}}catch(g){}}},_pageInit:function(h){var g=this;if(g.domLoaded){return}g.domLoaded=true;f(g.inits,function(i){i()});g.inits=[]},_wait:function(i){var g=this,h=i.document;if(i.tinyMCE_GZ&&tinyMCE_GZ.loaded){g.domLoaded=1;return}if(h.readyState==="complete"){g._pageInit(i);return}if(h.attachEvent){h.attachEvent("onreadystatechange",function(){if(h.readyState==="complete"){h.detachEvent("onreadystatechange",arguments.callee);g._pageInit(i)}});if(h.documentElement.doScroll&&i==i.top){(function(){if(g.domLoaded){return}try{h.documentElement.doScroll("left")}catch(j){setTimeout(arguments.callee,0);return}g._pageInit(i)})()}}else{if(h.addEventListener){g._add(i,"DOMContentLoaded",function(){g._pageInit(i)})}}g._add(i,"load",function(){g._pageInit(i)})},_stoppers:{preventDefault:function(){this.returnValue=false},stopPropagation:function(){this.cancelBubble=true}}});a=d.dom.Event=new d.dom.EventUtils();a._wait(window);d.addUnload(function(){a.destroy()})})(tinymce);(function(a){a.dom.Element=function(f,d){var b=this,e,c;b.settings=d=d||{};b.id=f;b.dom=e=d.dom||a.DOM;if(!a.isIE){c=e.get(b.id)}a.each(("getPos,getRect,getParent,add,setStyle,getStyle,setStyles,setAttrib,setAttribs,getAttrib,addClass,removeClass,hasClass,getOuterHTML,setOuterHTML,remove,show,hide,isHidden,setHTML,get").split(/,/),function(g){b[g]=function(){var h=[f],j;for(j=0;j"+(h.item?h.item(0).outerHTML:h.htmlText);l.removeChild(l.firstChild)}else{l.innerHTML=h.toString()}}if(/^\s/.test(l.innerHTML)){i=" "}if(/\s+$/.test(l.innerHTML)){k=" "}g.getInner=true;g.content=f.isCollapsed()?"":i+f.serializer.serialize(l,g)+k;f.onGetContent.dispatch(f,g);return g.content},setContent:function(g,i){var n=this,f=n.getRng(),j,k=n.win.document,m,l;i=i||{format:"html"};i.set=true;g=i.content=g;if(!i.no_events){n.onBeforeSetContent.dispatch(n,i)}g=i.content;if(f.insertNode){g+='_';if(f.startContainer==k&&f.endContainer==k){k.body.innerHTML=g}else{f.deleteContents();if(k.body.childNodes.length==0){k.body.innerHTML=g}else{if(f.createContextualFragment){f.insertNode(f.createContextualFragment(g))}else{m=k.createDocumentFragment();l=k.createElement("div");m.appendChild(l);l.outerHTML=g;f.insertNode(m)}}}j=n.dom.get("__caret");f=k.createRange();f.setStartBefore(j);f.setEndBefore(j);n.setRng(f);n.dom.remove("__caret");try{n.setRng(f)}catch(h){}}else{if(f.item){k.execCommand("Delete",false,null);f=n.getRng()}if(/^\s+/.test(g)){f.pasteHTML('_'+g);n.dom.remove("__mce_tmp")}else{f.pasteHTML(g)}}if(!i.no_events){n.onSetContent.dispatch(n,i)}},getStart:function(){var g=this.getRng(),h,f,j,i;if(g.duplicate||g.item){if(g.item){return g.item(0)}j=g.duplicate();j.collapse(1);h=j.parentElement();f=i=g.parentElement();while(i=i.parentNode){if(i==h){h=f;break}}return h}else{h=g.startContainer;if(h.nodeType==1&&h.hasChildNodes()){h=h.childNodes[Math.min(h.childNodes.length-1,g.startOffset)]}if(h&&h.nodeType==3){return h.parentNode}return h}},getEnd:function(){var g=this,h=g.getRng(),i,f;if(h.duplicate||h.item){if(h.item){return h.item(0)}h=h.duplicate();h.collapse(0);i=h.parentElement();if(i&&i.nodeName=="BODY"){return i.lastChild||i}return i}else{i=h.endContainer;f=h.endOffset;if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[f>0?f-1:f]}if(i&&i.nodeType==3){return i.parentNode}return i}},getBookmark:function(r,s){var v=this,m=v.dom,g,j,i,n,h,o,p,l="\uFEFF",u;function f(x,y){var t=0;d(m.select(x),function(A,z){if(A==y){t=z}});return t}if(r==2){function k(){var x=v.getRng(true),t=m.getRoot(),y={};function z(C,H){var B=C[H?"startContainer":"endContainer"],G=C[H?"startOffset":"endOffset"],A=[],D,F,E=0;if(B.nodeType==3){if(s){for(D=B.previousSibling;D&&D.nodeType==3;D=D.previousSibling){G+=D.nodeValue.length}}A.push(G)}else{F=B.childNodes;if(G>=F.length&&F.length){E=1;G=Math.max(0,F.length-1)}A.push(v.dom.nodeIndex(F[G],s)+E)}for(;B&&B!=t;B=B.parentNode){A.push(v.dom.nodeIndex(B,s))}return A}y.start=z(x,true);if(!v.isCollapsed()){y.end=z(x)}return y}if(v.tridentSel){return v.tridentSel.getBookmark(r)}return k()}if(r){return{rng:v.getRng()}}g=v.getRng();i=m.uniqueId();n=tinyMCE.activeEditor.selection.isCollapsed();u="overflow:hidden;line-height:0px";if(g.duplicate||g.item){if(!g.item){j=g.duplicate();try{g.collapse();g.pasteHTML(''+l+"");if(!n){j.collapse(false);g.moveToElementText(j.parentElement());if(g.compareEndPoints("StartToEnd",j)==0){j.move("character",-1)}j.pasteHTML(''+l+"")}}catch(q){return null}}else{o=g.item(0);h=o.nodeName;return{name:h,index:f(h,o)}}}else{o=v.getNode();h=o.nodeName;if(h=="IMG"){return{name:h,index:f(h,o)}}j=g.cloneRange();if(!n){j.collapse(false);j.insertNode(m.create("span",{"data-mce-type":"bookmark",id:i+"_end",style:u},l))}g.collapse(true);g.insertNode(m.create("span",{"data-mce-type":"bookmark",id:i+"_start",style:u},l))}v.moveToBookmark({id:i,keep:1});return{id:i}},moveToBookmark:function(n){var r=this,l=r.dom,i,h,f,q,j,s,o,p;if(n){if(n.start){f=l.createRng();q=l.getRoot();function g(z){var t=n[z?"start":"end"],v,x,y,u;if(t){y=t[0];for(x=q,v=t.length-1;v>=1;v--){u=x.childNodes;if(t[v]>u.length-1){return}x=u[t[v]]}if(x.nodeType===3){y=Math.min(t[0],x.nodeValue.length)}if(x.nodeType===1){y=Math.min(t[0],x.childNodes.length)}if(z){f.setStart(x,y)}else{f.setEnd(x,y)}}return true}if(r.tridentSel){return r.tridentSel.moveToBookmark(n)}if(g(true)&&g()){r.setRng(f)}}else{if(n.id){function k(A){var u=l.get(n.id+"_"+A),z,t,x,y,v=n.keep;if(u){z=u.parentNode;if(A=="start"){if(!v){t=l.nodeIndex(u)}else{z=u.firstChild;t=1}j=s=z;o=p=t}else{if(!v){t=l.nodeIndex(u)}else{z=u.firstChild;t=1}s=z;p=t}if(!v){y=u.previousSibling;x=u.nextSibling;d(c.grep(u.childNodes),function(B){if(B.nodeType==3){B.nodeValue=B.nodeValue.replace(/\uFEFF/g,"")}});while(u=l.get(n.id+"_"+A)){l.remove(u,1)}if(y&&x&&y.nodeType==x.nodeType&&y.nodeType==3&&!c.isOpera){t=y.nodeValue.length;y.appendData(x.nodeValue);l.remove(x);if(A=="start"){j=s=y;o=p=t}else{s=y;p=t}}}}}function m(t){if(l.isBlock(t)&&!t.innerHTML){t.innerHTML=!a?'
      ':" "}return t}k("start");k("end");if(j){f=l.createRng();f.setStart(m(j),o);f.setEnd(m(s),p);r.setRng(f)}}else{if(n.name){r.select(l.select(n.name)[n.index])}else{if(n.rng){r.setRng(n.rng)}}}}}},select:function(k,j){var i=this,l=i.dom,g=l.createRng(),f;if(k){f=l.nodeIndex(k);g.setStart(k.parentNode,f);g.setEnd(k.parentNode,f+1);if(j){function h(m,o){var n=new c.dom.TreeWalker(m,m);do{if(m.nodeType==3&&c.trim(m.nodeValue).length!=0){if(o){g.setStart(m,0)}else{g.setEnd(m,m.nodeValue.length)}return}if(m.nodeName=="BR"){if(o){g.setStartBefore(m)}else{g.setEndBefore(m)}return}}while(m=(o?n.next():n.prev()))}h(k,1);h(k)}i.setRng(g)}return k},isCollapsed:function(){var f=this,h=f.getRng(),g=f.getSel();if(!h||h.item){return false}if(h.compareEndPoints){return h.compareEndPoints("StartToEnd",h)===0}return !g||h.collapsed},collapse:function(f){var h=this,g=h.getRng(),i;if(g.item){i=g.item(0);g=h.win.document.body.createTextRange();g.moveToElementText(i)}g.collapse(!!f);h.setRng(g)},getSel:function(){var g=this,f=this.win;return f.getSelection?f.getSelection():f.document.selection},getRng:function(l){var g=this,h,i,k,j=g.win.document;if(l&&g.tridentSel){return g.tridentSel.getRangeAt(0)}try{if(h=g.getSel()){i=h.rangeCount>0?h.getRangeAt(0):(h.createRange?h.createRange():j.createRange())}}catch(f){}if(c.isIE&&i&&i.setStart&&j.selection.createRange().item){k=j.selection.createRange().item(0);i=j.createRange();i.setStartBefore(k);i.setEndAfter(k)}if(!i){i=j.createRange?j.createRange():j.body.createTextRange()}if(g.selectedRange&&g.explicitRange){if(i.compareBoundaryPoints(i.START_TO_START,g.selectedRange)===0&&i.compareBoundaryPoints(i.END_TO_END,g.selectedRange)===0){i=g.explicitRange}else{g.selectedRange=null;g.explicitRange=null}}return i},setRng:function(i){var h,g=this;if(!g.tridentSel){h=g.getSel();if(h){g.explicitRange=i;try{h.removeAllRanges()}catch(f){}h.addRange(i);g.selectedRange=h.rangeCount>0?h.getRangeAt(0):null}}else{if(i.cloneRange){g.tridentSel.addRange(i);return}try{i.select()}catch(f){}}},setNode:function(g){var f=this;f.setContent(f.dom.getOuterHTML(g));return g},getNode:function(){var h=this,g=h.getRng(),i=h.getSel(),l,k=g.startContainer,f=g.endContainer;if(!g){return h.dom.getRoot()}if(g.setStart){l=g.commonAncestorContainer;if(!g.collapsed){if(g.startContainer==g.endContainer){if(g.endOffset-g.startOffset<2){if(g.startContainer.hasChildNodes()){l=g.startContainer.childNodes[g.startOffset]}}}if(k.nodeType===3&&f.nodeType===3){function j(p,m){var o=p;while(p&&p.nodeType===3&&p.length===0){p=m?p.nextSibling:p.previousSibling}return p||o}if(k.length===g.startOffset){k=j(k.nextSibling,true)}else{k=k.parentNode}if(g.endOffset===0){f=j(f.previousSibling,false)}else{f=f.parentNode}if(k&&k===f){return k}}}if(l&&l.nodeType==3){return l.parentNode}return l}return g.item?g.item(0):g.parentElement()},getSelectedBlocks:function(o,g){var m=this,j=m.dom,l,k,h,i=[];l=j.getParent(o||m.getStart(),j.isBlock);k=j.getParent(g||m.getEnd(),j.isBlock);if(l){i.push(l)}if(l&&k&&l!=k){h=l;var f=new c.dom.TreeWalker(l,j.getRoot());while((h=f.next())&&h!=k){if(j.isBlock(h)){i.push(h)}}}if(k&&l!=k){i.push(k)}return i},normalize:function(){var g=this,f,i;if(c.isIE){return}function h(p){var k,o,n,m=g.dom,j=m.getRoot(),l;k=f[(p?"start":"end")+"Container"];o=f[(p?"start":"end")+"Offset"];if(k.nodeType===9){k=k.body;o=0}if(k===j){if(k.hasChildNodes()){k=k.childNodes[Math.min(!p&&o>0?o-1:o,k.childNodes.length-1)];o=0;if(k.hasChildNodes()){l=k;n=new c.dom.TreeWalker(k,j);do{if(l.nodeType===3){o=p?0:l.nodeValue.length-1;k=l;i=true;break}if(/^(BR|IMG)$/.test(l.nodeName)){o=m.nodeIndex(l);k=l.parentNode;if(l.nodeName=="IMG"&&!p){o++}i=true;break}}while(l=(p?n.next():n.prev()))}}}if(i){f["set"+(p?"Start":"End")](k,o)}}f=g.getRng();h(true);if(!f.collapsed){h()}if(i){g.setRng(f)}},destroy:function(g){var f=this;f.win=null;if(!g){c.removeUnload(f.destroy)}},_fixIESelection:function(){var g=this.dom,m=g.doc,h=m.body,j,n,f;m.documentElement.unselectable=true;function i(o,r){var p=h.createTextRange();try{p.moveToPoint(o,r)}catch(q){p=null}return p}function l(p){var o;if(p.button){o=i(p.x,p.y);if(o){if(o.compareEndPoints("StartToStart",n)>0){o.setEndPoint("StartToStart",n)}else{o.setEndPoint("EndToEnd",n)}o.select()}}else{k()}}function k(){var o=m.selection.createRange();if(n&&!o.item&&o.compareEndPoints("StartToEnd",o)===0){n.select()}g.unbind(m,"mouseup",k);g.unbind(m,"mousemove",l);n=j=0}g.bind(m,["mousedown","contextmenu"],function(o){if(o.target.nodeName==="HTML"){if(j){k()}f=m.documentElement;if(f.scrollHeight>f.clientHeight){return}j=1;n=i(o.x,o.y);if(n){g.bind(m,"mouseup",k);g.bind(m,"mousemove",l);g.win.focus();n.select()}}})}})})(tinymce);(function(a){a.dom.Serializer=function(e,i,f){var h,b,d=a.isIE,g=a.each,c;if(!e.apply_source_formatting){e.indent=false}i=i||a.DOM;f=f||new a.html.Schema(e);e.entity_encoding=e.entity_encoding||"named";e.remove_trailing_brs="remove_trailing_brs" in e?e.remove_trailing_brs:true;h=new a.util.Dispatcher(self);b=new a.util.Dispatcher(self);c=new a.html.DomParser(e,f);c.addAttributeFilter("src,href,style",function(k,j){var o=k.length,l,q,n="data-mce-"+j,p=e.url_converter,r=e.url_converter_scope,m;while(o--){l=k[o];q=l.attributes.map[n];if(q!==m){l.attr(j,q.length>0?q:null);l.attr(n,null)}else{q=l.attributes.map[j];if(j==="style"){q=i.serializeStyle(i.parseStyle(q),l.name)}else{if(p){q=p.call(r,q,j,l.name)}}l.attr(j,q.length>0?q:null)}}});c.addAttributeFilter("class",function(j,k){var l=j.length,m,n;while(l--){m=j[l];n=m.attr("class").replace(/\s*mce(Item\w+|Selected)\s*/g,"");m.attr("class",n.length>0?n:null)}});c.addAttributeFilter("data-mce-type",function(j,l,k){var m=j.length,n;while(m--){n=j[m];if(n.attributes.map["data-mce-type"]==="bookmark"&&!k.cleanup){n.remove()}}});c.addNodeFilter("script,style",function(k,l){var m=k.length,n,o;function j(p){return p.replace(/()/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(()?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}while(m--){n=k[m];o=n.firstChild?n.firstChild.value:"";if(l==="script"){n.attr("type",(n.attr("type")||"text/javascript").replace(/^mce\-/,""));if(o.length>0){n.firstChild.value="// "}}else{if(o.length>0){n.firstChild.value=""}}}});c.addNodeFilter("#comment",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.value.indexOf("[CDATA[")===0){m.name="#cdata";m.type=4;m.value=m.value.replace(/^\[CDATA\[|\]\]$/g,"")}else{if(m.value.indexOf("mce:protected ")===0){m.name="#text";m.type=3;m.raw=true;m.value=unescape(m.value).substr(14)}}}});c.addNodeFilter("xml:namespace,input",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.type===7){m.remove()}else{if(m.type===1){if(k==="input"&&!("type" in m.attributes.map)){m.attr("type","text")}}}}});if(e.fix_list_elements){c.addNodeFilter("ul,ol",function(k,l){var m=k.length,n,j;while(m--){n=k[m];j=n.parent;if(j.name==="ul"||j.name==="ol"){if(n.prev&&n.prev.name==="li"){n.prev.append(n)}}}})}c.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style",function(j,k){var l=j.length;while(l--){j[l].attr(k,null)}});return{schema:f,addNodeFilter:c.addNodeFilter,addAttributeFilter:c.addAttributeFilter,onPreProcess:h,onPostProcess:b,serialize:function(o,m){var l,p,k,j,n;if(d&&i.select("script,style,select,map").length>0){n=o.innerHTML;o=o.cloneNode(false);i.setHTML(o,n)}else{o=o.cloneNode(true)}l=o.ownerDocument.implementation;if(l.createHTMLDocument){p=l.createHTMLDocument("");g(o.nodeName=="BODY"?o.childNodes:[o],function(q){p.body.appendChild(p.importNode(q,true))});if(o.nodeName!="BODY"){o=p.body.firstChild}else{o=p.body}k=i.doc;i.doc=p}m=m||{};m.format=m.format||"html";if(!m.no_events){m.node=o;h.dispatch(self,m)}j=new a.html.Serializer(e,f);m.content=j.serialize(c.parse(m.getInner?o.innerHTML:a.trim(i.getOuterHTML(o),m),m));if(!m.cleanup){m.content=m.content.replace(/\uFEFF|\u200B/g,"")}if(!m.no_events){b.dispatch(self,m)}if(k){i.doc=k}m.node=null;return m.content},addRules:function(j){f.addValidElements(j)},setRules:function(j){f.setValidElements(j)}}}})(tinymce);(function(a){a.dom.ScriptLoader=function(h){var c=0,k=1,i=2,l={},j=[],f={},d=[],g=0,e;function b(m,v){var x=this,q=a.DOM,s,o,r,n;function p(){q.remove(n);if(s){s.onreadystatechange=s.onload=s=null}v()}function u(){if(typeof(console)!=="undefined"&&console.log){console.log("Failed to load: "+m)}}n=q.uniqueId();if(a.isIE6){o=new a.util.URI(m);r=location;if(o.host==r.hostname&&o.port==r.port&&(o.protocol+":")==r.protocol&&o.protocol.toLowerCase()!="file"){a.util.XHR.send({url:a._addVer(o.getURI()),success:function(y){var t=q.create("script",{type:"text/javascript"});t.text=y;document.getElementsByTagName("head")[0].appendChild(t);q.remove(t);p()},error:u});return}}s=q.create("script",{id:n,type:"text/javascript",src:a._addVer(m)});if(!a.isIE){s.onload=p}s.onerror=u;if(!a.isOpera){s.onreadystatechange=function(){var t=s.readyState;if(t=="complete"||t=="loaded"){p()}}}(document.getElementsByTagName("head")[0]||document.body).appendChild(s)}this.isDone=function(m){return l[m]==i};this.markDone=function(m){l[m]=i};this.add=this.load=function(m,q,n){var o,p=l[m];if(p==e){j.push(m);l[m]=c}if(q){if(!f[m]){f[m]=[]}f[m].push({func:q,scope:n||this})}};this.loadQueue=function(n,m){this.loadScripts(j,n,m)};this.loadScripts=function(m,q,p){var o;function n(r){a.each(f[r],function(s){s.func.call(s.scope)});f[r]=e}d.push({func:q,scope:p||this});o=function(){var r=a.grep(m);m.length=0;a.each(r,function(s){if(l[s]==i){n(s);return}if(l[s]!=k){l[s]=k;g++;b(s,function(){l[s]=i;g--;n(s);o()})}});if(!g){a.each(d,function(s){s.func.call(s.scope)});d.length=0}};o()}};a.ScriptLoader=new a.dom.ScriptLoader()})(tinymce);tinymce.dom.TreeWalker=function(a,c){var b=a;function d(i,f,e,j){var h,g;if(i){if(!j&&i[f]){return i[f]}if(i!=c){h=i[e];if(h){return h}for(g=i.parentNode;g&&g!=c;g=g.parentNode){h=g[e];if(h){return h}}}}}this.current=function(){return b};this.next=function(e){return(b=d(b,"firstChild","nextSibling",e))};this.prev=function(e){return(b=d(b,"lastChild","previousSibling",e))}};(function(a){a.dom.RangeUtils=function(c){var b="\uFEFF";this.walk=function(d,s){var i=d.startContainer,l=d.startOffset,t=d.endContainer,m=d.endOffset,j,g,o,h,r,q,e;e=c.select("td.mceSelected,th.mceSelected");if(e.length>0){a.each(e,function(u){s([u])});return}function f(u){var v;v=u[0];if(v.nodeType===3&&v===i&&l>=v.nodeValue.length){u.splice(0,1)}v=u[u.length-1];if(m===0&&u.length>0&&v===t&&v.nodeType===3){u.splice(u.length-1,1)}return u}function p(x,v,u){var y=[];for(;x&&x!=u;x=x[v]){y.push(x)}return y}function n(v,u){do{if(v.parentNode==u){return v}v=v.parentNode}while(v)}function k(x,v,y){var u=y?"nextSibling":"previousSibling";for(h=x,r=h.parentNode;h&&h!=v;h=r){r=h.parentNode;q=p(h==x?h:h[u],u);if(q.length){if(!y){q.reverse()}s(f(q))}}}if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[l]}if(t.nodeType==1&&t.hasChildNodes()){t=t.childNodes[Math.min(m-1,t.childNodes.length-1)]}if(i==t){return s(f([i]))}j=c.findCommonAncestor(i,t);for(h=i;h;h=h.parentNode){if(h===t){return k(i,j,true)}if(h===j){break}}for(h=t;h;h=h.parentNode){if(h===i){return k(t,j)}if(h===j){break}}g=n(i,j)||i;o=n(t,j)||t;k(i,g,true);q=p(g==i?g:g.nextSibling,"nextSibling",o==t?o.nextSibling:o);if(q.length){s(f(q))}k(t,o)};this.split=function(e){var h=e.startContainer,d=e.startOffset,i=e.endContainer,g=e.endOffset;function f(j,k){return j.splitText(k)}if(h==i&&h.nodeType==3){if(d>0&&dd){g=g-d;h=i=f(i,g).previousSibling;g=i.nodeValue.length;d=0}else{g=0}}}else{if(h.nodeType==3&&d>0&&d0&&g=l.length){q=0}}s=l[q];f.setAttrib(g,"tabindex","-1");f.setAttrib(s.id,"tabindex","0");f.get(s.id).focus();if(e.actOnFocus){e.onAction(s.id)}if(r){a.cancel(r)}};o=function(y){var u=37,t=39,x=38,z=40,q=27,s=14,r=13,v=32;switch(y.keyCode){case u:if(i){p.moveFocus(-1)}break;case t:if(i){p.moveFocus(1)}break;case x:if(n){p.moveFocus(-1)}break;case z:if(n){p.moveFocus(1)}break;case q:if(e.onCancel){e.onCancel();a.cancel(y)}break;case s:case r:case v:if(e.onAction){e.onAction(g);a.cancel(y)}break}};c(l,function(s,q){var r;if(!s.id){s.id=f.uniqueId("_mce_item_")}if(k){f.bind(s.id,"blur",h);r="-1"}else{r=(q===0?"0":"-1")}f.setAttrib(s.id,"tabindex",r);f.bind(f.get(s.id),"focus",j)});if(l[0]){g=l[0].id}f.setAttrib(m,"tabindex","-1");f.bind(f.get(m),"focus",d);f.bind(f.get(m),"keydown",o)}})})(tinymce);(function(c){var b=c.DOM,a=c.is;c.create("tinymce.ui.Control",{Control:function(f,e,d){this.id=f;this.settings=e=e||{};this.rendered=false;this.onRender=new c.util.Dispatcher(this);this.classPrefix="";this.scope=e.scope||this;this.disabled=0;this.active=0;this.editor=d},setAriaProperty:function(f,e){var d=b.get(this.id+"_aria")||b.get(this.id);if(d){b.setAttrib(d,"aria-"+f,!!e)}},focus:function(){b.get(this.id).focus()},setDisabled:function(d){if(d!=this.disabled){this.setAriaProperty("disabled",d);this.setState("Disabled",d);this.setState("Enabled",!d);this.disabled=d}},isDisabled:function(){return this.disabled},setActive:function(d){if(d!=this.active){this.setState("Active",d);this.active=d;this.setAriaProperty("pressed",d)}},isActive:function(){return this.active},setState:function(f,d){var e=b.get(this.id);f=this.classPrefix+f;if(d){b.addClass(e,f)}else{b.removeClass(e,f)}},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(d){b.setHTML(d,this.renderHTML())},postRender:function(){var e=this,d;if(a(e.disabled)){d=e.disabled;e.disabled=-1;e.setDisabled(d)}if(a(e.active)){d=e.active;e.active=-1;e.setActive(d)}},remove:function(){b.remove(this.id);this.destroy()},destroy:function(){c.dom.Event.clear(this.id)}})})(tinymce);tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(c,b,a){this.parent(c,b,a);this.controls=[];this.lookup={}},add:function(a){this.lookup[a.id]=a;this.controls.push(a);return a},get:function(a){return this.lookup[a]}});tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(b,a){this.parent(b,a);this.classPrefix="mceSeparator";this.setDisabled(true)},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix,role:"separator","aria-orientation":"vertical",tabindex:"-1"})}});(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(g,f){this.parent(g,f);this.classPrefix="mceMenuItem"},setSelected:function(f){this.setState("Selected",f);this.setAriaProperty("checked",!!f);this.selected=f},isSelected:function(){return this.selected},postRender:function(){var f=this;f.parent();if(c(f.selected)){f.setSelected(f.selected)}}})})(tinymce);(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(h,g){var f=this;f.parent(h,g);f.items={};f.collapsed=false;f.menuCount=0;f.onAddItem=new d.util.Dispatcher(this)},expand:function(g){var f=this;if(g){a(f,function(h){if(h.expand){h.expand()}},"items",f)}f.collapsed=false},collapse:function(g){var f=this;if(g){a(f,function(h){if(h.collapse){h.collapse()}},"items",f)}f.collapsed=true},isCollapsed:function(){return this.collapsed},add:function(f){if(!f.settings){f=new d.ui.MenuItem(f.id||b.uniqueId(),f)}this.onAddItem.dispatch(this,f);return this.items[f.id]=f},addSeparator:function(){return this.add({separator:true})},addMenu:function(f){if(!f.collapse){f=this.createMenu(f)}this.menuCount++;return this.add(f)},hasMenus:function(){return this.menuCount!==0},remove:function(f){delete this.items[f.id]},removeAll:function(){var f=this;a(f,function(g){if(g.removeAll){g.removeAll()}else{g.remove()}g.destroy()},"items",f);f.items={}},createMenu:function(g){var f=new d.ui.Menu(g.id||b.uniqueId(),g);f.onAddItem.add(this.onAddItem.dispatch,this.onAddItem);return f}})})(tinymce);(function(e){var d=e.is,c=e.DOM,f=e.each,a=e.dom.Event,b=e.dom.Element;e.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(h,g){g=g||{};g.container=g.container||c.doc.body;g.offset_x=g.offset_x||0;g.offset_y=g.offset_y||0;g.vp_offset_x=g.vp_offset_x||0;g.vp_offset_y=g.vp_offset_y||0;if(d(g.icons)&&!g.icons){g["class"]+=" mceNoIcons"}this.parent(h,g);this.onShowMenu=new e.util.Dispatcher(this);this.onHideMenu=new e.util.Dispatcher(this);this.classPrefix="mceMenu"},createMenu:function(j){var h=this,i=h.settings,g;j.container=j.container||i.container;j.parent=h;j.constrain=j.constrain||i.constrain;j["class"]=j["class"]||i["class"];j.vp_offset_x=j.vp_offset_x||i.vp_offset_x;j.vp_offset_y=j.vp_offset_y||i.vp_offset_y;j.keyboard_focus=i.keyboard_focus;g=new e.ui.DropMenu(j.id||c.uniqueId(),j);g.onAddItem.add(h.onAddItem.dispatch,h.onAddItem);return g},focus:function(){var g=this;if(g.keyboardNav){g.keyboardNav.focus()}},update:function(){var i=this,j=i.settings,g=c.get("menu_"+i.id+"_tbl"),l=c.get("menu_"+i.id+"_co"),h,k;h=j.max_width?Math.min(g.clientWidth,j.max_width):g.clientWidth;k=j.max_height?Math.min(g.clientHeight,j.max_height):g.clientHeight;if(!c.boxModel){i.element.setStyles({width:h+2,height:k+2})}else{i.element.setStyles({width:h,height:k})}if(j.max_width){c.setStyle(l,"width",h)}if(j.max_height){c.setStyle(l,"height",k);if(g.clientHeightv){p=r?r-u:Math.max(0,(v-A.vp_offset_x)-u)}if((n+A.vp_offset_y+l)>q){n=Math.max(0,(q-A.vp_offset_y)-l)}}c.setStyles(o,{left:p,top:n});z.element.update();z.isMenuVisible=1;z.mouseClickFunc=a.add(o,"click",function(s){var h;s=s.target;if(s&&(s=c.getParent(s,"tr"))&&!c.hasClass(s,m+"ItemSub")){h=z.items[s.id];if(h.isDisabled()){return}k=z;while(k){if(k.hideMenu){k.hideMenu()}k=k.settings.parent}if(h.settings.onclick){h.settings.onclick(s)}return a.cancel(s)}});if(z.hasMenus()){z.mouseOverFunc=a.add(o,"mouseover",function(x){var h,t,s;x=x.target;if(x&&(x=c.getParent(x,"tr"))){h=z.items[x.id];if(z.lastMenu){z.lastMenu.collapse(1)}if(h.isDisabled()){return}if(x&&c.hasClass(x,m+"ItemSub")){t=c.getRect(x);h.showMenu((t.x+t.w-i),t.y-i,t.x);z.lastMenu=h;c.addClass(c.get(h.id).firstChild,m+"ItemActive")}}})}a.add(o,"keydown",z._keyHandler,z);z.onShowMenu.dispatch(z);if(A.keyboard_focus){z._setupKeyboardNav()}},hideMenu:function(j){var g=this,i=c.get("menu_"+g.id),h;if(!g.isMenuVisible){return}if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(i,"mouseover",g.mouseOverFunc);a.remove(i,"click",g.mouseClickFunc);a.remove(i,"keydown",g._keyHandler);c.hide(i);g.isMenuVisible=0;if(!j){g.collapse(1)}if(g.element){g.element.hide()}if(h=c.get(g.id)){c.removeClass(h.firstChild,g.classPrefix+"ItemActive")}g.onHideMenu.dispatch(g)},add:function(i){var g=this,h;i=g.parent(i);if(g.isRendered&&(h=c.get("menu_"+g.id))){g._add(c.select("tbody",h)[0],i)}return i},collapse:function(g){this.parent(g);this.hideMenu(1)},remove:function(g){c.remove(g.id);this.destroy();return this.parent(g)},destroy:function(){var g=this,h=c.get("menu_"+g.id);if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(h,"mouseover",g.mouseOverFunc);a.remove(c.select("a",h),"focus",g.mouseOverFunc);a.remove(h,"click",g.mouseClickFunc);a.remove(h,"keydown",g._keyHandler);if(g.element){g.element.remove()}c.remove(h)},renderNode:function(){var i=this,j=i.settings,l,h,k,g;g=c.create("div",{role:"listbox",id:"menu_"+i.id,"class":j["class"],style:"position:absolute;left:0;top:0;z-index:200000;outline:0"});if(i.settings.parent){c.setAttrib(g,"aria-parent","menu_"+i.settings.parent.id)}k=c.add(g,"div",{role:"presentation",id:"menu_"+i.id+"_co","class":i.classPrefix+(j["class"]?" "+j["class"]:"")});i.element=new b("menu_"+i.id,{blocker:1,container:j.container});if(j.menu_line){c.add(k,"span",{"class":i.classPrefix+"Line"})}l=c.add(k,"table",{role:"presentation",id:"menu_"+i.id+"_tbl",border:0,cellPadding:0,cellSpacing:0});h=c.add(l,"tbody");f(i.items,function(m){i._add(h,m)});i.rendered=true;return g},_setupKeyboardNav:function(){var i,h,g=this;i=c.get("menu_"+g.id);h=c.select("a[role=option]","menu_"+g.id);h.splice(0,0,i);g.keyboardNav=new e.ui.KeyboardNavigation({root:"menu_"+g.id,items:h,onCancel:function(){g.hideMenu()},enableUpDown:true});i.focus()},_keyHandler:function(g){var h=this,i;switch(g.keyCode){case 37:if(h.settings.parent){h.hideMenu();h.settings.parent.focus();a.cancel(g)}break;case 39:if(h.mouseOverFunc){h.mouseOverFunc(g)}break}},_add:function(j,h){var i,q=h.settings,p,l,k,m=this.classPrefix,g;if(q.separator){l=c.add(j,"tr",{id:h.id,"class":m+"ItemSeparator"});c.add(l,"td",{"class":m+"ItemSeparator"});if(i=l.previousSibling){c.addClass(i,"mceLast")}return}i=l=c.add(j,"tr",{id:h.id,"class":m+"Item "+m+"ItemEnabled"});i=k=c.add(i,q.titleItem?"th":"td");i=p=c.add(i,"a",{id:h.id+"_aria",role:q.titleItem?"presentation":"option",href:"javascript:;",onclick:"return false;",onmousedown:"return false;"});if(q.parent){c.setAttrib(p,"aria-haspopup","true");c.setAttrib(p,"aria-owns","menu_"+h.id)}c.addClass(k,q["class"]);g=c.add(i,"span",{"class":"mceIcon"+(q.icon?" mce_"+q.icon:"")});if(q.icon_src){c.add(g,"img",{src:q.icon_src})}i=c.add(i,q.element||"span",{"class":"mceText",title:h.settings.title},h.settings.title);if(h.settings.style){c.setAttrib(i,"style",h.settings.style)}if(j.childNodes.length==1){c.addClass(l,"mceFirst")}if((i=l.previousSibling)&&c.hasClass(i,m+"ItemSeparator")){c.addClass(l,"mceFirst")}if(h.collapse){c.addClass(l,m+"ItemSub")}if(i=l.previousSibling){c.removeClass(i,"mceLast")}c.addClass(l,"mceLast")}})})(tinymce);(function(b){var a=b.DOM;b.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(e,d,c){this.parent(e,d,c);this.classPrefix="mceButton"},renderHTML:function(){var f=this.classPrefix,e=this.settings,d,c;c=a.encode(e.label||"");d='';if(e.image&&!(this.editor&&this.editor.forcedHighContrastMode)){d+=''+a.encode(e.title)+''+c}else{d+=''+(c?''+c+"":"")}d+='";d+="";return d},postRender:function(){var d=this,e=d.settings,c;if(b.isIE&&d.editor){b.dom.Event.add(d.id,"mousedown",function(f){var g=d.editor.selection.getNode().nodeName;c=g==="IMG"?d.editor.selection.getBookmark():null})}b.dom.Event.add(d.id,"click",function(f){if(!d.isDisabled()){if(b.isIE&&d.editor&&c!==null){d.editor.selection.moveToBookmark(c)}return e.onclick.call(e.scope,f)}});b.dom.Event.add(d.id,"keyup",function(f){if(!d.isDisabled()&&f.keyCode==b.VK.SPACEBAR){return e.onclick.call(e.scope,f)}})}})})(tinymce);(function(d){var c=d.DOM,b=d.dom.Event,e=d.each,a=d.util.Dispatcher;d.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(i,h,f){var g=this;g.parent(i,h,f);g.items=[];g.onChange=new a(g);g.onPostRender=new a(g);g.onAdd=new a(g);g.onRenderMenu=new d.util.Dispatcher(this);g.classPrefix="mceListBox"},select:function(h){var g=this,j,i;if(h==undefined){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(f){return f==h}}if(h!=g.selectedValue){e(g.items,function(k,f){if(i(k.value)){j=1;g.selectByIndex(f);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(f){var h=this,i,j,g;if(f!=h.selectedIndex){i=c.get(h.id+"_text");g=c.get(h.id+"_voiceDesc");j=h.items[f];if(j){h.selectedValue=j.value;h.selectedIndex=f;c.setHTML(i,c.encode(j.title));c.setHTML(g,h.settings.title+" - "+j.title);c.removeClass(i,"mceTitle");c.setAttrib(h.id,"aria-valuenow",j.title)}else{c.setHTML(i,c.encode(h.settings.title));c.setHTML(g,c.encode(h.settings.title));c.addClass(i,"mceTitle");h.selectedValue=h.selectedIndex=null;c.setAttrib(h.id,"aria-valuenow",h.settings.title)}i=0}},add:function(i,f,h){var g=this;h=h||{};h=d.extend(h,{title:i,value:f});g.items.push(h);g.onAdd.dispatch(g,h)},getLength:function(){return this.items.length},renderHTML:function(){var i="",f=this,g=f.settings,j=f.classPrefix;i='';i+="";i+="";i+="";return i},showMenu:function(){var g=this,i,h=c.get(this.id),f;if(g.isDisabled()||g.items.length==0){return}if(g.menu&&g.menu.isMenuVisible){return g.hideMenu()}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}i=c.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.keyboard_focus=!d.isOpera;if(g.oldID){f.items[g.oldID].setSelected(0)}e(g.items,function(j){if(j.value===g.selectedValue){f.items[j.id].setSelected(1);g.oldID=j.id}});f.showMenu(0,h.clientHeight);b.add(c.doc,"mousedown",g.hideMenu,g);c.addClass(g.id,g.classPrefix+"Selected")},hideMenu:function(g){var f=this;if(f.menu&&f.menu.isMenuVisible){c.removeClass(f.id,f.classPrefix+"Selected");if(g&&g.type=="mousedown"&&(g.target.id==f.id+"_text"||g.target.id==f.id+"_open")){return}if(!g||!c.getParent(g.target,".mceMenu")){c.removeClass(f.id,f.classPrefix+"Selected");b.remove(c.doc,"mousedown",f.hideMenu,f);f.menu.hideMenu()}}},renderMenu:function(){var g=this,f;f=g.settings.control_manager.createDropMenu(g.id+"_menu",{menu_line:1,"class":g.classPrefix+"Menu mceNoIcons",max_width:150,max_height:150});f.onHideMenu.add(function(){g.hideMenu();g.focus()});f.add({title:g.settings.title,"class":"mceMenuItemTitle",onclick:function(){if(g.settings.onselect("")!==false){g.select("")}}});e(g.items,function(h){if(h.value===undefined){f.add({title:h.title,role:"option","class":"mceMenuItemTitle",onclick:function(){if(g.settings.onselect("")!==false){g.select("")}}})}else{h.id=c.uniqueId();h.role="option";h.onclick=function(){if(g.settings.onselect(h.value)!==false){g.select(h.value)}};f.add(h)}});g.onRenderMenu.dispatch(g,f);g.menu=f},postRender:function(){var f=this,g=f.classPrefix;b.add(f.id,"click",f.showMenu,f);b.add(f.id,"keydown",function(h){if(h.keyCode==32){f.showMenu(h);b.cancel(h)}});b.add(f.id,"focus",function(){if(!f._focused){f.keyDownHandler=b.add(f.id,"keydown",function(h){if(h.keyCode==40){f.showMenu();b.cancel(h)}});f.keyPressHandler=b.add(f.id,"keypress",function(i){var h;if(i.keyCode==13){h=f.selectedValue;f.selectedValue=null;b.cancel(i);f.settings.onselect(h)}})}f._focused=1});b.add(f.id,"blur",function(){b.remove(f.id,"keydown",f.keyDownHandler);b.remove(f.id,"keypress",f.keyPressHandler);f._focused=0});if(d.isIE6||!c.boxModel){b.add(f.id,"mouseover",function(){if(!c.hasClass(f.id,g+"Disabled")){c.addClass(f.id,g+"Hover")}});b.add(f.id,"mouseout",function(){if(!c.hasClass(f.id,g+"Disabled")){c.removeClass(f.id,g+"Hover")}})}f.onPostRender.dispatch(f,c.get(f.id))},destroy:function(){this.parent();b.clear(this.id+"_text");b.clear(this.id+"_open")}})})(tinymce);(function(d){var c=d.DOM,b=d.dom.Event,e=d.each,a=d.util.Dispatcher;d.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(g,f){this.parent(g,f);this.classPrefix="mceNativeListBox"},setDisabled:function(f){c.get(this.id).disabled=f;this.setAriaProperty("disabled",f)},isDisabled:function(){return c.get(this.id).disabled},select:function(h){var g=this,j,i;if(h==undefined){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(f){return f==h}}if(h!=g.selectedValue){e(g.items,function(k,f){if(i(k.value)){j=1;g.selectByIndex(f);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(f){c.get(this.id).selectedIndex=f+1;this.selectedValue=this.items[f]?this.items[f].value:null},add:function(j,g,f){var i,h=this;f=f||{};f.value=g;if(h.isRendered()){c.add(c.get(this.id),"option",f,j)}i={title:j,value:g,attribs:f};h.items.push(i);h.onAdd.dispatch(h,i)},getLength:function(){return this.items.length},renderHTML:function(){var g,f=this;g=c.createHTML("option",{value:""},"-- "+f.settings.title+" --");e(f.items,function(h){g+=c.createHTML("option",{value:h.value},h.title)});g=c.createHTML("select",{id:f.id,"class":"mceNativeListBox","aria-labelledby":f.id+"_aria"},g);g+=c.createHTML("span",{id:f.id+"_aria",style:"display: none"},f.settings.title);return g},postRender:function(){var g=this,h,i=true;g.rendered=true;function f(k){var j=g.items[k.target.selectedIndex-1];if(j&&(j=j.value)){g.onChange.dispatch(g,j);if(g.settings.onselect){g.settings.onselect(j)}}}b.add(g.id,"change",f);b.add(g.id,"keydown",function(k){var j;b.remove(g.id,"change",h);i=false;j=b.add(g.id,"blur",function(){if(i){return}i=true;b.add(g.id,"change",f);b.remove(g.id,"blur",j)});if(d.isWebKit&&(k.keyCode==37||k.keyCode==39)){return b.prevent(k)}if(k.keyCode==13||k.keyCode==32){f(k);return b.cancel(k)}});g.onPostRender.dispatch(g,c.get(g.id))}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(g,f,e){this.parent(g,f,e);this.onRenderMenu=new c.util.Dispatcher(this);f.menu_container=f.menu_container||b.doc.body},showMenu:function(){var g=this,j,i,h=b.get(g.id),f;if(g.isDisabled()){return}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}if(g.isMenuVisible){return g.hideMenu()}j=b.getPos(g.settings.menu_container);i=b.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.vp_offset_x=i.x;f.settings.vp_offset_y=i.y;f.settings.keyboard_focus=g._focused;f.showMenu(0,h.clientHeight);a.add(b.doc,"mousedown",g.hideMenu,g);g.setState("Selected",1);g.isMenuVisible=1},renderMenu:function(){var f=this,e;e=f.settings.control_manager.createDropMenu(f.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:f.settings.icons});e.onHideMenu.add(function(){f.hideMenu();f.focus()});f.onRenderMenu.dispatch(f,e);f.menu=e},hideMenu:function(g){var f=this;if(g&&g.type=="mousedown"&&b.getParent(g.target,function(h){return h.id===f.id||h.id===f.id+"_open"})){return}if(!g||!b.getParent(g.target,".mceMenu")){f.setState("Selected",0);a.remove(b.doc,"mousedown",f.hideMenu,f);if(f.menu){f.menu.hideMenu()}}f.isMenuVisible=0},postRender:function(){var e=this,f=e.settings;a.add(e.id,"click",function(){if(!e.isDisabled()){if(f.onclick){f.onclick(e.value)}e.showMenu()}})}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(g,f,e){this.parent(g,f,e);this.classPrefix="mceSplitButton"},renderHTML:function(){var i,f=this,g=f.settings,e;i="";if(g.image){e=b.createHTML("img ",{src:g.image,role:"presentation","class":"mceAction "+g["class"]})}else{e=b.createHTML("span",{"class":"mceAction "+g["class"]},"")}e+=b.createHTML("span",{"class":"mceVoiceLabel mceIconOnly",id:f.id+"_voice",style:"display:none;"},g.title);i+=""+b.createHTML("a",{role:"button",id:f.id+"_action",tabindex:"-1",href:"javascript:;","class":"mceAction "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"";e=b.createHTML("span",{"class":"mceOpen "+g["class"]},'');i+=""+b.createHTML("a",{role:"button",id:f.id+"_open",tabindex:"-1",href:"javascript:;","class":"mceOpen "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"";i+="";i=b.createHTML("table",{role:"presentation","class":"mceSplitButton mceSplitButtonEnabled "+g["class"],cellpadding:"0",cellspacing:"0",title:g.title},i);return b.createHTML("div",{id:f.id,role:"button",tabindex:"0","aria-labelledby":f.id+"_voice","aria-haspopup":"true"},i)},postRender:function(){var e=this,g=e.settings,f;if(g.onclick){f=function(h){if(!e.isDisabled()){g.onclick(e.value);a.cancel(h)}};a.add(e.id+"_action","click",f);a.add(e.id,["click","keydown"],function(h){var k=32,m=14,i=13,j=38,l=40;if((h.keyCode===32||h.keyCode===13||h.keyCode===14)&&!h.altKey&&!h.ctrlKey&&!h.metaKey){f();a.cancel(h)}else{if(h.type==="click"||h.keyCode===l){e.showMenu();a.cancel(h)}}})}a.add(e.id+"_open","click",function(h){e.showMenu();a.cancel(h)});a.add([e.id,e.id+"_open"],"focus",function(){e._focused=1});a.add([e.id,e.id+"_open"],"blur",function(){e._focused=0});if(c.isIE6||!b.boxModel){a.add(e.id,"mouseover",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.addClass(e.id,"mceSplitButtonHover")}});a.add(e.id,"mouseout",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.removeClass(e.id,"mceSplitButtonHover")}})}},destroy:function(){this.parent();a.clear(this.id+"_action");a.clear(this.id+"_open");a.clear(this.id)}})})(tinymce);(function(d){var c=d.DOM,a=d.dom.Event,b=d.is,e=d.each;d.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(i,h,f){var g=this;g.parent(i,h,f);g.settings=h=d.extend({colors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",grid_width:8,default_color:"#888888"},g.settings);g.onShowMenu=new d.util.Dispatcher(g);g.onHideMenu=new d.util.Dispatcher(g);g.value=h.default_color},showMenu:function(){var f=this,g,j,i,h;if(f.isDisabled()){return}if(!f.isMenuRendered){f.renderMenu();f.isMenuRendered=true}if(f.isMenuVisible){return f.hideMenu()}i=c.get(f.id);c.show(f.id+"_menu");c.addClass(i,"mceSplitButtonSelected");h=c.getPos(i);c.setStyles(f.id+"_menu",{left:h.x,top:h.y+i.clientHeight,zIndex:200000});i=0;a.add(c.doc,"mousedown",f.hideMenu,f);f.onShowMenu.dispatch(f);if(f._focused){f._keyHandler=a.add(f.id+"_menu","keydown",function(k){if(k.keyCode==27){f.hideMenu()}});c.select("a",f.id+"_menu")[0].focus()}f.isMenuVisible=1},hideMenu:function(g){var f=this;if(f.isMenuVisible){if(g&&g.type=="mousedown"&&c.getParent(g.target,function(h){return h.id===f.id+"_open"})){return}if(!g||!c.getParent(g.target,".mceSplitButtonMenu")){c.removeClass(f.id,"mceSplitButtonSelected");a.remove(c.doc,"mousedown",f.hideMenu,f);a.remove(f.id+"_menu","keydown",f._keyHandler);c.hide(f.id+"_menu")}f.isMenuVisible=0;f.onHideMenu.dispatch()}},renderMenu:function(){var p=this,h,k=0,q=p.settings,g,j,l,o,f;o=c.add(q.menu_container,"div",{role:"listbox",id:p.id+"_menu","class":q.menu_class+" "+q["class"],style:"position:absolute;left:0;top:-1000px;"});h=c.add(o,"div",{"class":q["class"]+" mceSplitButtonMenu"});c.add(h,"span",{"class":"mceMenuLine"});g=c.add(h,"table",{role:"presentation","class":"mceColorSplitMenu"});j=c.add(g,"tbody");k=0;e(b(q.colors,"array")?q.colors:q.colors.split(","),function(m){m=m.replace(/^#/,"");if(!k--){l=c.add(j,"tr");k=q.grid_width-1}g=c.add(l,"td");var i={href:"javascript:;",style:{backgroundColor:"#"+m},title:p.editor.getLang("colors."+m,m),"data-mce-color":"#"+m};if(!d.isIE){i.role="option"}g=c.add(g,"a",i);if(p.editor.forcedHighContrastMode){g=c.add(g,"canvas",{width:16,height:16,"aria-hidden":"true"});if(g.getContext&&(f=g.getContext("2d"))){f.fillStyle="#"+m;f.fillRect(0,0,16,16)}else{c.remove(g)}}});if(q.more_colors_func){g=c.add(j,"tr");g=c.add(g,"td",{colspan:q.grid_width,"class":"mceMoreColors"});g=c.add(g,"a",{role:"option",id:p.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},q.more_colors_title);a.add(g,"click",function(i){q.more_colors_func.call(q.more_colors_scope||this);return a.cancel(i)})}c.addClass(h,"mceColorSplitMenu");new d.ui.KeyboardNavigation({root:p.id+"_menu",items:c.select("a",p.id+"_menu"),onCancel:function(){p.hideMenu();p.focus()}});a.add(p.id+"_menu","mousedown",function(i){return a.cancel(i)});a.add(p.id+"_menu","click",function(i){var m;i=c.getParent(i.target,"a",j);if(i&&i.nodeName.toLowerCase()=="a"&&(m=i.getAttribute("data-mce-color"))){p.setColor(m)}return a.cancel(i)});return o},setColor:function(f){this.displayColor(f);this.hideMenu();this.settings.onselect(f)},displayColor:function(g){var f=this;c.setStyle(f.id+"_preview","backgroundColor",g);f.value=g},postRender:function(){var f=this,g=f.id;f.parent();c.add(g+"_action","div",{id:g+"_preview","class":"mceColorPreview"});c.setStyle(f.id+"_preview","backgroundColor",f.value)},destroy:function(){this.parent();a.clear(this.id+"_menu");a.clear(this.id+"_more");c.remove(this.id+"_menu")}})})(tinymce);(function(b){var d=b.DOM,c=b.each,a=b.dom.Event;b.create("tinymce.ui.ToolbarGroup:tinymce.ui.Container",{renderHTML:function(){var f=this,i=[],e=f.controls,j=b.each,g=f.settings;i.push('
      ');i.push("");i.push('");j(e,function(h){i.push(h.renderHTML())});i.push("");i.push("
      ");return i.join("")},focus:function(){var e=this;d.get(e.id).focus()},postRender:function(){var f=this,e=[];c(f.controls,function(g){c(g.controls,function(h){if(h.id){e.push(h)}})});f.keyNav=new b.ui.KeyboardNavigation({root:f.id,items:e,onCancel:function(){if(b.isWebKit){d.get(f.editor.id+"_ifr").focus()}f.editor.focus()},excludeFromTabOrder:!f.settings.tab_focus_toolbar})},destroy:function(){var e=this;e.parent();e.keyNav.destroy();a.clear(e.id)}})})(tinymce);(function(a){var c=a.DOM,b=a.each;a.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var m=this,f="",j,k,n=m.settings,e,d,g,l;l=m.controls;for(e=0;e"))}if(d&&k.ListBox){if(d.Button||d.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarEnd"},c.createHTML("span",null,""))}}if(c.stdMode){f+=''+k.renderHTML()+""}else{f+=""+k.renderHTML()+""}if(g&&k.ListBox){if(g.Button||g.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarStart"},c.createHTML("span",null,""))}}}j="mceToolbarEnd";if(k.Button){j+=" mceToolbarEndButton"}else{if(k.SplitButton){j+=" mceToolbarEndSplitButton"}else{if(k.ListBox){j+=" mceToolbarEndListBox"}}}f+=c.createHTML("td",{"class":j},c.createHTML("span",null,""));return c.createHTML("table",{id:m.id,"class":"mceToolbar"+(n["class"]?" "+n["class"]:""),cellpadding:"0",cellspacing:"0",align:m.settings.align||"",role:"presentation",tabindex:"-1"},""+f+"")}})})(tinymce);(function(b){var a=b.util.Dispatcher,c=b.each;b.create("tinymce.AddOnManager",{AddOnManager:function(){var d=this;d.items=[];d.urls={};d.lookup={};d.onAdd=new a(d)},get:function(d){if(this.lookup[d]){return this.lookup[d].instance}else{return undefined}},dependencies:function(e){var d;if(this.lookup[e]){d=this.lookup[e].dependencies}return d||[]},requireLangPack:function(e){var d=b.settings;if(d&&d.language&&d.language_load!==false){b.ScriptLoader.add(this.urls[e]+"/langs/"+d.language+".js")}},add:function(f,e,d){this.items.push(e);this.lookup[f]={instance:e,dependencies:d};this.onAdd.dispatch(this,f,e);return e},createUrl:function(d,e){if(typeof e==="object"){return e}else{return{prefix:d.prefix,resource:e,suffix:d.suffix}}},addComponents:function(f,d){var e=this.urls[f];b.each(d,function(g){b.ScriptLoader.add(e+"/"+g)})},load:function(j,f,d,h){var g=this,e=f;function i(){var k=g.dependencies(j);b.each(k,function(m){var l=g.createUrl(f,m);g.load(l.resource,l,undefined,undefined)});if(d){if(h){d.call(h)}else{d.call(b.ScriptLoader)}}}if(g.urls[j]){return}if(typeof f==="object"){e=f.prefix+f.resource+f.suffix}if(e.indexOf("/")!=0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}g.urls[j]=e.substring(0,e.lastIndexOf("/"));if(g.lookup[j]){i()}else{b.ScriptLoader.add(e,i,h)}}});b.PluginManager=new b.AddOnManager();b.ThemeManager=new b.AddOnManager()}(tinymce));(function(j){var g=j.each,d=j.extend,k=j.DOM,i=j.dom.Event,f=j.ThemeManager,b=j.PluginManager,e=j.explode,h=j.util.Dispatcher,a,c=0;j.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(j.documentBaseURL)){j.documentBaseURL+="/"}j.baseURL=new j.util.URI(j.documentBaseURL).toAbsolute(j.baseURL);j.baseURI=new j.util.URI(j.baseURL);j.onBeforeUnload=new h(j);i.add(window,"beforeunload",function(l){j.onBeforeUnload.dispatch(j,l)});j.onAddEditor=new h(j);j.onRemoveEditor=new h(j);j.EditorManager=d(j,{editors:[],i18n:{},activeEditor:null,init:function(q){var n=this,p,l=j.ScriptLoader,u,o=[],m;function r(x,y,t){var v=x[y];if(!v){return}if(j.is(v,"string")){t=v.replace(/\.\w+$/,"");t=t?j.resolve(t):0;v=j.resolve(v)}return v.apply(t||this,Array.prototype.slice.call(arguments,2))}q=d({theme:"simple",language:"en"},q);n.settings=q;i.add(document,"init",function(){var s,v;r(q,"onpageload");switch(q.mode){case"exact":s=q.elements||"";if(s.length>0){g(e(s),function(x){if(k.get(x)){m=new j.Editor(x,q);o.push(m);m.render(1)}else{g(document.forms,function(y){g(y.elements,function(z){if(z.name===x){x="mce_editor_"+c++;k.setAttrib(z,"id",x);m=new j.Editor(x,q);o.push(m);m.render(1)}})})}})}break;case"textareas":case"specific_textareas":function t(y,x){return x.constructor===RegExp?x.test(y.className):k.hasClass(y,x)}g(k.select("textarea"),function(x){if(q.editor_deselector&&t(x,q.editor_deselector)){return}if(!q.editor_selector||t(x,q.editor_selector)){u=k.get(x.name);if(!x.id&&!u){x.id=x.name}if(!x.id||n.get(x.id)){x.id=k.uniqueId()}m=new j.Editor(x.id,q);o.push(m);m.render(1)}});break}if(q.oninit){s=v=0;g(o,function(x){v++;if(!x.initialized){x.onInit.add(function(){s++;if(s==v){r(q,"oninit")}})}else{s++}if(s==v){r(q,"oninit")}})}})},get:function(l){if(l===a){return this.editors}return this.editors[l]},getInstanceById:function(l){return this.get(l)},add:function(m){var l=this,n=l.editors;n[m.id]=m;n.push(m);l._setActive(m);l.onAddEditor.dispatch(l,m);return m},remove:function(n){var m=this,l,o=m.editors;if(!o[n.id]){return null}delete o[n.id];for(l=0;l':"",visual_table_class:"mceItemTable",visual:1,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",apply_source_formatting:1,directionality:"ltr",forced_root_block:"p",hidden_input:1,padd_empty_editor:1,render_ui:1,init_theme:1,force_p_newlines:1,indentation:"30px",keep_styles:1,fix_table_elements:1,inline_styles:1,convert_fonts_to_spans:true,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr",validate:true,entity_encoding:"named",url_converter:q.convertURL,url_converter_scope:q,ie7_compat:true},r);q.documentBaseURI=new n.util.URI(r.document_base_url||n.documentBaseURL,{base_uri:tinyMCE.baseURI});q.baseURI=n.baseURI;q.contentCSS=[];q.execCallback("setup",q)},render:function(u){var v=this,x=v.settings,y=v.id,q=n.ScriptLoader;if(!k.domLoaded){k.add(document,"init",function(){v.render()});return}tinyMCE.settings=x;if(!v.getElement()){return}if(n.isIDevice&&!n.isIOS5){return}if(!/TEXTAREA|INPUT/i.test(v.getElement().nodeName)&&x.hidden_input&&o.getParent(y,"form")){o.insertAfter(o.create("input",{type:"hidden",name:y}),y)}if(n.WindowManager){v.windowManager=new n.WindowManager(v)}if(x.encoding=="xml"){v.onGetContent.add(function(s,t){if(t.save){t.content=o.encode(t.content)}})}if(x.add_form_submit_trigger){v.onSubmit.addToTop(function(){if(v.initialized){v.save();v.isNotDirty=1}})}if(x.add_unload_trigger){v._beforeUnload=tinyMCE.onBeforeUnload.add(function(){if(v.initialized&&!v.destroyed&&!v.isHidden()){v.save({format:"raw",no_events:true})}})}n.addUnload(v.destroy,v);if(x.submit_patch){v.onBeforeRenderUI.add(function(){var s=v.getElement().form;if(!s){return}if(s._mceOldSubmit){return}if(!s.submit.nodeType&&!s.submit.length){v.formElement=s;s._mceOldSubmit=s.submit;s.submit=function(){n.triggerSave();v.isNotDirty=1;return v.formElement._mceOldSubmit(v.formElement)}}s=null})}function r(){if(x.language&&x.language_load!==false){q.add(n.baseURL+"/langs/"+x.language+".js")}if(x.theme&&x.theme.charAt(0)!="-"&&!h.urls[x.theme]){h.load(x.theme,"themes/"+x.theme+"/editor_template"+n.suffix+".js")}i(g(x.plugins),function(t){if(t&&!c.urls[t]){if(t.charAt(0)=="-"){t=t.substr(1,t.length);var s=c.dependencies(t);i(s,function(A){var z={prefix:"plugins/",resource:A,suffix:"/editor_plugin"+n.suffix+".js"};var A=c.createUrl(z,A);c.load(A.resource,A)})}else{if(t=="safari"){return}c.load(t,{prefix:"plugins/",resource:t,suffix:"/editor_plugin"+n.suffix+".js"})}}});q.loadQueue(function(){if(!v.removed){v.init()}})}r()},init:function(){var v,I=this,J=I.settings,F,B,E=I.getElement(),r,q,G,z,D,H,A,x=[];n.add(I);J.aria_label=J.aria_label||o.getAttrib(E,"aria-label",I.getLang("aria.rich_text_area"));if(J.theme){J.theme=J.theme.replace(/-/,"");r=h.get(J.theme);I.theme=new r();if(I.theme.init&&J.init_theme){I.theme.init(I,h.urls[J.theme]||n.documentBaseURL.replace(/\/$/,""))}}function C(K){var L=c.get(K),t=c.urls[K]||n.documentBaseURL.replace(/\/$/,""),s;if(L&&n.inArray(x,K)===-1){i(c.dependencies(K),function(u){C(u)});s=new L(I,t);I.plugins[K]=s;if(s.init){s.init(I,t);x.push(K)}}}i(g(J.plugins.replace(/\-/g,"")),C);if(J.popup_css!==false){if(J.popup_css){J.popup_css=I.documentBaseURI.toAbsolute(J.popup_css)}else{J.popup_css=I.baseURI.toAbsolute("themes/"+J.theme+"/skins/"+J.skin+"/dialog.css")}}if(J.popup_css_add){J.popup_css+=","+I.documentBaseURI.toAbsolute(J.popup_css_add)}I.controlManager=new n.ControlManager(I);if(J.custom_undo_redo){I.onBeforeExecCommand.add(function(t,K,u,L,s){if(K!="Undo"&&K!="Redo"&&K!="mceRepaint"&&(!s||!s.skip_undo)){I.undoManager.beforeChange()}});I.onExecCommand.add(function(t,K,u,L,s){if(K!="Undo"&&K!="Redo"&&K!="mceRepaint"&&(!s||!s.skip_undo)){I.undoManager.add()}})}I.onExecCommand.add(function(s,t){if(!/^(FontName|FontSize)$/.test(t)){I.nodeChanged()}});if(a){function y(s,t){if(!t||!t.initial){I.execCommand("mceRepaint")}}I.onUndo.add(y);I.onRedo.add(y);I.onSetContent.add(y)}I.onBeforeRenderUI.dispatch(I,I.controlManager);if(J.render_ui){F=J.width||E.style.width||E.offsetWidth;B=J.height||E.style.height||E.offsetHeight;I.orgDisplay=E.style.display;H=/^[0-9\.]+(|px)$/i;if(H.test(""+F)){F=Math.max(parseInt(F)+(r.deltaWidth||0),100)}if(H.test(""+B)){B=Math.max(parseInt(B)+(r.deltaHeight||0),100)}r=I.theme.renderUI({targetNode:E,width:F,height:B,deltaWidth:J.delta_width,deltaHeight:J.delta_height});I.editorContainer=r.editorContainer}if(document.domain&&location.hostname!=document.domain){n.relaxedDomain=document.domain}o.setStyles(r.sizeContainer||r.editorContainer,{width:F,height:B});if(J.content_css){n.each(g(J.content_css),function(s){I.contentCSS.push(I.documentBaseURI.toAbsolute(s))})}B=(r.iframeHeight||B)+(typeof(B)=="number"?(r.deltaHeight||0):"");if(B<100){B=100}I.iframeHTML=J.doctype+'';if(J.document_base_url!=n.documentBaseURL){I.iframeHTML+=''}if(J.ie7_compat){I.iframeHTML+=''}else{I.iframeHTML+=''}I.iframeHTML+='';for(A=0;A'}I.contentCSS=[];z=J.body_id||"tinymce";if(z.indexOf("=")!=-1){z=I.getParam("body_id","","hash");z=z[I.id]||z}D=J.body_class||"";if(D.indexOf("=")!=-1){D=I.getParam("body_class","","hash");D=D[I.id]||""}I.iframeHTML+='
      ";if(n.relaxedDomain&&(b||(n.isOpera&&parseFloat(opera.version())<11))){G='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+I.id+'");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()'}v=o.add(r.iframeContainer,"iframe",{id:I.id+"_ifr",src:G||'javascript:""',frameBorder:"0",allowTransparency:"true",title:J.aria_label,style:{width:"100%",height:B,display:"block"}});I.contentAreaContainer=r.iframeContainer;o.get(r.editorContainer).style.display=I.orgDisplay;o.get(I.id).style.display="none";o.setAttrib(I.id,"aria-hidden",true);if(!n.relaxedDomain||!G){I.setupIframe()}E=v=r=null},setupIframe:function(){var r=this,x=r.settings,y=o.get(r.id),z=r.getDoc(),v,q;if(!b||!n.relaxedDomain){z.open();z.write(r.iframeHTML);z.close();if(n.relaxedDomain){z.domain=n.relaxedDomain}}q=r.getBody();q.disabled=true;if(!x.readonly){q.contentEditable=true}q.disabled=false;r.schema=new n.html.Schema(x);r.dom=new n.dom.DOMUtils(r.getDoc(),{keep_values:true,url_converter:r.convertURL,url_converter_scope:r,hex_colors:x.force_hex_style_colors,class_filter:x.class_filter,update_styles:1,fix_ie_paragraphs:1,schema:r.schema});r.parser=new n.html.DomParser(x,r.schema);if(!r.settings.allow_html_in_named_anchor){r.parser.addAttributeFilter("name",function(s,t){var B=s.length,D,A,C,E;while(B--){E=s[B];if(E.name==="a"&&E.firstChild){C=E.parent;D=E.lastChild;do{A=D.prev;C.insert(D,E);D=A}while(D)}}})}r.parser.addAttributeFilter("src,href,style",function(s,t){var A=s.length,C,E=r.dom,D,B;while(A--){C=s[A];D=C.attr(t);B="data-mce-"+t;if(!C.attributes.map[B]){if(t==="style"){C.attr(B,E.serializeStyle(E.parseStyle(D),C.name))}else{C.attr(B,r.convertURL(D,t,C.name))}}}});r.parser.addNodeFilter("script",function(s,t){var A=s.length,B;while(A--){B=s[A];B.attr("type","mce-"+(B.attr("type")||"text/javascript"))}});r.parser.addNodeFilter("#cdata",function(s,t){var A=s.length,B;while(A--){B=s[A];B.type=8;B.name="#comment";B.value="[CDATA["+B.value+"]]"}});r.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(t,A){var B=t.length,C,s=r.schema.getNonEmptyElements();while(B--){C=t[B];if(C.isEmpty(s)){C.empty().append(new n.html.Node("br",1)).shortEnded=true}}});r.serializer=new n.dom.Serializer(x,r.dom,r.schema);r.selection=new n.dom.Selection(r.dom,r.getWin(),r.serializer);r.formatter=new n.Formatter(this);r.formatter.register({alignleft:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"}},{selector:"img,table",collapsed:false,styles:{"float":"left"}}],aligncenter:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"}},{selector:"img",collapsed:false,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:false,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"right"}},{selector:"img,table",collapsed:false,styles:{"float":"right"}}],alignfull:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"justify"}}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:true},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:true},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},wrap_links:false},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},wrap_links:false},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},link:{inline:"a",selector:"a",remove:"all",split:true,deep:true,onmatch:function(s){return true},onformat:function(A,s,t){i(t,function(C,B){r.dom.setAttrib(A,B,C)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike",remove:"all",split:true,expand:false,block_expand:true,deep:true},{selector:"span",attributes:["style","class"],remove:"empty",split:true,expand:false,deep:true},{selector:"*",attributes:["style","class"],split:false,expand:false,deep:true}]});i("p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp".split(/\s/),function(s){r.formatter.register(s,{block:s,remove:"all"})});r.formatter.register(r.settings.formats);r.undoManager=new n.UndoManager(r);r.undoManager.onAdd.add(function(t,s){if(t.hasUndo()){return r.onChange.dispatch(r,s,t)}});r.undoManager.onUndo.add(function(t,s){return r.onUndo.dispatch(r,s,t)});r.undoManager.onRedo.add(function(t,s){return r.onRedo.dispatch(r,s,t)});r.forceBlocks=new n.ForceBlocks(r,{forced_root_block:x.forced_root_block});r.editorCommands=new n.EditorCommands(r);r.serializer.onPreProcess.add(function(s,t){return r.onPreProcess.dispatch(r,t,s)});r.serializer.onPostProcess.add(function(s,t){return r.onPostProcess.dispatch(r,t,s)});r.onPreInit.dispatch(r);if(!x.gecko_spellcheck){r.getBody().spellcheck=0}if(!x.readonly){r._addEvents()}r.controlManager.onPostRender.dispatch(r,r.controlManager);r.onPostRender.dispatch(r);r.quirks=new n.util.Quirks(this);if(x.directionality){r.getBody().dir=x.directionality}if(x.nowrap){r.getBody().style.whiteSpace="nowrap"}if(x.handle_node_change_callback){r.onNodeChange.add(function(t,s,A){r.execCallback("handle_node_change_callback",r.id,A,-1,-1,true,r.selection.isCollapsed())})}if(x.save_callback){r.onSaveContent.add(function(s,A){var t=r.execCallback("save_callback",r.id,A.content,r.getBody());if(t){A.content=t}})}if(x.onchange_callback){r.onChange.add(function(t,s){r.execCallback("onchange_callback",r,s)})}if(x.protect){r.onBeforeSetContent.add(function(s,t){if(x.protect){i(x.protect,function(A){t.content=t.content.replace(A,function(B){return""})})}})}if(x.convert_newlines_to_brs){r.onBeforeSetContent.add(function(s,t){if(t.initial){t.content=t.content.replace(/\r?\n/g,"
      ")}})}if(x.preformatted){r.onPostProcess.add(function(s,t){t.content=t.content.replace(/^\s*/,"");t.content=t.content.replace(/<\/pre>\s*$/,"");if(t.set){t.content='
      '+t.content+"
      "}})}if(x.verify_css_classes){r.serializer.attribValueFilter=function(C,A){var B,t;if(C=="class"){if(!r.classesRE){t=r.dom.getClasses();if(t.length>0){B="";i(t,function(s){B+=(B?"|":"")+s["class"]});r.classesRE=new RegExp("("+B+")","gi")}}return !r.classesRE||/(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(A)||r.classesRE.test(A)?A:""}return A}}if(x.cleanup_callback){r.onBeforeSetContent.add(function(s,t){t.content=r.execCallback("cleanup_callback","insert_to_editor",t.content,t)});r.onPreProcess.add(function(s,t){if(t.set){r.execCallback("cleanup_callback","insert_to_editor_dom",t.node,t)}if(t.get){r.execCallback("cleanup_callback","get_from_editor_dom",t.node,t)}});r.onPostProcess.add(function(s,t){if(t.set){t.content=r.execCallback("cleanup_callback","insert_to_editor",t.content,t)}if(t.get){t.content=r.execCallback("cleanup_callback","get_from_editor",t.content,t)}})}if(x.save_callback){r.onGetContent.add(function(s,t){if(t.save){t.content=r.execCallback("save_callback",r.id,t.content,r.getBody())}})}if(x.handle_event_callback){r.onEvent.add(function(s,t,A){if(r.execCallback("handle_event_callback",t,s,A)===false){k.cancel(t)}})}r.onSetContent.add(function(){r.addVisual(r.getBody())});if(x.padd_empty_editor){r.onPostProcess.add(function(s,t){t.content=t.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
      [\r\n]*)$/,"")})}if(a){function u(s,t){i(s.dom.select("a"),function(B){var A=B.parentNode;if(s.dom.isBlock(A)&&A.lastChild===B){s.dom.add(A,"br",{"data-mce-bogus":1})}})}r.onExecCommand.add(function(s,t){if(t==="CreateLink"){u(s)}});r.onSetContent.add(r.selection.onSetContent.add(u))}r.load({initial:true,format:"html"});r.startContent=r.getContent({format:"raw"});r.undoManager.add();r.initialized=true;r.onInit.dispatch(r);r.execCallback("setupcontent_callback",r.id,r.getBody(),r.getDoc());r.execCallback("init_instance_callback",r);r.focus(true);r.nodeChanged({initial:1});i(r.contentCSS,function(s){r.dom.loadCSS(s)});if(x.auto_focus){setTimeout(function(){var s=n.get(x.auto_focus);s.selection.select(s.getBody(),1);s.selection.collapse(1);s.getBody().focus();s.getWin().focus()},100)}y=null},focus:function(v){var z,r=this,u=r.selection,y=r.settings.content_editable,s,q,x=r.getDoc();if(!v){s=u.getRng();if(s.item){q=s.item(0)}r._refreshContentEditable();if(!y){r.getWin().focus()}if(n.isGecko){r.getBody().focus()}if(q&&q.ownerDocument==x){s=x.body.createControlRange();s.addElement(q);s.select()}}if(n.activeEditor!=r){if((z=n.activeEditor)!=null){z.onDeactivate.dispatch(z,r)}r.onActivate.dispatch(r,z)}n._setActive(r)},execCallback:function(v){var q=this,u=q.settings[v],r;if(!u){return}if(q.callbackLookup&&(r=q.callbackLookup[v])){u=r.func;r=r.scope}if(d(u,"string")){r=u.replace(/\.\w+$/,"");r=r?n.resolve(r):0;u=n.resolve(u);q.callbackLookup=q.callbackLookup||{};q.callbackLookup[v]={func:u,scope:r}}return u.apply(r||q,Array.prototype.slice.call(arguments,1))},translate:function(q){var t=this.settings.language||"en",r=n.i18n;if(!q){return""}return r[t+"."+q]||q.replace(/{\#([^}]+)\}/g,function(u,s){return r[t+"."+s]||"{#"+s+"}"})},getLang:function(r,q){return n.i18n[(this.settings.language||"en")+"."+r]||(d(q)?q:"{#"+r+"}")},getParam:function(x,s,q){var t=n.trim,r=d(this.settings[x])?this.settings[x]:s,u;if(q==="hash"){u={};if(d(r,"string")){i(r.indexOf("=")>0?r.split(/[;,](?![^=;,]*(?:[;,]|$))/):r.split(","),function(y){y=y.split("=");if(y.length>1){u[t(y[0])]=t(y[1])}else{u[t(y[0])]=t(y)}})}else{u=r}return u}return r},nodeChanged:function(u){var q=this,r=q.selection,v=r.getStart()||q.getBody();if(q.initialized){u=u||{};v=b&&v.ownerDocument!=q.getDoc()?q.getBody():v;u.parents=[];q.dom.getParent(v,function(s){if(s.nodeName=="BODY"){return true}u.parents.push(s)});q.onNodeChange.dispatch(q,u?u.controlManager||q.controlManager:q.controlManager,v,r.isCollapsed(),u)}},addButton:function(u,r){var q=this;q.buttons=q.buttons||{};q.buttons[u]=r},addCommand:function(q,s,r){this.execCommands[q]={func:s,scope:r||this}},addQueryStateHandler:function(q,s,r){this.queryStateCommands[q]={func:s,scope:r||this}},addQueryValueHandler:function(q,s,r){this.queryValueCommands[q]={func:s,scope:r||this}},addShortcut:function(s,v,q,u){var r=this,x;if(!r.settings.custom_shortcuts){return false}r.shortcuts=r.shortcuts||{};if(d(q,"string")){x=q;q=function(){r.execCommand(x,false,null)}}if(d(q,"object")){x=q;q=function(){r.execCommand(x[0],x[1],x[2])}}i(g(s),function(t){var y={func:q,scope:u||this,desc:v,alt:false,ctrl:false,shift:false};i(g(t,"+"),function(z){switch(z){case"alt":case"ctrl":case"shift":y[z]=true;break;default:y.charCode=z.charCodeAt(0);y.keyCode=z.toUpperCase().charCodeAt(0)}});r.shortcuts[(y.ctrl?"ctrl":"")+","+(y.alt?"alt":"")+","+(y.shift?"shift":"")+","+y.keyCode]=y});return true},execCommand:function(y,x,A,q){var u=this,v=0,z,r;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(y)&&(!q||!q.skip_focus)){u.focus()}q=f({},q);u.onBeforeExecCommand.dispatch(u,y,x,A,q);if(q.terminate){return false}if(u.execCallback("execcommand_callback",u.id,u.selection.getNode(),y,x,A)){u.onExecCommand.dispatch(u,y,x,A,q);return true}if(z=u.execCommands[y]){r=z.func.call(z.scope,x,A);if(r!==true){u.onExecCommand.dispatch(u,y,x,A,q);return r}}i(u.plugins,function(s){if(s.execCommand&&s.execCommand(y,x,A)){u.onExecCommand.dispatch(u,y,x,A,q);v=1;return false}});if(v){return true}if(u.theme&&u.theme.execCommand&&u.theme.execCommand(y,x,A)){u.onExecCommand.dispatch(u,y,x,A,q);return true}if(u.editorCommands.execCommand(y,x,A)){u.onExecCommand.dispatch(u,y,x,A,q);return true}u.getDoc().execCommand(y,x,A);u.onExecCommand.dispatch(u,y,x,A,q)},queryCommandState:function(v){var r=this,x,u;if(r._isHidden()){return}if(x=r.queryStateCommands[v]){u=x.func.call(x.scope);if(u!==true){return u}}x=r.editorCommands.queryCommandState(v);if(x!==-1){return x}try{return this.getDoc().queryCommandState(v)}catch(q){}},queryCommandValue:function(x){var r=this,v,u;if(r._isHidden()){return}if(v=r.queryValueCommands[x]){u=v.func.call(v.scope);if(u!==true){return u}}v=r.editorCommands.queryCommandValue(x);if(d(v)){return v}try{return this.getDoc().queryCommandValue(x)}catch(q){}},show:function(){var q=this;o.show(q.getContainer());o.hide(q.id);q.load()},hide:function(){var q=this,r=q.getDoc();if(b&&r){r.execCommand("SelectAll")}q.save();o.hide(q.getContainer());o.setStyle(q.id,"display",q.orgDisplay)},isHidden:function(){return !o.isHidden(this.id)},setProgressState:function(q,r,s){this.onSetProgressState.dispatch(this,q,r,s);return q},load:function(u){var q=this,s=q.getElement(),r;if(s){u=u||{};u.load=true;r=q.setContent(d(s.value)?s.value:s.innerHTML,u);u.element=s;if(!u.no_events){q.onLoadContent.dispatch(q,u)}u.element=s=null;return r}},save:function(v){var q=this,u=q.getElement(),r,s;if(!u||!q.initialized){return}v=v||{};v.save=true;if(!v.no_events){q.undoManager.typing=false;q.undoManager.add()}v.element=u;r=v.content=q.getContent(v);if(!v.no_events){q.onSaveContent.dispatch(q,v)}r=v.content;if(!/TEXTAREA|INPUT/i.test(u.nodeName)){u.innerHTML=r;if(s=o.getParent(q.id,"form")){i(s.elements,function(t){if(t.name==q.id){t.value=r;return false}})}}else{u.value=r}v.element=u=null;return r},setContent:function(v,t){var s=this,r,q=s.getBody(),u;t=t||{};t.format=t.format||"html";t.set=true;t.content=v;if(!t.no_events){s.onBeforeSetContent.dispatch(s,t)}v=t.content;if(!n.isIE&&(v.length===0||/^\s+$/.test(v))){u=s.settings.forced_root_block;if(u){v="<"+u+'>
      "}else{v='
      '}q.innerHTML=v;s.selection.select(q,true);s.selection.collapse(true);return}if(t.format!=="raw"){v=new n.html.Serializer({},s.schema).serialize(s.parser.parse(v))}t.content=n.trim(v);s.dom.setHTML(q,t.content);if(!t.no_events){s.onSetContent.dispatch(s,t)}s.selection.normalize();return t.content},getContent:function(r){var q=this,s;r=r||{};r.format=r.format||"html";r.get=true;if(!r.no_events){q.onBeforeGetContent.dispatch(q,r)}if(r.format=="raw"){s=q.getBody().innerHTML}else{s=q.serializer.serialize(q.getBody(),r)}r.content=n.trim(s);if(!r.no_events){q.onGetContent.dispatch(q,r)}return r.content},isDirty:function(){var q=this;return n.trim(q.startContent)!=n.trim(q.getContent({format:"raw",no_events:1}))&&!q.isNotDirty},getContainer:function(){var q=this;if(!q.container){q.container=o.get(q.editorContainer||q.id+"_parent")}return q.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return o.get(this.settings.content_element||this.id)},getWin:function(){var q=this,r;if(!q.contentWindow){r=o.get(q.id+"_ifr");if(r){q.contentWindow=r.contentWindow}}return q.contentWindow},getDoc:function(){var r=this,q;if(!r.contentDocument){q=r.getWin();if(q){r.contentDocument=q.document}}return r.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(q,y,x){var r=this,v=r.settings;if(v.urlconverter_callback){return r.execCallback("urlconverter_callback",q,x,true,y)}if(!v.convert_urls||(x&&x.nodeName=="LINK")||q.indexOf("file:")===0){return q}if(v.relative_urls){return r.documentBaseURI.toRelative(q)}q=r.documentBaseURI.toAbsolute(q,v.remove_script_host);return q},addVisual:function(u){var q=this,r=q.settings;u=u||q.getBody();if(!d(q.hasVisual)){q.hasVisual=r.visual}i(q.dom.select("table,a",u),function(t){var s;switch(t.nodeName){case"TABLE":s=q.dom.getAttrib(t,"border");if(!s||s=="0"){if(q.hasVisual){q.dom.addClass(t,r.visual_table_class)}else{q.dom.removeClass(t,r.visual_table_class)}}return;case"A":s=q.dom.getAttrib(t,"name");if(s){if(q.hasVisual){q.dom.addClass(t,"mceItemAnchor")}else{q.dom.removeClass(t,"mceItemAnchor")}}return}});q.onVisualAid.dispatch(q,u,q.hasVisual)},remove:function(){var q=this,r=q.getContainer();q.removed=1;q.hide();q.execCallback("remove_instance_callback",q);q.onRemove.dispatch(q);q.onExecCommand.listeners=[];n.remove(q);o.remove(r)},destroy:function(r){var q=this;if(q.destroyed){return}if(!r){n.removeUnload(q.destroy);tinyMCE.onBeforeUnload.remove(q._beforeUnload);if(q.theme&&q.theme.destroy){q.theme.destroy()}q.controlManager.destroy();q.selection.destroy();q.dom.destroy();if(!q.settings.content_editable){k.clear(q.getWin());k.clear(q.getDoc())}k.clear(q.getBody());k.clear(q.formElement)}if(q.formElement){q.formElement.submit=q.formElement._mceOldSubmit;q.formElement._mceOldSubmit=null}q.contentAreaContainer=q.formElement=q.container=q.settings.content_element=q.bodyElement=q.contentDocument=q.contentWindow=null;if(q.selection){q.selection=q.selection.win=q.selection.dom=q.selection.dom.doc=null}q.destroyed=1},_addEvents:function(){var D=this,u,E=D.settings,r=D.dom,y={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};function q(t,F){var s=t.type;if(D.removed){return}if(D.onEvent.dispatch(D,t,F)!==false){D[y[t.fakeType||t.type]].dispatch(D,t,F)}}i(y,function(t,s){switch(s){case"contextmenu":r.bind(D.getDoc(),s,q);break;case"paste":r.bind(D.getBody(),s,function(F){q(F)});break;case"submit":case"reset":r.bind(D.getElement().form||o.getParent(D.id,"form"),s,q);break;default:r.bind(E.content_editable?D.getBody():D.getDoc(),s,q)}});r.bind(E.content_editable?D.getBody():(a?D.getDoc():D.getWin()),"focus",function(s){D.focus(true)});if(n.isGecko){r.bind(D.getDoc(),"DOMNodeInserted",function(t){var s;t=t.target;if(t.nodeType===1&&t.nodeName==="IMG"&&(s=t.getAttribute("data-mce-src"))){t.src=D.documentBaseURI.toAbsolute(s)}})}if(a){function v(){var G=this,I=G.getDoc(),H=G.settings;if(a&&!H.readonly){G._refreshContentEditable();try{I.execCommand("styleWithCSS",0,false)}catch(F){if(!G._isHidden()){try{I.execCommand("useCSS",0,true)}catch(F){}}}if(!H.table_inline_editing){try{I.execCommand("enableInlineTableEditing",false,false)}catch(F){}}if(!H.object_resizing){try{I.execCommand("enableObjectResizing",false,false)}catch(F){}}}}D.onBeforeExecCommand.add(v);D.onMouseDown.add(v)}D.onMouseUp.add(D.nodeChanged);D.onKeyUp.add(function(s,t){var F=t.keyCode;if((F>=33&&F<=36)||(F>=37&&F<=40)||F==13||F==45||F==46||F==8||(n.isMac&&(F==91||F==93))||t.ctrlKey){D.nodeChanged()}});D.onKeyDown.add(function(t,F){if(F.keyCode!=j.BACKSPACE){return}var s=t.selection.getRng();if(!s.collapsed){return}var H=s.startContainer;var G=s.startOffset;while(H&&H.nodeType&&H.nodeType!=1&&H.parentNode){H=H.parentNode}if(H&&H.parentNode&&H.parentNode.tagName==="BLOCKQUOTE"&&H.parentNode.firstChild==H&&G==0){t.formatter.toggle("blockquote",null,H.parentNode);s.setStart(H,0);s.setEnd(H,0);t.selection.setRng(s);t.selection.collapse(false)}});D.onReset.add(function(){D.setContent(D.startContent,{format:"raw"})});if(E.custom_shortcuts){if(E.custom_undo_redo_keyboard_shortcuts){D.addShortcut("ctrl+z",D.getLang("undo_desc"),"Undo");D.addShortcut("ctrl+y",D.getLang("redo_desc"),"Redo")}D.addShortcut("ctrl+b",D.getLang("bold_desc"),"Bold");D.addShortcut("ctrl+i",D.getLang("italic_desc"),"Italic");D.addShortcut("ctrl+u",D.getLang("underline_desc"),"Underline");for(u=1;u<=6;u++){D.addShortcut("ctrl+"+u,"",["FormatBlock",false,"h"+u])}D.addShortcut("ctrl+7","",["FormatBlock",false,"p"]);D.addShortcut("ctrl+8","",["FormatBlock",false,"div"]);D.addShortcut("ctrl+9","",["FormatBlock",false,"address"]);function x(t){var s=null;if(!t.altKey&&!t.ctrlKey&&!t.metaKey){return s}i(D.shortcuts,function(F){if(n.isMac&&F.ctrl!=t.metaKey){return}else{if(!n.isMac&&F.ctrl!=t.ctrlKey){return}}if(F.alt!=t.altKey){return}if(F.shift!=t.shiftKey){return}if(t.keyCode==F.keyCode||(t.charCode&&t.charCode==F.charCode)){s=F;return false}});return s}D.onKeyUp.add(function(s,t){var F=x(t);if(F){return k.cancel(t)}});D.onKeyPress.add(function(s,t){var F=x(t);if(F){return k.cancel(t)}});D.onKeyDown.add(function(s,t){var F=x(t);if(F){F.func.call(F.scope);return k.cancel(t)}})}if(n.isIE){r.bind(D.getDoc(),"controlselect",function(F){var t=D.resizeInfo,s;F=F.target;if(F.nodeName!=="IMG"){return}if(t){r.unbind(t.node,t.ev,t.cb)}if(!r.hasClass(F,"mceItemNoResize")){ev="resizeend";s=r.bind(F,ev,function(H){var G;H=H.target;if(G=r.getStyle(H,"width")){r.setAttrib(H,"width",G.replace(/[^0-9%]+/g,""));r.setStyle(H,"width","")}if(G=r.getStyle(H,"height")){r.setAttrib(H,"height",G.replace(/[^0-9%]+/g,""));r.setStyle(H,"height","")}})}else{ev="resizestart";s=r.bind(F,"resizestart",k.cancel,k)}t=D.resizeInfo={node:F,ev:ev,cb:s}})}if(n.isOpera){D.onClick.add(function(s,t){k.prevent(t)})}if(E.custom_undo_redo){function A(){D.undoManager.typing=false;D.undoManager.add()}var z=n.isGecko?"blur":"focusout";r.bind(D.getDoc(),z,function(s){if(!D.removed&&D.undoManager.typing){A()}});D.dom.bind(D.dom.getRoot(),"dragend",function(s){A()});D.onKeyUp.add(function(s,F){var t=F.keyCode;if((t>=33&&t<=36)||(t>=37&&t<=40)||t==13||t==45||F.ctrlKey){A()}});D.onKeyDown.add(function(s,G){var F=G.keyCode,t;if(F==8){t=D.getDoc().selection;if(t&&t.createRange&&t.createRange().item){D.undoManager.beforeChange();s.dom.remove(t.createRange().item(0));A();return k.cancel(G)}}if((F>=33&&F<=36)||(F>=37&&F<=40)||F==13||F==45){if(n.isIE&&F==13){D.undoManager.beforeChange()}if(D.undoManager.typing){A()}return}if((F<16||F>20)&&F!=224&&F!=91&&!D.undoManager.typing){D.undoManager.beforeChange();D.undoManager.typing=true;D.undoManager.add()}});D.onMouseDown.add(function(){if(D.undoManager.typing){A()}})}if(n.isGecko){function C(){var s=D.dom.getAttribs(D.selection.getStart().cloneNode(false));return function(){var t=D.selection.getStart();if(t!==D.getBody()){D.dom.setAttrib(t,"style",null);i(s,function(F){t.setAttributeNode(F.cloneNode(true))})}}}function B(){var t=D.selection;return !t.isCollapsed()&&t.getStart()!=t.getEnd()}D.onKeyPress.add(function(s,F){var t;if((F.keyCode==8||F.keyCode==46)&&B()){t=C();D.getDoc().execCommand("delete",false,null);t();return k.cancel(F)}});D.dom.bind(D.getDoc(),"cut",function(t){var s;if(B()){s=C();D.onKeyUp.addToTop(k.cancel,k);setTimeout(function(){s();D.onKeyUp.remove(k.cancel,k)},0)}})}},_refreshContentEditable:function(){var r=this,q,s;if(r._isHidden()){q=r.getBody();s=q.parentNode;s.removeChild(q);s.appendChild(q);q.focus()}},_isHidden:function(){var q;if(!a){return 0}q=this.selection.getSel();return(!q||!q.rangeCount||q.rangeCount==0)}})})(tinymce);(function(c){var d=c.each,e,a=true,b=false;c.EditorCommands=function(n){var m=n.dom,p=n.selection,j={state:{},exec:{},value:{}},k=n.settings,q=n.formatter,o;function r(z,y,x){var v;z=z.toLowerCase();if(v=j.exec[z]){v(z,y,x);return a}return b}function l(x){var v;x=x.toLowerCase();if(v=j.state[x]){return v(x)}return -1}function h(x){var v;x=x.toLowerCase();if(v=j.value[x]){return v(x)}return b}function u(v,x){x=x||"exec";d(v,function(z,y){d(y.toLowerCase().split(","),function(A){j[x][A]=z})})}c.extend(this,{execCommand:r,queryCommandState:l,queryCommandValue:h,addCommands:u});function f(y,x,v){if(x===e){x=b}if(v===e){v=null}return n.getDoc().execCommand(y,x,v)}function t(v){return q.match(v)}function s(v,x){q.toggle(v,x?{value:x}:e)}function i(v){o=p.getBookmark(v)}function g(){p.moveToBookmark(o)}u({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){n.undoManager.add()},"Cut,Copy,Paste":function(z){var y=n.getDoc(),v;try{f(z)}catch(x){v=a}if(v||!y.queryCommandSupported(z)){if(c.isGecko){n.windowManager.confirm(n.getLang("clipboard_msg"),function(A){if(A){open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}})}else{n.windowManager.alert(n.getLang("clipboard_no_support"))}}},unlink:function(v){if(p.isCollapsed()){p.select(p.getNode())}f(v);p.collapse(b)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(v){var x=v.substring(7);d("left,center,right,full".split(","),function(y){if(x!=y){q.remove("align"+y)}});s("align"+x);r("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(y){var v,x;f(y);v=m.getParent(p.getNode(),"ol,ul");if(v){x=v.parentNode;if(/^(H[1-6]|P|ADDRESS|PRE)$/.test(x.nodeName)){i();m.split(x,v);g()}}},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){s(v)},"ForeColor,HiliteColor,FontName":function(y,x,v){s(y,v)},FontSize:function(z,y,x){var v,A;if(x>=1&&x<=7){A=c.explode(k.font_size_style_values);v=c.explode(k.font_size_classes);if(v){x=v[x-1]||x}else{x=A[x-1]||x}}s(z,x)},RemoveFormat:function(v){q.remove(v)},mceBlockQuote:function(v){s("blockquote")},FormatBlock:function(y,x,v){return s(v||"p")},mceCleanup:function(){var v=p.getBookmark();n.setContent(n.getContent({cleanup:a}),{cleanup:a});p.moveToBookmark(v)},mceRemoveNode:function(z,y,x){var v=x||p.getNode();if(v!=n.getBody()){i();n.dom.remove(v,a);g()}},mceSelectNodeDepth:function(z,y,x){var v=0;m.getParent(p.getNode(),function(A){if(A.nodeType==1&&v++==x){p.select(A);return b}},n.getBody())},mceSelectNode:function(y,x,v){p.select(v)},mceInsertContent:function(B,I,K){var y,J,E,z,F,G,D,C,L,x,A,M,v,H;y=n.parser;J=new c.html.Serializer({},n.schema);v='\uFEFF';G={content:K,format:"html"};p.onBeforeSetContent.dispatch(p,G);K=G.content;if(K.indexOf("{$caret}")==-1){K+="{$caret}"}K=K.replace(/\{\$caret\}/,v);if(!p.isCollapsed()){n.getDoc().execCommand("Delete",false,null)}E=p.getNode();G={context:E.nodeName.toLowerCase()};F=y.parse(K,G);A=F.lastChild;if(A.attr("id")=="mce_marker"){D=A;for(A=A.prev;A;A=A.walk(true)){if(A.type==3||!m.isBlock(A.name)){A.parent.insert(D,A,A.name==="br");break}}}if(!G.invalid){K=J.serialize(F);A=E.firstChild;M=E.lastChild;if(!A||(A===M&&A.nodeName==="BR")){m.setHTML(E,K)}else{p.setContent(K)}}else{p.setContent(v);E=n.selection.getNode();z=n.getBody();if(E.nodeType==9){E=A=z}else{A=E}while(A!==z){E=A;A=A.parentNode}K=E==z?z.innerHTML:m.getOuterHTML(E);K=J.serialize(y.parse(K.replace(//i,function(){return J.serialize(F)})));if(E==z){m.setHTML(z,K)}else{m.setOuterHTML(E,K)}}D=m.get("mce_marker");C=m.getRect(D);L=m.getViewPort(n.getWin());if((C.y+C.h>L.y+L.h||C.yL.x+L.w||C.x")},mceToggleVisualAid:function(){n.hasVisual=!n.hasVisual;n.addVisual()},mceReplaceContent:function(y,x,v){n.execCommand("mceInsertContent",false,v.replace(/\{\$selection\}/g,p.getContent({format:"text"})))},mceInsertLink:function(z,y,x){var v;if(typeof(x)=="string"){x={href:x}}v=m.getParent(p.getNode(),"a");x.href=x.href.replace(" ","%20");if(!v||!x.href){q.remove("link")}if(x.href){q.apply("link",x,v)}},selectAll:function(){var x=m.getRoot(),v=m.createRng();v.setStart(x,0);v.setEnd(x,x.childNodes.length);n.selection.setRng(v)}});u({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(z){var x="align"+z.substring(7);var v=p.isCollapsed()?[p.getNode()]:p.getSelectedBlocks();var y=c.map(v,function(A){return !!q.matchNode(A,x)});return c.inArray(y,a)!==-1},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){return t(v)},mceBlockQuote:function(){return t("blockquote")},Outdent:function(){var v;if(k.inline_styles){if((v=m.getParent(p.getStart(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}if((v=m.getParent(p.getEnd(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}}return l("InsertUnorderedList")||l("InsertOrderedList")||(!k.inline_styles&&!!m.getParent(p.getNode(),"BLOCKQUOTE"))},"InsertUnorderedList,InsertOrderedList":function(v){return m.getParent(p.getNode(),v=="insertunorderedlist"?"UL":"OL")}},"state");u({"FontSize,FontName":function(y){var x=0,v;if(v=m.getParent(p.getNode(),"span")){if(y=="fontsize"){x=v.style.fontSize}else{x=v.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()}}return x}},"value");if(k.custom_undo_redo){u({Undo:function(){n.undoManager.undo()},Redo:function(){n.undoManager.redo()}})}}})(tinymce);(function(b){var a=b.util.Dispatcher;b.UndoManager=function(f){var d,e=0,h=[],c;function g(){return b.trim(f.getContent({format:"raw",no_events:1}))}return d={typing:false,onAdd:new a(d),onUndo:new a(d),onRedo:new a(d),beforeChange:function(){c=f.selection.getBookmark(2,true)},add:function(m){var j,k=f.settings,l;m=m||{};m.content=g();l=h[e];if(l&&l.content==m.content){return null}if(h[e]){h[e].beforeBookmark=c}if(k.custom_undo_redo_levels){if(h.length>k.custom_undo_redo_levels){for(j=0;j0){k=h[--e];f.setContent(k.content,{format:"raw"});f.selection.moveToBookmark(k.beforeBookmark);d.onUndo.dispatch(d,k)}return k},redo:function(){var i;if(e0||this.typing},hasRedo:function(){return e');q.replace(p,m);o.select(p,1)}return g}return d}l.create("tinymce.ForceBlocks",{ForceBlocks:function(m){var n=this,o=m.settings,p;n.editor=m;n.dom=m.dom;p=(o.forced_root_block||"p").toLowerCase();o.element=p.toUpperCase();m.onPreInit.add(n.setup,n)},setup:function(){var n=this,m=n.editor,p=m.settings,u=m.dom,o=m.selection,q=m.schema.getBlockElements();if(p.forced_root_block){function v(){var y=o.getStart(),t=m.getBody(),s,z,D,F,E,x,A,B=-16777215;if(!y||y.nodeType!==1){return}while(y!=t){if(q[y.nodeName]){return}y=y.parentNode}s=o.getRng();if(s.setStart){z=s.startContainer;D=s.startOffset;F=s.endContainer;E=s.endOffset}else{if(s.item){s=m.getDoc().body.createTextRange();s.moveToElementText(s.item(0))}tmpRng=s.duplicate();tmpRng.collapse(true);D=tmpRng.move("character",B)*-1;if(!tmpRng.collapsed){tmpRng=s.duplicate();tmpRng.collapse(false);E=(tmpRng.move("character",B)*-1)-D}}for(y=t.firstChild;y;y){if(y.nodeType===3||(y.nodeType==1&&!q[y.nodeName])){if(!x){x=u.create(p.forced_root_block);y.parentNode.insertBefore(x,y)}A=y;y=y.nextSibling;x.appendChild(A)}else{x=null;y=y.nextSibling}}if(s.setStart){s.setStart(z,D);s.setEnd(F,E);o.setRng(s)}else{try{s=m.getDoc().body.createTextRange();s.moveToElementText(t);s.collapse(true);s.moveStart("character",D);if(E>0){s.moveEnd("character",E)}s.select()}catch(C){}}m.nodeChanged()}m.onKeyUp.add(v);m.onClick.add(v)}if(p.force_br_newlines){if(c){m.onKeyPress.add(function(s,t){var x;if(t.keyCode==13&&o.getNode().nodeName!="LI"){o.setContent('
      ',{format:"raw"});x=u.get("__");x.removeAttribute("id");o.select(x);o.collapse();return j.cancel(t)}})}}if(p.force_p_newlines){if(!c){m.onKeyPress.add(function(s,t){if(t.keyCode==13&&!t.shiftKey&&!n.insertPara(t)){j.cancel(t)}})}else{l.addUnload(function(){n._previousFormats=0});m.onKeyPress.add(function(s,t){n._previousFormats=0;if(t.keyCode==13&&!t.shiftKey&&s.selection.isCollapsed()&&p.keep_styles){n._previousFormats=k(s.selection.getStart())}});m.onKeyUp.add(function(t,y){if(y.keyCode==13&&!y.shiftKey){var x=t.selection.getStart(),s=n._previousFormats;if(!x.hasChildNodes()&&s){x=u.getParent(x,u.isBlock);if(x&&x.nodeName!="LI"){x.innerHTML="";if(n._previousFormats){x.appendChild(s.wrapper);s.inner.innerHTML="\uFEFF"}else{x.innerHTML="\uFEFF"}o.select(x,1);o.collapse(true);t.getDoc().execCommand("Delete",false,null);n._previousFormats=0}}}})}if(a){m.onKeyDown.add(function(s,t){if((t.keyCode==8||t.keyCode==46)&&!t.shiftKey){n.backspaceDelete(t,t.keyCode==8)}})}}if(l.isWebKit){function r(t){var s=o.getRng(),x,A=u.create("div",null," "),z,y=u.getViewPort(t.getWin()).h;s.insertNode(x=u.create("br"));s.setStartAfter(x);s.setEndAfter(x);o.setRng(s);if(o.getSel().focusNode==x.previousSibling){o.select(u.insertAfter(u.doc.createTextNode("\u00a0"),x));o.collapse(d)}u.insertAfter(A,x);z=u.getPos(A).y;u.remove(A);if(z>y){t.getWin().scrollTo(0,z)}}m.onKeyPress.add(function(s,t){if(t.keyCode==13&&(t.shiftKey||(p.force_br_newlines&&!u.getParent(o.getNode(),"h1,h2,h3,h4,h5,h6,ol,ul")))){r(s);j.cancel(t)}})}if(c){if(p.element!="P"){m.onKeyPress.add(function(s,t){n.lastElm=o.getNode().nodeName});m.onKeyUp.add(function(t,x){var z,y=o.getNode(),s=t.getBody();if(s.childNodes.length===1&&y.nodeName=="P"){y=u.rename(y,p.element);o.select(y);o.collapse();t.nodeChanged()}else{if(x.keyCode==13&&!x.shiftKey&&n.lastElm!="P"){z=u.getParent(y,"p");if(z){u.rename(z,p.element);t.nodeChanged()}}}})}}},getParentBlock:function(o){var m=this.dom;return m.getParent(o,m.isBlock)},insertPara:function(Q){var E=this,v=E.editor,M=v.dom,R=v.getDoc(),V=v.settings,F=v.selection.getSel(),G=F.getRangeAt(0),U=R.body;var J,K,H,O,N,q,o,u,z,m,C,T,p,x,I,L=M.getViewPort(v.getWin()),B,D,A;v.undoManager.beforeChange();J=R.createRange();J.setStart(F.anchorNode,F.anchorOffset);J.collapse(d);K=R.createRange();K.setStart(F.focusNode,F.focusOffset);K.collapse(d);H=J.compareBoundaryPoints(J.START_TO_END,K)<0;O=H?F.anchorNode:F.focusNode;N=H?F.anchorOffset:F.focusOffset;q=H?F.focusNode:F.anchorNode;o=H?F.focusOffset:F.anchorOffset;if(O===q&&/^(TD|TH)$/.test(O.nodeName)){if(O.firstChild.nodeName=="BR"){M.remove(O.firstChild)}if(O.childNodes.length==0){v.dom.add(O,V.element,null,"
      ");T=v.dom.add(O,V.element,null,"
      ")}else{I=O.innerHTML;O.innerHTML="";v.dom.add(O,V.element,null,I);T=v.dom.add(O,V.element,null,"
      ")}G=R.createRange();G.selectNodeContents(T);G.collapse(1);v.selection.setRng(G);return g}if(O==U&&q==U&&U.firstChild&&v.dom.isBlock(U.firstChild)){O=q=O.firstChild;N=o=0;J=R.createRange();J.setStart(O,0);K=R.createRange();K.setStart(q,0)}if(!R.body.hasChildNodes()){R.body.appendChild(M.create("br"))}O=O.nodeName=="HTML"?R.body:O;O=O.nodeName=="BODY"?O.firstChild:O;q=q.nodeName=="HTML"?R.body:q;q=q.nodeName=="BODY"?q.firstChild:q;u=E.getParentBlock(O);z=E.getParentBlock(q);m=u?u.nodeName:V.element;if(I=E.dom.getParent(u,"li,pre")){if(I.nodeName=="LI"){return e(v.selection,E.dom,I)}return d}if(u&&(u.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(M.getStyle(u,"position",1)))){m=V.element;u=null}if(z&&(z.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(M.getStyle(u,"position",1)))){m=V.element;z=null}if(/(TD|TABLE|TH|CAPTION)/.test(m)||(u&&m=="DIV"&&/left|right/gi.test(M.getStyle(u,"float",1)))){m=V.element;u=z=null}C=(u&&u.nodeName==m)?u.cloneNode(0):v.dom.create(m);T=(z&&z.nodeName==m)?z.cloneNode(0):v.dom.create(m);T.removeAttribute("id");if(/^(H[1-6])$/.test(m)&&f(G,u)){T=v.dom.create(V.element)}I=p=O;do{if(I==U||I.nodeType==9||E.dom.isBlock(I)||/(TD|TABLE|TH|CAPTION)/.test(I.nodeName)){break}p=I}while((I=I.previousSibling?I.previousSibling:I.parentNode));I=x=q;do{if(I==U||I.nodeType==9||E.dom.isBlock(I)||/(TD|TABLE|TH|CAPTION)/.test(I.nodeName)){break}x=I}while((I=I.nextSibling?I.nextSibling:I.parentNode));if(p.nodeName==m){J.setStart(p,0)}else{J.setStartBefore(p)}J.setEnd(O,N);C.appendChild(J.cloneContents()||R.createTextNode(""));try{K.setEndAfter(x)}catch(P){}K.setStart(q,o);T.appendChild(K.cloneContents()||R.createTextNode(""));G=R.createRange();if(!p.previousSibling&&p.parentNode.nodeName==m){G.setStartBefore(p.parentNode)}else{if(J.startContainer.nodeName==m&&J.startOffset==0){G.setStartBefore(J.startContainer)}else{G.setStart(J.startContainer,J.startOffset)}}if(!x.nextSibling&&x.parentNode.nodeName==m){G.setEndAfter(x.parentNode)}else{G.setEnd(K.endContainer,K.endOffset)}G.deleteContents();if(b){v.getWin().scrollTo(0,L.y)}if(C.firstChild&&C.firstChild.nodeName==m){C.innerHTML=C.firstChild.innerHTML}if(T.firstChild&&T.firstChild.nodeName==m){T.innerHTML=T.firstChild.innerHTML}function S(y,s){var r=[],X,W,t;y.innerHTML="";if(V.keep_styles){W=s;do{if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(W.nodeName)){X=W.cloneNode(g);M.setAttrib(X,"id","");r.push(X)}}while(W=W.parentNode)}if(r.length>0){for(t=r.length-1,X=y;t>=0;t--){X=X.appendChild(r[t])}r[0].innerHTML=b?"\u00a0":"
      ";return r[0]}else{y.innerHTML=b?"\u00a0":"
      "}}if(M.isEmpty(C)){S(C,O)}if(M.isEmpty(T)){A=S(T,q)}if(b&&parseFloat(opera.version())<9.5){G.insertNode(C);G.insertNode(T)}else{G.insertNode(T);G.insertNode(C)}T.normalize();C.normalize();v.selection.select(T,true);v.selection.collapse(true);B=v.dom.getPos(T).y;if(BL.y+L.h){v.getWin().scrollTo(0,B1||ab==at){return ab}}}var al=V.selection.getRng();var ap=al.startContainer;var ak=al.endContainer;if(ap!=ak&&al.endOffset==0){var ao=am(ap,ak);var an=ao.nodeType==3?ao.length:ao.childNodes.length;al.setEnd(ao,an)}return al}function Y(an,at,aq,ap,al){var ak=[],am=-1,ar,av=-1,ao=-1,au;P(an.childNodes,function(ax,aw){if(ax.nodeName==="UL"||ax.nodeName==="OL"){am=aw;ar=ax;return false}});P(an.childNodes,function(ax,aw){if(ax.nodeName==="SPAN"&&c.getAttrib(ax,"data-mce-type")=="bookmark"){if(ax.id==at.id+"_start"){av=aw}else{if(ax.id==at.id+"_end"){ao=aw}}}});if(am<=0||(avam)){P(a.grep(an.childNodes),al);return 0}else{au=aq.cloneNode(S);P(a.grep(an.childNodes),function(ax,aw){if((avam&&aw>am)){ak.push(ax);ax.parentNode.removeChild(ax)}});if(avam){an.insertBefore(au,ar.nextSibling)}}ap.push(au);P(ak,function(aw){au.appendChild(aw)});return au}}function ai(al,an,ap){var ak=[],ao,am;ao=ah.inline||ah.block;am=c.create(ao);W(am);K.walk(al,function(aq){var ar;function at(au){var ax=au.nodeName.toLowerCase(),aw=au.parentNode.nodeName.toLowerCase(),av;if(g(ax,"br")){ar=0;if(ah.block){c.remove(au)}return}if(ah.wrapper&&x(au,Z,ag)){ar=0;return}if(ah.block&&!ah.wrapper&&G(ax)){au=c.rename(au,ao);W(au);ak.push(au);ar=0;return}if(ah.selector){P(ac,function(ay){if("collapsed" in ay&&ay.collapsed!==ad){return}if(c.is(au,ay.selector)&&!b(au)){W(au,ay);av=true}});if(!ah.inline||av){ar=0;return}}if(d(ao,ax)&&d(aw,ao)&&!(!ap&&au.nodeType===3&&au.nodeValue.length===1&&au.nodeValue.charCodeAt(0)===65279)&&!b(au)){if(!ar){ar=am.cloneNode(S);au.parentNode.insertBefore(ar,au);ak.push(ar)}ar.appendChild(au)}else{if(ax=="li"&&an){ar=Y(au,an,am,ak,at)}else{ar=0;P(a.grep(au.childNodes),at);ar=0}}}P(aq,at)});if(ah.wrap_links===false){P(ak,function(aq){function ar(aw){var av,au,at;if(aw.nodeName==="A"){au=am.cloneNode(S);ak.push(au);at=a.grep(aw.childNodes);for(av=0;av1||!F(at))&&aq===0){c.remove(at,1);return}if(ah.inline||ah.wrapper){if(!ah.exact&&aq===1){at=ar(at)}P(ac,function(av){P(c.select(av.inline,at),function(ax){var aw;if(av.wrap_links===false){aw=ax.parentNode;do{if(aw.nodeName==="A"){return}}while(aw=aw.parentNode)}U(av,ag,ax,av.exact?ax:null)})});if(x(at.parentNode,Z,ag)){c.remove(at,1);at=0;return B}if(ah.merge_with_parents){c.getParent(at.parentNode,function(av){if(x(av,Z,ag)){c.remove(at,1);at=0;return B}})}if(at&&ah.merge_siblings!==false){at=u(C(at),at);at=u(at,C(at,B))}}})}if(ah){if(ab){if(ab.nodeType){X=c.createRng();X.setStartBefore(ab);X.setEndAfter(ab);ai(o(X,ac),null,true)}else{ai(ab,null,true)}}else{if(!ad||!ah.inline||c.select("td.mceSelected,th.mceSelected").length){var aj=V.selection.getNode();V.selection.setRng(aa());af=q.getBookmark();ai(o(q.getRng(B),ac),af);if(ah.styles&&(ah.styles.color||ah.styles.textDecoration)){a.walk(aj,I,"childNodes");I(aj)}q.moveToBookmark(af);N(q.getRng(B));V.nodeChanged()}else{Q("apply",Z,ag)}}}}function A(Y,ag,aa){var ab=R(Y),ai=ab[0],af,ae,X;function Z(an){var am,al,ak;am=a.grep(an.childNodes);for(al=0,ak=ab.length;al=0;X--){W=ac[X].selector;if(!W){return B}for(ab=Y.length-1;ab>=0;ab--){if(c.is(Y[ab],W)){return B}}}}return S}a.extend(this,{get:R,register:k,apply:T,remove:A,toggle:D,match:j,matchAll:v,matchNode:x,canApply:y});function h(W,X){if(g(W,X.inline)){return B}if(g(W,X.block)){return B}if(X.selector){return c.is(W,X.selector)}}function g(X,W){X=X||"";W=W||"";X=""+(X.nodeName||X);W=""+(W.nodeName||W);return X.toLowerCase()==W.toLowerCase()}function L(X,W){var Y=c.getStyle(X,W);if(W=="color"||W=="backgroundColor"){Y=c.toHex(Y)}if(W=="fontWeight"&&Y==700){Y="bold"}return""+Y}function r(W,X){if(typeof(W)!="string"){W=W(X)}else{if(X){W=W.replace(/%(\w+)/g,function(Z,Y){return X[Y]||Z})}}return W}function f(W){return W&&W.nodeType===3&&/^([\t \r\n]+|)$/.test(W.nodeValue)}function O(Y,X,W){var Z=c.create(X,W);Y.parentNode.insertBefore(Z,Y);Z.appendChild(Y);return Z}function o(W,ai,Z){var Y=W.startContainer,ad=W.startOffset,al=W.endContainer,af=W.endOffset,ak,ah,ac,ag;function aj(ar){var am,ap,aq,ao,an;am=ap=ar?Y:al;an=ar?"previousSibling":"nextSibling";root=c.getRoot();if(am.nodeType==3&&!f(am)){if(ar?ad>0:afah?ah:ad];if(Y.nodeType==3){ad=0}}if(al.nodeType==1&&al.hasChildNodes()){ah=al.childNodes.length-1;al=al.childNodes[af>ah?ah:af-1];if(al.nodeType==3){af=al.nodeValue.length}}if(H(Y.parentNode)||H(Y)){Y=H(Y)?Y:Y.parentNode;Y=Y.nextSibling||Y;if(Y.nodeType==3){ad=0}}if(H(al.parentNode)||H(al)){al=H(al)?al:al.parentNode;al=al.previousSibling||al;if(al.nodeType==3){af=al.length}}if(ai[0].inline){if(W.collapsed){function ae(an,ar,au){var aq,ao,at,am;function ap(aw,ay){var az,av,ax=aw.nodeValue;if(typeof(ay)=="undefined"){ay=au?ax.length:0}if(au){az=ax.lastIndexOf(" ",ay);av=ax.lastIndexOf("\u00a0",ay);az=az>av?az:av;if(az!==-1&&!Z){az++}}else{az=ax.indexOf(" ",ay);av=ax.indexOf("\u00a0",ay);az=az!==-1&&(av===-1||az0&&ac.node.nodeType===3&&ac.node.nodeValue.charAt(ac.offset-1)===" "){if(ac.offset>1){al=ac.node;al.splitText(ac.offset-1)}else{if(ac.node.previousSibling){}}}}}if(ai[0].inline||ai[0].block_expand){if(!ai[0].inline||(Y.nodeType!=3||ad===0)){Y=aj(true)}if(!ai[0].inline||(al.nodeType!=3||af===al.nodeValue.length)){al=aj()}}if(ai[0].selector&&ai[0].expand!==S&&!ai[0].inline){function aa(an,am){var ao,ap,ar,aq;if(an.nodeType==3&&an.nodeValue.length==0&&an[am]){an=an[am]}ao=m(an);for(ap=0;apY?Y:aa]}if(W.nodeType===3&&ab&&aa>=W.nodeValue.length){W=new t(W,V.getBody()).next()||W}if(W.nodeType===3&&!ab&&aa==0){W=new t(W,V.getBody()).prev()||W}return W}function Q(af,W,ad){var ai,ag="_mce_caret",X=V.settings.caret_debug;ai=a.isGecko?"\u200B":E;function Y(ak){var aj=c.create("span",{id:ag,"data-mce-bogus":true,style:X?"color:red":""});if(ak){aj.appendChild(V.getDoc().createTextNode(ai))}return aj}function ae(ak,aj){while(ak){if((ak.nodeType===3&&ak.nodeValue!==ai)||ak.childNodes.length>1){return false}if(aj&&ak.nodeType===1){aj.push(ak)}ak=ak.firstChild}return true}function ab(aj){while(aj){if(aj.id===ag){return aj}aj=aj.parentNode}}function aa(aj){var ak;if(aj){ak=new t(aj,aj);for(aj=ak.current();aj;aj=ak.next()){if(aj.nodeType===3){return aj}}}}function Z(al,ak){var am,aj;if(!al){al=ab(q.getStart());if(!al){while(al=c.get(ag)){Z(al,false)}}}else{aj=q.getRng(true);if(ae(al)){if(ak!==false){aj.setStartBefore(al);aj.setEndBefore(al)}c.remove(al)}else{am=aa(al);if(am.nodeValue.charAt(0)===E){am=am.deleteData(0,1)}c.remove(al,1)}q.setRng(aj)}}function ac(){var al,aj,ap,ao,am,ak,an;al=q.getRng(true);ao=al.startOffset;ak=al.startContainer;an=ak.nodeValue;aj=ab(q.getStart());if(aj){ap=aa(aj)}if(an&&ao>0&&ao=0;an--){al.appendChild(ar[an].cloneNode(false));al=al.firstChild}al.appendChild(c.doc.createTextNode(ai));al=al.firstChild;c.insertAfter(aq,at);q.setCursorLocation(al,1)}}if(!self._hasCaretEvents){V.onBeforeGetContent.addToTop(function(){var aj=[],ak;if(ae(ab(q.getStart()),aj)){ak=aj.length;while(ak--){c.setAttrib(aj[ak],"data-mce-bogus","1")}}});a.each("onMouseUp onKeyUp".split(" "),function(aj){V[aj].addToTop(function(){Z()})});V.onKeyDown.addToTop(function(aj,al){var ak=al.keyCode;if(ak==8||ak==37||ak==39){Z(ab(q.getStart()))}});self._hasCaretEvents=true}if(af=="apply"){ac()}else{ah()}}function N(X){var W=X.startContainer,ac=X.startOffset,ab,aa,Y,Z;if(W.nodeType==3&&ac>=W.nodeValue.length-1){W=W.parentNode;ac=s(W)+1}if(W.nodeType==1){Y=W.childNodes;W=Y[Math.min(ac,Y.length-1)];ab=new t(W);if(ac>Y.length-1){ab.next()}for(aa=ab.current();aa;aa=ab.next()){if(aa.nodeType==3&&!f(aa)){Z=c.create("a",null,E);aa.parentNode.insertBefore(Z,aa);X.setStart(aa,0);q.setRng(X);c.remove(Z);return}}}}}})(tinymce);tinymce.onAddEditor.add(function(e,a){var d,h,g,c=a.settings;if(c.inline_styles){h=e.explode(c.font_size_legacy_values);function b(j,i){e.each(i,function(l,k){if(l){g.setStyle(j,k,l)}});g.rename(j,"span")}d={font:function(j,i){b(i,{backgroundColor:i.style.backgroundColor,color:i.color,fontFamily:i.face,fontSize:h[parseInt(i.size)-1]})},u:function(j,i){b(i,{textDecoration:"underline"})},strike:function(j,i){b(i,{textDecoration:"line-through"})}};function f(i,j){g=i.dom;if(c.convert_fonts_to_spans){e.each(g.select("font,u,strike",j.node),function(k){d[k.nodeName.toLowerCase()](a.dom,k)})}}a.onPreProcess.add(f);a.onSetContent.add(f);a.onInit.add(function(){a.selection.onSetContent.add(f)})}}); diff --git a/wp-includes/js/tinymce/wp-tinymce.js.gz b/wp-includes/js/tinymce/wp-tinymce.js.gz index cfc49ce5..457aed02 100644 Binary files a/wp-includes/js/tinymce/wp-tinymce.js.gz and b/wp-includes/js/tinymce/wp-tinymce.js.gz differ diff --git a/wp-includes/js/wp-pointer.dev.js b/wp-includes/js/wp-pointer.dev.js index 0cb111bb..23b0e43d 100644 --- a/wp-includes/js/wp-pointer.dev.js +++ b/wp-includes/js/wp-pointer.dev.js @@ -46,7 +46,6 @@ if ( family.filter(function(){ return 'fixed' === $(this).css('position'); }).length ) positioning = 'fixed'; - this.pointer = $('
      ') .append( this.content ) .append( this.arrow ) @@ -156,7 +155,8 @@ left: 0, zIndex: zindex++ // Increment the z-index so that it shows above other opened pointers. }).show().position($.extend({ - of: this.element + of: this.element, + collision: 'fit none' }, position )); // the object comes before this.options.position so the user can override position.of. this.repoint(); diff --git a/wp-includes/js/wp-pointer.js b/wp-includes/js/wp-pointer.js index 3b322a66..65531c84 100644 --- a/wp-includes/js/wp-pointer.js +++ b/wp-includes/js/wp-pointer.js @@ -1 +1 @@ -(function(c){var a=0,b=9999;c.widget("wp.pointer",{options:{pointerClass:"wp-pointer",pointerWidth:320,content:function(f,e,d){return c(this).text()},buttons:function(f,e){var g=(wpPointerL10n)?wpPointerL10n.dismiss:"Dismiss",d=c(''+g+"");return d.bind("click.pointer",function(h){h.preventDefault();e.element.pointer("close")})},position:"top",show:function(e,d){d.pointer.show();d.opened()},hide:function(e,d){d.pointer.hide();d.closed()},document:document},_create:function(){var e,d;this.content=c('
      ');this.arrow=c('
      ');d=this.element.parents().add(this.element);e="absolute";if(d.filter(function(){return"fixed"===c(this).css("position")}).length){e="fixed"}this.pointer=c("
      ").append(this.content).append(this.arrow).attr("id","wp-pointer-"+a++).addClass(this.options.pointerClass).css({position:e,width:this.options.pointerWidth+"px",display:"none"}).appendTo(this.options.document.body)},_setOption:function(d,f){var g=this.options,e=this.pointer;if(d==="document"&&f!==g.document){e.detach().appendTo(f.body)}else{if(d==="pointerClass"){e.removeClass(g.pointerClass).addClass(f)}}c.Widget.prototype._setOption.apply(this,arguments);if(d==="position"){this.reposition()}else{if(d==="content"&&this.active){this.update()}}},destroy:function(){this.pointer.remove();c.Widget.prototype.destroy.call(this)},widget:function(){return this.pointer},update:function(g){var e=this,h=this.options,d=c.Deferred(),f;if(h.disabled){return}d.done(function(i){e._update(g,i)});if(typeof h.content==="string"){f=h.content}else{f=h.content.call(this.element[0],d.resolve,g,this._handoff())}if(f){d.resolve(f)}return d.promise()},_update:function(f,e){var d,g=this.options;if(!e){return}this.pointer.stop();this.content.html(e);d=g.buttons.call(this.element[0],f,this._handoff());if(d){d.wrap('
      ').parent().appendTo(this.content)}this.reposition()},reposition:function(){var d;if(this.options.disabled){return}d=this._processPosition(this.options.position);this.pointer.css({top:0,left:0,zIndex:b++}).show().position(c.extend({of:this.element},d));this.repoint()},repoint:function(){var e=this.options,d;if(e.disabled){return}d=(typeof e.position=="string")?e.position:e.position.edge;this.pointer[0].className=this.pointer[0].className.replace(/wp-pointer-[^\s'"]*/,"");this.pointer.addClass("wp-pointer-"+d)},_processPosition:function(e){var f={top:"bottom",bottom:"top",left:"right",right:"left"},d;if(typeof e=="string"){d={edge:e+""}}else{d=c.extend({},e)}if(!d.edge){return d}if(d.edge=="top"||d.edge=="bottom"){d.align=d.align||"left";d.at=d.at||d.align+" "+f[d.edge];d.my=d.my||d.align+" "+d.edge}else{d.align=d.align||"top";d.at=d.at||f[d.edge]+" "+d.align;d.my=d.my||d.edge+" "+d.align}return d},open:function(e){var d=this,f=this.options;if(this.active||f.disabled||this.element.is(":hidden")){return}this.update().done(function(){d._open(e)})},_open:function(e){var d=this,f=this.options;if(this.active||f.disabled||this.element.is(":hidden")){return}this.active=true;this._trigger("open",e,this._handoff());this._trigger("show",e,this._handoff({opened:function(){d._trigger("opened",e,d._handoff())}}))},close:function(e){if(!this.active||this.options.disabled){return}var d=this;this.active=false;this._trigger("close",e,this._handoff());this._trigger("hide",e,this._handoff({closed:function(){d._trigger("closed",e,d._handoff())}}))},sendToTop:function(d){if(this.active){this.pointer.css("z-index",b++)}},toggle:function(d){if(this.pointer.is(":hidden")){this.open(d)}else{this.close(d)}},_handoff:function(d){return c.extend({pointer:this.pointer,element:this.element},d)}})})(jQuery); \ No newline at end of file +(function(c){var a=0,b=9999;c.widget("wp.pointer",{options:{pointerClass:"wp-pointer",pointerWidth:320,content:function(f,e,d){return c(this).text()},buttons:function(f,e){var g=(wpPointerL10n)?wpPointerL10n.dismiss:"Dismiss",d=c(''+g+"");return d.bind("click.pointer",function(h){h.preventDefault();e.element.pointer("close")})},position:"top",show:function(e,d){d.pointer.show();d.opened()},hide:function(e,d){d.pointer.hide();d.closed()},document:document},_create:function(){var e,d;this.content=c('
      ');this.arrow=c('
      ');d=this.element.parents().add(this.element);e="absolute";if(d.filter(function(){return"fixed"===c(this).css("position")}).length){e="fixed"}this.pointer=c("
      ").append(this.content).append(this.arrow).attr("id","wp-pointer-"+a++).addClass(this.options.pointerClass).css({position:e,width:this.options.pointerWidth+"px",display:"none"}).appendTo(this.options.document.body)},_setOption:function(d,f){var g=this.options,e=this.pointer;if(d==="document"&&f!==g.document){e.detach().appendTo(f.body)}else{if(d==="pointerClass"){e.removeClass(g.pointerClass).addClass(f)}}c.Widget.prototype._setOption.apply(this,arguments);if(d==="position"){this.reposition()}else{if(d==="content"&&this.active){this.update()}}},destroy:function(){this.pointer.remove();c.Widget.prototype.destroy.call(this)},widget:function(){return this.pointer},update:function(g){var e=this,h=this.options,d=c.Deferred(),f;if(h.disabled){return}d.done(function(i){e._update(g,i)});if(typeof h.content==="string"){f=h.content}else{f=h.content.call(this.element[0],d.resolve,g,this._handoff())}if(f){d.resolve(f)}return d.promise()},_update:function(f,e){var d,g=this.options;if(!e){return}this.pointer.stop();this.content.html(e);d=g.buttons.call(this.element[0],f,this._handoff());if(d){d.wrap('
      ').parent().appendTo(this.content)}this.reposition()},reposition:function(){var d;if(this.options.disabled){return}d=this._processPosition(this.options.position);this.pointer.css({top:0,left:0,zIndex:b++}).show().position(c.extend({of:this.element,collision:"fit none"},d));this.repoint()},repoint:function(){var e=this.options,d;if(e.disabled){return}d=(typeof e.position=="string")?e.position:e.position.edge;this.pointer[0].className=this.pointer[0].className.replace(/wp-pointer-[^\s'"]*/,"");this.pointer.addClass("wp-pointer-"+d)},_processPosition:function(e){var f={top:"bottom",bottom:"top",left:"right",right:"left"},d;if(typeof e=="string"){d={edge:e+""}}else{d=c.extend({},e)}if(!d.edge){return d}if(d.edge=="top"||d.edge=="bottom"){d.align=d.align||"left";d.at=d.at||d.align+" "+f[d.edge];d.my=d.my||d.align+" "+d.edge}else{d.align=d.align||"top";d.at=d.at||f[d.edge]+" "+d.align;d.my=d.my||d.edge+" "+d.align}return d},open:function(e){var d=this,f=this.options;if(this.active||f.disabled||this.element.is(":hidden")){return}this.update().done(function(){d._open(e)})},_open:function(e){var d=this,f=this.options;if(this.active||f.disabled||this.element.is(":hidden")){return}this.active=true;this._trigger("open",e,this._handoff());this._trigger("show",e,this._handoff({opened:function(){d._trigger("opened",e,d._handoff())}}))},close:function(e){if(!this.active||this.options.disabled){return}var d=this;this.active=false;this._trigger("close",e,this._handoff());this._trigger("hide",e,this._handoff({closed:function(){d._trigger("closed",e,d._handoff())}}))},sendToTop:function(d){if(this.active){this.pointer.css("z-index",b++)}},toggle:function(d){if(this.pointer.is(":hidden")){this.open(d)}else{this.close(d)}},_handoff:function(d){return c.extend({pointer:this.pointer,element:this.element},d)}})})(jQuery); \ No newline at end of file diff --git a/wp-includes/js/wplink.dev.js b/wp-includes/js/wplink.dev.js index 24403d31..d0c4b9a0 100644 --- a/wp-includes/js/wplink.dev.js +++ b/wp-includes/js/wplink.dev.js @@ -160,7 +160,7 @@ var wpLink; }, htmlUpdate : function() { - var attrs, html, start, end, cursor, + var attrs, html, begin, end, cursor, textarea = wpLink.textarea; if ( ! textarea ) @@ -183,35 +183,34 @@ var wpLink; html += '>'; // Insert HTML - // W3C - if ( typeof textarea.selectionStart !== 'undefined' ) { - start = textarea.selectionStart; + if ( document.selection && wpLink.range ) { + // IE + // Note: If no text is selected, IE will not place the cursor + // inside the closing tag. + textarea.focus(); + wpLink.range.text = html + wpLink.range.text + ''; + wpLink.range.moveToBookmark( wpLink.range.getBookmark() ); + wpLink.range.select(); + + wpLink.range = null; + } else if ( typeof textarea.selectionStart !== 'undefined' ) { + // W3C + begin = textarea.selectionStart; end = textarea.selectionEnd; - selection = textarea.value.substring( start, end ); + selection = textarea.value.substring( begin, end ); html = html + selection + ''; - cursor = start + html.length; + cursor = begin + html.length; // If no next is selected, place the cursor inside the closing tag. - if ( start == end ) + if ( begin == end ) cursor -= ''.length; - textarea.value = textarea.value.substring( 0, start ) + textarea.value = textarea.value.substring( 0, begin ) + html + textarea.value.substring( end, textarea.value.length ); // Update cursor position textarea.selectionStart = textarea.selectionEnd = cursor; - - // IE - // Note: If no text is selected, IE will not place the cursor - // inside the closing tag. - } else if ( document.selection && wpLink.range ) { - textarea.focus(); - wpLink.range.text = html + wpLink.range.text + ''; - wpLink.range.moveToBookmark( wpLink.range.getBookmark() ); - wpLink.range.select(); - - wpLink.range = null; } wpLink.close(); @@ -243,7 +242,7 @@ var wpLink; if (e == null) { ed.getDoc().execCommand("unlink", false, null); - tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1}); + tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1}); tinymce.each(ed.dom.select("a"), function(n) { if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') { diff --git a/wp-includes/js/wplink.js b/wp-includes/js/wplink.js index ee929644..4ce2f6eb 100644 --- a/wp-includes/js/wplink.js +++ b/wp-includes/js/wplink.js @@ -1 +1 @@ -var wpLink;(function(f){var b={},e={},d,a,c;wpLink={timeToTriggerRiver:150,minRiverAJAXDuration:200,riverBottomThreshold:5,keySensitivity:100,lastSearch:"",textarea:"",init:function(){b.dialog=f("#wp-link");b.submit=f("#wp-link-submit");b.url=f("#url-field");b.nonce=f("#_ajax_linking_nonce");b.title=f("#link-title-field");b.openInNewTab=f("#link-target-checkbox");b.search=f("#search-field");e.search=new a(f("#search-results"));e.recent=new a(f("#most-recent-results"));e.elements=f(".query-results",b.dialog);b.dialog.keydown(wpLink.keydown);b.dialog.keyup(wpLink.keyup);b.submit.click(function(g){g.preventDefault();wpLink.update()});f("#wp-link-cancel").click(function(g){g.preventDefault();wpLink.close()});f("#internal-toggle").click(wpLink.toggleInternalLinking);e.elements.bind("river-select",wpLink.updateFields);b.search.keyup(wpLink.searchInternalLinks);b.dialog.bind("wpdialogrefresh",wpLink.refresh);b.dialog.bind("wpdialogbeforeopen",wpLink.beforeOpen);b.dialog.bind("wpdialogclose",wpLink.onClose)},beforeOpen:function(){wpLink.range=null;if(!wpLink.isMCE()&&document.selection){wpLink.textarea.focus();wpLink.range=document.selection.createRange()}},open:function(){if(!wpActiveEditor){return}this.textarea=f("#"+wpActiveEditor).get(0);if(!b.dialog.data("wpdialog")){b.dialog.wpdialog({title:wpLinkL10n.title,width:480,height:"auto",modal:true,dialogClass:"wp-dialog",zIndex:300000})}b.dialog.wpdialog("open")},isMCE:function(){return tinyMCEPopup&&(d=tinyMCEPopup.editor)&&!d.isHidden()},refresh:function(){e.search.refresh();e.recent.refresh();if(wpLink.isMCE()){wpLink.mceRefresh()}else{wpLink.setDefaultValues()}b.url.focus()[0].select();if(!e.recent.ul.children().length){e.recent.ajax()}},mceRefresh:function(){var g;d=tinyMCEPopup.editor;tinyMCEPopup.restoreSelection();if(g=d.dom.getParent(d.selection.getNode(),"A")){b.url.val(d.dom.getAttrib(g,"href"));b.title.val(d.dom.getAttrib(g,"title"));if("_blank"==d.dom.getAttrib(g,"target")){b.openInNewTab.prop("checked",true)}b.submit.val(wpLinkL10n.update)}else{wpLink.setDefaultValues()}tinyMCEPopup.storeSelection()},close:function(){if(wpLink.isMCE()){tinyMCEPopup.close()}else{b.dialog.wpdialog("close")}},onClose:function(){if(!wpLink.isMCE()){wpLink.textarea.focus();if(wpLink.range){wpLink.range.moveToBookmark(wpLink.range.getBookmark());wpLink.range.select()}}},getAttrs:function(){return{href:b.url.val(),title:b.title.val(),target:b.openInNewTab.prop("checked")?"_blank":""}},update:function(){if(wpLink.isMCE()){wpLink.mceUpdate()}else{wpLink.htmlUpdate()}},htmlUpdate:function(){var i,j,l,h,k,g=wpLink.textarea;if(!g){return}i=wpLink.getAttrs();if(!i.href||i.href=="http://"){return}j='";k=l+j.length;if(l==h){k-="".length}g.value=g.value.substring(0,l)+j+g.value.substring(h,g.value.length);g.selectionStart=g.selectionEnd=k}else{if(document.selection&&wpLink.range){g.focus();wpLink.range.text=j+wpLink.range.text+"";wpLink.range.moveToBookmark(wpLink.range.getBookmark());wpLink.range.select();wpLink.range=null}}wpLink.close();g.focus()},mceUpdate:function(){var h=tinyMCEPopup.editor,i=wpLink.getAttrs(),j,g;tinyMCEPopup.restoreSelection();j=h.dom.getParent(h.selection.getNode(),"A");if(!i.href||i.href=="http://"){if(j){tinyMCEPopup.execCommand("mceBeginUndoLevel");g=h.selection.getBookmark();h.dom.remove(j,1);h.selection.moveToBookmark(g);tinyMCEPopup.execCommand("mceEndUndoLevel");wpLink.close()}return}tinyMCEPopup.execCommand("mceBeginUndoLevel");if(j==null){h.getDoc().execCommand("unlink",false,null);tinyMCEPopup.execCommand("CreateLink",false,"#mce_temp_url#",{skip_undo:1});tinymce.each(h.dom.select("a"),function(k){if(h.dom.getAttrib(k,"href")=="#mce_temp_url#"){j=k;h.dom.setAttribs(j,i)}});if(f(j).text()=="#mce_temp_url#"){h.dom.remove(j);j=null}}else{h.dom.setAttribs(j,i)}if(j&&(j.childNodes.length!=1||j.firstChild.nodeName!="IMG")){h.focus();h.selection.select(j);h.selection.collapse(0);tinyMCEPopup.storeSelection()}tinyMCEPopup.execCommand("mceEndUndoLevel");wpLink.close()},updateFields:function(i,h,g){b.url.val(h.children(".item-permalink").val());b.title.val(h.hasClass("no-title")?"":h.children(".item-title").text());if(g&&g.type=="click"){b.url.focus()}},setDefaultValues:function(){b.url.val("http://");b.title.val("");b.submit.val(wpLinkL10n.save)},searchInternalLinks:function(){var h=f(this),i,g=h.val();if(g.length>2){e.recent.hide();e.search.show();if(wpLink.lastSearch==g){return}wpLink.lastSearch=g;i=h.siblings("img.waiting").show();e.search.change(g);e.search.ajax(function(){i.hide()})}else{e.search.hide();e.recent.show()}},next:function(){e.search.next();e.recent.next()},prev:function(){e.search.prev();e.recent.prev()},keydown:function(i){var h,g=f.ui.keyCode;switch(i.which){case g.UP:h="prev";case g.DOWN:h=h||"next";clearInterval(wpLink.keyInterval);wpLink[h]();wpLink.keyInterval=setInterval(wpLink[h],wpLink.keySensitivity);break;default:return}i.preventDefault()},keyup:function(h){var g=f.ui.keyCode;switch(h.which){case g.ESCAPE:h.stopImmediatePropagation();if(!f(document).triggerHandler("wp_CloseOnEscape",[{event:h,what:"wplink",cb:wpLink.close}])){wpLink.close()}return false;break;case g.UP:case g.DOWN:clearInterval(wpLink.keyInterval);break;default:return}h.preventDefault()},delayedCallback:function(i,g){var l,k,j,h;if(!g){return i}setTimeout(function(){if(k){return i.apply(h,j)}l=true},g);return function(){if(l){return i.apply(this,arguments)}j=arguments;h=this;k=true}},toggleInternalLinking:function(h){var g=f("#search-panel"),i=b.dialog.wpdialog("widget"),k=!g.is(":visible"),j=f(window);f(this).toggleClass("toggle-arrow-active",k);b.dialog.height("auto");g.slideToggle(300,function(){setUserSetting("wplink",k?"1":"0");b[k?"search":"url"].focus();var l=j.scrollTop(),o=i.offset().top,m=o+i.outerHeight(),n=m-j.height();if(n>l){i.animate({top:ni){this.element.scrollTop(g+l-i+j)}}this.element.trigger("river-select",[h,k,this])},deselect:function(){if(this.selected){this.selected.removeClass("selected")}this.selected=false},prev:function(){if(!this.visible){return}var g;if(this.selected){g=this.selected.prev("li");if(g.length){this.select(g)}}},next:function(){if(!this.visible){return}var g=this.selected?this.selected.next("li"):f("li:not(.unselectable):first",this.element);if(g.length){this.select(g)}},ajax:function(j){var h=this,i=this.query.page==1?0:wpLink.minRiverAJAXDuration,g=wpLink.delayedCallback(function(k,l){h.process(k,l);if(j){j(k,l)}},i);this.query.ajax(g)},change:function(g){if(this.query&&this._search==g){return}this._search=g;this.query=new c(g);this.element.scrollTop(0)},process:function(h,l){var i="",j=true,g="",k=l.page==1;if(!h){if(k){i+='
    • '+wpLinkL10n.noMatchesFound+"
    • "}}else{f.each(h,function(){g=j?"alternate":"";g+=this["title"]?"":" no-title";i+=g?'
    • ':"
    • ";i+='';i+='';i+=this["title"]?this["title"]:wpLinkL10n.noTitle;i+=''+this["info"]+"
    • ";j=!j})}this.ul[k?"html":"append"](i)},maybeLoad:function(){var h=this,i=this.element,g=i.scrollTop()+i.height();if(!this.query.ready()||g";wpLink.range.moveToBookmark(wpLink.range.getBookmark());wpLink.range.select();wpLink.range=null}else{if(typeof g.selectionStart!=="undefined"){k=g.selectionStart;h=g.selectionEnd;selection=g.value.substring(k,h);j=j+selection+"";l=k+j.length;if(k==h){l-="".length}g.value=g.value.substring(0,k)+j+g.value.substring(h,g.value.length);g.selectionStart=g.selectionEnd=l}}wpLink.close();g.focus()},mceUpdate:function(){var h=tinyMCEPopup.editor,i=wpLink.getAttrs(),j,g;tinyMCEPopup.restoreSelection();j=h.dom.getParent(h.selection.getNode(),"A");if(!i.href||i.href=="http://"){if(j){tinyMCEPopup.execCommand("mceBeginUndoLevel");g=h.selection.getBookmark();h.dom.remove(j,1);h.selection.moveToBookmark(g);tinyMCEPopup.execCommand("mceEndUndoLevel");wpLink.close()}return}tinyMCEPopup.execCommand("mceBeginUndoLevel");if(j==null){h.getDoc().execCommand("unlink",false,null);tinyMCEPopup.execCommand("mceInsertLink",false,"#mce_temp_url#",{skip_undo:1});tinymce.each(h.dom.select("a"),function(k){if(h.dom.getAttrib(k,"href")=="#mce_temp_url#"){j=k;h.dom.setAttribs(j,i)}});if(f(j).text()=="#mce_temp_url#"){h.dom.remove(j);j=null}}else{h.dom.setAttribs(j,i)}if(j&&(j.childNodes.length!=1||j.firstChild.nodeName!="IMG")){h.focus();h.selection.select(j);h.selection.collapse(0);tinyMCEPopup.storeSelection()}tinyMCEPopup.execCommand("mceEndUndoLevel");wpLink.close()},updateFields:function(i,h,g){b.url.val(h.children(".item-permalink").val());b.title.val(h.hasClass("no-title")?"":h.children(".item-title").text());if(g&&g.type=="click"){b.url.focus()}},setDefaultValues:function(){b.url.val("http://");b.title.val("");b.submit.val(wpLinkL10n.save)},searchInternalLinks:function(){var h=f(this),i,g=h.val();if(g.length>2){e.recent.hide();e.search.show();if(wpLink.lastSearch==g){return}wpLink.lastSearch=g;i=h.siblings("img.waiting").show();e.search.change(g);e.search.ajax(function(){i.hide()})}else{e.search.hide();e.recent.show()}},next:function(){e.search.next();e.recent.next()},prev:function(){e.search.prev();e.recent.prev()},keydown:function(i){var h,g=f.ui.keyCode;switch(i.which){case g.UP:h="prev";case g.DOWN:h=h||"next";clearInterval(wpLink.keyInterval);wpLink[h]();wpLink.keyInterval=setInterval(wpLink[h],wpLink.keySensitivity);break;default:return}i.preventDefault()},keyup:function(h){var g=f.ui.keyCode;switch(h.which){case g.ESCAPE:h.stopImmediatePropagation();if(!f(document).triggerHandler("wp_CloseOnEscape",[{event:h,what:"wplink",cb:wpLink.close}])){wpLink.close()}return false;break;case g.UP:case g.DOWN:clearInterval(wpLink.keyInterval);break;default:return}h.preventDefault()},delayedCallback:function(i,g){var l,k,j,h;if(!g){return i}setTimeout(function(){if(k){return i.apply(h,j)}l=true},g);return function(){if(l){return i.apply(this,arguments)}j=arguments;h=this;k=true}},toggleInternalLinking:function(h){var g=f("#search-panel"),i=b.dialog.wpdialog("widget"),k=!g.is(":visible"),j=f(window);f(this).toggleClass("toggle-arrow-active",k);b.dialog.height("auto");g.slideToggle(300,function(){setUserSetting("wplink",k?"1":"0");b[k?"search":"url"].focus();var l=j.scrollTop(),o=i.offset().top,m=o+i.outerHeight(),n=m-j.height();if(n>l){i.animate({top:ni){this.element.scrollTop(g+l-i+j)}}this.element.trigger("river-select",[h,k,this])},deselect:function(){if(this.selected){this.selected.removeClass("selected")}this.selected=false},prev:function(){if(!this.visible){return}var g;if(this.selected){g=this.selected.prev("li");if(g.length){this.select(g)}}},next:function(){if(!this.visible){return}var g=this.selected?this.selected.next("li"):f("li:not(.unselectable):first",this.element);if(g.length){this.select(g)}},ajax:function(j){var h=this,i=this.query.page==1?0:wpLink.minRiverAJAXDuration,g=wpLink.delayedCallback(function(k,l){h.process(k,l);if(j){j(k,l)}},i);this.query.ajax(g)},change:function(g){if(this.query&&this._search==g){return}this._search=g;this.query=new c(g);this.element.scrollTop(0)},process:function(h,l){var i="",j=true,g="",k=l.page==1;if(!h){if(k){i+='
    • '+wpLinkL10n.noMatchesFound+"
    • "}}else{f.each(h,function(){g=j?"alternate":"";g+=this["title"]?"":" no-title";i+=g?'
    • ':"
    • ";i+='';i+='';i+=this["title"]?this["title"]:wpLinkL10n.noTitle;i+=''+this["info"]+"
    • ";j=!j})}this.ul[k?"html":"append"](i)},maybeLoad:function(){var h=this,i=this.element,g=i.scrollTop()+i.height();if(!this.query.ready()||g array(), 'a' => array( - 'class' => array (), - 'href' => array (), - 'id' => array (), - 'title' => array (), - 'rel' => array (), - 'rev' => array (), - 'name' => array (), - 'target' => array()), + 'class' => true, + 'href' => true, + 'id' => true, + 'title' => true, + 'rel' => true, + 'rev' => true, + 'name' => true, + 'target' => true, + ), 'abbr' => array( - 'class' => array (), - 'title' => array ()), + 'class' => true, + 'title' => true, + ), 'acronym' => array( - 'title' => array ()), + 'title' => true, + ), 'article' => array( - 'align' => array (), - 'class' => array (), - 'dir' => array (), - 'lang' => array(), - 'style' => array (), - 'xml:lang' => array(), + 'align' => true, + 'class' => true, + 'dir' => true, + 'lang' => true, + 'style' => true, + 'xml:lang' => true, ), 'aside' => array( - 'align' => array (), - 'class' => array (), - 'dir' => array (), - 'lang' => array(), - 'style' => array (), - 'xml:lang' => array(), + 'align' => true, + 'class' => true, + 'dir' => true, + 'lang' => true, + 'style' => true, + 'xml:lang' => true, ), 'b' => array(), 'big' => array(), 'blockquote' => array( - 'id' => array (), - 'cite' => array (), - 'class' => array(), - 'lang' => array(), - 'xml:lang' => array()), + 'id' => true, + 'cite' => true, + 'class' => true, + 'lang' => true, + 'xml:lang' => true, + ), 'br' => array ( - 'class' => array ()), + 'class' => true, + ), 'button' => array( - 'disabled' => array (), - 'name' => array (), - 'type' => array (), - 'value' => array ()), + 'disabled' => true, + 'name' => true, + 'type' => true, + 'value' => true, + ), 'caption' => array( - 'align' => array (), - 'class' => array ()), + 'align' => true, + 'class' => true, + ), 'cite' => array ( - 'class' => array(), - 'dir' => array(), - 'lang' => array(), - 'title' => array ()), + 'class' => true, + 'dir' => true, + 'lang' => true, + 'title' => true, + ), 'code' => array ( - 'style' => array()), + 'style' => true, + ), 'col' => array( - 'align' => array (), - 'char' => array (), - 'charoff' => array (), - 'span' => array (), - 'dir' => array(), - 'style' => array (), - 'valign' => array (), - 'width' => array ()), + 'align' => true, + 'char' => true, + 'charoff' => true, + 'span' => true, + 'dir' => true, + 'style' => true, + 'valign' => true, + 'width' => true, + ), 'del' => array( - 'datetime' => array ()), + 'datetime' => true, + ), 'dd' => array(), 'details' => array( - 'align' => array (), - 'class' => array (), - 'dir' => array (), - 'lang' => array(), - 'open' => array (), - 'style' => array (), - 'xml:lang' => array(), + 'align' => true, + 'class' => true, + 'dir' => true, + 'lang' => true, + 'open' => true, + 'style' => true, + 'xml:lang' => true, ), 'div' => array( - 'align' => array (), - 'class' => array (), - 'dir' => array (), - 'lang' => array(), - 'style' => array (), - 'xml:lang' => array()), + 'align' => true, + 'class' => true, + 'dir' => true, + 'lang' => true, + 'style' => true, + 'xml:lang' => true, + ), 'dl' => array(), 'dt' => array(), 'em' => array(), 'fieldset' => array(), 'figure' => array( - 'align' => array (), - 'class' => array (), - 'dir' => array (), - 'lang' => array(), - 'style' => array (), - 'xml:lang' => array(), + 'align' => true, + 'class' => true, + 'dir' => true, + 'lang' => true, + 'style' => true, + 'xml:lang' => true, ), 'figcaption' => array( - 'align' => array (), - 'class' => array (), - 'dir' => array (), - 'lang' => array(), - 'style' => array (), - 'xml:lang' => array(), + 'align' => true, + 'class' => true, + 'dir' => true, + 'lang' => true, + 'style' => true, + 'xml:lang' => true, ), 'font' => array( - 'color' => array (), - 'face' => array (), - 'size' => array ()), + 'color' => true, + 'face' => true, + 'size' => true, + ), 'footer' => array( - 'align' => array (), - 'class' => array (), - 'dir' => array (), - 'lang' => array(), - 'style' => array (), - 'xml:lang' => array(), + 'align' => true, + 'class' => true, + 'dir' => true, + 'lang' => true, + 'style' => true, + 'xml:lang' => true, ), 'form' => array( - 'action' => array (), - 'accept' => array (), - 'accept-charset' => array (), - 'enctype' => array (), - 'method' => array (), - 'name' => array (), - 'target' => array ()), + 'action' => true, + 'accept' => true, + 'accept-charset' => true, + 'enctype' => true, + 'method' => true, + 'name' => true, + 'target' => true, + ), 'h1' => array( - 'align' => array (), - 'class' => array (), - 'id' => array (), - 'style' => array ()), + 'align' => true, + 'class' => true, + 'id' => true, + 'style' => true, + ), 'h2' => array ( - 'align' => array (), - 'class' => array (), - 'id' => array (), - 'style' => array ()), + 'align' => true, + 'class' => true, + 'id' => true, + 'style' => true, + ), 'h3' => array ( - 'align' => array (), - 'class' => array (), - 'id' => array (), - 'style' => array ()), + 'align' => true, + 'class' => true, + 'id' => true, + 'style' => true, + ), 'h4' => array ( - 'align' => array (), - 'class' => array (), - 'id' => array (), - 'style' => array ()), + 'align' => true, + 'class' => true, + 'id' => true, + 'style' => true, + ), 'h5' => array ( - 'align' => array (), - 'class' => array (), - 'id' => array (), - 'style' => array ()), + 'align' => true, + 'class' => true, + 'id' => true, + 'style' => true, + ), 'h6' => array ( - 'align' => array (), - 'class' => array (), - 'id' => array (), - 'style' => array ()), + 'align' => true, + 'class' => true, + 'id' => true, + 'style' => true, + ), 'header' => array( - 'align' => array (), - 'class' => array (), - 'dir' => array (), - 'lang' => array(), - 'style' => array (), - 'xml:lang' => array(), + 'align' => true, + 'class' => true, + 'dir' => true, + 'lang' => true, + 'style' => true, + 'xml:lang' => true, ), 'hgroup' => array( - 'align' => array (), - 'class' => array (), - 'dir' => array (), - 'lang' => array(), - 'style' => array (), - 'xml:lang' => array(), + 'align' => true, + 'class' => true, + 'dir' => true, + 'lang' => true, + 'style' => true, + 'xml:lang' => true, ), 'hr' => array ( - 'align' => array (), - 'class' => array (), - 'noshade' => array (), - 'size' => array (), - 'width' => array ()), + 'align' => true, + 'class' => true, + 'noshade' => true, + 'size' => true, + 'width' => true, + ), 'i' => array(), 'img' => array( - 'alt' => array (), - 'align' => array (), - 'border' => array (), - 'class' => array (), - 'height' => array (), - 'hspace' => array (), - 'longdesc' => array (), - 'vspace' => array (), - 'src' => array (), - 'style' => array (), - 'width' => array ()), + 'alt' => true, + 'align' => true, + 'border' => true, + 'class' => true, + 'height' => true, + 'hspace' => true, + 'longdesc' => true, + 'vspace' => true, + 'src' => true, + 'style' => true, + 'width' => true, + ), 'ins' => array( - 'datetime' => array (), - 'cite' => array ()), + 'datetime' => true, + 'cite' => true, + ), 'kbd' => array(), 'label' => array( - 'for' => array ()), + 'for' => true, + ), 'legend' => array( - 'align' => array ()), + 'align' => true, + ), 'li' => array ( - 'align' => array (), - 'class' => array ()), + 'align' => true, + 'class' => true, + ), 'menu' => array ( - 'class' => array (), - 'style' => array (), - 'type' => array ()), + 'class' => true, + 'style' => true, + 'type' => true, + ), 'nav' => array( - 'align' => array (), - 'class' => array (), - 'dir' => array (), - 'lang' => array(), - 'style' => array (), - 'xml:lang' => array(), + 'align' => true, + 'class' => true, + 'dir' => true, + 'lang' => true, + 'style' => true, + 'xml:lang' => true, ), 'p' => array( - 'class' => array (), - 'align' => array (), - 'dir' => array(), - 'lang' => array(), - 'style' => array (), - 'xml:lang' => array()), + 'class' => true, + 'align' => true, + 'dir' => true, + 'lang' => true, + 'style' => true, + 'xml:lang' => true, + ), 'pre' => array( - 'style' => array(), - 'width' => array ()), + 'style' => true, + 'width' => true, + ), 'q' => array( - 'cite' => array ()), + 'cite' => true, + ), 's' => array(), 'span' => array ( - 'class' => array (), - 'dir' => array (), - 'align' => array (), - 'lang' => array (), - 'style' => array (), - 'title' => array (), - 'xml:lang' => array()), + 'class' => true, + 'dir' => true, + 'align' => true, + 'lang' => true, + 'style' => true, + 'title' => true, + 'xml:lang' => true, + ), 'section' => array( - 'align' => array (), - 'class' => array (), - 'dir' => array (), - 'lang' => array(), - 'style' => array (), - 'xml:lang' => array(), + 'align' => true, + 'class' => true, + 'dir' => true, + 'lang' => true, + 'style' => true, + 'xml:lang' => true, ), 'strike' => array(), 'strong' => array(), 'sub' => array(), 'summary' => array( - 'align' => array (), - 'class' => array (), - 'dir' => array (), - 'lang' => array(), - 'style' => array (), - 'xml:lang' => array(), + 'align' => true, + 'class' => true, + 'dir' => true, + 'lang' => true, + 'style' => true, + 'xml:lang' => true, ), 'sup' => array(), 'table' => array( - 'align' => array (), - 'bgcolor' => array (), - 'border' => array (), - 'cellpadding' => array (), - 'cellspacing' => array (), - 'class' => array (), - 'dir' => array(), - 'id' => array(), - 'rules' => array (), - 'style' => array (), - 'summary' => array (), - 'width' => array ()), + 'align' => true, + 'bgcolor' => true, + 'border' => true, + 'cellpadding' => true, + 'cellspacing' => true, + 'class' => true, + 'dir' => true, + 'id' => true, + 'rules' => true, + 'style' => true, + 'summary' => true, + 'width' => true, + ), 'tbody' => array( - 'align' => array (), - 'char' => array (), - 'charoff' => array (), - 'valign' => array ()), + 'align' => true, + 'char' => true, + 'charoff' => true, + 'valign' => true, + ), 'td' => array( - 'abbr' => array (), - 'align' => array (), - 'axis' => array (), - 'bgcolor' => array (), - 'char' => array (), - 'charoff' => array (), - 'class' => array (), - 'colspan' => array (), - 'dir' => array(), - 'headers' => array (), - 'height' => array (), - 'nowrap' => array (), - 'rowspan' => array (), - 'scope' => array (), - 'style' => array (), - 'valign' => array (), - 'width' => array ()), + 'abbr' => true, + 'align' => true, + 'axis' => true, + 'bgcolor' => true, + 'char' => true, + 'charoff' => true, + 'class' => true, + 'colspan' => true, + 'dir' => true, + 'headers' => true, + 'height' => true, + 'nowrap' => true, + 'rowspan' => true, + 'scope' => true, + 'style' => true, + 'valign' => true, + 'width' => true, + ), 'textarea' => array( - 'cols' => array (), - 'rows' => array (), - 'disabled' => array (), - 'name' => array (), - 'readonly' => array ()), + 'cols' => true, + 'rows' => true, + 'disabled' => true, + 'name' => true, + 'readonly' => true, + ), 'tfoot' => array( - 'align' => array (), - 'char' => array (), - 'class' => array (), - 'charoff' => array (), - 'valign' => array ()), + 'align' => true, + 'char' => true, + 'class' => true, + 'charoff' => true, + 'valign' => true, + ), 'th' => array( - 'abbr' => array (), - 'align' => array (), - 'axis' => array (), - 'bgcolor' => array (), - 'char' => array (), - 'charoff' => array (), - 'class' => array (), - 'colspan' => array (), - 'headers' => array (), - 'height' => array (), - 'nowrap' => array (), - 'rowspan' => array (), - 'scope' => array (), - 'valign' => array (), - 'width' => array ()), + 'abbr' => true, + 'align' => true, + 'axis' => true, + 'bgcolor' => true, + 'char' => true, + 'charoff' => true, + 'class' => true, + 'colspan' => true, + 'headers' => true, + 'height' => true, + 'nowrap' => true, + 'rowspan' => true, + 'scope' => true, + 'valign' => true, + 'width' => true, + ), 'thead' => array( - 'align' => array (), - 'char' => array (), - 'charoff' => array (), - 'class' => array (), - 'valign' => array ()), + 'align' => true, + 'char' => true, + 'charoff' => true, + 'class' => true, + 'valign' => true, + ), 'title' => array(), 'tr' => array( - 'align' => array (), - 'bgcolor' => array (), - 'char' => array (), - 'charoff' => array (), - 'class' => array (), - 'style' => array (), - 'valign' => array ()), + 'align' => true, + 'bgcolor' => true, + 'char' => true, + 'charoff' => true, + 'class' => true, + 'style' => true, + 'valign' => true, + ), 'tt' => array(), 'u' => array(), 'ul' => array ( - 'class' => array (), - 'style' => array (), - 'type' => array ()), + 'class' => true, + 'style' => true, + 'type' => true, + ), 'ol' => array ( - 'class' => array (), - 'start' => array (), - 'style' => array (), - 'type' => array ()), - 'var' => array ()); + 'class' => true, + 'start' => true, + 'style' => true, + 'type' => true, + ), + 'var' => array(), + ); /** * Kses allowed HTML elements. @@ -402,20 +444,25 @@ if ( ! CUSTOM_TAGS ) { */ $allowedtags = array( 'a' => array( - 'href' => array (), - 'title' => array ()), + 'href' => true, + 'title' => true, + ), 'abbr' => array( - 'title' => array ()), + 'title' => true, + ), 'acronym' => array( - 'title' => array ()), + 'title' => true, + ), 'b' => array(), 'blockquote' => array( - 'cite' => array ()), + 'cite' => true, + ), // 'br' => array(), - 'cite' => array (), + 'cite' => array(), 'code' => array(), 'del' => array( - 'datetime' => array ()), + 'datetime' => true, + ), // 'dd' => array(), // 'dl' => array(), // 'dt' => array(), @@ -425,7 +472,8 @@ if ( ! CUSTOM_TAGS ) { // 'ol' => array(), // 'p' => array(), 'q' => array( - 'cite' => array ()), + 'cite' => true, + ), 'strike' => array(), 'strong' => array(), // 'sub' => array(), @@ -674,6 +722,17 @@ function wp_kses_attr($element, $attr, $allowed_html, $allowed_protocols) { if ( $current == '' ) continue; # the attribute is not allowed + if ( strtolower( $arreach['name'] ) == 'style' ) { + $orig_value = $arreach['value']; + $value = safecss_filter_attr( $orig_value ); + + if ( empty( $value ) ) + continue; + + $arreach['value'] = $value; + $arreach['whole'] = str_replace( $orig_value, $value, $arreach['whole'] ); + } + if ( ! is_array($current) ) { $attr2 .= ' '.$arreach['whole']; # there are no checks @@ -688,18 +747,7 @@ function wp_kses_attr($element, $attr, $allowed_html, $allowed_protocols) { } } - if ( strtolower($arreach['name']) == 'style' ) { - $orig_value = $arreach['value']; - $value = safecss_filter_attr($orig_value); - - if ( empty($value) ) - continue; - - $arreach['value'] = $value; - $arreach['whole'] = str_replace($orig_value, $value, $arreach['whole']); - } - - if ($ok) + if ( $ok ) $attr2 .= ' '.$arreach['whole']; # it passed them } # if !is_array($current) } # foreach @@ -718,7 +766,7 @@ function wp_kses_attr($element, $attr, $allowed_html, $allowed_protocols) { * input. It will add quotes around attribute values that don't have any quotes * or apostrophes around them, to make it easier to produce HTML code that will * conform to W3C's HTML specification. It will also remove bad URL protocols - * from attribute values. It also reduces duplicate attributes by using the + * from attribute values. It also reduces duplicate attributes by using the * attribute defined first (foo='bar' foo='baz' will result in foo='bar'). * * @since 1.0.0 @@ -763,7 +811,7 @@ function wp_kses_hair($attr, $allowed_protocols) { { $working = 1; $mode = 0; - if(FALSE === array_key_exists($attrname, $attrarr)) { + if(false === array_key_exists($attrname, $attrarr)) { $attrarr[$attrname] = array ('name' => $attrname, 'value' => '', 'whole' => $attrname, 'vless' => 'y'); } $attr = preg_replace('/^\s+/', '', $attr); @@ -780,7 +828,7 @@ function wp_kses_hair($attr, $allowed_protocols) { if ( in_array(strtolower($attrname), $uris) ) $thisval = wp_kses_bad_protocol($thisval, $allowed_protocols); - if(FALSE === array_key_exists($attrname, $attrarr)) { + if(false === array_key_exists($attrname, $attrarr)) { $attrarr[$attrname] = array ('name' => $attrname, 'value' => $thisval, 'whole' => "$attrname=\"$thisval\"", 'vless' => 'n'); } $working = 1; @@ -796,7 +844,7 @@ function wp_kses_hair($attr, $allowed_protocols) { if ( in_array(strtolower($attrname), $uris) ) $thisval = wp_kses_bad_protocol($thisval, $allowed_protocols); - if(FALSE === array_key_exists($attrname, $attrarr)) { + if(false === array_key_exists($attrname, $attrarr)) { $attrarr[$attrname] = array ('name' => $attrname, 'value' => $thisval, 'whole' => "$attrname='$thisval'", 'vless' => 'n'); } $working = 1; @@ -812,7 +860,7 @@ function wp_kses_hair($attr, $allowed_protocols) { if ( in_array(strtolower($attrname), $uris) ) $thisval = wp_kses_bad_protocol($thisval, $allowed_protocols); - if(FALSE === array_key_exists($attrname, $attrarr)) { + if(false === array_key_exists($attrname, $attrarr)) { $attrarr[$attrname] = array ('name' => $attrname, 'value' => $thisval, 'whole' => "$attrname=\"$thisval\"", 'vless' => 'n'); } # We add quotes to conform to W3C's HTML spec. @@ -831,7 +879,7 @@ function wp_kses_hair($attr, $allowed_protocols) { } } # while - if ($mode == 1 && FALSE === array_key_exists($attrname, $attrarr)) + if ($mode == 1 && false === array_key_exists($attrname, $attrarr)) # special case, for when the attribute list ends with a valueless # attribute like "selected" $attrarr[$attrname] = array ('name' => $attrname, 'value' => '', 'whole' => $attrname, 'vless' => 'y'); @@ -941,7 +989,7 @@ function wp_kses_bad_protocol($string, $allowed_protocols) { } /** - * Removes any NULL characters in $string. + * Removes any null characters in $string. * * @since 1.0.0 * @@ -1315,10 +1363,15 @@ function wp_filter_nohtml_kses($data) { * @uses add_filter() See description for what functions are added to what hooks. */ function kses_init_filters() { - // Normal filtering. - add_filter('pre_comment_content', 'wp_filter_kses'); + // Normal filtering add_filter('title_save_pre', 'wp_filter_kses'); + // Comment filtering + if ( current_user_can( 'unfiltered_html' ) ) + add_filter( 'pre_comment_content', 'wp_filter_post_kses' ); + else + add_filter( 'pre_comment_content', 'wp_filter_kses' ); + // Post filtering add_filter('content_save_pre', 'wp_filter_post_kses'); add_filter('excerpt_save_pre', 'wp_filter_post_kses'); @@ -1338,10 +1391,13 @@ function kses_init_filters() { * @since 2.0.6 */ function kses_remove_filters() { - // Normal filtering. - remove_filter('pre_comment_content', 'wp_filter_kses'); + // Normal filtering remove_filter('title_save_pre', 'wp_filter_kses'); + // Comment filtering + remove_filter( 'pre_comment_content', 'wp_filter_post_kses' ); + remove_filter( 'pre_comment_content', 'wp_filter_kses' ); + // Post filtering remove_filter('content_save_pre', 'wp_filter_post_kses'); remove_filter('excerpt_save_pre', 'wp_filter_post_kses'); @@ -1414,7 +1470,7 @@ function safecss_filter_attr( $css, $deprecated = '' ) { if ( strpos( $css_item, ':' ) === false ) { $found = true; } else { - $parts = split( ':', $css_item ); + $parts = explode( ':', $css_item ); if ( in_array( trim( $parts[0] ), $allowed_attr ) ) $found = true; } diff --git a/wp-includes/l10n.php b/wp-includes/l10n.php index 733f3a44..851b3730 100644 --- a/wp-includes/l10n.php +++ b/wp-includes/l10n.php @@ -272,10 +272,11 @@ function _nx($single, $plural, $number, $context, $domain = 'default') { * @since 2.5 * @param string $singular Single form to be i18ned * @param string $plural Plural form to be i18ned + * @param string $domain Optional. The domain identifier the text will be retrieved in * @return array array($singular, $plural) */ -function _n_noop( $singular, $plural ) { - return array( 0 => $singular, 1 => $plural, 'singular' => $singular, 'plural' => $plural, 'context' => null ); +function _n_noop( $singular, $plural, $domain = null ) { + return array( 0 => $singular, 1 => $plural, 'singular' => $singular, 'plural' => $plural, 'context' => null, 'domain' => $domain ); } /** @@ -283,8 +284,8 @@ function _n_noop( $singular, $plural ) { * * @see _n_noop() */ -function _nx_noop( $singular, $plural, $context ) { - return array( 0 => $singular, 1 => $plural, 2 => $context, 'singular' => $singular, 'plural' => $plural, 'context' => $context ); +function _nx_noop( $singular, $plural, $context, $domain = null ) { + return array( 0 => $singular, 1 => $plural, 2 => $context, 'singular' => $singular, 'plural' => $plural, 'context' => $context, 'domain' => $domain ); } /** @@ -293,9 +294,13 @@ function _nx_noop( $singular, $plural, $context ) { * @since 3.1 * @param array $nooped_plural Array with singular, plural and context keys, usually the result of _n_noop() or _nx_noop() * @param int $count Number of objects - * @param string $domain Optional. The domain identifier the text should be retrieved in + * @param string $domain Optional. The domain identifier the text should be retrieved in. If $nooped_plural contains + * a domain passed to _n_noop() or _nx_noop(), it will override this value. */ function translate_nooped_plural( $nooped_plural, $count, $domain = 'default' ) { + if ( $nooped_plural['domain'] ) + $domain = $nooped_plural['domain']; + if ( $nooped_plural['context'] ) return _nx( $nooped_plural['singular'], $nooped_plural['plural'], $count, $nooped_plural['context'], $domain ); else @@ -382,9 +387,17 @@ function load_default_textdomain() { load_textdomain( 'default', WP_LANG_DIR . "/$locale.mo" ); - if ( is_multisite() || ( defined( 'WP_INSTALLING_NETWORK' ) && WP_INSTALLING_NETWORK ) ) { + if ( ( is_multisite() || ( defined( 'WP_INSTALLING_NETWORK' ) && WP_INSTALLING_NETWORK ) ) && ! file_exists( WP_LANG_DIR . "/admin-$locale.mo" ) ) { load_textdomain( 'default', WP_LANG_DIR . "/ms-$locale.mo" ); + return; } + + if ( is_admin() ) + load_textdomain( 'default', WP_LANG_DIR . "/admin-$locale.mo" ); + + if ( is_network_admin() || ( defined( 'WP_INSTALLING_NETWORK' ) && WP_INSTALLING_NETWORK ) ) + load_textdomain( 'default', WP_LANG_DIR . "/admin-network-$locale.mo" ); + } /** @@ -527,7 +540,8 @@ function get_available_languages( $dir = null ) { foreach( (array)glob( ( is_null( $dir) ? WP_LANG_DIR : $dir ) . '/*.mo' ) as $lang_file ) { $lang_file = basename($lang_file, '.mo'); - if ( 0 !== strpos( $lang_file, 'continents-cities' ) && 0 !== strpos( $lang_file, 'ms-' ) ) + if ( 0 !== strpos( $lang_file, 'continents-cities' ) && 0 !== strpos( $lang_file, 'ms-' ) && + 0 !== strpos( $lang_file, 'admin-' )) $languages[] = $lang_file; } diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 7c5f5119..ae8a9f13 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -507,7 +507,7 @@ function get_post_comments_feed_link($post_id = 0, $feed = '') { * @since 2.5.0 * * @param string $link_text Descriptive text. - * @param int $post_id Optional post ID. Default to current post. + * @param int $post_id Optional post ID. Default to current post. * @param string $feed Optional. Feed format. * @return string Link to the comment feed for the current post. */ @@ -589,8 +589,6 @@ function get_category_feed_link($cat_id, $feed = '') { * @return string Link to the feed for the term specified by $term_id and $taxonomy. */ function get_term_feed_link( $term_id, $taxonomy = 'category', $feed = '' ) { - global $wp_rewrite; - $term_id = ( int ) $term_id; $term = get_term( $term_id, $taxonomy ); @@ -630,7 +628,6 @@ function get_term_feed_link( $term_id, $taxonomy = 'category', $feed = '' ) { else $link = apply_filters( 'taxonomy_feed_link', $link, $feed, $taxonomy ); - return $link; } @@ -1375,9 +1372,11 @@ function adjacent_post_link($format, $link, $in_same_cat = false, $excluded_cate * @since 1.5.0 * * @param int $pagenum Optional. Page ID. + * @param bool $escape Optional. Whether to escape the URL for display, with esc_url(). Defaults to true. +* Otherwise, prepares the URL with esc_url_raw(). * @return string */ -function get_pagenum_link($pagenum = 1) { +function get_pagenum_link($pagenum = 1, $escape = true ) { global $wp_rewrite; $pagenum = (int) $pagenum; @@ -1428,7 +1427,10 @@ function get_pagenum_link($pagenum = 1) { $result = apply_filters('get_pagenum_link', $result); - return $result; + if ( $escape ) + return esc_url( $result ); + else + return esc_url_raw( $result ); } /** @@ -1566,7 +1568,7 @@ function get_previous_posts_link( $label = null ) { if ( !is_single() && $paged > 1 ) { $attr = apply_filters( 'previous_posts_link_attributes', '' ); - return '". preg_replace( '/&([^#])(?![a-z]{1,8};)/', '&$1', $label ) .''; + return '". preg_replace( '/&([^#])(?![a-z]{1,8};)/i', '&$1', $label ) .''; } } @@ -1793,7 +1795,7 @@ function paginate_comments_links($args = array()) { } /** - * Retrieve shortcut link. + * Retrieve the Press This bookmarklet link. * * Use this in 'a' element 'href' attribute. * @@ -1802,6 +1804,7 @@ function paginate_comments_links($args = array()) { * @return string */ function get_shortcut_link() { + // In case of breaking changes, version this. #WP20071 $link = "javascript: var d=document, w=window, @@ -1835,7 +1838,7 @@ function get_shortcut_link() { * @uses get_home_url() * * @param string $path (optional) Path relative to the home url. - * @param string $scheme (optional) Scheme to give the home url context. Currently 'http', 'https'. + * @param string $scheme (optional) Scheme to give the home url context. Currently 'http', 'https', or 'relative'. * @return string Home url link with optional path appended. */ function home_url( $path = '', $scheme = null ) { @@ -1854,13 +1857,13 @@ function home_url( $path = '', $scheme = null ) { * * @param int $blog_id (optional) Blog ID. Defaults to current blog. * @param string $path (optional) Path relative to the home url. - * @param string $scheme (optional) Scheme to give the home url context. Currently 'http', 'https'. + * @param string $scheme (optional) Scheme to give the home url context. Currently 'http', 'https', or 'relative'. * @return string Home url link with optional path appended. */ function get_home_url( $blog_id = null, $path = '', $scheme = null ) { $orig_scheme = $scheme; - if ( !in_array( $scheme, array( 'http', 'https' ) ) ) + if ( !in_array( $scheme, array( 'http', 'https', 'relative' ) ) ) $scheme = is_ssl() && !is_admin() ? 'https' : 'http'; if ( empty( $blog_id ) || !is_multisite() ) @@ -1868,7 +1871,9 @@ function get_home_url( $blog_id = null, $path = '', $scheme = null ) { else $url = get_blog_option( $blog_id, 'home' ); - if ( 'http' != $scheme ) + if ( 'relative' == $scheme ) + $url = preg_replace( '#^.+://[^/]*#', '', $url ); + elseif ( 'http' != $scheme ) $url = str_replace( 'http://', "$scheme://", $url ); if ( !empty( $path ) && is_string( $path ) && strpos( $path, '..' ) === false ) @@ -1890,7 +1895,7 @@ function get_home_url( $blog_id = null, $path = '', $scheme = null ) { * @uses get_site_url() * * @param string $path Optional. Path relative to the site url. - * @param string $scheme Optional. Scheme to give the site url context. Currently 'http', 'https', 'login', 'login_post', or 'admin'. + * @param string $scheme Optional. Scheme to give the site url context. Currently 'http', 'https', 'login', 'login_post', 'admin', or 'relative'. * @return string Site url link with optional path appended. */ function site_url( $path = '', $scheme = null ) { @@ -1909,13 +1914,13 @@ function site_url( $path = '', $scheme = null ) { * * @param int $blog_id (optional) Blog ID. Defaults to current blog. * @param string $path Optional. Path relative to the site url. - * @param string $scheme Optional. Scheme to give the site url context. Currently 'http', 'https', 'login', 'login_post', or 'admin'. + * @param string $scheme Optional. Scheme to give the site url context. Currently 'http', 'https', 'login', 'login_post', 'admin', or 'relative'. * @return string Site url link with optional path appended. */ function get_site_url( $blog_id = null, $path = '', $scheme = null ) { // should the list of allowed schemes be maintained elsewhere? $orig_scheme = $scheme; - if ( !in_array( $scheme, array( 'http', 'https' ) ) ) { + if ( !in_array( $scheme, array( 'http', 'https', 'relative' ) ) ) { if ( ( 'login_post' == $scheme || 'rpc' == $scheme ) && ( force_ssl_login() || force_ssl_admin() ) ) $scheme = 'https'; elseif ( ( 'login' == $scheme ) && force_ssl_admin() ) @@ -1931,7 +1936,9 @@ function get_site_url( $blog_id = null, $path = '', $scheme = null ) { else $url = get_blog_option( $blog_id, 'siteurl' ); - if ( 'http' != $scheme ) + if ( 'relative' == $scheme ) + $url = preg_replace( '#^.+://[^/]*#', '', $url ); + elseif ( 'http' != $scheme ) $url = str_replace( 'http://', "{$scheme}://", $url ); if ( !empty( $path ) && is_string( $path ) && strpos( $path, '..' ) === false ) @@ -2062,7 +2069,7 @@ function plugins_url($path = '', $plugin = '') { * @since 3.0.0 * * @param string $path Optional. Path relative to the site url. - * @param string $scheme Optional. Scheme to give the site url context. Currently 'http', 'https', 'login', 'login_post', or 'admin'. + * @param string $scheme Optional. Scheme to give the site url context. Currently 'http', 'https', 'login', 'login_post', 'admin', or 'relative'. * @return string Site url link with optional path appended. */ function network_site_url( $path = '', $scheme = null ) { @@ -2072,7 +2079,7 @@ function network_site_url( $path = '', $scheme = null ) { return site_url($path, $scheme); $orig_scheme = $scheme; - if ( !in_array($scheme, array('http', 'https')) ) { + if ( !in_array( $scheme, array( 'http', 'https', 'relative' ) ) ) { if ( ( 'login_post' == $scheme || 'rpc' == $scheme ) && ( force_ssl_login() || force_ssl_admin() ) ) $scheme = 'https'; elseif ( ('login' == $scheme) && ( force_ssl_admin() ) ) @@ -2083,7 +2090,10 @@ function network_site_url( $path = '', $scheme = null ) { $scheme = ( is_ssl() ? 'https' : 'http' ); } - $url = $scheme . '://' . $current_site->domain . $current_site->path; + if ( 'relative' == $scheme ) + $url = $current_site->path; + else + $url = $scheme . '://' . $current_site->domain . $current_site->path; if ( !empty($path) && is_string($path) && strpos($path, '..') === false ) $url .= ltrim($path, '/'); @@ -2102,7 +2112,7 @@ function network_site_url( $path = '', $scheme = null ) { * @since 3.0.0 * * @param string $path (optional) Path relative to the home url. - * @param string $scheme (optional) Scheme to give the home url context. Currently 'http', 'https'. + * @param string $scheme (optional) Scheme to give the home url context. Currently 'http', 'https', or 'relative'. * @return string Home url link with optional path appended. */ function network_home_url( $path = '', $scheme = null ) { @@ -2113,10 +2123,13 @@ function network_home_url( $path = '', $scheme = null ) { $orig_scheme = $scheme; - if ( !in_array($scheme, array('http', 'https')) ) + if ( !in_array( $scheme, array( 'http', 'https', 'relative' ) ) ) $scheme = is_ssl() && !is_admin() ? 'https' : 'http'; - $url = $scheme . '://' . $current_site->domain . $current_site->path; + if ( 'relative' == $scheme ) + $url = $current_site->path; + else + $url = $scheme . '://' . $current_site->domain . $current_site->path; if ( !empty( $path ) && is_string( $path ) && strpos( $path, '..' ) === false ) $url .= ltrim( $path, '/' ); @@ -2184,10 +2197,40 @@ function self_admin_url($path = '', $scheme = 'admin') { return admin_url($path, $scheme); } +/** + * Set the scheme for a URL + * + * @since 3.4.0 + * + * @param string $url Absolute url that includes a scheme + * @param string $scheme Optional. Scheme to give $url. Currently 'http', 'https', 'login', 'login_post', 'admin', or 'relative'. + * @return string $url URL with chosen scheme. + */ +function set_url_scheme( $url, $scheme = null ) { + $orig_scheme = $scheme; + if ( ! in_array( $scheme, array( 'http', 'https', 'relative' ) ) ) { + if ( ( 'login_post' == $scheme || 'rpc' == $scheme ) && ( force_ssl_login() || force_ssl_admin() ) ) + $scheme = 'https'; + elseif ( ( 'login' == $scheme ) && force_ssl_admin() ) + $scheme = 'https'; + elseif ( ( 'admin' == $scheme ) && force_ssl_admin() ) + $scheme = 'https'; + else + $scheme = ( is_ssl() ? 'https' : 'http' ); + } + + if ( 'relative' == $scheme ) + $url = preg_replace( '#^.+://[^/]*#', '', $url ); + else + $url = preg_replace( '#^.+://#', $scheme . '://', $url ); + + return apply_filters( 'set_url_scheme', $url, $scheme, $orig_scheme ); +} + /** * Get the URL to the user's dashboard. * - * If a user does not belong to any site, the global user dashboard is used. If the user belongs to the current site, + * If a user does not belong to any site, the global user dashboard is used. If the user belongs to the current site, * the dashboard for the current site is returned. If the user cannot edit the current site, the dashboard to the user's * primary blog is returned. * @@ -2364,7 +2407,7 @@ function the_shortlink( $text = '', $title = '', $before = '', $after = '' ) { $text = __('This is the short link.'); if ( empty( $title ) ) - $title = the_title_attribute( array( 'echo' => FALSE ) ); + $title = the_title_attribute( array( 'echo' => false ) ); $shortlink = wp_get_shortlink( $post->ID ); @@ -2374,5 +2417,3 @@ function the_shortlink( $text = '', $title = '', $before = '', $after = '' ) { echo $before, $link, $after; } } - -?> diff --git a/wp-includes/load.php b/wp-includes/load.php index c70eeeb9..94e6339d 100644 --- a/wp-includes/load.php +++ b/wp-includes/load.php @@ -19,7 +19,7 @@ function wp_unregister_GLOBALS() { return; if ( isset( $_REQUEST['GLOBALS'] ) ) - die( /*WP_I18N_GLOBALS_OVERWRITE*/'GLOBALS overwrite attempt detected'/*/WP_I18N_GLOBALS_OVERWRITE*/ ); + die( 'GLOBALS overwrite attempt detected' ); // Variables that shouldn't be unset $no_unset = array( 'GLOBALS', '_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES', 'table_prefix' ); @@ -97,22 +97,21 @@ function wp_fix_server_vars() { * * Dies if requirements are not met. * - * This function must be able to work without a complete environment set up. In wp-load.php, for - * example, WP_CONTENT_DIR is defined and version.php is included before this function is called. - * * @access private * @since 3.0.0 */ function wp_check_php_mysql_versions() { - // we can probably extend this function to check if wp_die() exists then use translated strings, and then use it in install.php etc. - global $required_php_version, $wp_version; $php_version = phpversion(); - if ( version_compare( $required_php_version, $php_version, '>' ) ) - die( sprintf( /*WP_I18N_OLD_PHP*/'Your server is running PHP version %1$s but WordPress %2$s requires at least %3$s.'/*/WP_I18N_OLD_PHP*/, $php_version, $wp_version, $required_php_version ) ); + if ( version_compare( $required_php_version, $php_version, '>' ) ) { + wp_load_translations_early(); + wp_die( sprintf( __( 'Your server is running PHP version %1$s but WordPress %2$s requires at least %3$s.' ), $php_version, $wp_version, $required_php_version ) ); + } - if ( !extension_loaded( 'mysql' ) && !file_exists( WP_CONTENT_DIR . '/db.php' ) ) - die( /*WP_I18N_OLD_MYSQL*/'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.'/*/WP_I18N_OLD_MYSQL*/ ); + if ( ! extension_loaded( 'mysql' ) && ! file_exists( WP_CONTENT_DIR . '/db.php' ) ) { + wp_load_translations_early(); + wp_die( __( 'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.' ) ); + } } /** @@ -159,6 +158,8 @@ function wp_maintenance() { die(); } + wp_load_translations_early(); + $protocol = $_SERVER["SERVER_PROTOCOL"]; if ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol ) $protocol = 'HTTP/1.0'; @@ -167,14 +168,14 @@ function wp_maintenance() { header( 'Retry-After: 600' ); ?> - + > - <?php echo /*WP_I18N_MAINTENANCE*/'Maintenance'/*/WP_I18N_MAINTENANCE*/; ?> + <?php _e( 'Maintenance' ); ?> -

      +

      set_prefix( $table_prefix ); - if ( is_wp_error( $prefix ) ) - wp_die( /*WP_I18N_BAD_PREFIX*/'ERROR: $table_prefix in wp-config.php can only contain numbers, letters, and underscores.'/*/WP_I18N_BAD_PREFIX*/ ); + if ( is_wp_error( $prefix ) ) { + wp_load_translations_early(); + wp_die( __( 'ERROR: $table_prefix in wp-config.php can only contain numbers, letters, and underscores.' ) ); + } } /** @@ -568,7 +568,7 @@ function shutdown_action_hook() { */ function wp_clone( $object ) { - // Use parens for clone to accommodate PHP 4. See #17880 + // Use parens for clone to accommodate PHP 4. See #17880 return clone( $object ); } @@ -653,4 +653,86 @@ function is_multisite() { return false; } -?> +/** + * Attempts an early load of translations. + * + * Used for errors encountered during the initial loading process, before the locale has been + * properly detected and loaded. + * + * Designed for unusual load sequences (like setup-config.php) or for when the script will then + * terminate with an error, otherwise there is a risk that a file can be double-included. + * + * @since 3.4.0 + * @access private + */ +function wp_load_translations_early() { + global $text_direction, $wp_locale; + + static $loaded = false; + if ( $loaded ) + return; + $loaded = true; + + if ( function_exists( 'did_action' ) && did_action( 'init' ) ) + return; + + // We need $wp_local_package + require ABSPATH . WPINC . '/version.php'; + + // Translation and localization + require_once ABSPATH . WPINC . '/pomo/mo.php'; + require_once ABSPATH . WPINC . '/l10n.php'; + require_once ABSPATH . WPINC . '/locale.php'; + + // General libraries + require_once ABSPATH . WPINC . '/functions.php'; + require_once ABSPATH . WPINC . '/plugin.php'; + + $locales = $locations = array(); + + while ( true ) { + if ( defined( 'WPLANG' ) ) { + if ( '' == WPLANG ) + break; + $locales[] = WPLANG; + } + + if ( isset( $wp_local_package ) ) + $locales[] = $wp_local_package; + + if ( ! $locales ) + break; + + if ( defined( 'WP_LANG_DIR' ) && @is_dir( WP_LANG_DIR ) ) + $locations[] = WP_LANG_DIR; + + if ( defined( 'WP_CONTENT_DIR' ) && @is_dir( WP_CONTENT_DIR . '/languages' ) ) + $locations[] = WP_CONTENT_DIR . '/languages'; + + if ( @is_dir( ABSPATH . 'wp-content/languages' ) ) + $locations[] = ABSPATH . 'wp-content/languages'; + + if ( @is_dir( ABSPATH . WPINC . '/languages' ) ) + $locations[] = ABSPATH . WPINC . '/languages'; + + if ( ! $locations ) + break; + + $locations = array_unique( $locations ); + + foreach ( $locales as $locale ) { + foreach ( $locations as $location ) { + if ( file_exists( $location . '/' . $locale . '.mo' ) ) { + load_textdomain( 'default', $location . '/' . $locale . '.mo' ); + if ( defined( 'WP_SETUP_CONFIG' ) && file_exists( $location . '/admin-' . $locale . '.mo' ) ) + load_textdomain( 'default', $location . '/admin-' . $locale . '.mo' ); + break 2; + } + } + } + + break; + } + + $wp_locale = new WP_Locale(); +} diff --git a/wp-includes/locale.php b/wp-includes/locale.php index 1b529bae..bc5037c7 100644 --- a/wp-includes/locale.php +++ b/wp-includes/locale.php @@ -84,15 +84,6 @@ class WP_Locale { */ var $text_direction = 'ltr'; - /** - * Imports the global version to the class property. - * - * @since 2.1.0 - * @var array - * @access private - */ - var $locale_vars = array('text_direction'); - /** * Sets up the translated strings and object properties. * @@ -113,7 +104,7 @@ class WP_Locale { $this->weekday[5] = /* translators: weekday */ __('Friday'); $this->weekday[6] = /* translators: weekday */ __('Saturday'); - // The first letter of each day. The _%day%_initial suffix is a hack to make + // The first letter of each day. The _%day%_initial suffix is a hack to make // sure the day initials are unique. $this->weekday_initial[__('Sunday')] = /* translators: one-letter abbreviation of the weekday */ __('S_Sunday_initial'); $this->weekday_initial[__('Monday')] = /* translators: one-letter abbreviation of the weekday */ __('M_Monday_initial'); @@ -186,12 +177,12 @@ class WP_Locale { $trans = __('number_format_decimal_point'); $this->number_format['decimal_point'] = ('number_format_decimal_point' == $trans) ? '.' : $trans; - // Import global locale vars set during inclusion of $locale.php. - foreach ( (array) $this->locale_vars as $var ) { - if ( isset($GLOBALS[$var]) ) - $this->$var = $GLOBALS[$var]; - } - + // Set text direction. + if ( isset( $GLOBALS['text_direction'] ) ) + $this->text_direction = $GLOBALS['text_direction']; + /* translators: 'rtl' or 'ltr'. This sets the text direction for WordPress. */ + elseif ( 'rtl' == _x( 'ltr', 'text direction' ) ) + $this->text_direction = 'rtl'; } /** @@ -326,15 +317,16 @@ class WP_Locale { $this->init(); $this->register_globals(); } + /** * Checks if current locale is RTL. * * @since 3.0.0 * @return bool Whether locale is RTL. */ - function is_rtl() { - return 'rtl' == $this->text_direction; - } + function is_rtl() { + return 'rtl' == $this->text_direction; + } } /** @@ -347,5 +339,3 @@ function is_rtl() { global $wp_locale; return $wp_locale->is_rtl(); } - -?> diff --git a/wp-includes/media.php b/wp-includes/media.php index 5ec0338f..1a933edf 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -53,9 +53,9 @@ function image_constrain_size_for_editor($width, $height, $size = 'medium') { // if no width is set, default to the theme content width if available } elseif ( $size == 'large' ) { - // we're inserting a large size image into the editor. if it's a really + // We're inserting a large size image into the editor. If it's a really // big image we'll scale it down to fit reasonably within the editor - // itself, and within the theme's content width if it's known. the user + // itself, and within the theme's content width if it's known. The user // can resize it in the editor if they wish. $max_width = intval(get_option('large_size_w')); $max_height = intval(get_option('large_size_h')); @@ -327,6 +327,8 @@ function wp_constrain_dimensions( $current_width, $current_height, $max_width=0, * portion of the image will be cropped out and resized to the required size. * * @since 2.5.0 + * @uses apply_filters() Calls 'image_resize_dimensions' on $orig_w, $orig_h, $dest_w, $dest_h and + * $crop to provide custom resize dimensions. * * @param int $orig_w Original width. * @param int $orig_h Original height. @@ -343,6 +345,11 @@ function image_resize_dimensions($orig_w, $orig_h, $dest_w, $dest_h, $crop = fal if ($dest_w <= 0 && $dest_h <= 0) return false; + // plugins can use this to provide custom resize dimensions + $output = apply_filters( 'image_resize_dimensions', null, $orig_w, $orig_h, $dest_w, $dest_h, $crop ); + if ( null !== $output ) + return $output; + if ( $crop ) { // crop the largest possible portion of the original image that we can size to $dest_w x $dest_h $aspect_ratio = $orig_w / $orig_h; @@ -455,7 +462,8 @@ function image_resize( $file, $max_w, $max_h, $crop = false, $suffix = null, $de return new WP_Error('resize_path_invalid', __( 'Resize path invalid' )); } else { // all other formats are converted to jpg - $destfilename = "{$dir}/{$name}-{$suffix}.jpg"; + if ( 'jpg' != $ext && 'jpeg' != $ext ) + $destfilename = "{$dir}/{$name}-{$suffix}.jpg"; if ( !imagejpeg( $newimage, $destfilename, apply_filters( 'jpeg_quality', $jpeg_quality, 'image_resize' ) ) ) return new WP_Error('resize_path_invalid', __( 'Resize path invalid' )); } @@ -724,6 +732,13 @@ add_shortcode('caption', 'img_caption_shortcode'); * @return string */ function img_caption_shortcode($attr, $content = null) { + // New-style shortcode with the caption inside the shortcode with the link and image tags. + if ( ! isset( $attr['caption'] ) ) { + if ( preg_match( '#((?:]+>\s*)?]+>(?:\s*)?)(.*)#is', $content, $matches ) ) { + $content = $matches[1]; + $attr['caption'] = trim( $matches[2] ); + } + } // Allow plugins/themes to override the default caption template. $output = apply_filters('img_caption_shortcode', '', $attr, $content); @@ -1096,7 +1111,7 @@ class WP_Embed { @@ -1378,7 +1393,7 @@ function wp_expand_dimensions( $example_width, $example_height, $max_width, $max * * @param string $url The URL that should be embedded. * @param array $args Additional arguments and parameters. - * @return string The original URL on failure or the embed HTML on success. + * @return bool|string False on failure or the embed HTML on success. */ function wp_oembed_get( $url, $args = '' ) { require_once( ABSPATH . WPINC . '/class-oembed.php' ); @@ -1442,4 +1457,53 @@ function wp_embed_handler_googlevideo( $matches, $attr, $url, $rawattr ) { return apply_filters( 'embed_googlevideo', '', $matches, $attr, $url, $rawattr ); } -?> \ No newline at end of file +/** + * Prints default plupload arguments. + * + * @since 3.4.0 + */ +function wp_plupload_default_settings() { + global $wp_scripts; + + $max_upload_size = wp_max_upload_size(); + + $defaults = array( + 'runtimes' => 'html5,silverlight,flash,html4', + 'file_data_name' => 'async-upload', // key passed to $_FILE. + 'multiple_queues' => true, + 'max_file_size' => $max_upload_size . 'b', + 'url' => admin_url( 'admin-ajax.php', 'relative' ), + 'flash_swf_url' => includes_url( 'js/plupload/plupload.flash.swf' ), + 'silverlight_xap_url' => includes_url( 'js/plupload/plupload.silverlight.xap' ), + 'filters' => array( array( 'title' => __( 'Allowed Files' ), 'extensions' => '*') ), + 'multipart' => true, + 'urlstream_upload' => true, + ); + + $defaults = apply_filters( 'plupload_default_settings', $defaults ); + + $params = array( + 'action' => 'upload-attachment', + ); + + $params = apply_filters( 'plupload_default_params', $params ); + $params['_wpnonce'] = wp_create_nonce( 'media-form' ); + $defaults['multipart_params'] = $params; + + $settings = array( + 'defaults' => $defaults, + 'browser' => array( + 'mobile' => wp_is_mobile(), + 'supported' => _device_can_upload(), + ), + ); + + $script = 'var _wpPluploadSettings = ' . json_encode( $settings ) . ';'; + + $data = $wp_scripts->get_data( 'wp-plupload', 'data' ); + if ( $data ) + $script = "$data\n$script"; + + $wp_scripts->add_data( 'wp-plupload', 'data', $script ); +} +add_action( 'customize_controls_enqueue_scripts', 'wp_plupload_default_settings' ); diff --git a/wp-includes/meta.php b/wp-includes/meta.php index a318bbe2..d6984f62 100644 --- a/wp-includes/meta.php +++ b/wp-includes/meta.php @@ -2,8 +2,8 @@ /** * Metadata API * - * Functions for retrieving and manipulating metadata of various WordPress object types. Metadata - * for an object is a represented by a simple key-value pair. Objects may contain multiple + * Functions for retrieving and manipulating metadata of various WordPress object types. Metadata + * for an object is a represented by a simple key-value pair. Objects may contain multiple * metadata entries that share the same key and differ only in their value. * * @package WordPress @@ -23,8 +23,8 @@ * @param int $object_id ID of the object metadata is for * @param string $meta_key Metadata key * @param string $meta_value Metadata value - * @param bool $unique Optional, default is false. Whether the specified metadata key should be - * unique for the object. If true, and the object already has a value for the specified + * @param bool $unique Optional, default is false. Whether the specified metadata key should be + * unique for the object. If true, and the object already has a value for the specified * metadata key, no change will be made * @return bool The meta ID on successful update, false on failure. */ @@ -80,7 +80,7 @@ function add_metadata($meta_type, $object_id, $meta_key, $meta_value, $unique = } /** - * Update metadata for the specified object. If no value already exists for the specified object + * Update metadata for the specified object. If no value already exists for the specified object * ID and metadata key, the metadata will be added. * * @since 2.9.0 @@ -94,8 +94,8 @@ function add_metadata($meta_type, $object_id, $meta_key, $meta_value, $unique = * @param int $object_id ID of the object metadata is for * @param string $meta_key Metadata key * @param string $meta_value Metadata value - * @param string $prev_value Optional. If specified, only update existing metadata entries with - * the specified value. Otherwise, update all entries. + * @param string $prev_value Optional. If specified, only update existing metadata entries with + * the specified value. Otherwise, update all entries. * @return bool True on successful update, false on failure. */ function update_metadata($meta_type, $object_id, $meta_key, $meta_value, $prev_value = '') { @@ -174,10 +174,10 @@ function update_metadata($meta_type, $object_id, $meta_key, $meta_value, $prev_v * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user) * @param int $object_id ID of the object metadata is for * @param string $meta_key Metadata key - * @param string $meta_value Optional. Metadata value. If specified, only delete metadata entries - * with this value. Otherwise, delete all entries with the specified meta_key. - * @param bool $delete_all Optional, default is false. If true, delete matching metadata entries - * for all objects, ignoring the specified object_id. Otherwise, only delete matching + * @param string $meta_value Optional. Metadata value. If specified, only delete metadata entries + * with this value. Otherwise, delete all entries with the specified meta_key. + * @param bool $delete_all Optional, default is false. If true, delete matching metadata entries + * for all objects, ignoring the specified object_id. Otherwise, only delete matching * metadata entries for the specified object_id. * @return bool True on successful delete, false on failure. */ @@ -223,6 +223,7 @@ function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '', $d do_action( "delete_{$meta_type}_meta", $meta_ids, $object_id, $meta_key, $_meta_value ); + // Old-style action. if ( 'post' == $meta_type ) do_action( 'delete_postmeta', $meta_ids ); @@ -243,6 +244,7 @@ function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '', $d do_action( "deleted_{$meta_type}_meta", $meta_ids, $object_id, $meta_key, $_meta_value ); + // Old-style action. if ( 'post' == $meta_type ) do_action( 'deleted_postmeta', $meta_ids ); @@ -256,10 +258,10 @@ function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '', $d * * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user) * @param int $object_id ID of the object metadata is for - * @param string $meta_key Optional. Metadata key. If not specified, retrieve all metadata for + * @param string $meta_key Optional. Metadata key. If not specified, retrieve all metadata for * the specified object. - * @param bool $single Optional, default is false. If true, return only the first value of the - * specified meta_key. This parameter has no effect if meta_key is not specified. + * @param bool $single Optional, default is false. If true, return only the first value of the + * specified meta_key. This parameter has no effect if meta_key is not specified. * @return string|array Single metadata value, or array of values */ function get_metadata($meta_type, $object_id, $meta_key = '', $single = false) { @@ -485,19 +487,21 @@ function delete_metadata_by_mid( $meta_type, $meta_id ) { do_action( "delete_{$meta_type}_meta", (array) $meta_id, $object_id, $meta->meta_key, $meta->meta_value ); - if ( 'post' == $meta_type ) - do_action( 'delete_postmeta', $meta_id ); + // Old-style action. + if ( 'post' == $meta_type || 'comment' == $meta_type ) + do_action( "delete_{$meta_type}meta", $meta_id ); // Run the query, will return true if deleted, false otherwise - $result = (bool) $wpdb->query( $wpdb->prepare( "DELETE FROM $table WHERE $id_column = %d LIMIT 1;", $meta_id ) ); + $result = (bool) $wpdb->delete( $table, array( $id_column => $meta_id ) ); // Clear the caches. wp_cache_delete($object_id, $meta_type . '_meta'); do_action( "deleted_{$meta_type}_meta", (array) $meta_id, $object_id, $meta->meta_key, $meta->meta_value ); - if ( 'post' == $meta_type ) - do_action( 'deleted_postmeta', $meta_id ); + // Old-style action. + if ( 'post' == $meta_type || 'comment' == $meta_type ) + do_action( "deleted_{$meta_type}meta", $meta_id ); return $result; @@ -861,5 +865,3 @@ function register_meta( $meta_type, $meta_key, $sanitize_callback, $auth_callbac if ( is_callable( $auth_callback ) ) add_filter( "auth_{$meta_type}_meta_{$meta_key}", $auth_callback, 10, 6 ); } - -?> diff --git a/wp-includes/ms-blogs.php b/wp-includes/ms-blogs.php index 0bd6a92b..8f66aadd 100644 --- a/wp-includes/ms-blogs.php +++ b/wp-includes/ms-blogs.php @@ -252,6 +252,8 @@ function refresh_blog_details( $blog_id ) { wp_cache_delete( md5( $details->domain . $details->path ) , 'blog-lookup' ); wp_cache_delete( 'current_blog_' . $details->domain, 'site-options' ); wp_cache_delete( 'current_blog_' . $details->domain . $details->path, 'site-options' ); + + do_action( 'refresh_blog_details', $blog_id ); } /** @@ -709,4 +711,23 @@ function _update_blog_date_on_post_publish( $new_status, $old_status, $post ) { wpmu_update_blogs_date(); } -?> +/** + * Handler for updating the blog date when a published post is deleted. + * + * @since 3.4.0 + * + * @param int $post_id Post ID + */ +function _update_blog_date_on_post_delete( $post_id ) { + $post = get_post( $post_id ); + + $post_type_obj = get_post_type_object( $post->post_type ); + if ( ! $post_type_obj->public ) + return; + + if ( 'publish' != $post->post_status ) + return; + + wpmu_update_blogs_date(); +} + diff --git a/wp-includes/ms-default-constants.php b/wp-includes/ms-default-constants.php index 12dc661a..cc341b14 100644 --- a/wp-includes/ms-default-constants.php +++ b/wp-includes/ms-default-constants.php @@ -136,5 +136,3 @@ function ms_subdomain_constants() { } } add_action( 'init', 'ms_subdomain_constants' ); - -?> diff --git a/wp-includes/ms-default-filters.php b/wp-includes/ms-default-filters.php index 9e42f62d..44d8294a 100644 --- a/wp-includes/ms-default-filters.php +++ b/wp-includes/ms-default-filters.php @@ -35,7 +35,7 @@ add_filter( 'allowed_redirect_hosts', 'redirect_this_site' ); // Administration add_filter( 'term_id_filter', 'global_terms', 10, 2 ); add_action( 'publish_post', 'update_posts_count' ); -add_action( 'delete_post', 'wpmu_update_blogs_date' ); +add_action( 'delete_post', '_update_blog_date_on_post_delete' ); add_action( 'transition_post_status', '_update_blog_date_on_post_publish', 10, 3 ); add_action( 'admin_init', 'wp_schedule_update_network_counts'); add_action( 'update_network_counts', 'wp_update_network_counts'); @@ -60,5 +60,3 @@ add_filter( 'force_filtered_html_on_import', '__return_true' ); // WP_HOME and WP_SITEURL should not have any effect in MS remove_filter( 'option_siteurl', '_config_wp_siteurl' ); remove_filter( 'option_home', '_config_wp_home' ); - -?> diff --git a/wp-includes/ms-deprecated.php b/wp-includes/ms-deprecated.php index 9b910b72..9b9c43f9 100644 --- a/wp-includes/ms-deprecated.php +++ b/wp-includes/ms-deprecated.php @@ -49,7 +49,7 @@ function is_site_admin( $user_login = '' ) { return false; } else { $user = get_user_by( 'login', $user_login ); - if ( empty( $user->ID ) ) + if ( ! $user->exists() ) return false; $user_id = $user->ID; } @@ -270,5 +270,3 @@ function wpmu_admin_redirect_add_updated_param( $url = '' ) { } return $url; } - -?> \ No newline at end of file diff --git a/wp-includes/ms-files.php b/wp-includes/ms-files.php index e7ab0a4c..100ba2c6 100644 --- a/wp-includes/ms-files.php +++ b/wp-includes/ms-files.php @@ -80,4 +80,3 @@ if ( ( $client_last_modified && $client_etag ) // If we made it this far, just serve the file readfile( $file ); -?> diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php index c9cd15fd..f4fe306b 100644 --- a/wp-includes/ms-functions.php +++ b/wp-includes/ms-functions.php @@ -185,7 +185,7 @@ function add_user_to_blog( $blog_id, $user_id, $role ) { $user = new WP_User($user_id); - if ( empty( $user->ID ) ) { + if ( ! $user->exists() ) { restore_current_blog(); return new WP_Error('user_does_not_exist', __('That user does not exist.')); } @@ -247,7 +247,7 @@ function remove_user_from_blog($user_id, $blog_id = '', $reassign = '') { // wp_revoke_user($user_id); $user = new WP_User($user_id); - if ( empty( $user->ID ) ) { + if ( ! $user->exists() ) { restore_current_blog(); return new WP_Error('user_does_not_exist', __('That user does not exist.')); } @@ -279,8 +279,8 @@ function remove_user_from_blog($user_id, $blog_id = '', $reassign = '') { * * @param string $domain The new blog's domain. * @param string $path The new blog's path. - * @param string $string The new blog's title. - * @param int $site Optional. Defaults to 1. + * @param string $weblog_title The new blog's title. + * @param int $site_id Optional. Defaults to 1. * @return int The ID of the newly created blog */ function create_empty_blog( $domain, $path, $weblog_title, $site_id = 1 ) { @@ -436,10 +436,8 @@ function wpmu_validate_user_signup($user_name, $user_email) { $orig_username = $user_name; $user_name = preg_replace( '/\s+/', '', sanitize_user( $user_name, true ) ); - $maybe = array(); - preg_match( '/[a-z0-9]+/', $user_name, $maybe ); - if ( $user_name != $orig_username || $user_name != $maybe[0] ) { + if ( $user_name != $orig_username || preg_match( '/[^a-z0-9]/', $user_name ) ) { $errors->add( 'user_name', __( 'Only lowercase letters (a-z) and numbers are allowed.' ) ); $user_name = $orig_username; } @@ -447,7 +445,7 @@ function wpmu_validate_user_signup($user_name, $user_email) { $user_email = sanitize_email( $user_email ); if ( empty( $user_name ) ) - $errors->add('user_name', __('Please enter a username')); + $errors->add('user_name', __( 'Please enter a username.' ) ); $illegal_names = get_site_option( 'illegal_names' ); if ( is_array( $illegal_names ) == false ) { @@ -455,13 +453,13 @@ function wpmu_validate_user_signup($user_name, $user_email) { add_site_option( 'illegal_names', $illegal_names ); } if ( in_array( $user_name, $illegal_names ) == true ) - $errors->add('user_name', __('That username is not allowed')); + $errors->add('user_name', __( 'That username is not allowed.' ) ); if ( is_email_address_unsafe( $user_email ) ) $errors->add('user_email', __('You cannot use that email address to signup. We are having problems with them blocking some of our email. Please use another email provider.')); if ( strlen( $user_name ) < 4 ) - $errors->add('user_name', __('Username must be at least 4 characters')); + $errors->add('user_name', __( 'Username must be at least 4 characters.' ) ); if ( strpos( ' ' . $user_name, '_' ) != false ) $errors->add( 'user_name', __( 'Sorry, usernames may not contain the character “_”!' ) ); @@ -473,7 +471,7 @@ function wpmu_validate_user_signup($user_name, $user_email) { $errors->add('user_name', __('Sorry, usernames must have letters too!')); if ( !is_email( $user_email ) ) - $errors->add('user_email', __('Please enter a correct email address')); + $errors->add('user_email', __( 'Please enter a correct email address.' ) ); $limited_email_domains = get_site_option( 'limited_email_domains' ); if ( is_array( $limited_email_domains ) && empty( $limited_email_domains ) == false ) { @@ -498,7 +496,7 @@ function wpmu_validate_user_signup($user_name, $user_email) { $diff = $now - $registered_at; // If registered more than two days ago, cancel registration and let this signup go through. if ( $diff > 172800 ) - $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->signups WHERE user_login = %s", $user_name) ); + $wpdb->delete( $wpdb->signups, array( 'user_login' => $user_name ) ); else $errors->add('user_name', __('That username is currently reserved but may be available in a couple of days.')); @@ -511,7 +509,7 @@ function wpmu_validate_user_signup($user_name, $user_email) { $diff = current_time( 'timestamp', true ) - mysql2date('U', $signup->registered); // If registered more than two days ago, cancel registration and let this signup go through. if ( $diff > 172800 ) - $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->signups WHERE user_email = %s", $user_email) ); + $wpdb->delete( $wpdb->signups, array( 'user_email' => $user_email ) ); else $errors->add('user_email', __('That email address has already been used. Please check your inbox for an activation email. It will become available in a couple of days if you do nothing.')); } @@ -561,16 +559,16 @@ function wpmu_validate_blog_signup($blogname, $blog_title, $user = '') { $illegal_names = array_merge($illegal_names, apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'blog', 'files', 'feed' ) ) ); if ( empty( $blogname ) ) - $errors->add('blogname', __('Please enter a site name')); + $errors->add('blogname', __( 'Please enter a site name.' ) ); if ( preg_match( '/[^a-z0-9]+/', $blogname ) ) - $errors->add('blogname', __('Only lowercase letters and numbers allowed')); + $errors->add('blogname', __( 'Only lowercase letters and numbers allowed.' ) ); if ( in_array( $blogname, $illegal_names ) == true ) - $errors->add('blogname', __('That name is not allowed')); + $errors->add('blogname', __( 'That name is not allowed.' ) ); if ( strlen( $blogname ) < 4 && !is_super_admin() ) - $errors->add('blogname', __('Site name must be at least 4 characters')); + $errors->add('blogname', __( 'Site name must be at least 4 characters.' ) ); if ( strpos( ' ' . $blogname, '_' ) != false ) $errors->add( 'blogname', __( 'Sorry, site names may not contain the character “_”!' ) ); @@ -590,7 +588,7 @@ function wpmu_validate_blog_signup($blogname, $blog_title, $user = '') { $blog_title = stripslashes( $blog_title ); if ( empty( $blog_title ) ) - $errors->add('blog_title', __('Please enter a site title')); + $errors->add('blog_title', __( 'Please enter a site title.' ) ); // Check if the domain/path has been used already. if ( is_subdomain_install() ) { @@ -614,7 +612,7 @@ function wpmu_validate_blog_signup($blogname, $blog_title, $user = '') { $diff = current_time( 'timestamp', true ) - mysql2date('U', $signup->registered); // If registered more than two days ago, cancel registration and let this signup go through. if ( $diff > 172800 ) - $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->signups WHERE domain = %s AND path = %s", $mydomain, $path) ); + $wpdb->delete( $wpdb->signups, array( 'domain' => $mydomain , 'path' => $path ) ); else $errors->add('blogname', __('That site is currently reserved but may be available in a couple days.')); } @@ -845,7 +843,7 @@ function wpmu_activate_signup($key) { return new WP_Error( 'already_active', __( 'The site is already active.' ), $signup ); } - $meta = unserialize($signup->meta); + $meta = maybe_unserialize($signup->meta); $user_login = $wpdb->escape($signup->user_login); $user_email = $wpdb->escape($signup->user_email); $password = wp_generate_password( 12, false ); @@ -880,7 +878,7 @@ function wpmu_activate_signup($key) { // TODO: What to do if we create a user but cannot create a blog? if ( is_wp_error($blog_id) ) { // If blog is taken, that means a previous attempt to activate this blog failed in between creating the blog and - // setting the activation flag. Let's just set the active flag and instruct the user to reset their password. + // setting the activation flag. Let's just set the active flag and instruct the user to reset their password. if ( 'blog_taken' == $blog_id->get_error_code() ) { $blog_id->add_data( $signup ); $wpdb->update( $wpdb->signups, array( 'active' => 1, 'activated' => $now ), array( 'activation_key' => $key ) ); @@ -1044,6 +1042,7 @@ Disable these notifications: %4s' ), $blogname, $siteurl, $_SERVER['REMOTE_ADDR' * the notification email. * * @since MU + * @uses apply_filters() Filter newuser_notify_siteadmin to change the content of the email message * * @param int $user_id The new user's ID. * @return bool @@ -1065,7 +1064,7 @@ Remote IP: %2s Disable these notifications: %3s'), $user->user_login, $_SERVER['REMOTE_ADDR'], $options_site_url); - $msg = apply_filters( 'newuser_notify_siteadmin', $msg ); + $msg = apply_filters( 'newuser_notify_siteadmin', $msg, $user ); wp_mail( $email, sprintf(__('New User Registration: %s'), $user->user_login), $msg ); return true; } @@ -1161,8 +1160,9 @@ function install_blog($blog_id, $blog_title = '') { $wpdb->update( $wpdb->options, array('option_value' => ''), array('option_name' => 'admin_email') ); // remove all perms - $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE meta_key = %s", $table_prefix.'user_level') ); - $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE meta_key = %s", $table_prefix.'capabilities') ); + $wpdb->delete( $wpdb->usermeta, array( 'meta_key' => $table_prefix.'user_level' ) ); + + $wpdb->delete( $wpdb->usermeta, array( 'meta_key' => $table_prefix.'capabilities' ) ); $wpdb->suppress_errors( false ); } @@ -1368,7 +1368,8 @@ function get_most_recent_post_of_user( $user_id ) { // Walk through each blog and get the most recent post // published by $user_id foreach ( (array) $user_blogs as $blog ) { - $recent_post = $wpdb->get_row( $wpdb->prepare("SELECT ID, post_date_gmt FROM {$wpdb->base_prefix}{$blog->userblog_id}_posts WHERE post_author = %d AND post_type = 'post' AND post_status = 'publish' ORDER BY post_date_gmt DESC LIMIT 1", $user_id ), ARRAY_A); + $prefix = $wpdb->get_blog_prefix( $blog->userblog_id ); + $recent_post = $wpdb->get_row( $wpdb->prepare("SELECT ID, post_date_gmt FROM {$prefix}posts WHERE post_author = %d AND post_type = 'post' AND post_status = 'publish' ORDER BY post_date_gmt DESC LIMIT 1", $user_id ), ARRAY_A); // Make sure we found a post if ( isset($recent_post['ID']) ) { @@ -1459,9 +1460,6 @@ function recurse_dirsize( $directory ) { /** * Check whether a blog has used its allotted upload space. * - * Used by get_dirsize() to get a directory's size when it contains - * other directories. - * * @since MU * @uses get_dirsize() * @@ -1734,9 +1732,9 @@ function maybe_add_existing_user_to_blog() { delete_option( 'new_user_' . $key ); if ( empty( $details ) || is_wp_error( add_existing_user_to_blog( $details ) ) ) - wp_die( sprintf(__('An error occurred adding you to this site. Back to the homepage.'), site_url() ) ); + wp_die( sprintf(__('An error occurred adding you to this site. Back to the homepage.'), home_url() ) ); - wp_die( sprintf(__('You have been added to this site. Please visit the homepage or log in using your username and password.'), site_url(), admin_url() ), __('Success') ); + wp_die( sprintf(__('You have been added to this site. Please visit the homepage or log in using your username and password.'), home_url(), admin_url() ), __('Success') ); } /** @@ -1862,7 +1860,7 @@ function is_user_option_local( $key, $user_id = 0, $blog_id = 0 ) { if ( $blog_id == 0 ) $blog_id = $wpdb->blogid; - $local_key = $wpdb->base_prefix . $blog_id . '_' . $key; + $local_key = $wpdb->get_blog_prefix( $blog_id ) . $key; if ( isset( $current_user->$local_key ) ) return true; @@ -1948,7 +1946,7 @@ function filter_SSL( $url ) { $arrURL = parse_url( $url ); if ( force_ssl_content() && is_ssl() ) { - if ( 'http' === $arrURL['scheme'] && 'https' !== $arrURL['scheme'] ) + if ( 'http' === $arrURL['scheme'] ) $url = str_replace( $arrURL['scheme'], 'https', $url ); } @@ -1982,5 +1980,3 @@ function wp_update_network_counts() { $count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(ID) as c FROM $wpdb->users WHERE spam = '0' AND deleted = '0'") ); update_site_option( 'user_count', $count ); } - -?> \ No newline at end of file diff --git a/wp-includes/ms-load.php b/wp-includes/ms-load.php index 5ff0526f..58826e78 100644 --- a/wp-includes/ms-load.php +++ b/wp-includes/ms-load.php @@ -211,10 +211,12 @@ function wpmu_current_site() { } // Still no dice. + wp_load_translations_early(); + if ( 1 == count( $sites ) ) - wp_die( sprintf( /*WP_I18N_BLOG_DOESNT_EXIST*/'That site does not exist. Please try %s.'/*/WP_I18N_BLOG_DOESNT_EXIST*/, $sites[0]->domain . $sites[0]->path ) ); + wp_die( sprintf( __( 'That site does not exist. Please try %s.' ), 'http://' . $sites[0]->domain . $sites[0]->path ) ); else - wp_die( /*WP_I18N_NO_SITE_DEFINED*/'No site defined on this host. If you are the owner of this site, please check Debugging a WordPress Network for help.'/*/WP_I18N_NO_SITE_DEFINED*/ ); + wp_die( __( 'No site defined on this host. If you are the owner of this site, please check Debugging a WordPress Network for help.' ) ); } /** @@ -228,19 +230,21 @@ function wpmu_current_site() { function ms_not_installed() { global $wpdb, $domain, $path; - $title = /*WP_I18N_FATAL_ERROR*/'Error establishing database connection'/*/WP_I18N_FATAL_ERROR*/; + wp_load_translations_early(); + + $title = __( 'Error establishing database connection' ); $msg = '

      ' . $title . '

      '; if ( ! is_admin() ) die( $msg ); - $msg .= '

      ' . /*WP_I18N_CONTACT_OWNER*/'If your site does not display, please contact the owner of this network.'/*/WP_I18N_CONTACT_OWNER*/ . ''; - $msg .= ' ' . /*WP_I18N_CHECK_MYSQL*/'If you are the owner of this network please check that MySQL is running properly and all tables are error free.'/*/WP_I18N_CHECK_MYSQL*/ . '

      '; + $msg .= '

      ' . __( 'If your site does not display, please contact the owner of this network.' ) . ''; + $msg .= ' ' . __( 'If you are the owner of this network please check that MySQL is running properly and all tables are error free.' ) . '

      '; if ( false && !$wpdb->get_var( "SHOW TABLES LIKE '$wpdb->site'" ) ) - $msg .= '

      ' . sprintf( /*WP_I18N_TABLES_MISSING_LONG*/'Database tables are missing. This means that MySQL is not running, WordPress was not installed properly, or someone deleted %s. You really should look at your database now.'/*/WP_I18N_TABLES_MISSING_LONG*/, $wpdb->site ) . '

      '; + $msg .= '

      ' . sprintf( __( 'Database tables are missing. This means that MySQL is not running, WordPress was not installed properly, or someone deleted %s. You really should look at your database now.' ), $wpdb->site ) . '

      '; else - $msg .= '

      ' . sprintf( /*WP_I18N_NO_SITE_FOUND*/'Could not find site %1$s. Searched for table %2$s in database %3$s. Is that right?'/*/WP_I18N_NO_SITE_FOUND*/, rtrim( $domain . $path, '/' ), $wpdb->blogs, DB_NAME ) . '

      '; - $msg .= '

      ' . /*WP_I18N_WHAT_DO_I_DO*/'What do I do now?'/*/WP_I18N_WHAT_DO_I_DO*/ . ' '; - $msg .= /*WP_I18N_RTFM*/'Read the bug report page. Some of the guidelines there may help you figure out what went wrong.'/*/WP_I18N_RTFM*/; - $msg .= ' ' . /*WP_I18N_STUCK*/'If you’re still stuck with this message, then check that your database contains the following tables:'/*/WP_I18N_STUCK*/ . '

        '; + $msg .= '

        ' . sprintf( __( 'Could not find site %1$s. Searched for table %2$s in database %3$s. Is that right?' ), rtrim( $domain . $path, '/' ), $wpdb->blogs, DB_NAME ) . '

        '; + $msg .= '

        ' . __( 'What do I do now?' ) . ' '; + $msg .= __( 'Read the bug report page. Some of the guidelines there may help you figure out what went wrong.' ); + $msg .= ' ' . __( 'If you’re still stuck with this message, then check that your database contains the following tables:' ) . '

          '; foreach ( $wpdb->tables('global') as $t => $table ) { if ( 'sitecategories' == $t ) continue; @@ -250,5 +254,3 @@ function ms_not_installed() { wp_die( $msg, $title ); } - -?> \ No newline at end of file diff --git a/wp-includes/ms-settings.php b/wp-includes/ms-settings.php index 42df103d..5dd460e3 100644 --- a/wp-includes/ms-settings.php +++ b/wp-includes/ms-settings.php @@ -31,7 +31,8 @@ if ( !isset( $current_site ) || !isset( $current_blog ) ) { $domain = substr( $domain, 0, -4 ); $_SERVER['HTTP_HOST'] = substr( $_SERVER['HTTP_HOST'], 0, -4 ); } else { - wp_die( /*WP_I18N_NO_PORT_NUMBER*/'Multisite only works without the port number in the URL.'/*/WP_I18N_NO_PORT_NUMBER*/ ); + wp_load_translations_early(); + wp_die( __( 'Multisite only works without the port number in the URL.' ) ); } } @@ -116,8 +117,9 @@ if ( !isset( $current_site ) || !isset( $current_blog ) ) { if ( defined( 'WP_INSTALLING' ) ) { $current_blog->blog_id = $blog_id = 1; } else { - $msg = ! $wpdb->get_var( "SHOW TABLES LIKE '$wpdb->site'" ) ? ' ' . /*WP_I18N_TABLES_MISSING*/'Database tables are missing.'/*/WP_I18N_TABLES_MISSING*/ : ''; - wp_die( /*WP_I18N_NO_BLOG*/'No site by that name on this system.'/*/WP_I18N_NO_BLOG*/ . $msg ); + wp_load_translations_early(); + $msg = ! $wpdb->get_var( "SHOW TABLES LIKE '$wpdb->site'" ) ? ' ' . __( 'Database tables are missing.' ) : ''; + wp_die( __( 'No site by that name on this system.' ) . $msg ); } } } diff --git a/wp-includes/nav-menu-template.php b/wp-includes/nav-menu-template.php index f412c8db..4b9293b1 100644 --- a/wp-includes/nav-menu-template.php +++ b/wp-includes/nav-menu-template.php @@ -37,7 +37,7 @@ class Walker_Nav_Menu extends Walker { * @param string $output Passed by reference. Used to append additional content. * @param int $depth Depth of page. Used for padding. */ - function start_lvl(&$output, $depth) { + function start_lvl( &$output, $depth = 0, $args = array() ) { $indent = str_repeat("\t", $depth); $output .= "\n$indent
            \n"; } @@ -49,7 +49,7 @@ class Walker_Nav_Menu extends Walker { * @param string $output Passed by reference. Used to append additional content. * @param int $depth Depth of page. Used for padding. */ - function end_lvl(&$output, $depth) { + function end_lvl( &$output, $depth = 0, $args = array() ) { $indent = str_repeat("\t", $depth); $output .= "$indent
          \n"; } @@ -64,7 +64,7 @@ class Walker_Nav_Menu extends Walker { * @param int $current_page Menu item ID. * @param object $args */ - function start_el(&$output, $item, $depth, $args) { + function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { global $wp_query; $indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; @@ -74,10 +74,10 @@ class Walker_Nav_Menu extends Walker { $classes[] = 'menu-item-' . $item->ID; $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item, $args ) ); - $class_names = ' class="' . esc_attr( $class_names ) . '"'; + $class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : ''; $id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item->ID, $item, $args ); - $id = strlen( $id ) ? ' id="' . esc_attr( $id ) . '"' : ''; + $id = $id ? ' id="' . esc_attr( $id ) . '"' : ''; $output .= $indent . ''; @@ -103,7 +103,7 @@ class Walker_Nav_Menu extends Walker { * @param object $item Page data object. Not used. * @param int $depth Depth of page. Not Used. */ - function end_el(&$output, $item, $depth) { + function end_el( &$output, $item, $depth = 0, $args = array() ) { $output .= "\n"; } } @@ -113,7 +113,7 @@ class Walker_Nav_Menu extends Walker { * * Optional $args contents: * - * menu - The menu that is desired. Accepts (matching in order) id, slug, name. Defaults to blank. + * menu - The menu that is desired. Accepts (matching in order) id, slug, name. Defaults to blank. * menu_class - CSS class to use for the ul element which forms the menu. Defaults to 'menu'. * menu_id - The ID that is applied to the ul element which forms the menu. Defaults to the menu slug, incremented. * container - Whether to wrap the ul, and what to wrap it with. Defaults to 'div'. @@ -125,9 +125,9 @@ class Walker_Nav_Menu extends Walker { * link_before - Text before the link. * link_after - Text after the link. * echo - Whether to echo the menu or return it. Defaults to echo. - * depth - how many levels of the hierarchy are to be included. 0 means all. Defaults to 0. + * depth - how many levels of the hierarchy are to be included. 0 means all. Defaults to 0. * walker - allows a custom walker to be specified. - * theme_location - the location in the theme to be used. Must be registered with register_nav_menu() in order to be selectable by the user. + * theme_location - the location in the theme to be used. Must be registered with register_nav_menu() in order to be selectable by the user. * items_wrap - How the list items should be wrapped. Defaults to a ul with an id and class. Uses printf() format with numbered placeholders. * * @since 3.0.0 diff --git a/wp-includes/nav-menu.php b/wp-includes/nav-menu.php index 6a622b27..361a8de6 100644 --- a/wp-includes/nav-menu.php +++ b/wp-includes/nav-menu.php @@ -554,7 +554,7 @@ function wp_get_nav_menu_items( $menu, $args = array() ) { * - object: The type of object originally represented, such as "category," "post", or "attachment." * - type_label: The singular label used to describe this type of menu item. * - post_parent: The DB ID of the original object's parent object, if any (0 otherwise). - * - menu_item_parent: The DB ID of the nav_menu_item that is this item's menu parent, if any. 0 otherwise. + * - menu_item_parent: The DB ID of the nav_menu_item that is this item's menu parent, if any. 0 otherwise. * - url: The URL to which this menu item points. * - title: The title of this menu item. * - target: The target attribute of the link element for this menu item. @@ -782,5 +782,3 @@ function _wp_auto_add_pages_to_menu( $new_status, $old_status, $post ) { wp_update_nav_menu_item( $menu_id, 0, $args ); } } - -?> diff --git a/wp-includes/option.php b/wp-includes/option.php new file mode 100644 index 00000000..33897b60 --- /dev/null +++ b/wp-includes/option.php @@ -0,0 +1,1046 @@ +get_row( $wpdb->prepare( "SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1", $option ) ); + + // Has to be get_row instead of get_var because of funkiness with 0, false, null values + if ( is_object( $row ) ) { + $value = $row->option_value; + wp_cache_add( $option, $value, 'options' ); + } else { // option does not exist, so we must cache its non-existence + $notoptions[$option] = true; + wp_cache_set( 'notoptions', $notoptions, 'options' ); + return apply_filters( 'default_option_' . $option, $default ); + } + } + } + } else { + $suppress = $wpdb->suppress_errors(); + $row = $wpdb->get_row( $wpdb->prepare( "SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1", $option ) ); + $wpdb->suppress_errors( $suppress ); + if ( is_object( $row ) ) + $value = $row->option_value; + else + return apply_filters( 'default_option_' . $option, $default ); + } + + // If home is not set use siteurl. + if ( 'home' == $option && '' == $value ) + return get_option( 'siteurl' ); + + if ( in_array( $option, array('siteurl', 'home', 'category_base', 'tag_base') ) ) + $value = untrailingslashit( $value ); + + return apply_filters( 'option_' . $option, maybe_unserialize( $value ) ); +} + +/** + * Protect WordPress special option from being modified. + * + * Will die if $option is in protected list. Protected options are 'alloptions' + * and 'notoptions' options. + * + * @since 2.2.0 + * @package WordPress + * @subpackage Option + * + * @param string $option Option name. + */ +function wp_protect_special_option( $option ) { + $protected = array( 'alloptions', 'notoptions' ); + if ( in_array( $option, $protected ) ) + wp_die( sprintf( __( '%s is a protected WP option and may not be modified' ), esc_html( $option ) ) ); +} + +/** + * Print option value after sanitizing for forms. + * + * @uses attr Sanitizes value. + * @since 1.5.0 + * @package WordPress + * @subpackage Option + * + * @param string $option Option name. + */ +function form_option( $option ) { + echo esc_attr( get_option( $option ) ); +} + +/** + * Loads and caches all autoloaded options, if available or all options. + * + * @since 2.2.0 + * @package WordPress + * @subpackage Option + * + * @return array List of all options. + */ +function wp_load_alloptions() { + global $wpdb; + + if ( !defined( 'WP_INSTALLING' ) || !is_multisite() ) + $alloptions = wp_cache_get( 'alloptions', 'options' ); + else + $alloptions = false; + + if ( !$alloptions ) { + $suppress = $wpdb->suppress_errors(); + if ( !$alloptions_db = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options WHERE autoload = 'yes'" ) ) + $alloptions_db = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options" ); + $wpdb->suppress_errors($suppress); + $alloptions = array(); + foreach ( (array) $alloptions_db as $o ) { + $alloptions[$o->option_name] = $o->option_value; + } + if ( !defined( 'WP_INSTALLING' ) || !is_multisite() ) + wp_cache_add( 'alloptions', $alloptions, 'options' ); + } + + return $alloptions; +} + +/** + * Loads and caches certain often requested site options if is_multisite() and a persistent cache is not being used. + * + * @since 3.0.0 + * @package WordPress + * @subpackage Option + * + * @param int $site_id Optional site ID for which to query the options. Defaults to the current site. + */ +function wp_load_core_site_options( $site_id = null ) { + global $wpdb, $_wp_using_ext_object_cache; + + if ( !is_multisite() || $_wp_using_ext_object_cache || defined( 'WP_INSTALLING' ) ) + return; + + if ( empty($site_id) ) + $site_id = $wpdb->siteid; + + $core_options = array('site_name', 'siteurl', 'active_sitewide_plugins', '_site_transient_timeout_theme_roots', '_site_transient_theme_roots', 'site_admins', 'can_compress_scripts', 'global_terms_enabled' ); + + $core_options_in = "'" . implode("', '", $core_options) . "'"; + $options = $wpdb->get_results( $wpdb->prepare("SELECT meta_key, meta_value FROM $wpdb->sitemeta WHERE meta_key IN ($core_options_in) AND site_id = %d", $site_id) ); + + foreach ( $options as $option ) { + $key = $option->meta_key; + $cache_key = "{$site_id}:$key"; + $option->meta_value = maybe_unserialize( $option->meta_value ); + + wp_cache_set( $cache_key, $option->meta_value, 'site-options' ); + } +} + +/** + * Update the value of an option that was already added. + * + * You do not need to serialize values. If the value needs to be serialized, then + * it will be serialized before it is inserted into the database. Remember, + * resources can not be serialized or added as an option. + * + * If the option does not exist, then the option will be added with the option + * value, but you will not be able to set whether it is autoloaded. If you want + * to set whether an option is autoloaded, then you need to use the add_option(). + * + * @since 1.0.0 + * @package WordPress + * @subpackage Option + * + * @uses apply_filters() Calls 'pre_update_option_$option' hook to allow overwriting the + * option value to be stored. + * @uses do_action() Calls 'update_option' hook before updating the option. + * @uses do_action() Calls 'update_option_$option' and 'updated_option' hooks on success. + * + * @param string $option Option name. Expected to not be SQL-escaped. + * @param mixed $newvalue Option value. Expected to not be SQL-escaped. + * @return bool False if value was not updated and true if value was updated. + */ +function update_option( $option, $newvalue ) { + global $wpdb; + + $option = trim($option); + if ( empty($option) ) + return false; + + wp_protect_special_option( $option ); + + if ( is_object($newvalue) ) + $newvalue = clone $newvalue; + + $newvalue = sanitize_option( $option, $newvalue ); + $oldvalue = get_option( $option ); + $newvalue = apply_filters( 'pre_update_option_' . $option, $newvalue, $oldvalue ); + + // If the new and old values are the same, no need to update. + if ( $newvalue === $oldvalue ) + return false; + + if ( false === $oldvalue ) + return add_option( $option, $newvalue ); + + $notoptions = wp_cache_get( 'notoptions', 'options' ); + if ( is_array( $notoptions ) && isset( $notoptions[$option] ) ) { + unset( $notoptions[$option] ); + wp_cache_set( 'notoptions', $notoptions, 'options' ); + } + + $_newvalue = $newvalue; + $newvalue = maybe_serialize( $newvalue ); + + do_action( 'update_option', $option, $oldvalue, $_newvalue ); + if ( ! defined( 'WP_INSTALLING' ) ) { + $alloptions = wp_load_alloptions(); + if ( isset( $alloptions[$option] ) ) { + $alloptions[$option] = $_newvalue; + wp_cache_set( 'alloptions', $alloptions, 'options' ); + } else { + wp_cache_set( $option, $_newvalue, 'options' ); + } + } + + $result = $wpdb->update( $wpdb->options, array( 'option_value' => $newvalue ), array( 'option_name' => $option ) ); + + if ( $result ) { + do_action( "update_option_{$option}", $oldvalue, $_newvalue ); + do_action( 'updated_option', $option, $oldvalue, $_newvalue ); + return true; + } + return false; +} + +/** + * Add a new option. + * + * You do not need to serialize values. If the value needs to be serialized, then + * it will be serialized before it is inserted into the database. Remember, + * resources can not be serialized or added as an option. + * + * You can create options without values and then update the values later. + * Existing options will not be updated and checks are performed to ensure that you + * aren't adding a protected WordPress option. Care should be taken to not name + * options the same as the ones which are protected. + * + * @package WordPress + * @subpackage Option + * @since 1.0.0 + * + * @uses do_action() Calls 'add_option' hook before adding the option. + * @uses do_action() Calls 'add_option_$option' and 'added_option' hooks on success. + * + * @param string $option Name of option to add. Expected to not be SQL-escaped. + * @param mixed $value Optional. Option value, can be anything. Expected to not be SQL-escaped. + * @param mixed $deprecated Optional. Description. Not used anymore. + * @param bool $autoload Optional. Default is enabled. Whether to load the option when WordPress starts up. + * @return bool False if option was not added and true if option was added. + */ +function add_option( $option, $value = '', $deprecated = '', $autoload = 'yes' ) { + global $wpdb; + + if ( !empty( $deprecated ) ) + _deprecated_argument( __FUNCTION__, '2.3' ); + + $option = trim($option); + if ( empty($option) ) + return false; + + wp_protect_special_option( $option ); + + if ( is_object($value) ) + $value = clone $value; + + $value = sanitize_option( $option, $value ); + + // Make sure the option doesn't already exist. We can check the 'notoptions' cache before we ask for a db query + $notoptions = wp_cache_get( 'notoptions', 'options' ); + if ( !is_array( $notoptions ) || !isset( $notoptions[$option] ) ) + if ( false !== get_option( $option ) ) + return false; + + $_value = $value; + $value = maybe_serialize( $value ); + $autoload = ( 'no' === $autoload ) ? 'no' : 'yes'; + do_action( 'add_option', $option, $_value ); + if ( ! defined( 'WP_INSTALLING' ) ) { + if ( 'yes' == $autoload ) { + $alloptions = wp_load_alloptions(); + $alloptions[$option] = $value; + wp_cache_set( 'alloptions', $alloptions, 'options' ); + } else { + wp_cache_set( $option, $value, 'options' ); + } + } + + // This option exists now + $notoptions = wp_cache_get( 'notoptions', 'options' ); // yes, again... we need it to be fresh + if ( is_array( $notoptions ) && isset( $notoptions[$option] ) ) { + unset( $notoptions[$option] ); + wp_cache_set( 'notoptions', $notoptions, 'options' ); + } + + $result = $wpdb->query( $wpdb->prepare( "INSERT INTO `$wpdb->options` (`option_name`, `option_value`, `autoload`) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`)", $option, $value, $autoload ) ); + + if ( $result ) { + do_action( "add_option_{$option}", $option, $_value ); + do_action( 'added_option', $option, $_value ); + return true; + } + return false; +} + +/** + * Removes option by name. Prevents removal of protected WordPress options. + * + * @package WordPress + * @subpackage Option + * @since 1.2.0 + * + * @uses do_action() Calls 'delete_option' hook before option is deleted. + * @uses do_action() Calls 'deleted_option' and 'delete_option_$option' hooks on success. + * + * @param string $option Name of option to remove. Expected to not be SQL-escaped. + * @return bool True, if option is successfully deleted. False on failure. + */ +function delete_option( $option ) { + global $wpdb; + + wp_protect_special_option( $option ); + + // Get the ID, if no ID then return + $row = $wpdb->get_row( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $option ) ); + if ( is_null( $row ) ) + return false; + do_action( 'delete_option', $option ); + $result = $wpdb->delete( $wpdb->options, array( 'option_name' => $option ) ); + if ( ! defined( 'WP_INSTALLING' ) ) { + if ( 'yes' == $row->autoload ) { + $alloptions = wp_load_alloptions(); + if ( is_array( $alloptions ) && isset( $alloptions[$option] ) ) { + unset( $alloptions[$option] ); + wp_cache_set( 'alloptions', $alloptions, 'options' ); + } + } else { + wp_cache_delete( $option, 'options' ); + } + } + if ( $result ) { + do_action( "delete_option_$option", $option ); + do_action( 'deleted_option', $option ); + return true; + } + return false; +} + +/** + * Delete a transient. + * + * @since 2.8.0 + * @package WordPress + * @subpackage Transient + * + * @uses do_action() Calls 'delete_transient_$transient' hook before transient is deleted. + * @uses do_action() Calls 'deleted_transient' hook on success. + * + * @param string $transient Transient name. Expected to not be SQL-escaped. + * @return bool true if successful, false otherwise + */ +function delete_transient( $transient ) { + global $_wp_using_ext_object_cache; + + do_action( 'delete_transient_' . $transient, $transient ); + + if ( $_wp_using_ext_object_cache ) { + $result = wp_cache_delete( $transient, 'transient' ); + } else { + $option_timeout = '_transient_timeout_' . $transient; + $option = '_transient_' . $transient; + $result = delete_option( $option ); + if ( $result ) + delete_option( $option_timeout ); + } + + if ( $result ) + do_action( 'deleted_transient', $transient ); + return $result; +} + +/** + * Get the value of a transient. + * + * If the transient does not exist or does not have a value, then the return value + * will be false. + * + * @uses apply_filters() Calls 'pre_transient_$transient' hook before checking the transient. + * Any value other than false will "short-circuit" the retrieval of the transient + * and return the returned value. + * @uses apply_filters() Calls 'transient_$option' hook, after checking the transient, with + * the transient value. + * + * @since 2.8.0 + * @package WordPress + * @subpackage Transient + * + * @param string $transient Transient name. Expected to not be SQL-escaped + * @return mixed Value of transient + */ +function get_transient( $transient ) { + global $_wp_using_ext_object_cache; + + $pre = apply_filters( 'pre_transient_' . $transient, false ); + if ( false !== $pre ) + return $pre; + + if ( $_wp_using_ext_object_cache ) { + $value = wp_cache_get( $transient, 'transient' ); + } else { + $transient_option = '_transient_' . $transient; + if ( ! defined( 'WP_INSTALLING' ) ) { + // If option is not in alloptions, it is not autoloaded and thus has a timeout + $alloptions = wp_load_alloptions(); + if ( !isset( $alloptions[$transient_option] ) ) { + $transient_timeout = '_transient_timeout_' . $transient; + if ( get_option( $transient_timeout ) < time() ) { + delete_option( $transient_option ); + delete_option( $transient_timeout ); + return false; + } + } + } + + $value = get_option( $transient_option ); + } + + return apply_filters( 'transient_' . $transient, $value ); +} + +/** + * Set/update the value of a transient. + * + * You do not need to serialize values. If the value needs to be serialized, then + * it will be serialized before it is set. + * + * @since 2.8.0 + * @package WordPress + * @subpackage Transient + * + * @uses apply_filters() Calls 'pre_set_transient_$transient' hook to allow overwriting the + * transient value to be stored. + * @uses do_action() Calls 'set_transient_$transient' and 'setted_transient' hooks on success. + * + * @param string $transient Transient name. Expected to not be SQL-escaped. + * @param mixed $value Transient value. Expected to not be SQL-escaped. + * @param int $expiration Time until expiration in seconds, default 0 + * @return bool False if value was not set and true if value was set. + */ +function set_transient( $transient, $value, $expiration = 0 ) { + global $_wp_using_ext_object_cache; + + $value = apply_filters( 'pre_set_transient_' . $transient, $value ); + + if ( $_wp_using_ext_object_cache ) { + $result = wp_cache_set( $transient, $value, 'transient', $expiration ); + } else { + $transient_timeout = '_transient_timeout_' . $transient; + $transient = '_transient_' . $transient; + if ( false === get_option( $transient ) ) { + $autoload = 'yes'; + if ( $expiration ) { + $autoload = 'no'; + add_option( $transient_timeout, time() + $expiration, '', 'no' ); + } + $result = add_option( $transient, $value, '', $autoload ); + } else { + if ( $expiration ) + update_option( $transient_timeout, time() + $expiration ); + $result = update_option( $transient, $value ); + } + } + if ( $result ) { + do_action( 'set_transient_' . $transient ); + do_action( 'setted_transient', $transient ); + } + return $result; +} + +/** + * Saves and restores user interface settings stored in a cookie. + * + * Checks if the current user-settings cookie is updated and stores it. When no + * cookie exists (different browser used), adds the last saved cookie restoring + * the settings. + * + * @package WordPress + * @subpackage Option + * @since 2.7.0 + */ +function wp_user_settings() { + + if ( ! is_admin() ) + return; + + if ( defined('DOING_AJAX') ) + return; + + if ( ! $user = wp_get_current_user() ) + return; + + $settings = get_user_option( 'user-settings', $user->ID ); + + if ( isset( $_COOKIE['wp-settings-' . $user->ID] ) ) { + $cookie = preg_replace( '/[^A-Za-z0-9=&_]/', '', $_COOKIE['wp-settings-' . $user->ID] ); + + if ( ! empty( $cookie ) && strpos( $cookie, '=' ) ) { + if ( $cookie == $settings ) + return; + + $last_time = (int) get_user_option( 'user-settings-time', $user->ID ); + $saved = isset( $_COOKIE['wp-settings-time-' . $user->ID]) ? preg_replace( '/[^0-9]/', '', $_COOKIE['wp-settings-time-' . $user->ID] ) : 0; + + if ( $saved > $last_time ) { + update_user_option( $user->ID, 'user-settings', $cookie, false ); + update_user_option( $user->ID, 'user-settings-time', time() - 5, false ); + return; + } + } + } + + setcookie( 'wp-settings-' . $user->ID, $settings, time() + 31536000, SITECOOKIEPATH ); + setcookie( 'wp-settings-time-' . $user->ID, time(), time() + 31536000, SITECOOKIEPATH ); + $_COOKIE['wp-settings-' . $user->ID] = $settings; +} + +/** + * Retrieve user interface setting value based on setting name. + * + * @package WordPress + * @subpackage Option + * @since 2.7.0 + * + * @param string $name The name of the setting. + * @param string $default Optional default value to return when $name is not set. + * @return mixed the last saved user setting or the default value/false if it doesn't exist. + */ +function get_user_setting( $name, $default = false ) { + + $all = get_all_user_settings(); + + return isset($all[$name]) ? $all[$name] : $default; +} + +/** + * Add or update user interface setting. + * + * Both $name and $value can contain only ASCII letters, numbers and underscores. + * This function has to be used before any output has started as it calls setcookie(). + * + * @package WordPress + * @subpackage Option + * @since 2.8.0 + * + * @param string $name The name of the setting. + * @param string $value The value for the setting. + * @return bool true if set successfully/false if not. + */ +function set_user_setting( $name, $value ) { + + if ( headers_sent() ) + return false; + + $all = get_all_user_settings(); + $name = preg_replace( '/[^A-Za-z0-9_]+/', '', $name ); + + if ( empty($name) ) + return false; + + $all[$name] = $value; + + return wp_set_all_user_settings($all); +} + +/** + * Delete user interface settings. + * + * Deleting settings would reset them to the defaults. + * This function has to be used before any output has started as it calls setcookie(). + * + * @package WordPress + * @subpackage Option + * @since 2.7.0 + * + * @param mixed $names The name or array of names of the setting to be deleted. + * @return bool true if deleted successfully/false if not. + */ +function delete_user_setting( $names ) { + + if ( headers_sent() ) + return false; + + $all = get_all_user_settings(); + $names = (array) $names; + + foreach ( $names as $name ) { + if ( isset($all[$name]) ) { + unset($all[$name]); + $deleted = true; + } + } + + if ( isset($deleted) ) + return wp_set_all_user_settings($all); + + return false; +} + +/** + * Retrieve all user interface settings. + * + * @package WordPress + * @subpackage Option + * @since 2.7.0 + * + * @return array the last saved user settings or empty array. + */ +function get_all_user_settings() { + global $_updated_user_settings; + + if ( ! $user = wp_get_current_user() ) + return array(); + + if ( isset($_updated_user_settings) && is_array($_updated_user_settings) ) + return $_updated_user_settings; + + $all = array(); + if ( isset($_COOKIE['wp-settings-' . $user->ID]) ) { + $cookie = preg_replace( '/[^A-Za-z0-9=&_]/', '', $_COOKIE['wp-settings-' . $user->ID] ); + + if ( $cookie && strpos($cookie, '=') ) // the '=' cannot be 1st char + parse_str($cookie, $all); + + } else { + $option = get_user_option('user-settings', $user->ID); + if ( $option && is_string($option) ) + parse_str( $option, $all ); + } + + return $all; +} + +/** + * Private. Set all user interface settings. + * + * @package WordPress + * @subpackage Option + * @since 2.8.0 + * + * @param unknown $all + * @return bool + */ +function wp_set_all_user_settings($all) { + global $_updated_user_settings; + + if ( ! $user = wp_get_current_user() ) + return false; + + $_updated_user_settings = $all; + $settings = ''; + foreach ( $all as $k => $v ) { + $v = preg_replace( '/[^A-Za-z0-9_]+/', '', $v ); + $settings .= $k . '=' . $v . '&'; + } + + $settings = rtrim($settings, '&'); + + update_user_option( $user->ID, 'user-settings', $settings, false ); + update_user_option( $user->ID, 'user-settings-time', time(), false ); + + return true; +} + +/** + * Delete the user settings of the current user. + * + * @package WordPress + * @subpackage Option + * @since 2.7.0 + */ +function delete_all_user_settings() { + if ( ! $user = wp_get_current_user() ) + return; + + update_user_option( $user->ID, 'user-settings', '', false ); + setcookie('wp-settings-' . $user->ID, ' ', time() - 31536000, SITECOOKIEPATH); +} + +/** + * Retrieve site option value based on name of option. + * + * @see get_option() + * @package WordPress + * @subpackage Option + * @since 2.8.0 + * + * @uses apply_filters() Calls 'pre_site_option_$option' before checking the option. + * Any value other than false will "short-circuit" the retrieval of the option + * and return the returned value. + * @uses apply_filters() Calls 'site_option_$option', after checking the option, with + * the option value. + * + * @param string $option Name of option to retrieve. Expected to not be SQL-escaped. + * @param mixed $default Optional value to return if option doesn't exist. Default false. + * @param bool $use_cache Whether to use cache. Multisite only. Default true. + * @return mixed Value set for the option. + */ +function get_site_option( $option, $default = false, $use_cache = true ) { + global $wpdb; + + // Allow plugins to short-circuit site options. + $pre = apply_filters( 'pre_site_option_' . $option, false ); + if ( false !== $pre ) + return $pre; + + if ( ! is_multisite() ) { + $default = apply_filters( 'default_site_option_' . $option, $default ); + $value = get_option($option, $default); + } else { + $cache_key = "{$wpdb->siteid}:$option"; + if ( $use_cache ) + $value = wp_cache_get($cache_key, 'site-options'); + + if ( !isset($value) || (false === $value) ) { + $row = $wpdb->get_row( $wpdb->prepare("SELECT meta_value FROM $wpdb->sitemeta WHERE meta_key = %s AND site_id = %d", $option, $wpdb->siteid ) ); + + // Has to be get_row instead of get_var because of funkiness with 0, false, null values + if ( is_object( $row ) ) { + $value = $row->meta_value; + $value = maybe_unserialize( $value ); + wp_cache_set( $cache_key, $value, 'site-options' ); + } else { + $value = apply_filters( 'default_site_option_' . $option, $default ); + } + } + } + + return apply_filters( 'site_option_' . $option, $value ); +} + +/** + * Add a new site option. + * + * Existing options will not be updated. Note that prior to 3.3 this wasn't the case. + * + * @see add_option() + * @package WordPress + * @subpackage Option + * @since 2.8.0 + * + * @uses apply_filters() Calls 'pre_add_site_option_$option' hook to allow overwriting the + * option value to be stored. + * @uses do_action() Calls 'add_site_option_$option' and 'add_site_option' hooks on success. + * + * @param string $option Name of option to add. Expected to not be SQL-escaped. + * @param mixed $value Optional. Option value, can be anything. Expected to not be SQL-escaped. + * @return bool False if option was not added and true if option was added. + */ +function add_site_option( $option, $value ) { + global $wpdb; + + $value = apply_filters( 'pre_add_site_option_' . $option, $value ); + + if ( !is_multisite() ) { + $result = add_option( $option, $value ); + } else { + $cache_key = "{$wpdb->siteid}:$option"; + + if ( false !== get_site_option( $option ) ) + return false; + + $value = sanitize_option( $option, $value ); + wp_cache_set( $cache_key, $value, 'site-options' ); + + $_value = $value; + $value = maybe_serialize( $value ); + $result = $wpdb->insert( $wpdb->sitemeta, array('site_id' => $wpdb->siteid, 'meta_key' => $option, 'meta_value' => $value ) ); + $value = $_value; + } + + if ( $result ) { + do_action( "add_site_option_{$option}", $option, $value ); + do_action( "add_site_option", $option, $value ); + return true; + } + return false; +} + +/** + * Removes site option by name. + * + * @see delete_option() + * @package WordPress + * @subpackage Option + * @since 2.8.0 + * + * @uses do_action() Calls 'pre_delete_site_option_$option' hook before option is deleted. + * @uses do_action() Calls 'delete_site_option' and 'delete_site_option_$option' + * hooks on success. + * + * @param string $option Name of option to remove. Expected to not be SQL-escaped. + * @return bool True, if succeed. False, if failure. + */ +function delete_site_option( $option ) { + global $wpdb; + + // ms_protect_special_option( $option ); @todo + + do_action( 'pre_delete_site_option_' . $option ); + + if ( !is_multisite() ) { + $result = delete_option( $option ); + } else { + $row = $wpdb->get_row( $wpdb->prepare( "SELECT meta_id FROM {$wpdb->sitemeta} WHERE meta_key = %s AND site_id = %d", $option, $wpdb->siteid ) ); + if ( is_null( $row ) || !$row->meta_id ) + return false; + $cache_key = "{$wpdb->siteid}:$option"; + wp_cache_delete( $cache_key, 'site-options' ); + + $result = $wpdb->delete( $wpdb->sitemeta, array( 'meta_key' => $option, 'site_id' => $wpdb->siteid ) ); + } + + if ( $result ) { + do_action( "delete_site_option_{$option}", $option ); + do_action( "delete_site_option", $option ); + return true; + } + return false; +} + +/** + * Update the value of a site option that was already added. + * + * @see update_option() + * @since 2.8.0 + * @package WordPress + * @subpackage Option + * + * @uses apply_filters() Calls 'pre_update_site_option_$option' hook to allow overwriting the + * option value to be stored. + * @uses do_action() Calls 'update_site_option_$option' and 'update_site_option' hooks on success. + * + * @param string $option Name of option. Expected to not be SQL-escaped. + * @param mixed $value Option value. Expected to not be SQL-escaped. + * @return bool False if value was not updated and true if value was updated. + */ +function update_site_option( $option, $value ) { + global $wpdb; + + $oldvalue = get_site_option( $option ); + $value = apply_filters( 'pre_update_site_option_' . $option, $value, $oldvalue ); + + if ( $value === $oldvalue ) + return false; + + if ( false === $oldvalue ) + return add_site_option( $option, $value ); + + if ( !is_multisite() ) { + $result = update_option( $option, $value ); + } else { + $value = sanitize_option( $option, $value ); + $cache_key = "{$wpdb->siteid}:$option"; + wp_cache_set( $cache_key, $value, 'site-options' ); + + $_value = $value; + $value = maybe_serialize( $value ); + $result = $wpdb->update( $wpdb->sitemeta, array( 'meta_value' => $value ), array( 'site_id' => $wpdb->siteid, 'meta_key' => $option ) ); + $value = $_value; + } + + if ( $result ) { + do_action( "update_site_option_{$option}", $option, $value, $oldvalue ); + do_action( "update_site_option", $option, $value, $oldvalue ); + return true; + } + return false; +} + +/** + * Delete a site transient. + * + * @since 2.9.0 + * @package WordPress + * @subpackage Transient + * + * @uses do_action() Calls 'delete_site_transient_$transient' hook before transient is deleted. + * @uses do_action() Calls 'deleted_site_transient' hook on success. + * + * @param string $transient Transient name. Expected to not be SQL-escaped. + * @return bool True if successful, false otherwise + */ +function delete_site_transient( $transient ) { + global $_wp_using_ext_object_cache; + + do_action( 'delete_site_transient_' . $transient, $transient ); + if ( $_wp_using_ext_object_cache ) { + $result = wp_cache_delete( $transient, 'site-transient' ); + } else { + $option_timeout = '_site_transient_timeout_' . $transient; + $option = '_site_transient_' . $transient; + $result = delete_site_option( $option ); + if ( $result ) + delete_site_option( $option_timeout ); + } + if ( $result ) + do_action( 'deleted_site_transient', $transient ); + return $result; +} + +/** + * Get the value of a site transient. + * + * If the transient does not exist or does not have a value, then the return value + * will be false. + * + * @see get_transient() + * @since 2.9.0 + * @package WordPress + * @subpackage Transient + * + * @uses apply_filters() Calls 'pre_site_transient_$transient' hook before checking the transient. + * Any value other than false will "short-circuit" the retrieval of the transient + * and return the returned value. + * @uses apply_filters() Calls 'site_transient_$option' hook, after checking the transient, with + * the transient value. + * + * @param string $transient Transient name. Expected to not be SQL-escaped. + * @return mixed Value of transient + */ +function get_site_transient( $transient ) { + global $_wp_using_ext_object_cache; + + $pre = apply_filters( 'pre_site_transient_' . $transient, false ); + if ( false !== $pre ) + return $pre; + + if ( $_wp_using_ext_object_cache ) { + $value = wp_cache_get( $transient, 'site-transient' ); + } else { + // Core transients that do not have a timeout. Listed here so querying timeouts can be avoided. + $no_timeout = array('update_core', 'update_plugins', 'update_themes'); + $transient_option = '_site_transient_' . $transient; + if ( ! in_array( $transient, $no_timeout ) ) { + $transient_timeout = '_site_transient_timeout_' . $transient; + $timeout = get_site_option( $transient_timeout ); + if ( false !== $timeout && $timeout < time() ) { + delete_site_option( $transient_option ); + delete_site_option( $transient_timeout ); + return false; + } + } + + $value = get_site_option( $transient_option ); + } + + return apply_filters( 'site_transient_' . $transient, $value ); +} + +/** + * Set/update the value of a site transient. + * + * You do not need to serialize values, if the value needs to be serialize, then + * it will be serialized before it is set. + * + * @see set_transient() + * @since 2.9.0 + * @package WordPress + * @subpackage Transient + * + * @uses apply_filters() Calls 'pre_set_site_transient_$transient' hook to allow overwriting the + * transient value to be stored. + * @uses do_action() Calls 'set_site_transient_$transient' and 'setted_site_transient' hooks on success. + * + * @param string $transient Transient name. Expected to not be SQL-escaped. + * @param mixed $value Transient value. Expected to not be SQL-escaped. + * @param int $expiration Time until expiration in seconds, default 0 + * @return bool False if value was not set and true if value was set. + */ +function set_site_transient( $transient, $value, $expiration = 0 ) { + global $_wp_using_ext_object_cache; + + $value = apply_filters( 'pre_set_site_transient_' . $transient, $value ); + + if ( $_wp_using_ext_object_cache ) { + $result = wp_cache_set( $transient, $value, 'site-transient', $expiration ); + } else { + $transient_timeout = '_site_transient_timeout_' . $transient; + $transient = '_site_transient_' . $transient; + if ( false === get_site_option( $transient ) ) { + if ( $expiration ) + add_site_option( $transient_timeout, time() + $expiration ); + $result = add_site_option( $transient, $value ); + } else { + if ( $expiration ) + update_site_option( $transient_timeout, time() + $expiration ); + $result = update_site_option( $transient, $value ); + } + } + if ( $result ) { + do_action( 'set_site_transient_' . $transient ); + do_action( 'setted_site_transient', $transient ); + } + return $result; +} diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index df20cf63..ac308a99 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -27,12 +27,12 @@ if ( !function_exists('wp_set_current_user') ) : function wp_set_current_user($id, $name = '') { global $current_user; - if ( isset($current_user) && ($id == $current_user->ID) ) + if ( isset( $current_user ) && ( $current_user instanceof WP_User ) && ( $id == $current_user->ID ) ) return $current_user; - $current_user = new WP_User($id, $name); + $current_user = new WP_User( $id, $name ); - setup_userdata($current_user->ID); + setup_userdata( $current_user->ID ); do_action('set_current_user'); @@ -74,20 +74,37 @@ if ( !function_exists('get_currentuserinfo') ) : function get_currentuserinfo() { global $current_user; - if ( defined('XMLRPC_REQUEST') && XMLRPC_REQUEST ) + if ( ! empty( $current_user ) ) { + if ( $current_user instanceof WP_User ) + return; + + // Upgrade stdClass to WP_User + if ( is_object( $current_user ) && isset( $current_user->ID ) ) { + $cur_id = $current_user->ID; + $current_user = null; + wp_set_current_user( $cur_id ); + return; + } + + // $current_user has a junk value. Force to WP_User with ID 0. + $current_user = null; + wp_set_current_user( 0 ); return false; + } - if ( ! empty($current_user) ) - return; + if ( defined('XMLRPC_REQUEST') && XMLRPC_REQUEST ) { + wp_set_current_user( 0 ); + return false; + } if ( ! $user = wp_validate_auth_cookie() ) { - if ( is_blog_admin() || is_network_admin() || empty($_COOKIE[LOGGED_IN_COOKIE]) || !$user = wp_validate_auth_cookie($_COOKIE[LOGGED_IN_COOKIE], 'logged_in') ) { - wp_set_current_user(0); + if ( is_blog_admin() || is_network_admin() || empty( $_COOKIE[LOGGED_IN_COOKIE] ) || !$user = wp_validate_auth_cookie( $_COOKIE[LOGGED_IN_COOKIE], 'logged_in' ) ) { + wp_set_current_user( 0 ); return false; } } - wp_set_current_user($user); + wp_set_current_user( $user ); } endif; @@ -111,8 +128,8 @@ if ( !function_exists('get_user_by') ) : * * @since 2.8.0 * - * @param string $field The field to retrieve the user with. id | slug | email | login - * @param int|string $value A value for $field. A user ID, slug, email address, or login name. + * @param string $field The field to retrieve the user with. id | slug | email | login + * @param int|string $value A value for $field. A user ID, slug, email address, or login name. * @return bool|object False on failure, WP_User object on success */ function get_user_by( $field, $value ) { @@ -139,13 +156,7 @@ if ( !function_exists('cache_users') ) : function cache_users( $user_ids ) { global $wpdb; - $clean = array(); - foreach ( $user_ids as $id ) { - $id = (int) $id; - if ( !wp_cache_get( $id, 'users' ) ) { - $clean[] = $id; - } - } + $clean = _get_non_cached_ids( $user_ids, 'users' ); if ( empty( $clean ) ) return; @@ -715,7 +726,7 @@ if ( !function_exists('is_user_logged_in') ) : function is_user_logged_in() { $user = wp_get_current_user(); - if ( empty( $user->ID ) ) + if ( ! $user->exists() ) return false; return true; @@ -829,8 +840,12 @@ function check_ajax_referer( $action = -1, $query_arg = false, $die = true ) { $result = wp_verify_nonce( $nonce, $action ); - if ( $die && false == $result ) - die('-1'); + if ( $die && false == $result ) { + if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) + wp_die( -1 ); + else + die( '-1' ); + } do_action('check_ajax_referer', $action, $result); @@ -929,7 +944,7 @@ if ( !function_exists('wp_validate_redirect') ) : * WordPress host string and $location host string. * * @param string $location The redirect to validate - * @param string $default The value to return is $location is not allowed + * @param string $default The value to return if $location is not allowed * @return string redirect-sanitized URL **/ function wp_validate_redirect($location, $default = '') { @@ -1276,108 +1291,89 @@ endif; if ( !function_exists('wp_salt') ) : /** - * Get salt to add to hashes to help prevent attacks. + * Get salt to add to hashes. * - * The secret key is located in two places: the database in case the secret key - * isn't defined in the second place, which is in the wp-config.php file. If you - * are going to set the secret key, then you must do so in the wp-config.php - * file. + * Salts are created using secret keys. Secret keys are located in two places: + * in the database and in the wp-config.php file. The secret key in the database + * is randomly generated and will be appended to the secret keys in wp-config.php. * - * The secret key in the database is randomly generated and will be appended to - * the secret key that is in wp-config.php file in some instances. It is - * important to have the secret key defined or changed in wp-config.php. - * - * If you have installed WordPress 2.5 or later, then you will have the - * SECRET_KEY defined in the wp-config.php already. You will want to change the - * value in it because hackers will know what it is. If you have upgraded to - * WordPress 2.5 or later version from a version before WordPress 2.5, then you - * should add the constant to your wp-config.php file. - * - * Below is an example of how the SECRET_KEY constant is defined with a value. - * You must not copy the below example and paste into your wp-config.php. If you - * need an example, then you can have a - * {@link https://api.wordpress.org/secret-key/1.1/ secret key created} for you. + * The secret keys in wp-config.php should be updated to strong, random keys to maximize + * security. Below is an example of how the secret key constants are defined. + * Do not paste this example directly into wp-config.php. Instead, have a + * {@link https://api.wordpress.org/secret-key/1.1/salt/ secret key created} just + * for you. * * - * define('SECRET_KEY', 'mAry1HadA15|\/|b17w55w1t3asSn09w'); + * define('AUTH_KEY', ' XakmM%G4Yt>f`z]MON'); + * define('SECURE_AUTH_KEY', 'LzJ}op]mr|6+![P}Ak:uNdJCJZd>(Hx.-Mh#Tz)pCIU#uGEnfFz|f ;;eU%/U^O~'); + * define('LOGGED_IN_KEY', '|i|Ux`9z7X>QYR0Z_XnZ@|'); + * define('AUTH_SALT', 'eZyT)-Naw]F8CwA*VaW#q*|.)g@o}||wf~@C-YSt}(dh_r6EbI#A,y|nU2{B#JBW'); + * define('SECURE_AUTH_SALT', '!=oLUTXh,QW=H `}`L|9/^4-3 STz},T(w}W*c(u`g~EJBf#8u#R{mUEZrozmm'); + * define('NONCE_SALT', 'h`GXHhD>SLWVfg1(1(N{;.V!MoE(SfbA_ksP@&`+AycHcAV$+?@3q+rxV{%^VyKT'); * * * Salting passwords helps against tools which has stored hashed values of - * common dictionary strings. The added values makes it harder to crack if given - * salt string is not weak. + * common dictionary strings. The added values makes it harder to crack. * * @since 2.5 - * @link https://api.wordpress.org/secret-key/1.1/ Create a Secret Key for wp-config.php * - * @param string $scheme Authentication scheme + * @link https://api.wordpress.org/secret-key/1.1/salt/ Create secrets for wp-config.php + * + * @param string $scheme Authentication scheme (auth, secure_auth, logged_in, nonce) * @return string Salt value */ -function wp_salt($scheme = 'auth') { - global $wp_default_secret_key; - $secret_key = ''; - if ( defined('SECRET_KEY') && ('' != SECRET_KEY) && ( $wp_default_secret_key != SECRET_KEY) ) - $secret_key = SECRET_KEY; - - if ( 'auth' == $scheme ) { - if ( defined('AUTH_KEY') && ('' != AUTH_KEY) && ( $wp_default_secret_key != AUTH_KEY) ) - $secret_key = AUTH_KEY; - - if ( defined('AUTH_SALT') && ('' != AUTH_SALT) && ( $wp_default_secret_key != AUTH_SALT) ) { - $salt = AUTH_SALT; - } elseif ( defined('SECRET_SALT') && ('' != SECRET_SALT) && ( $wp_default_secret_key != SECRET_SALT) ) { - $salt = SECRET_SALT; - } else { - $salt = get_site_option('auth_salt'); - if ( empty($salt) ) { - $salt = wp_generate_password( 64, true, true ); - update_site_option('auth_salt', $salt); - } - } - } elseif ( 'secure_auth' == $scheme ) { - if ( defined('SECURE_AUTH_KEY') && ('' != SECURE_AUTH_KEY) && ( $wp_default_secret_key != SECURE_AUTH_KEY) ) - $secret_key = SECURE_AUTH_KEY; - - if ( defined('SECURE_AUTH_SALT') && ('' != SECURE_AUTH_SALT) && ( $wp_default_secret_key != SECURE_AUTH_SALT) ) { - $salt = SECURE_AUTH_SALT; - } else { - $salt = get_site_option('secure_auth_salt'); - if ( empty($salt) ) { - $salt = wp_generate_password( 64, true, true ); - update_site_option('secure_auth_salt', $salt); +function wp_salt( $scheme = 'auth' ) { + static $cached_salts = array(); + if ( isset( $cached_salts[ $scheme ] ) ) + return apply_filters( 'salt', $cached_salts[ $scheme ], $scheme ); + + static $duplicated_keys; + if ( null === $duplicated_keys ) { + $duplicated_keys = array( 'put your unique phrase here' => true ); + foreach ( array( 'AUTH', 'SECURE_AUTH', 'LOGGED_IN', 'NONCE', 'SECRET' ) as $first ) { + foreach ( array( 'KEY', 'SALT' ) as $second ) { + if ( ! defined( "{$first}_{$second}" ) ) + continue; + $value = constant( "{$first}_{$second}" ); + $duplicated_keys[ $value ] = isset( $duplicated_keys[ $value ] ); } } - } elseif ( 'logged_in' == $scheme ) { - if ( defined('LOGGED_IN_KEY') && ('' != LOGGED_IN_KEY) && ( $wp_default_secret_key != LOGGED_IN_KEY) ) - $secret_key = LOGGED_IN_KEY; + } - if ( defined('LOGGED_IN_SALT') && ('' != LOGGED_IN_SALT) && ( $wp_default_secret_key != LOGGED_IN_SALT) ) { - $salt = LOGGED_IN_SALT; - } else { - $salt = get_site_option('logged_in_salt'); - if ( empty($salt) ) { - $salt = wp_generate_password( 64, true, true ); - update_site_option('logged_in_salt', $salt); + $key = $salt = ''; + if ( defined( 'SECRET_KEY' ) && SECRET_KEY && empty( $duplicated_keys[ SECRET_KEY ] ) ) + $key = SECRET_KEY; + if ( 'auth' == $scheme && defined( 'SECRET_SALT' ) && SECRET_SALT && empty( $duplicated_keys[ SECRET_SALT ] ) ) + $salt = SECRET_SALT; + + if ( in_array( $scheme, array( 'auth', 'secure_auth', 'logged_in', 'nonce' ) ) ) { + foreach ( array( 'key', 'salt' ) as $type ) { + $const = strtoupper( "{$scheme}_{$type}" ); + if ( defined( $const ) && constant( $const ) && empty( $duplicated_keys[ constant( $const ) ] ) ) { + $$type = constant( $const ); + } elseif ( ! $$type ) { + $$type = get_site_option( "{$scheme}_{$type}" ); + if ( ! $$type ) { + $$type = wp_generate_password( 64, true, true ); + update_site_option( "{$scheme}_{$type}", $$type ); + } } } - } elseif ( 'nonce' == $scheme ) { - if ( defined('NONCE_KEY') && ('' != NONCE_KEY) && ( $wp_default_secret_key != NONCE_KEY) ) - $secret_key = NONCE_KEY; - - if ( defined('NONCE_SALT') && ('' != NONCE_SALT) && ( $wp_default_secret_key != NONCE_SALT) ) { - $salt = NONCE_SALT; - } else { - $salt = get_site_option('nonce_salt'); - if ( empty($salt) ) { - $salt = wp_generate_password( 64, true, true ); - update_site_option('nonce_salt', $salt); + } else { + if ( ! $key ) { + $key = get_site_option( 'secret_key' ); + if ( ! $key ) { + $key = wp_generate_password( 64, true, true ); + update_site_option( 'secret_key', $key ); } } - } else { - // ensure each auth scheme has its own unique salt - $salt = hash_hmac('md5', $scheme, $secret_key); + $salt = hash_hmac( 'md5', $scheme, $key ); } - return apply_filters('salt', $secret_key . $salt, $scheme); + $cached_salts[ $scheme ] = $key . $salt; + return apply_filters( 'salt', $cached_salts[ $scheme ], $scheme ); } endif; @@ -1418,7 +1414,7 @@ function wp_hash_password($password) { if ( empty($wp_hasher) ) { require_once( ABSPATH . 'wp-includes/class-phpass.php'); // By default, use the portable hash from phpass - $wp_hasher = new PasswordHash(8, TRUE); + $wp_hasher = new PasswordHash(8, true); } return $wp_hasher->HashPassword($password); @@ -1466,7 +1462,7 @@ function wp_check_password($password, $hash, $user_id = '') { if ( empty($wp_hasher) ) { require_once( ABSPATH . 'wp-includes/class-phpass.php'); // By default, use the portable hash from phpass - $wp_hasher = new PasswordHash(8, TRUE); + $wp_hasher = new PasswordHash(8, true); } $check = $wp_hasher->CheckPassword($password, $hash); @@ -1629,7 +1625,7 @@ function get_avatar( $id_or_email, $size = '96', $default = '', $alt = false ) { } if ( !empty($email) ) - $email_hash = md5( strtolower( $email ) ); + $email_hash = md5( strtolower( trim( $email ) ) ); if ( is_ssl() ) { $host = 'https://secure.gravatar.com'; @@ -1647,7 +1643,7 @@ function get_avatar( $id_or_email, $size = '96', $default = '', $alt = false ) { elseif ( !empty($email) && 'gravatar_default' == $default ) $default = ''; elseif ( 'gravatar_default' == $default ) - $default = "$host/avatar/s={$size}"; + $default = "$host/avatar/?s={$size}"; elseif ( empty($email) ) $default = "$host/avatar/?d=$default&s={$size}"; elseif ( strpos($default, 'http://') === 0 ) @@ -1709,8 +1705,8 @@ function wp_text_diff( $left_string, $right_string, $args = null ) { $left_string = normalize_whitespace($left_string); $right_string = normalize_whitespace($right_string); - $left_lines = split("\n", $left_string); - $right_lines = split("\n", $right_string); + $left_lines = explode("\n", $left_string); + $right_lines = explode("\n", $right_string); $text_diff = new Text_Diff($left_lines, $right_lines); $renderer = new WP_Text_Diff_Renderer_Table(); diff --git a/wp-includes/plugin.php b/wp-includes/plugin.php index bb71d3d3..914d7065 100644 --- a/wp-includes/plugin.php +++ b/wp-includes/plugin.php @@ -80,7 +80,7 @@ function add_filter($tag, $function_to_add, $priority = 10, $accepted_args = 1) * @global array $wp_filter Stores all of the filters * * @param string $tag The name of the filter hook. - * @param callback $function_to_check optional. If specified, return the priority of that function on this hook or false if not attached. + * @param callback $function_to_check optional. If specified, return the priority of that function on this hook or false if not attached. * @return int|boolean Optionally returns the priority on that hook for the specified function. */ function has_filter($tag, $function_to_check = false) { @@ -308,7 +308,6 @@ function current_filter() { return end( $wp_current_filter ); } - /** * Hooks a function on to a specific action. * @@ -332,7 +331,6 @@ function add_action($tag, $function_to_add, $priority = 10, $accepted_args = 1) return add_filter($tag, $function_to_add, $priority, $accepted_args); } - /** * Execute functions hooked on a specific action hook. * @@ -499,7 +497,7 @@ function do_action_ref_array($tag, $args) { * @see has_filter() has_action() is an alias of has_filter(). * * @param string $tag The name of the action hook. - * @param callback $function_to_check optional. If specified, return the priority of that function on this hook or false if not attached. + * @param callback $function_to_check optional. If specified, return the priority of that function on this hook or false if not attached. * @return int|boolean Optionally returns the priority on that hook for the specified function. */ function has_action($tag, $function_to_check = false) { @@ -744,7 +742,7 @@ function _wp_call_all_hook($args) { * @global array $wp_filter Storage for all of the filters and actions * @param string $tag Used in counting how many hooks were applied * @param callback $function Used for creating unique id - * @param int|bool $priority Used in counting how many hooks were applied. If === false and $function is an object reference, we return the unique id only if it already has one, false otherwise. + * @param int|bool $priority Used in counting how many hooks were applied. If === false and $function is an object reference, we return the unique id only if it already has one, false otherwise. * @return string|bool Unique ID for usage as array key or false if $priority === false and $function is an object reference, and it does not already have a unique id. */ function _wp_filter_build_unique_id($tag, $function, $priority) { @@ -784,5 +782,3 @@ function _wp_filter_build_unique_id($tag, $function, $priority) { return $function[0].$function[1]; } } - -?> diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index eac548b0..5a414eaf 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -79,7 +79,6 @@ function the_title_attribute( $args = '' ) { $r = wp_parse_args($args, $defaults); extract( $r, EXTR_SKIP ); - $title = $before . $title . $after; $title = esc_attr(strip_tags($title)); @@ -188,10 +187,8 @@ function get_the_content($more_link_text = null, $stripteaser = false) { $hasTeaser = false; // If post password required and it doesn't match the cookie. - if ( post_password_required($post) ) { - $output = get_the_password_form(); - return $output; - } + if ( post_password_required($post) ) + return get_the_password_form(); if ( $page > count($pages) ) // if the requested page doesn't exist $page = count($pages); // give them the highest numbered page that DOES exist @@ -414,8 +411,10 @@ function get_body_class( $class = '' ) { $classes[] = 'archive'; if ( is_date() ) $classes[] = 'date'; - if ( is_search() ) + if ( is_search() ) { $classes[] = 'search'; + $classes[] = $wp_query->posts ? 'search-results' : 'search-no-results'; + } if ( is_paged() ) $classes[] = 'paged'; if ( is_attachment() ) @@ -490,15 +489,10 @@ function get_body_class( $class = '' ) { } if ( is_page_template() ) { $classes[] = 'page-template'; - $classes[] = 'page-template-' . sanitize_html_class( str_replace( '.', '-', get_post_meta( $page_id, '_wp_page_template', true ) ), '' ); + $classes[] = 'page-template-' . sanitize_html_class( str_replace( '.', '-', get_page_template_slug( $page_id ) ) ); } else { $classes[] = 'page-template-default'; } - } elseif ( is_search() ) { - if ( !empty( $wp_query->posts ) ) - $classes[] = 'search-results'; - else - $classes[] = 'search-no-results'; } if ( is_user_logged_in() ) @@ -507,7 +501,7 @@ function get_body_class( $class = '' ) { if ( is_admin_bar_showing() ) $classes[] = 'admin-bar'; - if ( get_background_image() || get_background_color() ) + if ( get_theme_mod( 'background_color' ) || get_background_image() ) $classes[] = 'custom-background'; $page = $wp_query->get( 'page' ); @@ -555,22 +549,29 @@ function get_body_class( $class = '' ) { * * @since 2.7.0 * - * @param int|object $post An optional post. Global $post used if not provided. + * @param int|object $post An optional post. Global $post used if not provided. * @return bool false if a password is not required or the correct password cookie is present, true otherwise. */ function post_password_required( $post = null ) { + global $wp_hasher; + $post = get_post($post); - if ( empty($post->post_password) ) + if ( empty( $post->post_password ) ) return false; - if ( !isset($_COOKIE['wp-postpass_' . COOKIEHASH]) ) + if ( ! isset( $_COOKIE['wp-postpass_' . COOKIEHASH] ) ) return true; - if ( stripslashes( $_COOKIE['wp-postpass_' . COOKIEHASH] ) != $post->post_password ) - return true; + if ( empty( $wp_hasher ) ) { + require_once( ABSPATH . 'wp-includes/class-phpass.php'); + // By default, use the portable hash from phpass + $wp_hasher = new PasswordHash(8, true); + } - return false; + $hash = stripslashes( $_COOKIE[ 'wp-postpass_' . COOKIEHASH ] ); + + return ! $wp_hasher->CheckPassword( $post->post_password, $hash ); } /** @@ -994,7 +995,7 @@ class Walker_Page extends Walker { * @param string $output Passed by reference. Used to append additional content. * @param int $depth Depth of page. Used for padding. */ - function start_lvl(&$output, $depth) { + function start_lvl( &$output, $depth = 0, $args = array() ) { $indent = str_repeat("\t", $depth); $output .= "\n$indent
            \n"; } @@ -1006,7 +1007,7 @@ class Walker_Page extends Walker { * @param string $output Passed by reference. Used to append additional content. * @param int $depth Depth of page. Used for padding. */ - function end_lvl(&$output, $depth) { + function end_lvl( &$output, $depth = 0, $args = array() ) { $indent = str_repeat("\t", $depth); $output .= "$indent
          \n"; } @@ -1021,7 +1022,7 @@ class Walker_Page extends Walker { * @param int $current_page Page ID. * @param array $args */ - function start_el(&$output, $page, $depth, $args, $current_page) { + function start_el( &$output, $page, $depth, $args, $current_page = 0 ) { if ( $depth ) $indent = str_repeat("\t", $depth); else @@ -1064,7 +1065,7 @@ class Walker_Page extends Walker { * @param object $page Page data object. Not used. * @param int $depth Depth of page. Not Used. */ - function end_el(&$output, $page, $depth) { + function end_el( &$output, $page, $depth = 0, $args = array() ) { $output .= "\n"; } @@ -1102,7 +1103,7 @@ class Walker_PageDropdown extends Walker { * @param int $depth Depth of page in reference to parent pages. Used for padding. * @param array $args Uses 'selected' argument for selected page to set selected HTML attribute for option element. */ - function start_el(&$output, $page, $depth, $args) { + function start_el(&$output, $page, $depth, $args, $id = 0) { $pad = str_repeat(' ', $depth * 3); $output .= "\t
      - diff --git a/wp-includes/theme.php b/wp-includes/theme.php index b132364b..db7b0a2c 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -3,9 +3,109 @@ * Theme, template, and stylesheet functions. * * @package WordPress - * @subpackage Template + * @subpackage Theme */ +/** + * Returns an array of WP_Theme objects based on the arguments. + * + * Despite advances over get_themes(), this function is quite expensive, and grows + * linearly with additional themes. Stick to wp_get_theme() if possible. + * + * @since 3.4.0 + * + * @param array $args The search arguments. Optional. + * - errors mixed True to return themes with errors, false to return themes without errors, null + * to return all themes. Defaults to false. + * - allowed mixed (Multisite) True to return only allowed themes for a site. False to return only + * disallowed themes for a site. 'site' to return only site-allowed themes. 'network' + * to return only network-allowed themes. Null to return all themes. Defaults to null. + * - blog_id int (Multisite) The blog ID used to calculate which themes are allowed. Defaults to 0, + * synonymous for the current blog. + * @return Array of WP_Theme objects. + */ +function wp_get_themes( $args = array() ) { + global $wp_theme_directories; + + $defaults = array( 'errors' => false, 'allowed' => null, 'blog_id' => 0 ); + $args = wp_parse_args( $args, $defaults ); + + $theme_directories = search_theme_directories(); + + if ( count( $wp_theme_directories ) > 1 ) { + // Make sure the current theme wins out, in case search_theme_directories() picks the wrong + // one in the case of a conflict. (Normally, last registered theme root wins.) + $current_theme = get_stylesheet(); + if ( isset( $theme_directories[ $current_theme ] ) ) { + $root_of_current_theme = get_raw_theme_root( $current_theme ); + if ( ! in_array( $root_of_current_theme, $wp_theme_directories ) ) + $root_of_current_theme = WP_CONTENT_DIR . $root_of_current_theme; + $theme_directories[ $current_theme ]['theme_root'] = $root_of_current_theme; + } + } + + if ( empty( $theme_directories ) ) + return array(); + + if ( is_multisite() && null !== $args['allowed'] ) { + $allowed = $args['allowed']; + if ( 'network' === $allowed ) + $theme_directories = array_intersect_key( $theme_directories, WP_Theme::get_allowed_on_network() ); + elseif ( 'site' === $allowed ) + $theme_directories = array_intersect_key( $theme_directories, WP_Theme::get_allowed_on_site( $args['blog_id'] ) ); + elseif ( $allowed ) + $theme_directories = array_intersect_key( $theme_directories, WP_Theme::get_allowed( $args['blog_id'] ) ); + else + $theme_directories = array_diff_key( $theme_directories, WP_Theme::get_allowed( $args['blog_id'] ) ); + } + + $themes = array(); + static $_themes = array(); + + foreach ( $theme_directories as $theme => $theme_root ) { + if ( isset( $_themes[ $theme_root['theme_root'] . '/' . $theme ] ) ) + $themes[ $theme ] = $_themes[ $theme_root['theme_root'] . '/' . $theme ]; + else + $themes[ $theme ] = $_themes[ $theme_root['theme_root'] . '/' . $theme ] = new WP_Theme( $theme, $theme_root['theme_root'] ); + } + + if ( null !== $args['errors'] ) { + foreach ( $themes as $theme => $wp_theme ) { + if ( $wp_theme->errors() != $args['errors'] ) + unset( $themes[ $theme ] ); + } + } + + return $themes; +} + +/** + * Gets a WP_Theme object for a theme. + * + * @since 3.4.0 + * + * @param string $stylesheet Directory name for the theme. Optional. Defaults to current theme. + * @param string $theme_root Absolute path of the theme root to look in. Optional. If not specified, get_raw_theme_root() + * is used to calculate the theme root for the $stylesheet provided (or current theme). + * @return WP_Theme Theme object. Be sure to check the object's exists() method if you need to confirm the theme's existence. + */ +function wp_get_theme( $stylesheet = null, $theme_root = null ) { + global $wp_theme_directories; + + if ( empty( $stylesheet ) ) + $stylesheet = get_stylesheet(); + + if ( empty( $theme_root ) ) { + $theme_root = get_raw_theme_root( $stylesheet ); + if ( false === $theme_root ) + $theme_root = WP_CONTENT_DIR . '/themes'; + elseif ( ! in_array( $theme_root, (array) $wp_theme_directories ) ) + $theme_root = WP_CONTENT_DIR . $theme_root; + } + + return new WP_Theme( $stylesheet, $theme_root ); +} + /** * Whether a child theme is in use. * @@ -160,310 +260,6 @@ function get_template_directory_uri() { return apply_filters( 'template_directory_uri', $template_dir_uri, $template, $theme_root_uri ); } -/** - * Retrieve theme data from parsed theme file. - * - * The description will have the tags filtered with the following HTML elements - * whitelisted. The 'a' element with the href and title - * attributes. The abbr element with the title attribute. The - * acronym element with the title attribute allowed. The - * code, em, and strong elements also allowed. - * - * The style.css file must contain theme name, theme URI, and description. The - * data can also contain author URI, author, template (parent template), - * version, status, and finally tags. Some of these are not used by WordPress - * administration panels, but are used by theme directory web sites which list - * the theme. - * - * @since 1.5.0 - * - * @param string $theme_file Theme file path. - * @return array Theme data. - */ -function get_theme_data( $theme_file ) { - $default_headers = array( - 'Name' => 'Theme Name', - 'URI' => 'Theme URI', - 'Description' => 'Description', - 'Author' => 'Author', - 'AuthorURI' => 'Author URI', - 'Version' => 'Version', - 'Template' => 'Template', - 'Status' => 'Status', - 'Tags' => 'Tags' - ); - - $themes_allowed_tags = array( - 'a' => array( - 'href' => array(),'title' => array() - ), - 'abbr' => array( - 'title' => array() - ), - 'acronym' => array( - 'title' => array() - ), - 'code' => array(), - 'em' => array(), - 'strong' => array() - ); - - $theme_data = get_file_data( $theme_file, $default_headers, 'theme' ); - - $theme_data['Name'] = $theme_data['Title'] = wp_kses( $theme_data['Name'], $themes_allowed_tags ); - - $theme_data['URI'] = esc_url( $theme_data['URI'] ); - - $theme_data['Description'] = wptexturize( wp_kses( $theme_data['Description'], $themes_allowed_tags ) ); - - $theme_data['AuthorURI'] = esc_url( $theme_data['AuthorURI'] ); - - $theme_data['Template'] = wp_kses( $theme_data['Template'], $themes_allowed_tags ); - - $theme_data['Version'] = wp_kses( $theme_data['Version'], $themes_allowed_tags ); - - if ( $theme_data['Status'] == '' ) - $theme_data['Status'] = 'publish'; - else - $theme_data['Status'] = wp_kses( $theme_data['Status'], $themes_allowed_tags ); - - if ( $theme_data['Tags'] == '' ) - $theme_data['Tags'] = array(); - else - $theme_data['Tags'] = array_map( 'trim', explode( ',', wp_kses( $theme_data['Tags'], array() ) ) ); - - if ( $theme_data['Author'] == '' ) { - $theme_data['Author'] = $theme_data['AuthorName'] = __('Anonymous'); - } else { - $theme_data['AuthorName'] = wp_kses( $theme_data['Author'], $themes_allowed_tags ); - if ( empty( $theme_data['AuthorURI'] ) ) { - $theme_data['Author'] = $theme_data['AuthorName']; - } else { - $theme_data['Author'] = sprintf( '%3$s', $theme_data['AuthorURI'], esc_attr__( 'Visit author homepage' ), $theme_data['AuthorName'] ); - } - } - - return $theme_data; -} - -/** - * Retrieve list of themes with theme data in theme directory. - * - * The theme is broken, if it doesn't have a parent theme and is missing either - * style.css and, or index.php. If the theme has a parent theme then it is - * broken, if it is missing style.css; index.php is optional. The broken theme - * list is saved in the {@link $wp_broken_themes} global, which is displayed on - * the theme list in the administration panels. - * - * @since 1.5.0 - * @global array $wp_broken_themes Stores the broken themes. - * @global array $wp_themes Stores the working themes. - * - * @return array Theme list with theme data. - */ -function get_themes() { - global $wp_themes, $wp_broken_themes; - - if ( isset($wp_themes) ) - return $wp_themes; - - if ( !$theme_files = search_theme_directories() ) - return false; - - asort( $theme_files ); - - $wp_themes = array(); - - foreach ( (array) $theme_files as $theme_file ) { - $theme_root = $theme_file['theme_root']; - $theme_file = $theme_file['theme_file']; - - if ( !is_readable("$theme_root/$theme_file") ) { - $wp_broken_themes[$theme_file] = array('Name' => $theme_file, 'Title' => $theme_file, 'Description' => __('File not readable.')); - continue; - } - - $theme_data = get_theme_data("$theme_root/$theme_file"); - - $name = $theme_data['Name']; - $title = $theme_data['Title']; - $description = wptexturize($theme_data['Description']); - $version = $theme_data['Version']; - $author = $theme_data['Author']; - $template = $theme_data['Template']; - $stylesheet = dirname($theme_file); - - $screenshot = false; - foreach ( array('png', 'gif', 'jpg', 'jpeg') as $ext ) { - if (file_exists("$theme_root/$stylesheet/screenshot.$ext")) { - $screenshot = "screenshot.$ext"; - break; - } - } - - if ( empty($name) ) { - $name = dirname($theme_file); - $title = $name; - } - - $parent_template = $template; - - if ( empty($template) ) { - if ( file_exists("$theme_root/$stylesheet/index.php") ) - $template = $stylesheet; - else - continue; - } - - $template = trim( $template ); - - if ( !file_exists("$theme_root/$template/index.php") ) { - $parent_dir = dirname(dirname($theme_file)); - if ( file_exists("$theme_root/$parent_dir/$template/index.php") ) { - $template = "$parent_dir/$template"; - $template_directory = "$theme_root/$template"; - } else { - /** - * The parent theme doesn't exist in the current theme's folder or sub folder - * so lets use the theme root for the parent template. - */ - if ( isset($theme_files[$template]) && file_exists( $theme_files[$template]['theme_root'] . "/$template/index.php" ) ) { - $template_directory = $theme_files[$template]['theme_root'] . "/$template"; - } else { - if ( empty( $parent_template) ) - $wp_broken_themes[$name] = array('Name' => $name, 'Title' => $title, 'Description' => __('Template is missing.'), 'error' => 'no_template'); - else - $wp_broken_themes[$name] = array('Name' => $name, 'Title' => $title, 'Description' => sprintf( __('The parent theme is missing. Please install the "%s" parent theme.'), $parent_template ), 'error' => 'no_parent', 'parent' => $parent_template ); - continue; - } - - } - } else { - $template_directory = trim( $theme_root . '/' . $template ); - } - - $stylesheet_files = array(); - $template_files = array(); - - $stylesheet_dir = @ dir("$theme_root/$stylesheet"); - if ( $stylesheet_dir ) { - while ( ($file = $stylesheet_dir->read()) !== false ) { - if ( !preg_match('|^\.+$|', $file) ) { - if ( preg_match('|\.css$|', $file) ) - $stylesheet_files[] = "$theme_root/$stylesheet/$file"; - elseif ( preg_match('|\.php$|', $file) ) - $template_files[] = "$theme_root/$stylesheet/$file"; - } - } - @ $stylesheet_dir->close(); - } - - $template_dir = @ dir("$template_directory"); - if ( $template_dir ) { - while ( ($file = $template_dir->read()) !== false ) { - if ( preg_match('|^\.+$|', $file) ) - continue; - if ( preg_match('|\.php$|', $file) ) { - $template_files[] = "$template_directory/$file"; - } elseif ( is_dir("$template_directory/$file") ) { - $template_subdir = @ dir("$template_directory/$file"); - if ( !$template_subdir ) - continue; - while ( ($subfile = $template_subdir->read()) !== false ) { - if ( preg_match('|^\.+$|', $subfile) ) - continue; - if ( preg_match('|\.php$|', $subfile) ) - $template_files[] = "$template_directory/$file/$subfile"; - } - @ $template_subdir->close(); - } - } - @ $template_dir->close(); - } - - //Make unique and remove duplicates when stylesheet and template are the same i.e. most themes - $template_files = array_unique($template_files); - $stylesheet_files = array_unique($stylesheet_files); - - $template_dir = $template_directory; - $stylesheet_dir = $theme_root . '/' . $stylesheet; - - if ( empty($template_dir) ) - $template_dir = '/'; - if ( empty($stylesheet_dir) ) - $stylesheet_dir = '/'; - - // Check for theme name collision. This occurs if a theme is copied to - // a new theme directory and the theme header is not updated. Whichever - // theme is first keeps the name. Subsequent themes get a suffix applied. - // The Twenty Eleven, Twenty Ten, Default and Classic themes always trump - // their pretenders. - if ( isset($wp_themes[$name]) ) { - $trump_cards = array( - 'classic' => 'WordPress Classic', - 'default' => 'WordPress Default', - 'twentyten' => 'Twenty Ten', - 'twentyeleven' => 'Twenty Eleven', - ); - if ( isset( $trump_cards[ $stylesheet ] ) && $name == $trump_cards[ $stylesheet ] ) { - // If another theme has claimed to be one of our default themes, move - // them aside. - $suffix = $wp_themes[$name]['Stylesheet']; - $new_name = "$name/$suffix"; - $wp_themes[$new_name] = $wp_themes[$name]; - $wp_themes[$new_name]['Name'] = $new_name; - } else { - $name = "$name/$stylesheet"; - } - } - - $theme_roots[$stylesheet] = str_replace( WP_CONTENT_DIR, '', $theme_root ); - $wp_themes[$name] = array( - 'Name' => $name, - 'Title' => $title, - 'Description' => $description, - 'Author' => $author, - 'Author Name' => $theme_data['AuthorName'], - 'Author URI' => $theme_data['AuthorURI'], - 'Version' => $version, - 'Template' => $template, - 'Stylesheet' => $stylesheet, - 'Template Files' => $template_files, - 'Stylesheet Files' => $stylesheet_files, - 'Template Dir' => $template_dir, - 'Stylesheet Dir' => $stylesheet_dir, - 'Status' => $theme_data['Status'], - 'Screenshot' => $screenshot, - 'Tags' => $theme_data['Tags'], - 'Theme Root' => $theme_root, - 'Theme Root URI' => str_replace( WP_CONTENT_DIR, content_url(), $theme_root ), - ); - } - - unset($theme_files); - - /* Store theme roots in the DB */ - if ( get_site_transient( 'theme_roots' ) != $theme_roots ) - set_site_transient( 'theme_roots', $theme_roots, 7200 ); // cache for two hours - unset($theme_roots); - - /* Resolve theme dependencies. */ - $theme_names = array_keys( $wp_themes ); - foreach ( (array) $theme_names as $theme_name ) { - $wp_themes[$theme_name]['Parent Theme'] = ''; - if ( $wp_themes[$theme_name]['Stylesheet'] != $wp_themes[$theme_name]['Template'] ) { - foreach ( (array) $theme_names as $parent_theme_name ) { - if ( ($wp_themes[$parent_theme_name]['Stylesheet'] == $wp_themes[$parent_theme_name]['Template']) && ($wp_themes[$parent_theme_name]['Template'] == $wp_themes[$theme_name]['Template']) ) { - $wp_themes[$theme_name]['Parent Theme'] = $wp_themes[$parent_theme_name]['Name']; - break; - } - } - } - } - - return $wp_themes; -} - /** * Retrieve theme roots. * @@ -479,66 +275,12 @@ function get_theme_roots() { $theme_roots = get_site_transient( 'theme_roots' ); if ( false === $theme_roots ) { - get_themes(); - $theme_roots = get_site_transient( 'theme_roots' ); // this is set in get_theme() + search_theme_directories( true ); // Regenerate the transient. + $theme_roots = get_site_transient( 'theme_roots' ); } return $theme_roots; } -/** - * Retrieve theme data. - * - * @since 1.5.0 - * - * @param string $theme Theme name. - * @return array|null Null, if theme name does not exist. Theme data, if exists. - */ -function get_theme($theme) { - $themes = get_themes(); - - if ( is_array( $themes ) && array_key_exists( $theme, $themes ) ) - return $themes[$theme]; - - return null; -} - -/** - * Retrieve current theme display name. - * - * If the 'current_theme' option has already been set, then it will be returned - * instead. If it is not set, then each theme will be iterated over until both - * the current stylesheet and current template name. - * - * @since 1.5.0 - * - * @return string - */ -function get_current_theme() { - if ( $theme = get_option('current_theme') ) - return $theme; - - $themes = get_themes(); - $current_theme = 'Twenty Eleven'; - - if ( $themes ) { - $theme_names = array_keys( $themes ); - $current_template = get_option( 'template' ); - $current_stylesheet = get_option( 'stylesheet' ); - - foreach ( (array) $theme_names as $theme_name ) { - if ( $themes[$theme_name]['Stylesheet'] == $current_stylesheet && - $themes[$theme_name]['Template'] == $current_template ) { - $current_theme = $themes[$theme_name]['Name']; - break; - } - } - } - - update_option('current_theme', $current_theme); - - return $current_theme; -} - /** * Register a directory that contains themes. * @@ -547,21 +289,18 @@ function get_current_theme() { * @param string $directory Either the full filesystem path to a theme folder or a folder within WP_CONTENT_DIR * @return bool */ -function register_theme_directory( $directory) { +function register_theme_directory( $directory ) { global $wp_theme_directories; - /* If this folder does not exist, return and do not register */ - if ( !file_exists( $directory ) ) - /* Try prepending as the theme directory could be relative to the content directory */ - $registered_directory = WP_CONTENT_DIR . '/' . $directory; - else - $registered_directory = $directory; - - /* If this folder does not exist, return and do not register */ - if ( !file_exists( $registered_directory ) ) - return false; + if ( ! file_exists( $directory ) ) { + // Try prepending as the theme directory could be relative to the content directory + $directory = WP_CONTENT_DIR . '/' . $directory; + // If this directory does not exist, return and do not register + if ( ! file_exists( $directory ) ) + return false; + } - $wp_theme_directories[] = $registered_directory; + $wp_theme_directories[] = $directory; return true; } @@ -571,550 +310,211 @@ function register_theme_directory( $directory) { * * @since 2.9.0 * + * @param bool $force Optional. Whether to force a new directory scan. Defaults to false. * @return array Valid themes found */ -function search_theme_directories() { - global $wp_theme_directories, $wp_broken_themes; +function search_theme_directories( $force = false ) { + global $wp_theme_directories; if ( empty( $wp_theme_directories ) ) return false; - $theme_files = array(); - $wp_broken_themes = array(); - - /* Loop the registered theme directories and extract all themes */ - foreach ( (array) $wp_theme_directories as $theme_root ) { - $theme_loc = $theme_root; + static $found_themes; + if ( ! $force && isset( $found_themes ) ) + return $found_themes; - /* We don't want to replace all forward slashes, see Trac #4541 */ - if ( '/' != WP_CONTENT_DIR ) - $theme_loc = str_replace(WP_CONTENT_DIR, '', $theme_root); + $found_themes = array(); - /* Files in the root of the current theme directory and one subdir down */ - $themes_dir = @ opendir($theme_root); + $wp_theme_directories = (array) $wp_theme_directories; - if ( !$themes_dir ) - return false; + // Set up maybe-relative, maybe-absolute array of theme directories. + // We always want to return absolute, but we need to cache relative + // use in for get_theme_root(). + foreach ( $wp_theme_directories as $theme_root ) { + if ( 0 === strpos( $theme_root, WP_CONTENT_DIR ) ) + $relative_theme_roots[ str_replace( WP_CONTENT_DIR, '', $theme_root ) ] = $theme_root; + else + $relative_theme_roots[ $theme_root ] = $theme_root; + } - while ( ($theme_dir = readdir($themes_dir)) !== false ) { - if ( is_dir($theme_root . '/' . $theme_dir) && is_readable($theme_root . '/' . $theme_dir) ) { - if ( $theme_dir[0] == '.' || $theme_dir == 'CVS' ) + if ( $cache_expiration = apply_filters( 'wp_cache_themes_persistently', false, 'search_theme_directories' ) ) { + $cached_roots = get_site_transient( 'theme_roots' ); + if ( is_array( $cached_roots ) ) { + foreach ( $cached_roots as $theme_dir => $theme_root ) { + // A cached theme root is no longer around, so skip it. + if ( ! isset( $relative_theme_roots[ $theme_root ] ) ) continue; - - $stylish_dir = @opendir($theme_root . '/' . $theme_dir); - $found_stylesheet = false; - - while ( ($theme_file = readdir($stylish_dir)) !== false ) { - if ( $theme_file == 'style.css' ) { - $theme_files[$theme_dir] = array( 'theme_file' => $theme_dir . '/' . $theme_file, 'theme_root' => $theme_root ); - $found_stylesheet = true; - break; - } - } - @closedir($stylish_dir); - - if ( !$found_stylesheet ) { // look for themes in that dir - $subdir = "$theme_root/$theme_dir"; - $subdir_name = $theme_dir; - $theme_subdirs = @opendir( $subdir ); - - $found_subdir_themes = false; - while ( ($theme_subdir = readdir($theme_subdirs)) !== false ) { - if ( is_dir( $subdir . '/' . $theme_subdir) && is_readable($subdir . '/' . $theme_subdir) ) { - if ( $theme_subdir[0] == '.' || $theme_subdir == 'CVS' ) - continue; - - $stylish_dir = @opendir($subdir . '/' . $theme_subdir); - $found_stylesheet = false; - - while ( ($theme_file = readdir($stylish_dir)) !== false ) { - if ( $theme_file == 'style.css' ) { - $theme_files["$theme_dir/$theme_subdir"] = array( 'theme_file' => $subdir_name . '/' . $theme_subdir . '/' . $theme_file, 'theme_root' => $theme_root ); - $found_stylesheet = true; - $found_subdir_themes = true; - break; - } - } - @closedir($stylish_dir); - } - } - @closedir($theme_subdirs); - if ( !$found_subdir_themes ) - $wp_broken_themes[$theme_dir] = array('Name' => $theme_dir, 'Title' => $theme_dir, 'Description' => __('Stylesheet is missing.')); - } + $found_themes[ $theme_dir ] = array( + 'theme_file' => $theme_dir . '/style.css', + 'theme_root' => $relative_theme_roots[ $theme_root ], // Convert relative to absolute. + ); } + return $found_themes; } - @closedir( $themes_dir ); - } - return $theme_files; -} - -/** - * Retrieve path to themes directory. - * - * Does not have trailing slash. - * - * @since 1.5.0 - * @uses apply_filters() Calls 'theme_root' filter on path. - * - * @param string $stylesheet_or_template The stylesheet or template name of the theme - * @return string Theme path. - */ -function get_theme_root( $stylesheet_or_template = false ) { - if ( $stylesheet_or_template ) { - if ( $theme_root = get_raw_theme_root($stylesheet_or_template) ) - $theme_root = WP_CONTENT_DIR . $theme_root; - else - $theme_root = WP_CONTENT_DIR . '/themes'; + if ( ! is_int( $cache_expiration ) ) + $cache_expiration = 1800; // half hour } else { - $theme_root = WP_CONTENT_DIR . '/themes'; + $cache_expiration = 1800; // half hour } - return apply_filters( 'theme_root', $theme_root ); -} - -/** - * Retrieve URI for themes directory. - * - * Does not have trailing slash. - * - * @since 1.5.0 - * - * @param string $stylesheet_or_template The stylesheet or template name of the theme - * @return string Themes URI. - */ -function get_theme_root_uri( $stylesheet_or_template = false ) { - if ( $stylesheet_or_template ) { - if ( $theme_root = get_raw_theme_root($stylesheet_or_template) ) - $theme_root_uri = content_url( $theme_root ); - else - $theme_root_uri = content_url( 'themes' ); - } else { - $theme_root_uri = content_url( 'themes' ); - } - - return apply_filters( 'theme_root_uri', $theme_root_uri, get_option('siteurl'), $stylesheet_or_template ); -} - -/** - * Get the raw theme root relative to the content directory with no filters applied. - * - * @since 3.1.0 - * - * @param string $stylesheet_or_template The stylesheet or template name of the theme - * @return string Theme root - */ -function get_raw_theme_root( $stylesheet_or_template, $no_cache = false ) { - global $wp_theme_directories; - - if ( count($wp_theme_directories) <= 1 ) - return '/themes'; - - $theme_root = false; - - // If requesting the root for the current theme, consult options to avoid calling get_theme_roots() - if ( !$no_cache ) { - if ( get_option('stylesheet') == $stylesheet_or_template ) - $theme_root = get_option('stylesheet_root'); - elseif ( get_option('template') == $stylesheet_or_template ) - $theme_root = get_option('template_root'); - } - - if ( empty($theme_root) ) { - $theme_roots = get_theme_roots(); - if ( !empty($theme_roots[$stylesheet_or_template]) ) - $theme_root = $theme_roots[$stylesheet_or_template]; - } - - return $theme_root; -} - -/** - * Retrieve path to a template - * - * Used to quickly retrieve the path of a template without including the file - * extension. It will also check the parent theme, if the file exists, with - * the use of {@link locate_template()}. Allows for more generic template location - * without the use of the other get_*_template() functions. - * - * @since 1.5.0 - * - * @param string $type Filename without extension. - * @param array $templates An optional list of template candidates - * @return string Full path to file. - */ -function get_query_template( $type, $templates = array() ) { - $type = preg_replace( '|[^a-z0-9-]+|', '', $type ); - - if ( empty( $templates ) ) - $templates = array("{$type}.php"); - - return apply_filters( "{$type}_template", locate_template( $templates ) ); -} - -/** - * Retrieve path of index template in current or parent template. - * - * @since 3.0.0 - * - * @return string - */ -function get_index_template() { - return get_query_template('index'); -} - -/** - * Retrieve path of 404 template in current or parent template. - * - * @since 1.5.0 - * - * @return string - */ -function get_404_template() { - return get_query_template('404'); -} - -/** - * Retrieve path of archive template in current or parent template. - * - * @since 1.5.0 - * - * @return string - */ -function get_archive_template() { - $post_type = get_query_var( 'post_type' ); - - $templates = array(); - - if ( $post_type ) - $templates[] = "archive-{$post_type}.php"; - $templates[] = 'archive.php'; - - return get_query_template( 'archive', $templates ); -} - -/** - * Retrieve path of author template in current or parent template. - * - * @since 1.5.0 - * - * @return string - */ -function get_author_template() { - $author = get_queried_object(); - - $templates = array(); - - $templates[] = "author-{$author->user_nicename}.php"; - $templates[] = "author-{$author->ID}.php"; - $templates[] = 'author.php'; - - return get_query_template( 'author', $templates ); -} - -/** - * Retrieve path of category template in current or parent template. - * - * Works by first retrieving the current slug for example 'category-default.php' and then - * trying category ID, for example 'category-1.php' and will finally fallback to category.php - * template, if those files don't exist. - * - * @since 1.5.0 - * @uses apply_filters() Calls 'category_template' on file path of category template. - * - * @return string - */ -function get_category_template() { - $category = get_queried_object(); - - $templates = array(); - - $templates[] = "category-{$category->slug}.php"; - $templates[] = "category-{$category->term_id}.php"; - $templates[] = 'category.php'; - - return get_query_template( 'category', $templates ); -} - -/** - * Retrieve path of tag template in current or parent template. - * - * Works by first retrieving the current tag name, for example 'tag-wordpress.php' and then - * trying tag ID, for example 'tag-1.php' and will finally fallback to tag.php - * template, if those files don't exist. - * - * @since 2.3.0 - * @uses apply_filters() Calls 'tag_template' on file path of tag template. - * - * @return string - */ -function get_tag_template() { - $tag = get_queried_object(); - - $templates = array(); - - $templates[] = "tag-{$tag->slug}.php"; - $templates[] = "tag-{$tag->term_id}.php"; - $templates[] = 'tag.php'; - - return get_query_template( 'tag', $templates ); -} - -/** - * Retrieve path of taxonomy template in current or parent template. - * - * Retrieves the taxonomy and term, if term is available. The template is - * prepended with 'taxonomy-' and followed by both the taxonomy string and - * the taxonomy string followed by a dash and then followed by the term. - * - * The taxonomy and term template is checked and used first, if it exists. - * Second, just the taxonomy template is checked, and then finally, taxonomy.php - * template is used. If none of the files exist, then it will fall back on to - * index.php. - * - * @since 2.5.0 - * @uses apply_filters() Calls 'taxonomy_template' filter on found path. - * - * @return string - */ -function get_taxonomy_template() { - $term = get_queried_object(); - $taxonomy = $term->taxonomy; - - $templates = array(); - - $templates[] = "taxonomy-$taxonomy-{$term->slug}.php"; - $templates[] = "taxonomy-$taxonomy.php"; - $templates[] = 'taxonomy.php'; - - return get_query_template( 'taxonomy', $templates ); -} - -/** - * Retrieve path of date template in current or parent template. - * - * @since 1.5.0 - * - * @return string - */ -function get_date_template() { - return get_query_template('date'); -} - -/** - * Retrieve path of home template in current or parent template. - * - * This is the template used for the page containing the blog posts - * - * Attempts to locate 'home.php' first before falling back to 'index.php'. - * - * @since 1.5.0 - * @uses apply_filters() Calls 'home_template' on file path of home template. - * - * @return string - */ -function get_home_template() { - $templates = array( 'home.php', 'index.php' ); - - return get_query_template( 'home', $templates ); -} - -/** - * Retrieve path of front-page template in current or parent template. - * - * Looks for 'front-page.php'. - * - * @since 3.0.0 - * @uses apply_filters() Calls 'front_page_template' on file path of template. - * - * @return string - */ -function get_front_page_template() { - $templates = array('front-page.php'); - - return get_query_template( 'front_page', $templates ); -} - -/** - * Retrieve path of page template in current or parent template. - * - * Will first look for the specifically assigned page template - * The will search for 'page-{slug}.php' followed by 'page-id.php' - * and finally 'page.php' - * - * @since 1.5.0 - * - * @return string - */ -function get_page_template() { - $id = get_queried_object_id(); - $template = get_post_meta($id, '_wp_page_template', true); - $pagename = get_query_var('pagename'); - - if ( !$pagename && $id > 0 ) { - // If a static page is set as the front page, $pagename will not be set. Retrieve it from the queried object - $post = get_queried_object(); - $pagename = $post->post_name; - } - - if ( 'default' == $template ) - $template = ''; - - $templates = array(); - if ( !empty($template) && !validate_file($template) ) - $templates[] = $template; - if ( $pagename ) - $templates[] = "page-$pagename.php"; - if ( $id ) - $templates[] = "page-$id.php"; - $templates[] = 'page.php'; - - return get_query_template( 'page', $templates ); -} - -/** - * Retrieve path of paged template in current or parent template. - * - * @since 1.5.0 - * - * @return string - */ -function get_paged_template() { - return get_query_template('paged'); -} - -/** - * Retrieve path of search template in current or parent template. - * - * @since 1.5.0 - * - * @return string - */ -function get_search_template() { - return get_query_template('search'); -} - -/** - * Retrieve path of single template in current or parent template. - * - * @since 1.5.0 - * - * @return string - */ -function get_single_template() { - $object = get_queried_object(); - - $templates = array(); - - $templates[] = "single-{$object->post_type}.php"; - $templates[] = "single.php"; - - return get_query_template( 'single', $templates ); -} + /* Loop the registered theme directories and extract all themes */ + foreach ( $wp_theme_directories as $theme_root ) { -/** - * Retrieve path of attachment template in current or parent template. - * - * The attachment path first checks if the first part of the mime type exists. - * The second check is for the second part of the mime type. The last check is - * for both types separated by an underscore. If neither are found then the file - * 'attachment.php' is checked and returned. - * - * Some examples for the 'text/plain' mime type are 'text.php', 'plain.php', and - * finally 'text_plain.php'. - * - * @since 2.0.0 - * - * @return string - */ -function get_attachment_template() { - global $posts; - $type = explode('/', $posts[0]->post_mime_type); - if ( $template = get_query_template($type[0]) ) - return $template; - elseif ( $template = get_query_template($type[1]) ) - return $template; - elseif ( $template = get_query_template("$type[0]_$type[1]") ) - return $template; - else - return get_query_template('attachment'); + // Start with directories in the root of the current theme directory. + $dirs = @ scandir( $theme_root ); + if ( ! $dirs ) + return false; + foreach ( $dirs as $dir ) { + if ( ! is_dir( $theme_root . '/' . $dir ) || $dir[0] == '.' || $dir == 'CVS' ) + continue; + if ( file_exists( $theme_root . '/' . $dir . '/style.css' ) ) { + // wp-content/themes/a-single-theme + // wp-content/themes is $theme_root, a-single-theme is $dir + $found_themes[ $dir ] = array( + 'theme_file' => $dir . '/style.css', + 'theme_root' => $theme_root, + ); + } else { + $found_theme = false; + // wp-content/themes/a-folder-of-themes/* + // wp-content/themes is $theme_root, a-folder-of-themes is $dir, then themes are $sub_dirs + $sub_dirs = @ scandir( $theme_root . '/' . $dir ); + if ( ! $sub_dirs ) + return false; + foreach ( $sub_dirs as $sub_dir ) { + if ( ! is_dir( $theme_root . '/' . $dir ) || $dir[0] == '.' || $dir == 'CVS' ) + continue; + if ( ! file_exists( $theme_root . '/' . $dir . '/' . $sub_dir . '/style.css' ) ) + continue; + $found_themes[ $dir . '/' . $sub_dir ] = array( + 'theme_file' => $dir . '/' . $sub_dir . '/style.css', + 'theme_root' => $theme_root, + ); + $found_theme = true; + } + // Never mind the above, it's just a theme missing a style.css. + // Return it; WP_Theme will catch the error. + if ( ! $found_theme ) + $found_themes[ $dir ] = array( + 'theme_file' => $dir . '/style.css', + 'theme_root' => $theme_root, + ); + } + } + } + + asort( $found_themes ); + + $theme_roots = array(); + $relative_theme_roots = array_flip( $relative_theme_roots ); + + foreach ( $found_themes as $theme_dir => $theme_data ) { + $theme_roots[ $theme_dir ] = $relative_theme_roots[ $theme_data['theme_root'] ]; // Convert absolute to relative. + } + + if ( $theme_roots != get_site_transient( 'theme_roots' ) ) + set_site_transient( 'theme_roots', $theme_roots, $cache_expiration ); + + return $found_themes; } /** - * Retrieve path of comment popup template in current or parent template. + * Retrieve path to themes directory. * - * Checks for comment popup template in current template, if it exists or in the - * parent template. + * Does not have trailing slash. * * @since 1.5.0 - * @uses apply_filters() Calls 'comments_popup_template' filter on path. + * @uses apply_filters() Calls 'theme_root' filter on path. * - * @return string + * @param string $stylesheet_or_template The stylesheet or template name of the theme + * @return string Theme path. */ -function get_comments_popup_template() { - $template = get_query_template( 'comments_popup', array( 'comments-popup.php' ) ); +function get_theme_root( $stylesheet_or_template = false ) { + global $wp_theme_directories; - // Backward compat code will be removed in a future release - if ('' == $template) - $template = ABSPATH . WPINC . '/theme-compat/comments-popup.php'; + if ( $stylesheet_or_template && $theme_root = get_raw_theme_root( $stylesheet_or_template ) ) { + // Always prepend WP_CONTENT_DIR unless the root currently registered as a theme directory. + // This gives relative theme roots the benefit of the doubt when things go haywire. + if ( ! in_array( $theme_root, (array) $wp_theme_directories ) ) + $theme_root = WP_CONTENT_DIR . $theme_root; + } else { + $theme_root = WP_CONTENT_DIR . '/themes'; + } - return $template; + return apply_filters( 'theme_root', $theme_root ); } /** - * Retrieve the name of the highest priority template file that exists. + * Retrieve URI for themes directory. * - * Searches in the STYLESHEETPATH before TEMPLATEPATH so that themes which - * inherit from a parent theme can just overload one file. + * Does not have trailing slash. * - * @since 2.7.0 + * @since 1.5.0 * - * @param string|array $template_names Template file(s) to search for, in order. - * @param bool $load If true the template file will be loaded if it is found. - * @param bool $require_once Whether to require_once or require. Default true. Has no effect if $load is false. - * @return string The template filename if one is located. + * @param string $stylesheet_or_template Optional. The stylesheet or template name of the theme. + * Default is to leverage the main theme root. + * @param string $theme_root Optional. The theme root for which calculations will be based, preventing + * the need for a get_raw_theme_root() call. + * @return string Themes URI. */ -function locate_template($template_names, $load = false, $require_once = true ) { - $located = ''; - foreach ( (array) $template_names as $template_name ) { - if ( !$template_name ) - continue; - if ( file_exists(STYLESHEETPATH . '/' . $template_name)) { - $located = STYLESHEETPATH . '/' . $template_name; - break; - } else if ( file_exists(TEMPLATEPATH . '/' . $template_name) ) { - $located = TEMPLATEPATH . '/' . $template_name; - break; +function get_theme_root_uri( $stylesheet_or_template = false, $theme_root = false ) { + global $wp_theme_directories; + + if ( $stylesheet_or_template && ! $theme_root ) + $theme_root = get_raw_theme_root( $stylesheet_or_template ); + + if ( $stylesheet_or_template && $theme_root ) { + if ( in_array( $theme_root, (array) $wp_theme_directories ) ) { + // Absolute path. Make an educated guess. YMMV -- but note the filter below. + if ( 0 === strpos( $theme_root, WP_CONTENT_DIR ) ) + $theme_root_uri = content_url( str_replace( WP_CONTENT_DIR, '', $theme_root ) ); + elseif ( 0 === strpos( $theme_root, ABSPATH ) ) + $theme_root_uri = site_url( str_replace( ABSPATH, '', $theme_root ) ); + elseif ( 0 === strpos( $theme_root, WP_PLUGIN_DIR ) || 0 === strpos( $theme_root, WPMU_PLUGIN_DIR ) ) + $theme_root_uri = plugins_url( basename( $theme_root ), $theme_root ); + else + $theme_root_uri = $theme_root; + } else { + $theme_root_uri = content_url( $theme_root ); } + } else { + $theme_root_uri = content_url( 'themes' ); } - if ( $load && '' != $located ) - load_template( $located, $require_once ); - - return $located; + return apply_filters( 'theme_root_uri', $theme_root_uri, get_option('siteurl'), $stylesheet_or_template ); } /** - * Require the template file with WordPress environment. - * - * The globals are set up for the template file to ensure that the WordPress - * environment is available from within the function. The query variables are - * also available. + * Get the raw theme root relative to the content directory with no filters applied. * - * @since 1.5.0 + * @since 3.1.0 * - * @param string $_template_file Path to template file. - * @param bool $require_once Whether to require_once or require. Default true. + * @param string $stylesheet_or_template The stylesheet or template name of the theme + * @param bool $skip_cache Optional. Whether to skip the cache. Defaults to false, meaning the cache is used. + * @return string Theme root */ -function load_template( $_template_file, $require_once = true ) { - global $posts, $post, $wp_did_header, $wp_did_template_redirect, $wp_query, $wp_rewrite, $wpdb, $wp_version, $wp, $id, $comment, $user_ID; +function get_raw_theme_root( $stylesheet_or_template, $skip_cache = false ) { + global $wp_theme_directories; + + if ( count($wp_theme_directories) <= 1 ) + return '/themes'; - if ( is_array( $wp_query->query_vars ) ) - extract( $wp_query->query_vars, EXTR_SKIP ); + $theme_root = false; - if ( $require_once ) - require_once( $_template_file ); - else - require( $_template_file ); + // If requesting the root for the current theme, consult options to avoid calling get_theme_roots() + if ( ! $skip_cache ) { + if ( get_option('stylesheet') == $stylesheet_or_template ) + $theme_root = get_option('stylesheet_root'); + elseif ( get_option('template') == $stylesheet_or_template ) + $theme_root = get_option('template_root'); + } + + if ( empty($theme_root) ) { + $theme_roots = get_theme_roots(); + if ( !empty($theme_roots[$stylesheet_or_template]) ) + $theme_root = $theme_roots[$stylesheet_or_template]; + } + + return $theme_root; } /** @@ -1163,7 +563,7 @@ function preview_theme() { } // Prevent theme mods to current theme being used on theme being previewed - add_filter( 'pre_option_mods_' . get_current_theme(), '__return_empty_array' ); + add_filter( 'pre_option_theme_mods_' . get_option( 'stylesheet' ), '__return_empty_array' ); ob_start( 'preview_theme_ob_filter' ); } @@ -1231,7 +631,7 @@ function preview_theme_ob_filter_callback( $matches ) { ) return $matches[1] . "#$matches[2] onclick=$matches[2]return false;" . $matches[4]; - $link = add_query_arg( array('preview' => 1, 'template' => $_GET['template'], 'stylesheet' => @$_GET['stylesheet'] ), $matches[3] ); + $link = add_query_arg( array( 'preview' => 1, 'template' => $_GET['template'], 'stylesheet' => @$_GET['stylesheet'], 'preview_iframe' => 1 ), $matches[3] ); if ( 0 === strpos($link, 'preview=1') ) $link = "?$link"; return $matches[1] . esc_attr( $link ) . $matches[4]; @@ -1241,37 +641,38 @@ function preview_theme_ob_filter_callback( $matches ) { * Switches current theme to new template and stylesheet names. * * @since 2.5.0 - * @uses do_action() Calls 'switch_theme' action on updated theme display name. + * @uses do_action() Calls 'switch_theme' action, passing the new theme. * * @param string $template Template name * @param string $stylesheet Stylesheet name. */ -function switch_theme($template, $stylesheet) { +function switch_theme( $template, $stylesheet ) { global $wp_theme_directories, $sidebars_widgets; if ( is_array( $sidebars_widgets ) ) set_theme_mod( 'sidebars_widgets', array( 'time' => time(), 'data' => $sidebars_widgets ) ); - $old_theme = get_current_theme(); + $old_theme = wp_get_theme(); + $new_theme = wp_get_theme( $stylesheet ); + $new_name = $new_theme->get('Name'); - update_option('template', $template); - update_option('stylesheet', $stylesheet); + update_option( 'template', $template ); + update_option( 'stylesheet', $stylesheet ); - if ( count($wp_theme_directories) > 1 ) { - update_option('template_root', get_raw_theme_root($template, true)); - update_option('stylesheet_root', get_raw_theme_root($stylesheet, true)); + if ( count( $wp_theme_directories ) > 1 ) { + update_option( 'template_root', get_raw_theme_root( $template, true ) ); + update_option( 'stylesheet_root', get_raw_theme_root( $stylesheet, true ) ); } - delete_option('current_theme'); - $theme = get_current_theme(); + update_option( 'current_theme', $new_name ); - if ( is_admin() && false === get_option( "theme_mods_$stylesheet" ) ) { - $default_theme_mods = (array) get_option( "mods_$theme" ); + if ( is_admin() && false === get_option( 'theme_mods_' . $stylesheet ) ) { + $default_theme_mods = (array) get_option( 'mods_' . $new_name ); add_option( "theme_mods_$stylesheet", $default_theme_mods ); } - update_option( 'theme_switched', $old_theme ); - do_action( 'switch_theme', $theme ); + update_option( 'theme_switched', $old_theme->get_stylesheet() ); + do_action( 'switch_theme', $new_name, $new_theme ); } /** @@ -1279,7 +680,7 @@ function switch_theme($template, $stylesheet) { * * Does not check the default theme, which is the fallback and should always exist. * Will switch theme to the fallback theme if current theme does not validate. - * You can use the 'validate_current_theme' filter to return FALSE to + * You can use the 'validate_current_theme' filter to return false to * disable this functionality. * * @since 1.5.0 @@ -1320,7 +721,9 @@ function validate_current_theme() { function get_theme_mods() { $theme_slug = get_option( 'stylesheet' ); if ( false === ( $mods = get_option( "theme_mods_$theme_slug" ) ) ) { - $theme_name = get_current_theme(); + $theme_name = get_option( 'current_theme' ); + if ( false === $theme_name ) + $theme_name = wp_get_theme()->get('Name'); $mods = get_option( "mods_$theme_name" ); // Deprecated location. if ( is_admin() && false !== $mods ) { update_option( "theme_mods_$theme_slug", $mods ); @@ -1351,7 +754,10 @@ function get_theme_mod( $name, $default = false ) { if ( isset( $mods[ $name ] ) ) return apply_filters( "theme_mod_$name", $mods[ $name ] ); - return apply_filters( "theme_mod_$name", sprintf( $default, get_template_directory_uri(), get_stylesheet_directory_uri() ) ); + if ( is_string( $default ) ) + $default = sprintf( $default, get_template_directory_uri(), get_stylesheet_directory_uri() ); + + return apply_filters( "theme_mod_$name", $default ); } /** @@ -1404,21 +810,23 @@ function remove_theme_mod( $name ) { */ function remove_theme_mods() { delete_option( 'theme_mods_' . get_option( 'stylesheet' ) ); - delete_option( 'mods_' . get_current_theme() ); + + // Old style. + $theme_name = get_option( 'current_theme' ); + if ( false === $theme_name ) + $theme_name = wp_get_theme()->get('Name'); + delete_option( 'mods_' . $theme_name ); } /** * Retrieve text color for custom header. * * @since 2.1.0 - * @uses HEADER_TEXTCOLOR * * @return string */ function get_header_textcolor() { - $default = defined('HEADER_TEXTCOLOR') ? HEADER_TEXTCOLOR : ''; - - return get_theme_mod('header_textcolor', $default); + return get_theme_mod('header_textcolor', get_theme_support( 'custom-header', 'default-text-color' ) ); } /** @@ -1430,17 +838,30 @@ function header_textcolor() { echo get_header_textcolor(); } +/** + * Whether to display the header text. + * + * @since 3.4.0 + * + * @return bool + */ +function display_header_text() { + if ( ! current_theme_supports( 'custom-header', 'header-text' ) ) + return false; + + $text_color = get_theme_mod( 'header_textcolor', get_theme_support( 'custom-header', 'default-text-color' ) ); + return 'blank' != $text_color; +} + /** * Retrieve header image for custom header. * * @since 2.1.0 - * @uses HEADER_IMAGE * * @return string */ function get_header_image() { - $default = defined( 'HEADER_IMAGE' ) ? HEADER_IMAGE : ''; - $url = get_theme_mod( 'header_image', $default ); + $url = get_theme_mod( 'header_image', get_theme_support( 'custom-header', 'default-image' ) ); if ( 'remove-header' == $url ) return false; @@ -1457,37 +878,58 @@ function get_header_image() { } /** - * Get random header image from registered images in theme. + * Get random header image data from registered images in theme. * - * @since 3.2.0 + * @since 3.4.0 + * + * @access private * * @return string Path to header image */ -function get_random_header_image() { - global $_wp_default_headers; - $header_image_mod = get_theme_mod( 'header_image', '' ); - $headers = array(); +function _get_random_header_data() { + static $_wp_random_header; - if ( 'random-uploaded-image' == $header_image_mod ) - $headers = get_uploaded_header_images(); - elseif ( ! empty( $_wp_default_headers ) ) { - if ( 'random-default-image' == $header_image_mod ) { - $headers = $_wp_default_headers; - } else { - $is_random = get_theme_support( 'custom-header' ); - if ( isset( $is_random[ 0 ] ) && !empty( $is_random[ 0 ][ 'random-default' ] ) ) + if ( empty( $_wp_random_header ) ) { + global $_wp_default_headers; + $header_image_mod = get_theme_mod( 'header_image', '' ); + $headers = array(); + + if ( 'random-uploaded-image' == $header_image_mod ) + $headers = get_uploaded_header_images(); + elseif ( ! empty( $_wp_default_headers ) ) { + if ( 'random-default-image' == $header_image_mod ) { $headers = $_wp_default_headers; + } else { + if ( current_theme_supports( 'custom-header', 'random-default' ) ) + $headers = $_wp_default_headers; + } } - } - if ( empty( $headers ) ) - return ''; + if ( empty( $headers ) ) + return new stdClass; + + $_wp_random_header = (object) $headers[ array_rand( $headers ) ]; + + $_wp_random_header->url = sprintf( $_wp_random_header->url, get_template_directory_uri(), get_stylesheet_directory_uri() ); + $_wp_random_header->thumbnail_url = sprintf( $_wp_random_header->thumbnail_url, get_template_directory_uri(), get_stylesheet_directory_uri() ); + } + return $_wp_random_header; +} - $random_image = array_rand( $headers ); - $header_url = sprintf( $headers[$random_image]['url'], get_template_directory_uri(), get_stylesheet_directory_uri() ); +/** + * Get random header image url from registered images in theme. + * + * @since 3.2.0 + * + * @return string Path to header image + */ - return $header_url; +function get_random_header_image() { + $random_image = _get_random_header_data(); + if ( empty( $random_image->url ) ) + return ''; + return $random_image->url; } /** @@ -1498,14 +940,12 @@ function get_random_header_image() { * is chosen, and theme turns on random headers with add_theme_support(). * * @since 3.2.0 - * @uses HEADER_IMAGE * * @param string $type The random pool to use. any|default|uploaded * @return boolean */ function is_random_header_image( $type = 'any' ) { - $default = defined( 'HEADER_IMAGE' ) ? HEADER_IMAGE : ''; - $header_image_mod = get_theme_mod( 'header_image', $default ); + $header_image_mod = get_theme_mod( 'header_image', get_theme_support( 'custom-header', 'default-image' ) ); if ( 'any' == $type ) { if ( 'random-default-image' == $header_image_mod || 'random-uploaded-image' == $header_image_mod || ( '' != get_random_header_image() && empty( $header_image_mod ) ) ) @@ -1547,75 +987,35 @@ function get_uploaded_header_images() { foreach ( (array) $headers as $header ) { $url = esc_url_raw( $header->guid ); - $header = basename($url); - $header_images[$header] = array(); - $header_images[$header]['url'] = $url; - $header_images[$header]['thumbnail_url'] = $url; - $header_images[$header]['uploaded'] = true; + $header_data = wp_get_attachment_metadata( $header->ID ); + $header_index = basename($url); + $header_images[$header_index] = array(); + $header_images[$header_index]['attachment_id'] = $header->ID; + $header_images[$header_index]['url'] = $url; + $header_images[$header_index]['thumbnail_url'] = $url; + $header_images[$header_index]['width'] = $header_data['width']; + $header_images[$header_index]['height'] = $header_data['height']; } return $header_images; } /** - * Add callbacks for image header display. - * - * The parameter $header_callback callback will be required to display the - * content for the 'wp_head' action. The parameter $admin_header_callback - * callback will be added to Custom_Image_Header class and that will be added - * to the 'admin_menu' action. - * - * @since 2.1.0 - * @uses Custom_Image_Header Sets up for $admin_header_callback for administration panel display. - * - * @param callback $header_callback Call on 'wp_head' action. - * @param callback $admin_header_callback Call on custom header administration screen. - * @param callback $admin_image_div_callback Output a custom header image div on the custom header administration screen. Optional. - */ -function add_custom_image_header( $header_callback, $admin_header_callback, $admin_image_div_callback = '' ) { - if ( ! empty( $header_callback ) ) - add_action('wp_head', $header_callback); - - $support = array( 'callback' => $header_callback ); - $theme_support = get_theme_support( 'custom-header' ); - if ( ! empty( $theme_support ) && is_array( $theme_support[ 0 ] ) ) - $support = array_merge( $theme_support[ 0 ], $support ); - add_theme_support( 'custom-header', $support ); - add_theme_support( 'custom-header-uploads' ); - - if ( ! is_admin() ) - return; - - global $custom_image_header; - - require_once( ABSPATH . 'wp-admin/custom-header.php' ); - $custom_image_header = new Custom_Image_Header( $admin_header_callback, $admin_image_div_callback ); - add_action( 'admin_menu', array( &$custom_image_header, 'init' ) ); -} - -/** - * Remove image header support. + * Get the header image data. * - * @since 3.1.0 - * @see add_custom_image_header() + * @since 3.4.0 * - * @return bool Whether support was removed. + * @return object */ -function remove_custom_image_header() { - if ( ! current_theme_supports( 'custom-header' ) ) - return false; - - $callback = get_theme_support( 'custom-header' ); - remove_action( 'wp_head', $callback[0]['callback'] ); - _remove_theme_support( 'custom-header' ); - remove_theme_support( 'custom-header-uploads' ); - - if ( is_admin() ) { - remove_action( 'admin_menu', array( &$GLOBALS['custom_image_header'], 'init' ) ); - unset( $GLOBALS['custom_image_header'] ); - } - - return true; +function get_custom_header() { + $data = is_random_header_image()? _get_random_header_data() : get_theme_mod( 'header_image_data' ); + $default = array( + 'url' => '', + 'thumbnail_url' => '', + 'width' => get_theme_support( 'custom-header', 'width' ), + 'height' => get_theme_support( 'custom-header', 'height' ), + ); + return (object) wp_parse_args( $data, $default ); } /** @@ -1663,9 +1063,7 @@ function unregister_default_headers( $header ) { * @return string */ function get_background_image() { - $default = defined('BACKGROUND_IMAGE') ? BACKGROUND_IMAGE : ''; - - return get_theme_mod('background_image', $default); + return get_theme_mod('background_image', get_theme_support( 'custom-background', 'default-image' ) ); } /** @@ -1681,14 +1079,11 @@ function background_image() { * Retrieve value for custom background color. * * @since 3.0.0 - * @uses BACKGROUND_COLOR * * @return string */ function get_background_color() { - $default = defined('BACKGROUND_COLOR') ? BACKGROUND_COLOR : ''; - - return get_theme_mod('background_color', $default); + return get_theme_mod('background_color', get_theme_support( 'custom-background', 'default-color' ) ); } /** @@ -1700,73 +1095,20 @@ function background_color() { echo get_background_color(); } -/** - * Add callbacks for background image display. - * - * The parameter $header_callback callback will be required to display the - * content for the 'wp_head' action. The parameter $admin_header_callback - * callback will be added to Custom_Background class and that will be added - * to the 'admin_menu' action. - * - * @since 3.0.0 - * @uses Custom_Background Sets up for $admin_header_callback for administration panel display. - * - * @param callback $header_callback Call on 'wp_head' action. - * @param callback $admin_header_callback Call on custom background administration screen. - * @param callback $admin_image_div_callback Output a custom background image div on the custom background administration screen. Optional. - */ -function add_custom_background( $header_callback = '', $admin_header_callback = '', $admin_image_div_callback = '' ) { - if ( isset( $GLOBALS['custom_background'] ) ) - return; - - if ( empty( $header_callback ) ) - $header_callback = '_custom_background_cb'; - - add_action( 'wp_head', $header_callback ); - - add_theme_support( 'custom-background', array( 'callback' => $header_callback ) ); - - if ( ! is_admin() ) - return; - require_once( ABSPATH . 'wp-admin/custom-background.php' ); - $GLOBALS['custom_background'] = new Custom_Background( $admin_header_callback, $admin_image_div_callback ); - add_action( 'admin_menu', array( &$GLOBALS['custom_background'], 'init' ) ); -} - -/** - * Remove custom background support. - * - * @since 3.1.0 - * @see add_custom_background() - * - * @return bool Whether support was removed. - */ -function remove_custom_background() { - if ( ! current_theme_supports( 'custom-background' ) ) - return false; - - $callback = get_theme_support( 'custom-background' ); - remove_action( 'wp_head', $callback[0]['callback'] ); - _remove_theme_support( 'custom-background' ); - - if ( is_admin() ) { - remove_action( 'admin_menu', array( &$GLOBALS['custom_background'], 'init' ) ); - unset( $GLOBALS['custom_background'] ); - } - - return true; -} - /** * Default custom background callback. * * @since 3.0.0 - * @see add_custom_background() * @access protected */ function _custom_background_cb() { + // $background is the saved custom image, or the default image. $background = get_background_image(); - $color = get_background_color(); + + // $color is the saved custom color. + // A default has to be specified in style.css. It will not be printed here. + $color = get_theme_mod( 'background_color' ); + if ( ! $background && ! $color ) return; @@ -1793,7 +1135,7 @@ function _custom_background_cb() { $style .= $image . $repeat . $position . $attachment; } ?> - } * the theme root. It also accepts an array of stylesheets. * It is optional and defaults to 'editor-style.css'. * - * Supports RTL stylesheets automatically by searching for the -rtl prefix, e.g. - * editor-style-rtl.css. If an array of stylesheets is passed to add_editor_style(), + * This function automatically adds another stylesheet with -rtl prefix, e.g. editor-style-rtl.css. + * If that file doesn't exist, it is removed before adding the stylesheet(s) to TinyMCE. + * If an array of stylesheets is passed to add_editor_style(), * RTL is only added for the first stylesheet. * + * Since version 3.4 the TinyMCE body has .rtl CSS class. + * It is a better option to use that class and add any RTL styles to the main stylesheet. + * * @since 3.0.0 * * @param mixed $stylesheet Optional. Stylesheet name or array thereof, relative to theme root. @@ -1863,13 +1209,172 @@ function add_theme_support( $feature ) { global $_wp_theme_features; if ( func_num_args() == 1 ) - $_wp_theme_features[$feature] = true; + $args = true; else - $_wp_theme_features[$feature] = array_slice( func_get_args(), 1 ); + $args = array_slice( func_get_args(), 1 ); + + switch ( $feature ) { + case 'post-formats' : + if ( is_array( $args[0] ) ) + $args[0] = array_intersect( $args[0], array_keys( get_post_format_slugs() ) ); + break; + + case 'custom-header-uploads' : + return add_theme_support( 'custom-header', array( 'uploads' => true ) ); + break; + + case 'custom-header' : + if ( ! is_array( $args ) ) + $args = array( 0 => array() ); + + $defaults = array( + 'default-image' => '', + 'random-default' => false, + 'width' => 0, + 'height' => 0, + 'flex-height' => false, + 'flex-width' => false, + 'default-text-color' => '', + 'header-text' => true, + 'uploads' => true, + 'wp-head-callback' => '', + 'admin-head-callback' => '', + 'admin-preview-callback' => '', + ); + + $jit = isset( $args[0]['__jit'] ); + unset( $args[0]['__jit'] ); + + // Merge in data from previous add_theme_support() calls. + // The first value registered wins. (A child theme is set up first.) + if ( isset( $_wp_theme_features['custom-header'] ) ) + $args[0] = wp_parse_args( $_wp_theme_features['custom-header'][0], $args[0] ); + + // Load in the defaults at the end, as we need to insure first one wins. + // This will cause all constants to be defined, as each arg will then be set to the default. + if ( $jit ) + $args[0] = wp_parse_args( $args[0], $defaults ); + + // If a constant was defined, use that value. Otherwise, define the constant to ensure + // the constant is always accurate (and is not defined later, overriding our value). + // As stated above, the first value wins. + // Once we get to wp_loaded (just-in-time), define any constants we haven't already. + // Constants are lame. Don't reference them. This is just for backwards compatibility. + + if ( defined( 'NO_HEADER_TEXT' ) ) + $args[0]['header-text'] = ! NO_HEADER_TEXT; + elseif ( isset( $args[0]['header-text'] ) ) + define( 'NO_HEADER_TEXT', empty( $args[0]['header-text'] ) ); + + if ( defined( 'HEADER_IMAGE_WIDTH' ) ) + $args[0]['width'] = (int) HEADER_IMAGE_WIDTH; + elseif ( isset( $args[0]['width'] ) ) + define( 'HEADER_IMAGE_WIDTH', (int) $args[0]['width'] ); + + if ( defined( 'HEADER_IMAGE_HEIGHT' ) ) + $args[0]['height'] = (int) HEADER_IMAGE_HEIGHT; + elseif ( isset( $args[0]['height'] ) ) + define( 'HEADER_IMAGE_HEIGHT', (int) $args[0]['height'] ); + + if ( defined( 'HEADER_TEXTCOLOR' ) ) + $args[0]['default-text-color'] = HEADER_TEXTCOLOR; + elseif ( isset( $args[0]['default-text-color'] ) ) + define( 'HEADER_TEXTCOLOR', $args[0]['default-text-color'] ); + + if ( defined( 'HEADER_IMAGE' ) ) + $args[0]['default-image'] = HEADER_IMAGE; + elseif ( isset( $args[0]['default-image'] ) ) + define( 'HEADER_IMAGE', $args[0]['default-image'] ); + + if ( $jit && ! empty( $args[0]['default-image'] ) ) + $args[0]['random-default'] = false; + + // If headers are supported, and we still don't have a defined width or height, + // we have implicit flex sizes. + if ( $jit ) { + if ( empty( $args[0]['width'] ) && empty( $args[0]['flex-width'] ) ) + $args[0]['flex-width'] = true; + if ( empty( $args[0]['height'] ) && empty( $args[0]['flex-height'] ) ) + $args[0]['flex-height'] = true; + } + + break; + + case 'custom-background' : + if ( ! is_array( $args ) ) + $args = array( 0 => array() ); + + $defaults = array( + 'default-image' => '', + 'default-color' => '', + 'wp-head-callback' => '_custom_background_cb', + 'admin-head-callback' => '', + 'admin-preview-callback' => '', + ); + + $jit = isset( $args[0]['__jit'] ); + unset( $args[0]['__jit'] ); + + // Merge in data from previous add_theme_support() calls. The first value registered wins. + if ( isset( $_wp_theme_features['custom-background'] ) ) + $args[0] = wp_parse_args( $_wp_theme_features['custom-background'][0], $args[0] ); + + if ( $jit ) + $args[0] = wp_parse_args( $args[0], $defaults ); + + if ( defined( 'BACKGROUND_COLOR' ) ) + $args[0]['default-color'] = BACKGROUND_COLOR; + elseif ( isset( $args[0]['default-color'] ) || $jit ) + define( 'BACKGROUND_COLOR', $args[0]['default-color'] ); + + if ( defined( 'BACKGROUND_IMAGE' ) ) + $args[0]['default-image'] = BACKGROUND_IMAGE; + elseif ( isset( $args[0]['default-image'] ) || $jit ) + define( 'BACKGROUND_IMAGE', $args[0]['default-image'] ); + + break; + } + + $_wp_theme_features[ $feature ] = $args; +} - if ( $feature == 'post-formats' && is_array( $_wp_theme_features[$feature][0] ) ) - $_wp_theme_features[$feature][0] = array_intersect( $_wp_theme_features[$feature][0], array_keys( get_post_format_slugs() ) ); +/** + * Registers the internal custom header and background routines. + * + * @since 3.4.0 + * @access private + */ +function _custom_header_background_just_in_time() { + global $custom_image_header, $custom_background; + + if ( current_theme_supports( 'custom-header' ) ) { + // In case any constants were defined after an add_custom_image_header() call, re-run. + add_theme_support( 'custom-header', array( '__jit' => true ) ); + + $args = get_theme_support( 'custom-header' ); + if ( $args[0]['wp-head-callback'] ) + add_action( 'wp_head', $args[0]['wp-head-callback'] ); + + if ( is_admin() ) { + require_once( ABSPATH . 'wp-admin/custom-header.php' ); + $custom_image_header = new Custom_Image_Header( $args[0]['admin-head-callback'], $args[0]['admin-preview-callback'] ); + } + } + + if ( current_theme_supports( 'custom-background' ) ) { + // In case any constants were defined after an add_custom_background() call, re-run. + add_theme_support( 'custom-background', array( '__jit' => true ) ); + + $args = get_theme_support( 'custom-background' ); + add_action( 'wp_head', $args[0]['wp-head-callback'] ); + + if ( is_admin() ) { + require_once( ABSPATH . 'wp-admin/custom-background.php' ); + $custom_background = new Custom_Background( $args[0]['admin-head-callback'], $args[0]['admin-preview-callback'] ); + } + } } +add_action( 'wp_loaded', '_custom_header_background_just_in_time' ); /** * Gets the theme support arguments passed when registering that support @@ -1880,10 +1385,24 @@ function add_theme_support( $feature ) { */ function get_theme_support( $feature ) { global $_wp_theme_features; - if ( !isset( $_wp_theme_features[$feature] ) ) + if ( ! isset( $_wp_theme_features[ $feature ] ) ) return false; - else - return $_wp_theme_features[$feature]; + + if ( func_num_args() <= 1 ) + return $_wp_theme_features[ $feature ]; + + $args = array_slice( func_get_args(), 1 ); + switch ( $feature ) { + case 'custom-header' : + case 'custom-background' : + if ( isset( $_wp_theme_features[ $feature ][0][ $args[0] ] ) ) + return $_wp_theme_features[ $feature ][0][ $args[0] ]; + return false; + break; + default : + return $_wp_theme_features[ $feature ]; + break; + } } /** @@ -1899,8 +1418,9 @@ function get_theme_support( $feature ) { */ function remove_theme_support( $feature ) { // Blacklist: for internal registrations not used directly by themes. - if ( in_array( $feature, array( 'custom-background', 'custom-header', 'editor-style', 'widgets', 'menus' ) ) ) + if ( in_array( $feature, array( 'editor-style', 'widgets', 'menus' ) ) ) return false; + return _remove_theme_support( $feature ); } @@ -1913,9 +1433,35 @@ function remove_theme_support( $feature ) { function _remove_theme_support( $feature ) { global $_wp_theme_features; - if ( ! isset( $_wp_theme_features[$feature] ) ) + switch ( $feature ) { + case 'custom-header-uploads' : + if ( ! isset( $_wp_theme_features['custom-header'] ) ) + return false; + add_theme_support( 'custom-header', array( 'uploads' => false ) ); + return; // Do not continue - custom-header-uploads no longer exists. + } + + if ( ! isset( $_wp_theme_features[ $feature ] ) ) return false; - unset( $_wp_theme_features[$feature] ); + + switch ( $feature ) { + case 'custom-header' : + $support = get_theme_support( 'custom-header' ); + if ( $support[0]['wp-head-callback'] ) + remove_action( 'wp_head', $support[0]['wp-head-callback'] ); + remove_action( 'admin_menu', array( $GLOBALS['custom_image_header'], 'init' ) ); + unset( $GLOBALS['custom_image_header'] ); + break; + + case 'custom-background' : + $support = get_theme_support( 'custom-background' ); + remove_action( 'wp_head', $support[0]['wp-head-callback'] ); + remove_action( 'admin_menu', array( $GLOBALS['custom_background'], 'init' ) ); + unset( $GLOBALS['custom_background'] ); + break; + } + + unset( $_wp_theme_features[ $feature ] ); return true; } @@ -1929,6 +1475,9 @@ function _remove_theme_support( $feature ) { function current_theme_supports( $feature ) { global $_wp_theme_features; + if ( 'custom-header-uploads' == $feature ) + return current_theme_supports( 'custom-header', 'uploads' ); + if ( !isset( $_wp_theme_features[$feature] ) ) return false; @@ -1938,11 +1487,10 @@ function current_theme_supports( $feature ) { $args = array_slice( func_get_args(), 1 ); - // @todo Allow pluggable arg checking switch ( $feature ) { case 'post-thumbnails': // post-thumbnails can be registered for only certain content/post types by passing - // an array of types to add_theme_support(). If no array was passed, then + // an array of types to add_theme_support(). If no array was passed, then // any type is accepted if ( true === $_wp_theme_features[$feature] ) // Registered for all types return true; @@ -1956,9 +1504,17 @@ function current_theme_supports( $feature ) { $post_format = $args[0]; return in_array( $post_format, $_wp_theme_features[$feature][0] ); break; + + case 'custom-header': + case 'custom-background' : + // specific custom header and background capabilities can be registered by passing + // an array to add_theme_support() + $header_support = $args[0]; + return ( isset( $_wp_theme_features[$feature][0][$header_support] ) && $_wp_theme_features[$feature][0][$header_support] ); + break; } - return true; + return apply_filters('current_theme_supports-' . $feature, true, $args, $_wp_theme_features[$feature]); } /** @@ -2000,11 +1556,121 @@ add_action( 'delete_attachment', '_delete_attachment_theme_mod' ); /** * Checks if a theme has been changed and runs 'after_switch_theme' hook on the next WP load * - * @since 3.3 + * @since 3.3.0 */ function check_theme_switched() { - if ( false !== ( $old_theme = get_option( 'theme_switched' ) ) && !empty( $old_theme ) ) { - do_action( 'after_switch_theme', $old_theme ); + if ( $stylesheet = get_option( 'theme_switched' ) ) { + $old_theme = wp_get_theme( $stylesheet ); + + if ( $old_theme->exists() ) + do_action( 'after_switch_theme', $old_theme->get('Name'), $old_theme ); + else + do_action( 'after_switch_theme', $stylesheet ); + update_option( 'theme_switched', false ); } } + +/** + * Includes and instantiates the WP_Customize_Manager class. + * + * Fires when ?wp_customize=on or on wp-admin/customize.php. + * + * @since 3.4.0 + */ +function _wp_customize_include() { + if ( ! ( ( isset( $_REQUEST['wp_customize'] ) && 'on' == $_REQUEST['wp_customize'] ) + || ( is_admin() && 'customize.php' == basename( $_SERVER['PHP_SELF'] ) ) + ) ) + return; + + require( ABSPATH . WPINC . '/class-wp-customize-manager.php' ); + // Init Customize class + $GLOBALS['wp_customize'] = new WP_Customize_Manager; +} +add_action( 'plugins_loaded', '_wp_customize_include' ); + +/** + * Adds settings for the customize-loader script. + * + * @since 3.4.0 + */ +function _wp_customize_loader_settings() { + global $wp_scripts; + + $admin_origin = parse_url( admin_url() ); + $home_origin = parse_url( home_url() ); + $cross_domain = ( strtolower( $admin_origin[ 'host' ] ) != strtolower( $home_origin[ 'host' ] ) ); + + $browser = array( + 'mobile' => wp_is_mobile(), + 'ios' => wp_is_mobile() && preg_match( '/iPad|iPod|iPhone/', $_SERVER['HTTP_USER_AGENT'] ), + ); + + $settings = array( + 'url' => esc_url( admin_url( 'customize.php' ) ), + 'isCrossDomain' => $cross_domain, + 'browser' => $browser, + ); + + $script = 'var _wpCustomizeLoaderSettings = ' . json_encode( $settings ) . ';'; + + $data = $wp_scripts->get_data( 'customize-loader', 'data' ); + if ( $data ) + $script = "$data\n$script"; + + $wp_scripts->add_data( 'customize-loader', 'data', $script ); +} +add_action( 'admin_enqueue_scripts', '_wp_customize_loader_settings' ); + +/** + * Returns a URL to load the theme customizer. + * + * @since 3.4.0 + * + * @param string $stylesheet Optional. Theme to customize. Defaults to current theme. + */ +function wp_customize_url( $stylesheet = null ) { + $url = admin_url( 'customize.php' ); + if ( $stylesheet ) + $url .= '?theme=' . $stylesheet; + return esc_url( $url ); +} + +/** + * Prints a script to check whether or not the customizer is supported, + * and apply either the no-customize-support or customize-support class + * to the body. + * + * This function MUST be called inside the body tag. + * + * Ideally, call this function immediately after the body tag is opened. + * This prevents a flash of unstyled content. + * + * It is also recommended that you add the "no-customize-support" class + * to the body tag by default. + * + * @since 3.4.0 + */ +function wp_customize_support_script() { + $admin_origin = parse_url( admin_url() ); + $home_origin = parse_url( home_url() ); + $cross_domain = ( strtolower( $admin_origin[ 'host' ] ) != strtolower( $home_origin[ 'host' ] ) ); + + ?> + + version_checked = $wp_version; } + // Wait 60 seconds between multiple version check requests + $timeout = 60; + $time_not_changed = isset( $current->last_checked ) && $timeout > ( time() - $current->last_checked ); + if ( $time_not_changed ) + return false; + $locale = apply_filters( 'core_version_check_locale', get_locale() ); // Update last_checked for current to prevent multiple blocking requests if request hangs @@ -85,10 +91,11 @@ function wp_version_check() { return false; $body = trim( wp_remote_retrieve_body( $response ) ); - if ( ! $body = maybe_unserialize( $body ) ) - return false; - if ( ! isset( $body['offers'] ) ) + $body = maybe_unserialize( $body ); + + if ( ! is_array( $body ) || ! isset( $body['offers'] ) ) return false; + $offers = $body['offers']; foreach ( $offers as &$offer ) { @@ -143,30 +150,44 @@ function wp_update_plugins() { $new_option = new stdClass; $new_option->last_checked = time(); - // Check for updated every 60 minutes if hitting update pages; else, check every 12 hours. - $timeout = in_array( current_filter(), array( 'load-plugins.php', 'load-update.php', 'load-update-core.php' ) ) ? 3600 : 43200; - $time_not_changed = isset( $current->last_checked ) && $timeout > ( time() - $current->last_checked ); - - $plugin_changed = false; - foreach ( $plugins as $file => $p ) { - $new_option->checked[ $file ] = $p['Version']; - if ( !isset( $current->checked[ $file ] ) || strval($current->checked[ $file ]) !== strval($p['Version']) ) - $plugin_changed = true; + // Check for update on a different schedule, depending on the page. + switch ( current_filter() ) { + case 'load-update-core.php' : + $timeout = 60; // 1 min + break; + case 'load-plugins.php' : + case 'load-update.php' : + $timeout = 3600; // 1 hour + break; + default : + $timeout = 43200; // 12 hours } - if ( isset ( $current->response ) && is_array( $current->response ) ) { - foreach ( $current->response as $plugin_file => $update_details ) { - if ( ! isset($plugins[ $plugin_file ]) ) { + $time_not_changed = isset( $current->last_checked ) && $timeout > ( time() - $current->last_checked ); + + if ( $time_not_changed ) { + $plugin_changed = false; + foreach ( $plugins as $file => $p ) { + $new_option->checked[ $file ] = $p['Version']; + + if ( !isset( $current->checked[ $file ] ) || strval($current->checked[ $file ]) !== strval($p['Version']) ) $plugin_changed = true; - break; + } + + if ( isset ( $current->response ) && is_array( $current->response ) ) { + foreach ( $current->response as $plugin_file => $update_details ) { + if ( ! isset($plugins[ $plugin_file ]) ) { + $plugin_changed = true; + break; + } } } - } - // Bail if we've checked in the last 12 hours and if nothing has changed - if ( $time_not_changed && !$plugin_changed ) - return false; + // Bail if we've checked recently and if nothing has changed + if ( ! $plugin_changed ) + return false; + } // Update last_checked for current to prevent multiple blocking requests if request hangs $current->last_checked = time(); @@ -185,9 +206,9 @@ function wp_update_plugins() { if ( is_wp_error( $raw_response ) || 200 != wp_remote_retrieve_response_code( $raw_response ) ) return false; - $response = unserialize( wp_remote_retrieve_body( $raw_response ) ); + $response = maybe_unserialize( wp_remote_retrieve_body( $raw_response ) ); - if ( false !== $response ) + if ( is_array( $response ) ) $new_option->response = $response; else $new_option->response = array(); @@ -214,57 +235,68 @@ function wp_update_themes() { if ( defined( 'WP_INSTALLING' ) ) return false; - if ( !function_exists( 'get_themes' ) ) - require_once( ABSPATH . 'wp-includes/theme.php' ); - - $installed_themes = get_themes( ); + $installed_themes = wp_get_themes(); $last_update = get_site_transient( 'update_themes' ); if ( ! is_object($last_update) ) $last_update = new stdClass; - // Check for updated every 60 minutes if hitting update pages; else, check every 12 hours. - $timeout = in_array( current_filter(), array( 'load-themes.php', 'load-update.php', 'load-update-core.php' ) ) ? 3600 : 43200; - $time_not_changed = isset( $last_update->last_checked ) && $timeout > ( time( ) - $last_update->last_checked ); - $themes = array(); $checked = array(); - $exclude_fields = array('Template Files', 'Stylesheet Files', 'Status', 'Theme Root', 'Theme Root URI', 'Template Dir', 'Stylesheet Dir', 'Description', 'Tags', 'Screenshot'); // Put slug of current theme into request. $themes['current_theme'] = get_option( 'stylesheet' ); - foreach ( (array) $installed_themes as $theme_title => $theme ) { - $themes[$theme['Stylesheet']] = array(); - $checked[$theme['Stylesheet']] = $theme['Version']; - - $themes[$theme['Stylesheet']]['Name'] = $theme['Name']; - $themes[$theme['Stylesheet']]['Version'] = $theme['Version']; + foreach ( $installed_themes as $theme ) { + $checked[ $theme->get_stylesheet() ] = $theme->get('Version'); + + $themes[ $theme->get_stylesheet() ] = array( + 'Name' => $theme->get('Name'), + 'Title' => $theme->get('Name'), + 'Version' => $theme->get('Version'), + 'Author' => $theme->get('Author'), + 'Author URI' => $theme->get('AuthorURI'), + 'Template' => $theme->get_template(), + 'Stylesheet' => $theme->get_stylesheet(), + ); + } - foreach ( (array) $theme as $key => $value ) { - if ( !in_array($key, $exclude_fields) ) - $themes[$theme['Stylesheet']][$key] = $value; - } + // Check for update on a different schedule, depending on the page. + switch ( current_filter() ) { + case 'load-update-core.php' : + $timeout = 60; // 1 min + break; + case 'load-themes.php' : + case 'load-update.php' : + $timeout = 3600; // 1 hour + break; + default : + $timeout = 43200; // 12 hours } - $theme_changed = false; - foreach ( $checked as $slug => $v ) { - $update_request->checked[ $slug ] = $v; + $time_not_changed = isset( $last_update->last_checked ) && $timeout > ( time( ) - $last_update->last_checked ); - if ( !isset( $last_update->checked[ $slug ] ) || strval($last_update->checked[ $slug ]) !== strval($v) ) - $theme_changed = true; - } + if ( $time_not_changed ) { + $theme_changed = false; + foreach ( $checked as $slug => $v ) { + $update_request->checked[ $slug ] = $v; - if ( isset ( $last_update->response ) && is_array( $last_update->response ) ) { - foreach ( $last_update->response as $slug => $update_details ) { - if ( ! isset($checked[ $slug ]) ) { + if ( !isset( $last_update->checked[ $slug ] ) || strval($last_update->checked[ $slug ]) !== strval($v) ) $theme_changed = true; - break; + } + + if ( isset ( $last_update->response ) && is_array( $last_update->response ) ) { + foreach ( $last_update->response as $slug => $update_details ) { + if ( ! isset($checked[ $slug ]) ) { + $theme_changed = true; + break; + } } } - } - if ( $time_not_changed && !$theme_changed ) - return false; + // Bail if we've checked recently and if nothing has changed + if ( ! $theme_changed ) + return false; + } // Update last_checked for current to prevent multiple blocking requests if request hangs $last_update->last_checked = time(); @@ -285,8 +317,8 @@ function wp_update_themes() { $new_update->last_checked = time( ); $new_update->checked = $checked; - $response = unserialize( wp_remote_retrieve_body( $raw_response ) ); - if ( false !== $response ) + $response = maybe_unserialize( wp_remote_retrieve_body( $raw_response ) ); + if ( is_array( $response ) ) $new_update->response = $response; set_site_transient( 'update_themes', $new_update ); @@ -397,7 +429,7 @@ function wp_schedule_update_checks() { wp_schedule_event(time(), 'twicedaily', 'wp_update_themes'); } -if ( ! is_main_site() && ! is_network_admin() ) +if ( ( ! is_main_site() && ! is_network_admin() ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) return; add_action( 'admin_init', '_maybe_update_core' ); @@ -416,5 +448,3 @@ add_action( 'admin_init', '_maybe_update_themes' ); add_action( 'wp_update_themes', 'wp_update_themes' ); add_action('init', 'wp_schedule_update_checks'); - -?> diff --git a/wp-includes/user.php b/wp-includes/user.php index cdec57e2..6b342c85 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -65,7 +65,6 @@ function wp_signon( $credentials = '', $secure_cookie = '' ) { return $user; } - /** * Authenticate the user using the username and password. */ @@ -154,7 +153,7 @@ function wp_authenticate_cookie($user, $username, $password) { function count_user_posts($userid) { global $wpdb; - $where = get_posts_by_author_sql('post', TRUE, $userid); + $where = get_posts_by_author_sql('post', true, $userid); $count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts $where" ); @@ -165,11 +164,12 @@ function count_user_posts($userid) { * Number of posts written by a list of users. * * @since 3.0.0 - * @param array $user_ids Array of user IDs. + * + * @param array $users Array of user IDs. * @param string|array $post_type Optional. Post type to check. Defaults to post. * @return array Amount of posts each user has written. */ -function count_many_users_posts($users, $post_type = 'post' ) { +function count_many_users_posts( $users, $post_type = 'post' ) { global $wpdb; $count = array(); @@ -259,7 +259,7 @@ function get_user_option( $option, $user = 0, $deprecated = '' ) { else $user = new WP_User( $user ); - if ( ! isset( $user->ID ) ) + if ( ! $user->exists() ) return false; if ( $user->has_prop( $wpdb->prefix . $option ) ) // Blog specific @@ -359,7 +359,6 @@ class WP_User_Query { var $query_orderby; var $query_limit; - /** * PHP5 constructor * @@ -379,6 +378,7 @@ class WP_User_Query { 'include' => array(), 'exclude' => array(), 'search' => '', + 'search_columns' => array(), 'orderby' => 'login', 'order' => 'ASC', 'offset' => '', @@ -477,14 +477,19 @@ class WP_User_Query { if ( $wild ) $search = trim($search, '*'); - if ( false !== strpos( $search, '@') ) - $search_columns = array('user_email'); - elseif ( is_numeric($search) ) - $search_columns = array('user_login', 'ID'); - elseif ( preg_match('|^https?://|', $search) ) - $search_columns = array('user_url'); - else - $search_columns = array('user_login', 'user_nicename'); + $search_columns = array(); + if ( $qv['search_columns'] ) + $search_columns = array_intersect( $qv['search_columns'], array( 'ID', 'user_login', 'user_email', 'user_url', 'user_nicename' ) ); + if ( ! $search_columns ) { + if ( false !== strpos( $search, '@') ) + $search_columns = array('user_email'); + elseif ( is_numeric($search) ) + $search_columns = array('user_login', 'ID'); + elseif ( preg_match('|^https?://|', $search) && ! wp_is_large_network( 'users' ) ) + $search_columns = array('user_url'); + else + $search_columns = array('user_login', 'user_nicename'); + } $this->query_where .= $this->get_search_sql( $search, $search_columns, $wild ); } @@ -647,7 +652,7 @@ function get_users( $args = array() ) { * * @param int $user_id User ID * @param bool $all Whether to retrieve all blogs, or only blogs that are not marked as deleted, archived, or spam. - * @return array A list of the user's blogs. False if the user was not found or an empty array if the user has no blogs. + * @return array A list of the user's blogs. An empty array if the user doesn't exist or belongs to no blogs. */ function get_blogs_of_user( $user_id, $all = false ) { global $wpdb; @@ -656,11 +661,11 @@ function get_blogs_of_user( $user_id, $all = false ) { // Logged out users can't have blogs if ( empty( $user_id ) ) - return false; + return array(); $keys = get_user_meta( $user_id ); if ( empty( $keys ) ) - return false; + return array(); if ( ! is_multisite() ) { $blog_id = get_current_blog_id(); @@ -725,8 +730,8 @@ function get_blogs_of_user( $user_id, $all = false ) { * @since MU 1.1 * @uses get_blogs_of_user() * - * @param int $user_id The unique ID of the user - * @param int $blog Optional. If no blog_id is provided, current site is used + * @param int $user_id Optional. The unique ID of the user. Defaults to the current user. + * @param int $blog_id Optional. ID of the blog to check. Defaults to the current site. * @return bool */ function is_user_member_of_blog( $user_id = 0, $blog_id = 0 ) { @@ -740,10 +745,7 @@ function is_user_member_of_blog( $user_id = 0, $blog_id = 0 ) { $blog_id = get_current_blog_id(); $blogs = get_blogs_of_user( $user_id ); - if ( is_array( $blogs ) ) - return array_key_exists( $blog_id, $blogs ); - else - return false; + return array_key_exists( $blog_id, $blogs ); } /** @@ -793,7 +795,7 @@ function delete_user_meta($user_id, $meta_key, $meta_value = '') { * @link http://codex.wordpress.org/Function_Reference/get_user_meta * * @param int $user_id Post ID. - * @param string $key The meta key to retrieve. + * @param string $key Optional. The meta key to retrieve. By default, returns data for all keys. * @param bool $single Whether to return a single value. * @return mixed Will be an array if $single is false. Will be value of meta data field if $single * is true. @@ -828,7 +830,7 @@ function update_user_meta($user_id, $meta_key, $meta_value, $prev_value = '') { * Count number of users who have each of the user roles. * * Assumes there are neither duplicated nor orphaned capabilities meta_values. - * Assumes role names are unique phrases. Same assumption made by WP_User_Query::prepare_query() + * Assumes role names are unique phrases. Same assumption made by WP_User_Query::prepare_query() * Using $strategy = 'time' this is CPU-intensive and should handle around 10^7 users. * Using $strategy = 'memory' this is memory-intensive and should handle around 10^5 users, but see WP Bug #12257. * @@ -855,7 +857,7 @@ function count_users($strategy = 'time') { // Build a CPU-intensive query that will return concise information. $select_count = array(); foreach ( $avail_roles as $this_role => $name ) { - $select_count[] = "COUNT(NULLIF(`meta_value` LIKE '%" . like_escape($this_role) . "%', FALSE))"; + $select_count[] = "COUNT(NULLIF(`meta_value` LIKE '%\"" . like_escape( $this_role ) . "\"%', false))"; } $select_count = implode(', ', $select_count); @@ -883,14 +885,14 @@ function count_users($strategy = 'time') { $users_of_blog = $wpdb->get_col( "SELECT meta_value FROM $wpdb->usermeta WHERE meta_key = '{$blog_prefix}capabilities'" ); foreach ( $users_of_blog as $caps_meta ) { - $b_roles = unserialize($caps_meta); - if ( is_array($b_roles) ) { - foreach ( $b_roles as $b_role => $val ) { - if ( isset($avail_roles[$b_role]) ) { - $avail_roles[$b_role]++; - } else { - $avail_roles[$b_role] = 1; - } + $b_roles = maybe_unserialize($caps_meta); + if ( ! is_array( $b_roles ) ) + continue; + foreach ( $b_roles as $b_role => $val ) { + if ( isset($avail_roles[$b_role]) ) { + $avail_roles[$b_role]++; + } else { + $avail_roles[$b_role] = 1; } } } @@ -935,17 +937,17 @@ function setup_userdata($for_user_id = '') { $user_ID = (int) $user->ID; $user_level = (int) isset($user->user_level) ? $user->user_level : 0; - if ( 0 == $user->ID ) { + if ( ! $user->exists() ) { $user_login = $user_email = $user_url = $user_pass_md5 = $user_identity = ''; return; } - $userdata = $user; - $user_login = $user->user_login; - $user_email = $user->user_email; - $user_url = $user->user_url; - $user_pass_md5 = md5($user->user_pass); - $user_identity = $user->display_name; + $userdata = $user; + $user_login = $user->user_login; + $user_email = $user->user_email; + $user_url = $user->user_url; + $user_pass_md5 = md5( $user->user_pass ); + $user_identity = $user->display_name; } /** @@ -974,7 +976,7 @@ function setup_userdata($for_user_id = '') { *
    • id - Default is the value of the 'name' parameter. ID attribute of select element.
    • *
    • class - Class attribute of select element.
    • *
    • blog_id - ID of blog (Multisite only). Defaults to ID of current blog.
    • - *
    • who - Which users to query. Currently only 'authors' is supported. Default is all users.
    • + *
    • who - Which users to query. Currently only 'authors' is supported. Default is all users.
    • * * * @since 2.3.0 @@ -1056,17 +1058,12 @@ function wp_dropdown_users( $args = '' ) { * when calling filters. * * @since 2.3.0 - * @uses apply_filters() Calls 'edit_$field' and '{$field_no_prefix}_edit_pre' passing $value and - * $user_id if $context == 'edit' and field name prefix == 'user_'. - * - * @uses apply_filters() Calls 'edit_user_$field' passing $value and $user_id if $context == 'db'. - * @uses apply_filters() Calls 'pre_$field' passing $value if $context == 'db' and field name prefix == 'user_'. - * @uses apply_filters() Calls '{$field}_pre' passing $value if $context == 'db' and field name prefix != 'user_'. - * + * @uses apply_filters() Calls 'edit_$field' passing $value and $user_id if $context == 'edit'. + * $field is prefixed with 'user_' if it isn't already. + * @uses apply_filters() Calls 'pre_$field' passing $value if $context == 'db'. $field is prefixed with + * 'user_' if it isn't already. * @uses apply_filters() Calls '$field' passing $value, $user_id and $context if $context == anything - * other than 'raw', 'edit' and 'db' and field name prefix == 'user_'. - * @uses apply_filters() Calls 'user_$field' passing $value if $context == anything other than 'raw', - * 'edit' and 'db' and field name prefix != 'user_'. + * other than 'raw', 'edit' and 'db'. $field is prefixed with 'user_' if it isn't already. * * @param string $field The user Object field name. * @param mixed $value The user Object value. @@ -1086,11 +1083,7 @@ function sanitize_user_field($field, $value, $user_id, $context) { if ( !is_string($value) && !is_numeric($value) ) return $value; - $prefixed = false; - if ( false !== strpos($field, 'user_') ) { - $prefixed = true; - $field_no_prefix = str_replace('user_', '', $field); - } + $prefixed = false !== strpos( $field, 'user_' ); if ( 'edit' == $context ) { if ( $prefixed ) { @@ -1147,15 +1140,19 @@ function update_user_caches($user) { * * @since 3.0.0 * - * @param int $id User ID + * @param WP_User|int $user User object or ID to be cleaned from the cache */ -function clean_user_cache($id) { - $user = WP_User::get_data_by( 'id', $id ); +function clean_user_cache( $user ) { + if ( is_numeric( $user ) ) + $user = new WP_User( $user ); - wp_cache_delete($id, 'users'); - wp_cache_delete($user->user_login, 'userlogins'); - wp_cache_delete($user->user_email, 'useremail'); - wp_cache_delete($user->user_nicename, 'userslugs'); + if ( ! $user->exists() ) + return; + + wp_cache_delete( $user->ID, 'users' ); + wp_cache_delete( $user->user_login, 'userlogins' ); + wp_cache_delete( $user->user_email, 'useremail' ); + wp_cache_delete( $user->user_nicename, 'userslugs' ); } /** @@ -1461,7 +1458,6 @@ function wp_create_user($username, $password, $email = '') { return wp_insert_user($userdata); } - /** * Return a list of meta keys that wp_insert_user() is supposed to set. * @@ -1493,5 +1489,3 @@ function _wp_get_user_contactmethods( $user = null ) { ); return apply_filters( 'user_contactmethods', $user_contactmethods, $user ); } - -?> diff --git a/wp-includes/vars.php b/wp-includes/vars.php index 3b824a95..7585793d 100644 --- a/wp-includes/vars.php +++ b/wp-includes/vars.php @@ -98,4 +98,29 @@ $is_IIS = !$is_apache && (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') ! */ $is_iis7 = $is_IIS && (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/7.') !== false); -?> +/** + * Test if the current browser runs on a mobile device (smart phone, tablet, etc.) + * + * @return bool true|false + */ +function wp_is_mobile() { + static $is_mobile; + + if ( isset($is_mobile) ) + return $is_mobile; + + if ( empty($_SERVER['HTTP_USER_AGENT']) ) { + $is_mobile = false; + } elseif ( strpos($_SERVER['HTTP_USER_AGENT'], 'Mobile') !== false // many mobile devices (all iPhone, iPad, etc.) + || strpos($_SERVER['HTTP_USER_AGENT'], 'Android') !== false + || strpos($_SERVER['HTTP_USER_AGENT'], 'Silk/') !== false + || strpos($_SERVER['HTTP_USER_AGENT'], 'Kindle') !== false + || strpos($_SERVER['HTTP_USER_AGENT'], 'BlackBerry') !== false + || strpos($_SERVER['HTTP_USER_AGENT'], 'Opera Mini') !== false ) { + $is_mobile = true; + } else { + $is_mobile = false; + } + + return $is_mobile; +} diff --git a/wp-includes/version.php b/wp-includes/version.php index 67e53dcd..e65b0c8d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,21 +4,21 @@ * * @global string $wp_version */ -$wp_version = '3.3.2'; +$wp_version = '3.4'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * * @global int $wp_db_version */ -$wp_db_version = 19470; +$wp_db_version = 20596; /** * Holds the TinyMCE version * * @global string $tinymce_version */ -$tinymce_version = '345-20111127'; +$tinymce_version = '349-20805'; /** * Holds the cache manifest version diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php index 2dfafcb5..765bbffc 100644 --- a/wp-includes/widgets.php +++ b/wp-includes/widgets.php @@ -681,7 +681,6 @@ function wp_sidebar_description( $id ) { return esc_html( $wp_registered_sidebars[$id]['description'] ); } - /** * Remove widget from sidebar. * @@ -1149,7 +1148,7 @@ function _get_widget_id_base($id) { * Handle sidebars config after theme change * * @access private - * @since 3.3 + * @since 3.3.0 */ function _wp_sidebars_changed() { global $sidebars_widgets; diff --git a/wp-includes/wlwmanifest.xml b/wp-includes/wlwmanifest.xml index eb131473..98504ee4 100644 --- a/wp-includes/wlwmanifest.xml +++ b/wp-includes/wlwmanifest.xml @@ -41,4 +41,3 @@ - diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index e9ada84d..f4187459 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -404,9 +404,10 @@ class wpdb { * Keys are column names, values are format types: 'ID' => '%d' * * @since 2.8.0 - * @see wpdb:prepare() - * @see wpdb:insert() - * @see wpdb:update() + * @see wpdb::prepare() + * @see wpdb::insert() + * @see wpdb::update() + * @see wpdb::delete() * @see wp_set_wpdb_vars() * @access public * @var array @@ -573,7 +574,7 @@ class wpdb { function set_prefix( $prefix, $set_table_names = true ) { if ( preg_match( '|[^a-z0-9_]|i', $prefix ) ) - return new WP_Error('invalid_db_prefix', /*WP_I18N_DB_BAD_PREFIX*/'Invalid database prefix'/*/WP_I18N_DB_BAD_PREFIX*/); + return new WP_Error('invalid_db_prefix', 'Invalid database prefix' ); $old_prefix = is_multisite() ? '' : $prefix; @@ -745,14 +746,15 @@ class wpdb { if ( !@mysql_select_db( $db, $dbh ) ) { $this->ready = false; - $this->bail( sprintf( /*WP_I18N_DB_SELECT_DB*/'

      Can’t select database

      + wp_load_translations_early(); + $this->bail( sprintf( __( '

      Can’t select database

      We were able to connect to the database server (which means your username and password is okay) but not able to select the %1$s database.

      • Are you sure it exists?
      • Does the user %2$s have permission to use the %1$s database?
      • On some systems the name of your database is prefixed with your username, so it would be like username_%1$s. Could that be the problem?
      -

      If you don\'t know how to set up a database you should contact your host. If all else fails you may find help at the WordPress Support Forums.

      '/*/WP_I18N_DB_SELECT_DB*/, htmlspecialchars( $db, ENT_QUOTES ), htmlspecialchars( $this->dbuser, ENT_QUOTES ) ), 'db_select_fail' ); +

      If you don\'t know how to set up a database you should contact your host. If all else fails you may find help at the WordPress Support Forums.

      ' ), htmlspecialchars( $db, ENT_QUOTES ), htmlspecialchars( $this->dbuser, ENT_QUOTES ) ), 'db_select_fail' ); return; } } @@ -923,10 +925,12 @@ class wpdb { if ( $this->suppress_errors ) return false; + wp_load_translations_early(); + if ( $caller = $this->get_caller() ) - $error_str = sprintf( /*WP_I18N_DB_QUERY_ERROR_FULL*/'WordPress database error %1$s for query %2$s made by %3$s'/*/WP_I18N_DB_QUERY_ERROR_FULL*/, $str, $this->last_query, $caller ); + $error_str = sprintf( __( 'WordPress database error %1$s for query %2$s made by %3$s' ), $str, $this->last_query, $caller ); else - $error_str = sprintf( /*WP_I18N_DB_QUERY_ERROR*/'WordPress database error %1$s for query %2$s'/*/WP_I18N_DB_QUERY_ERROR*/, $str, $this->last_query ); + $error_str = sprintf( __( 'WordPress database error %1$s for query %2$s' ), $str, $this->last_query ); if ( function_exists( 'error_log' ) && ( $log_file = @ini_get( 'error_log' ) ) @@ -1037,7 +1041,8 @@ class wpdb { } if ( !$this->dbh ) { - $this->bail( sprintf( /*WP_I18N_DB_CONN_ERROR*/" + wp_load_translations_early(); + $this->bail( sprintf( __( "

      Error establishing a database connection

      This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at %s. This could mean your host's database server is down.

        @@ -1046,7 +1051,7 @@ class wpdb {
      • Are you sure that the database server is running?

      If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

      -"/*/WP_I18N_DB_CONN_ERROR*/, htmlspecialchars( $this->dbhost, ENT_QUOTES ) ), 'db_connect_fail' ); +" ), htmlspecialchars( $this->dbhost, ENT_QUOTES ) ), 'db_connect_fail' ); return; } @@ -1073,8 +1078,7 @@ class wpdb { return false; // some queries are made before the plugins have been loaded, and thus cannot be filtered with this method - if ( function_exists( 'apply_filters' ) ) - $query = apply_filters( 'query', $query ); + $query = apply_filters( 'query', $query ); $return_val = 0; $this->flush(); @@ -1191,7 +1195,7 @@ class wpdb { * @see wp_set_wpdb_vars() * * @param string $table table name - * @param array $data Data to insert (in column => value pairs). Both $data columns and $data values should be "raw" (neither should be SQL escaped). + * @param array $data Data to insert (in column => value pairs). Both $data columns and $data values should be "raw" (neither should be SQL escaped). * @param array|string $format Optional. An array of formats to be mapped to each of the value in $data. If string, that format will be used for all of the values in $data. * A format is one of '%d', '%f', '%s' (integer, float, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types. * @param string $type Optional. What type of operation is this? INSERT or REPLACE. Defaults to INSERT. @@ -1212,7 +1216,7 @@ class wpdb { $form = '%s'; $formatted_fields[] = $form; } - $sql = "{$type} INTO `$table` (`" . implode( '`,`', $fields ) . "`) VALUES ('" . implode( "','", $formatted_fields ) . "')"; + $sql = "{$type} INTO `$table` (`" . implode( '`,`', $fields ) . "`) VALUES (" . implode( ",", $formatted_fields ) . ")"; return $this->query( $this->prepare( $sql, $data ) ); } @@ -1234,7 +1238,7 @@ class wpdb { * @param array $where A named array of WHERE clauses (in column => value pairs). Multiple clauses will be joined with ANDs. Both $where columns and $where values should be "raw". * @param array|string $format Optional. An array of formats to be mapped to each of the values in $data. If string, that format will be used for all of the values in $data. * A format is one of '%d', '%f', '%s' (integer, float, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types. - * @param array|string $where_format Optional. An array of formats to be mapped to each of the values in $where. If string, that format will be used for all of the items in $where. A format is one of '%d', '%f', '%s' (integer, float, string). If omitted, all values in $where will be treated as strings. + * @param array|string $where_format Optional. An array of formats to be mapped to each of the values in $where. If string, that format will be used for all of the items in $where. A format is one of '%d', '%f', '%s' (integer, float, string). If omitted, all values in $where will be treated as strings. * @return int|false The number of rows updated, or false on error. */ function update( $table, $data, $where, $format = null, $where_format = null ) { @@ -1268,6 +1272,49 @@ class wpdb { return $this->query( $this->prepare( $sql, array_merge( array_values( $data ), array_values( $where ) ) ) ); } + /** + * Delete a row in the table + * + * + * wpdb::delete( 'table', array( 'ID' => 1 ) ) + * wpdb::delete( 'table', array( 'ID' => 1 ), array( '%d' ) ) + * + * + * @since 3.4.0 + * @see wpdb::prepare() + * @see wpdb::$field_types + * @see wp_set_wpdb_vars() + * + * @param string $table table name + * @param array $where A named array of WHERE clauses (in column => value pairs). Multiple clauses will be joined with ANDs. Both $where columns and $where values should be "raw". + * @param array|string $where_format Optional. An array of formats to be mapped to each of the values in $where. If string, that format will be used for all of the items in $where. A format is one of '%d', '%f', '%s' (integer, float, string). If omitted, all values in $where will be treated as strings unless otherwise specified in wpdb::$field_types. + * @return int|false The number of rows updated, or false on error. + */ + function delete( $table, $where, $where_format = null ) { + if ( ! is_array( $where ) ) + return false; + + $bits = $wheres = array(); + + $where_formats = $where_format = (array) $where_format; + + foreach ( array_keys( $where ) as $field ) { + if ( !empty( $where_format ) ) { + $form = ( $form = array_shift( $where_formats ) ) ? $form : $where_format[0]; + } elseif ( isset( $this->field_types[ $field ] ) ) { + $form = $this->field_types[ $field ]; + } else { + $form = '%s'; + } + + $wheres[] = "$field = $form"; + } + + $sql = "DELETE FROM $table WHERE " . implode( ' AND ', $wheres ); + return $this->query( $this->prepare( $sql, $where ) ); + } + + /** * Retrieve one variable from the database. * @@ -1278,8 +1325,8 @@ class wpdb { * @since 0.71 * * @param string|null $query Optional. SQL query. Defaults to null, use the result from the previous query. - * @param int $x Optional. Column of value to return. Indexed from 0. - * @param int $y Optional. Row of value to return. Indexed from 0. + * @param int $x Optional. Column of value to return. Indexed from 0. + * @param int $y Optional. Row of value to return. Indexed from 0. * @return string|null Database query result (as string), or null on failure */ function get_var( $query = null, $x = 0, $y = 0 ) { @@ -1326,7 +1373,7 @@ class wpdb { } elseif ( $output == ARRAY_N ) { return $this->last_result[$y] ? array_values( get_object_vars( $this->last_result[$y] ) ) : null; } else { - $this->print_error(/*WP_I18N_DB_GETROW_ERROR*/" \$db->get_row(string query, output type, int offset) -- Output type must be one of: OBJECT, ARRAY_A, ARRAY_N"/*/WP_I18N_DB_GETROW_ERROR*/); + $this->print_error( " \$db->get_row(string query, output type, int offset) -- Output type must be one of: OBJECT, ARRAY_A, ARRAY_N" ); } } @@ -1365,7 +1412,7 @@ class wpdb { * @param string $query SQL query. * @param string $output Optional. Any of ARRAY_A | ARRAY_N | OBJECT | OBJECT_K constants. With one of the first three, return an array of rows indexed from 0 by SQL result row number. * Each row is an associative array (column => value, ...), a numerically indexed array (0 => value, ...), or an object. ( ->column = value ), respectively. - * With OBJECT_K, return an associative array of row objects keyed by the value of each row's first column's value. Duplicate keys are discarded. + * With OBJECT_K, return an associative array of row objects keyed by the value of each row's first column's value. Duplicate keys are discarded. * @return mixed Database query results */ function get_results( $query = null, $output = OBJECT ) { @@ -1441,8 +1488,7 @@ class wpdb { * @return true */ function timer_start() { - $mtime = explode( ' ', microtime() ); - $this->time_start = $mtime[1] + $mtime[0]; + $this->time_start = microtime( true ); return true; } @@ -1451,13 +1497,10 @@ class wpdb { * * @since 1.5.0 * - * @return int Total time spent on the query, in milliseconds + * @return float Total time spent on the query, in seconds */ function timer_stop() { - $mtime = explode( ' ', microtime() ); - $time_end = $mtime[1] + $mtime[0]; - $time_total = $time_end - $this->time_start; - return $time_total; + return ( microtime( true ) - $this->time_start ); } /** @@ -1546,16 +1589,7 @@ class wpdb { * @return string The name of the calling function */ function get_caller() { - $trace = array_reverse( debug_backtrace() ); - $caller = array(); - - foreach ( $trace as $call ) { - if ( isset( $call['class'] ) && __CLASS__ == $call['class'] ) - continue; // Filter out wpdb calls. - $caller[] = isset( $call['class'] ) ? "{$call['class']}->{$call['function']}" : $call['function']; - } - - return join( ', ', $caller ); + return wp_debug_backtrace_summary( __CLASS__ ); } /** @@ -1569,5 +1603,3 @@ class wpdb { return preg_replace( '/[^0-9.].*/', '', mysql_get_server_info( $this->dbh ) ); } } - -?> diff --git a/wp-includes/wp-diff.php b/wp-includes/wp-diff.php index ed36ee90..052bf133 100644 --- a/wp-includes/wp-diff.php +++ b/wp-includes/wp-diff.php @@ -202,15 +202,14 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { $r = ''; // Does the aforementioned additional processing - // *_matches tell what rows are "the same" in orig and final. Those pairs will be diffed to get word changes + // *_matches tell what rows are "the same" in orig and final. Those pairs will be diffed to get word changes // match is numeric: an index in other column - // match is 'X': no match. It is a new row + // match is 'X': no match. It is a new row // *_rows are column vectors for the orig column and the final column. // row >= 0: an indix of the $orig or $final array // row < 0: a blank row for that column list($orig_matches, $final_matches, $orig_rows, $final_rows) = $this->interleave_changed_lines( $orig, $final ); - // These will hold the word changes as determined by an inline diff $orig_diffs = array(); $final_diffs = array(); @@ -231,7 +230,7 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { $stripped_diff = strlen(strip_tags( $diff )) * 2 - $stripped_matches; $diff_ratio = $stripped_matches / $stripped_diff; if ( $diff_ratio > $this->_diff_threshold ) - continue; // Too different. Don't save diffs. + continue; // Too different. Don't save diffs. } // Un-inline the diffs by removing del or ins @@ -241,11 +240,11 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { } foreach ( array_keys($orig_rows) as $row ) { - // Both columns have blanks. Ignore them. + // Both columns have blanks. Ignore them. if ( $orig_rows[$row] < 0 && $final_rows[$row] < 0 ) continue; - // If we have a word based diff, use it. Otherwise, use the normal line. + // If we have a word based diff, use it. Otherwise, use the normal line. if ( isset( $orig_diffs[$orig_rows[$row]] ) ) $orig_line = $orig_diffs[$orig_rows[$row]]; elseif ( isset( $orig[$orig_rows[$row]] ) ) @@ -260,9 +259,9 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { else $final_line = ''; - if ( $orig_rows[$row] < 0 ) { // Orig is blank. This is really an added row. + if ( $orig_rows[$row] < 0 ) { // Orig is blank. This is really an added row. $r .= $this->_added( array($final_line), false ); - } elseif ( $final_rows[$row] < 0 ) { // Final is blank. This is really a deleted row. + } elseif ( $final_rows[$row] < 0 ) { // Final is blank. This is really a deleted row. $r .= $this->_deleted( array($orig_line), false ); } else { // A true changed row. $r .= '' . $this->deletedLine( $orig_line ) . $this->addedLine( $final_line ) . "\n"; @@ -288,7 +287,7 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { */ function interleave_changed_lines( $orig, $final ) { - // Contains all pairwise string comparisons. Keys are such that this need only be a one dimensional array. + // Contains all pairwise string comparisons. Keys are such that this need only be a one dimensional array. $matches = array(); foreach ( array_keys($orig) as $o ) { foreach ( array_keys($final) as $f ) { @@ -309,7 +308,7 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { if ( isset($orig_matches[$o]) && isset($final_matches[$f]) ) continue; - // First match for these guys. Must be best match + // First match for these guys. Must be best match if ( !isset($orig_matches[$o]) && !isset($final_matches[$f]) ) { $orig_matches[$o] = $f; $final_matches[$f] = $o; @@ -329,7 +328,6 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { ksort($orig_matches); ksort($final_matches); - // Stores rows and blanks for each column. $orig_rows = $orig_rows_copy = array_keys($orig_matches); $final_rows = array_keys($final_matches); @@ -342,18 +340,17 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { if ( false === $final_pos ) { // This orig is paired with a blank final. array_splice( $final_rows, $orig_pos, 0, -1 ); - } elseif ( $final_pos < $orig_pos ) { // This orig's match is up a ways. Pad final with blank rows. + } elseif ( $final_pos < $orig_pos ) { // This orig's match is up a ways. Pad final with blank rows. $diff_pos = $final_pos - $orig_pos; while ( $diff_pos < 0 ) array_splice( $final_rows, $orig_pos, 0, $diff_pos++ ); - } elseif ( $final_pos > $orig_pos ) { // This orig's match is down a ways. Pad orig with blank rows. + } elseif ( $final_pos > $orig_pos ) { // This orig's match is down a ways. Pad orig with blank rows. $diff_pos = $orig_pos - $final_pos; while ( $diff_pos < 0 ) array_splice( $orig_rows, $orig_pos, 0, $diff_pos++ ); } } - // Pad the ends with blank rows if the columns aren't the same length $diff_count = count($orig_rows) - count($final_rows); if ( $diff_count < 0 ) { @@ -427,7 +424,7 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { // L1-norm of difference vector. $difference = array_sum( array_map( array(&$this, 'difference'), $chars1, $chars2 ) ); - // $string1 has zero length? Odd. Give huge penalty by not dividing. + // $string1 has zero length? Odd. Give huge penalty by not dividing. if ( !$string1 ) return $difference; @@ -473,5 +470,3 @@ class WP_Text_Diff_Renderer_inline extends Text_Diff_Renderer_inline { } } - -?> diff --git a/wp-load.php b/wp-load.php index b9ae7e8a..600805a2 100644 --- a/wp-load.php +++ b/wp-load.php @@ -18,7 +18,7 @@ * @package WordPress */ -/** Define ABSPATH as this files directory */ +/** Define ABSPATH as this file's directory */ define( 'ABSPATH', dirname(__FILE__) . '/' ); error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR ); @@ -30,7 +30,7 @@ if ( file_exists( ABSPATH . 'wp-config.php') ) { } elseif ( file_exists( dirname(ABSPATH) . '/wp-config.php' ) && ! file_exists( dirname(ABSPATH) . '/wp-settings.php' ) ) { - /** The config file resides one level above ABSPATH but is not part of another install*/ + /** The config file resides one level above ABSPATH but is not part of another install */ require_once( dirname(ABSPATH) . '/wp-config.php' ); } else { @@ -39,22 +39,23 @@ if ( file_exists( ABSPATH . 'wp-config.php') ) { // Set a path for the link to the installer if ( strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false ) - $path = ''; + $path = 'setup-config.php'; else - $path = 'wp-admin/'; + $path = 'wp-admin/setup-config.php'; - require_once( ABSPATH . '/wp-includes/load.php' ); - require_once( ABSPATH . '/wp-includes/version.php' ); + define( 'WPINC', 'wp-includes' ); define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); + require_once( ABSPATH . WPINC . '/load.php' ); + require_once( ABSPATH . WPINC . '/version.php' ); + + wp_load_translations_early(); wp_check_php_mysql_versions(); // Die with an error message - require_once( ABSPATH . '/wp-includes/class-wp-error.php' ); - require_once( ABSPATH . '/wp-includes/functions.php' ); - require_once( ABSPATH . '/wp-includes/plugin.php' ); - $text_direction = /*WP_I18N_TEXT_DIRECTION*/'ltr'/*/WP_I18N_TEXT_DIRECTION*/; - wp_die(sprintf(/*WP_I18N_NO_CONFIG*/"

      There doesn't seem to be a wp-config.php file. I need this before we can get started.

      Need more help? We got it.

      You can create a wp-config.php file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.

      Create a Configuration File

      "/*/WP_I18N_NO_CONFIG*/, $path), /*WP_I18N_ERROR_TITLE*/'WordPress › Error'/*/WP_I18N_ERROR_TITLE*/, array('text_direction' => $text_direction)); + $die = __( "There doesn't seem to be a wp-config.php file. I need this before we can get started." ) . '

      '; + $die .= '

      ' . __( "Need more help? We got it." ) . '

      '; + $die .= '

      ' . __( "You can create a wp-config.php file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file." ) . '

      '; + $die .= '

      ' . __( "Create a Configuration File" ) . ''; + wp_die( $die, __( 'WordPress › Error' ) ); } - -?> \ No newline at end of file diff --git a/wp-login.php b/wp-login.php index efd03736..0b1df607 100644 --- a/wp-login.php +++ b/wp-login.php @@ -39,7 +39,7 @@ if ( force_ssl_admin() && !is_ssl() ) { * @param WP_Error $wp_error Optional. WordPress Error Object */ function login_header($title = 'Log In', $message = '', $wp_error = '') { - global $error, $is_iphone, $interim_login, $current_site; + global $error, $interim_login, $current_site, $customize_login; // Don't index any of these forms add_action( 'login_head', 'wp_no_robots' ); @@ -54,39 +54,53 @@ function login_header($title = 'Log In', $message = '', $wp_error = '') { if ( $shake_error_codes && $wp_error->get_error_code() && in_array( $wp_error->get_error_code(), $shake_error_codes ) ) add_action( 'login_head', 'wp_shake_js', 12 ); - ?> - -> - + ?> + > + <?php bloginfo('name'); ?> › <?php echo $title; ?> - - - - + - - - -

      - -

      -site_name; + } else { + $login_header_url = __( 'http://wordpress.org/' ); + $login_header_title = __( 'Powered by WordPress' ); + } + + $login_header_url = apply_filters( 'login_headerurl', $login_header_url ); + $login_header_title = apply_filters( 'login_headertitle', $login_header_title ); + + // Don't allow interim logins to navigate away from the page. + if ( $interim_login ) + $login_header_url = '#'; + + ?> + + +
      +

      + + global $interim_login; + + // Don't allow interim logins to navigate away from the page. + if ( ! $interim_login ): ?>

      -
      + - - - +
      - -
      - - - + + + + +
      + + + -

      -

      -
      + login_header( '', $message ); + + if ( ! $customize_login ) : ?> + +

      +

      +
      + + + add('test_cookie', __("ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.")); // Some parts of this script use the main login form to display a message - if ( isset($_GET['loggedout']) && TRUE == $_GET['loggedout'] ) + if ( isset($_GET['loggedout']) && true == $_GET['loggedout'] ) $errors->add('loggedout', __('You are now logged out.'), 'message'); elseif ( isset($_GET['registration']) && 'disabled' == $_GET['registration'] ) $errors->add('registerdisabled', __('User registration is currently not allowed.')); @@ -615,6 +658,8 @@ default: $errors->add('registered', __('Registration complete. Please check your e-mail.'), 'message'); elseif ( $interim_login ) $errors->add('expired', __('Your session has expired. Please log-in again.'), 'message'); + elseif ( strpos( $redirect_to, 'about.php?updated' ) ) + $errors->add('updated', __( 'You have successfully updated WordPress! Please log back in to experience the awesomeness.' ), 'message' ); // Clear any stale cookies. if ( $reauth ) @@ -645,6 +690,9 @@ default: + + +

      @@ -691,4 +739,3 @@ if(typeof wpOnload=='function')wpOnload(); login_footer(); break; } // end action switch -?> diff --git a/wp-mail.php b/wp-mail.php index 4ecc9548..7fc3967b 100644 --- a/wp-mail.php +++ b/wp-mail.php @@ -105,7 +105,7 @@ for ( $i = 1; $i <= $count; $i++ ) { // Set the author using the email address (From or Reply-To, the last used) // otherwise use the site admin - if ( preg_match('/(From|Reply-To): /', $line) ) { + if ( ! $author_found && preg_match( '/^(From|Reply-To): /', $line ) ) { if ( preg_match('|[a-z0-9_.-]+@[a-z0-9_.-]+(?!.*<)|i', $line, $matches) ) $author = $matches[0]; else @@ -114,14 +114,10 @@ for ( $i = 1; $i <= $count; $i++ ) { if ( is_email($author) ) { echo '

      ' . sprintf(__('Author is %s'), $author) . '

      '; $userdata = get_user_by('email', $author); - if ( empty($userdata) ) { - $author_found = false; - } else { + if ( ! empty( $userdata ) ) { $post_author = $userdata->ID; $author_found = true; } - } else { - $author_found = false; } } @@ -161,7 +157,7 @@ for ( $i = 1; $i <= $count; $i++ ) { $user = new WP_User($post_author); $post_status = ( $user->has_cap('publish_posts') ) ? 'publish' : 'pending'; } else { - // Author not found in DB, set status to pending. Author already set to admin. + // Author not found in DB, set status to pending. Author already set to admin. $post_status = 'pending'; } @@ -226,11 +222,9 @@ for ( $i = 1; $i <= $count; $i++ ) { $pop3->reset(); exit; } else { - echo '

      ' . sprintf(__('Mission complete. Message %s deleted.'), $i) . '

      '; + echo '

      ' . sprintf(__('Mission complete. Message %s deleted.'), $i) . '

      '; } } $pop3->quit(); - -?> diff --git a/wp-pass.php b/wp-pass.php deleted file mode 100644 index 556deab9..00000000 --- a/wp-pass.php +++ /dev/null @@ -1,17 +0,0 @@ - diff --git a/wp-register.php b/wp-register.php deleted file mode 100644 index 0b1a7697..00000000 --- a/wp-register.php +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/wp-settings.php b/wp-settings.php index 7897e734..cb950184 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -70,6 +70,7 @@ require( ABSPATH . WPINC . '/functions.php' ); require( ABSPATH . WPINC . '/class-wp.php' ); require( ABSPATH . WPINC . '/class-wp-error.php' ); require( ABSPATH . WPINC . '/plugin.php' ); +require( ABSPATH . WPINC . '/pomo/mo.php' ); // Include the wpdb class and, if present, a db.php database drop-in. require_wp_db(); @@ -81,9 +82,8 @@ wp_set_wpdb_vars(); // Start the WordPress object cache, or an external object cache if the drop-in is present. wp_start_object_cache(); -// Load early WordPress files. +// Attach the default filters. require( ABSPATH . WPINC . '/default-filters.php' ); -require( ABSPATH . WPINC . '/pomo/mo.php' ); // Initialize multisite if enabled. if ( is_multisite() ) { @@ -99,13 +99,12 @@ register_shutdown_function( 'shutdown_action_hook' ); if ( SHORTINIT ) return false; -// Load the l18n library. -require( ABSPATH . WPINC . '/l10n.php' ); +// Load the L10n library. +require_once( ABSPATH . WPINC . '/l10n.php' ); // Run the installer if WordPress is not installed. wp_not_installed(); - // Load most of WordPress. require( ABSPATH . WPINC . '/class-wp-walker.php' ); require( ABSPATH . WPINC . '/class-wp-ajax-response.php' ); @@ -113,6 +112,8 @@ require( ABSPATH . WPINC . '/formatting.php' ); require( ABSPATH . WPINC . '/capabilities.php' ); require( ABSPATH . WPINC . '/query.php' ); require( ABSPATH . WPINC . '/theme.php' ); +require( ABSPATH . WPINC . '/class-wp-theme.php' ); +require( ABSPATH . WPINC . '/template.php' ); require( ABSPATH . WPINC . '/user.php' ); require( ABSPATH . WPINC . '/meta.php' ); require( ABSPATH . WPINC . '/general-template.php' ); @@ -120,6 +121,7 @@ require( ABSPATH . WPINC . '/link-template.php' ); require( ABSPATH . WPINC . '/author-template.php' ); require( ABSPATH . WPINC . '/post.php' ); require( ABSPATH . WPINC . '/post-template.php' ); +require( ABSPATH . WPINC . '/post-thumbnail-template.php' ); require( ABSPATH . WPINC . '/category.php' ); require( ABSPATH . WPINC . '/category-template.php' ); require( ABSPATH . WPINC . '/comment.php' ); @@ -237,7 +239,7 @@ $wp_query =& $wp_the_query; * @global object $wp_rewrite * @since 1.5.0 */ -$wp_rewrite = new WP_Rewrite(); +$GLOBALS['wp_rewrite'] = new WP_Rewrite(); /** * WordPress Object @@ -261,15 +263,14 @@ wp_templating_constants( ); // Load the default text localization domain. load_default_textdomain(); -// Find the blog locale. $locale = get_locale(); $locale_file = WP_LANG_DIR . "/$locale.php"; if ( ( 0 === validate_file( $locale ) ) && is_readable( $locale_file ) ) require( $locale_file ); -unset($locale_file); +unset( $locale_file ); // Pull in locale data after loading text domain. -require( ABSPATH . WPINC . '/locale.php' ); +require_once( ABSPATH . WPINC . '/locale.php' ); /** * WordPress Locale object for loading locale domain date and various strings. @@ -288,9 +289,6 @@ if ( ! defined( 'WP_INSTALLING' ) || 'wp-activate.php' === $pagenow ) { do_action( 'after_setup_theme' ); -// Load any template functions the theme supports. -require_if_theme_supports( 'post-thumbnails', ABSPATH . WPINC . '/post-thumbnail-template.php' ); - // Set up current user. $wp->init(); @@ -323,4 +321,3 @@ if ( is_multisite() ) { * @since 3.0.0 */ do_action('wp_loaded'); -?> diff --git a/wp-signup.php b/wp-signup.php index 6fa1742f..2cd93c82 100644 --- a/wp-signup.php +++ b/wp-signup.php @@ -95,7 +95,7 @@ function show_blog_form($blogname = '', $blog_title = '', $errors = '') {

      - +

      {$blog_title}" ) ?>

      - http://%2$s is your new site. Log in as “%4$s” using your existing password.' ), $domain.$path, $domain.$path, "http://" . $domain.$path . "wp-login.php", $user_name ) ?> + http://%2$s is your new site. Log in as “%4$s” using your existing password.' ), $domain.$path, $domain.$path, "http://" . $domain.$path . "wp-login.php", $user_name ) ?>

      $user_name, 'user_email' => $user_email, 'errors' => $errors )); @@ -257,10 +252,10 @@ function signup_user($user_name = '', $user_email = '', $errors = '') { - /> + />
      - /> + />

      @@ -294,7 +289,7 @@ function confirm_user_signup($user_name, $user_email) { ?>

      you must activate it.' ) ?>

      -

      %1$s and click the link given.' ), $user_email) ?>

      +

      %s and click the link given.' ), $user_email ); ?>

      insert_id); trackback_response(0); } -?> \ No newline at end of file diff --git a/xmlrpc.php b/xmlrpc.php index ff7bfcde..2d3822ca 100644 --- a/xmlrpc.php +++ b/xmlrpc.php @@ -54,9 +54,6 @@ include_once(ABSPATH . 'wp-admin/includes/admin.php'); include_once(ABSPATH . WPINC . '/class-IXR.php'); include_once(ABSPATH . WPINC . '/class-wp-xmlrpc-server.php'); -// Turn off all warnings and errors. -// error_reporting(0); - /** * Posts submitted via the xmlrpc interface get that title * @name post_default_title @@ -64,47 +61,26 @@ include_once(ABSPATH . WPINC . '/class-wp-xmlrpc-server.php'); */ $post_default_title = ""; -/** - * Whether to enable XMLRPC Logging. - * - * @name xmlrpc_logging - * @var int|bool - */ -$xmlrpc_logging = 0; +// Allow for a plugin to insert a different class to handle requests. +$wp_xmlrpc_server_class = apply_filters('wp_xmlrpc_server_class', 'wp_xmlrpc_server'); +$wp_xmlrpc_server = new $wp_xmlrpc_server_class; + +// Fire off the request +$wp_xmlrpc_server->serve_request(); + +exit; /** * logIO() - Writes logging info to a file. * - * @uses $xmlrpc_logging - * @package WordPress - * @subpackage Logging + * @deprecated 3.4.0 + * @deprecated Use error_log() * * @param string $io Whether input or output * @param string $msg Information describing logging reason. - * @return bool Always return true */ -function logIO($io,$msg) { - global $xmlrpc_logging; - if ($xmlrpc_logging) { - $fp = fopen("../xmlrpc.log","a+"); - $date = gmdate("Y-m-d H:i:s "); - $iot = ($io == "I") ? " Input: " : " Output: "; - fwrite($fp, "\n\n".$date.$iot.$msg); - fclose($fp); - } - return true; -} - -if ( isset($HTTP_RAW_POST_DATA) ) - logIO("I", $HTTP_RAW_POST_DATA); - -// Make sure wp_die output is XML -add_filter( 'wp_die_handler', '_xmlrpc_wp_die_filter' ); - -// Allow for a plugin to insert a different class to handle requests. -$wp_xmlrpc_server_class = apply_filters('wp_xmlrpc_server_class', 'wp_xmlrpc_server'); -$wp_xmlrpc_server = new $wp_xmlrpc_server_class; - -// Fire off the request -$wp_xmlrpc_server->serve_request(); -?> \ No newline at end of file +function logIO( $io, $msg ) { + _deprecated_function( __FUNCTION__, '3.4', 'error_log()' ); + if ( ! empty( $GLOBALS['xmlrpc_logging'] ) ) + error_log( $io . ' - ' . $msg ); +} \ No newline at end of file